Now for use with the ESP8285 and having GPIO16 as input!

This commit is contained in:
Charles Lohr 2016-07-04 16:59:34 -04:00
parent bc5c12acc8
commit ddcbe07e15
5 changed files with 13 additions and 1 deletions

View file

@ -226,6 +226,16 @@ void ICACHE_FLASH_ATTR user_init(void)
os_timer_setfn(&some_timer, (os_timer_func_t *)myTimer, NULL);
os_timer_arm(&some_timer, 100, 1);
//Set GPIO16 for Input
WRITE_PERI_REG(PAD_XPD_DCDC_CONF,
(READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); // mux configuration for XPD_DCDC and rtc_gpio0 connection
WRITE_PERI_REG(RTC_GPIO_CONF,
(READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0); //mux configuration for out enable
WRITE_PERI_REG(RTC_GPIO_ENABLE,
READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe); //out disable
InitColorChord(); //Init colorchord
StartHPATimer(); //Init the high speed ADC timer.