Merge pull request #724 from DiUS/more-wdt-fixup

Fix newly introduced incorrect WDT feeding.
This commit is contained in:
Terry Ellison 2015-11-04 10:52:49 +00:00
commit 6b8c7f4b8e
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ static int ICACHE_FLASH_ATTR hx711_read(lua_State* L) {
//wait for data ready. or time out. //wait for data ready. or time out.
//TODO: set pin inturrupt and come back to it. This may take up to 1/10 sec //TODO: set pin inturrupt and come back to it. This may take up to 1/10 sec
// or maybe just make an async version too and have both available. // or maybe just make an async version too and have both available.
WRITE_PERI_REG(0x60000914, 0x73); //clear WDT... this may take a while. system_soft_wdt_feed(); //clear WDT... this may take a while.
for (i = 0; i<HX711_MAX_WAIT && platform_gpio_read(data_pin)==1;i++){ for (i = 0; i<HX711_MAX_WAIT && platform_gpio_read(data_pin)==1;i++){
asm ("nop"); asm ("nop");
} }