Mergine master back into priv to continue work/debugging

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
A.M. Rowsell 2019-01-23 02:53:59 -05:00
commit 045e438b6e
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9
9 changed files with 44 additions and 141 deletions

View file

@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <stdint.h>
#include "os_type.h"
#include "osapi.h"
@ -5,7 +9,7 @@
#include "gpio.h"
#include "onewire.h"
#define OWBUS BIT5
#define OWBUS BIT5 /**< This define determines which pin is used */
sint8 ICACHE_FLASH_ATTR reset(void) {
uint32_t time;
@ -20,7 +24,7 @@ sint8 ICACHE_FLASH_ATTR reset(void) {
// give a 480uS pause so the next onewire event doesn't get trampled
time = system_get_time() + 480;
while(system_get_time() < time);
if(!presence) {
return 1;
} else {