Updated formatting with astyle -A14 -S
Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
parent
3de8cc9ed7
commit
7c5dfae57b
7 changed files with 651 additions and 638 deletions
20
dht.c
20
dht.c
|
@ -8,20 +8,20 @@
|
|||
#define DHTBus BIT4
|
||||
|
||||
LOCAL uint8_t ICACHE_FLASH_ATTR getBitNum(uint32_t bit) {
|
||||
uint32_t localBit = bit;
|
||||
for(uint8_t i = 0; i <= 16; i++) {
|
||||
localBit >>= i;
|
||||
if(bit & 0x01) {
|
||||
return i;
|
||||
uint32_t localBit = bit;
|
||||
for(uint8_t i = 0; i <= 16; i++) {
|
||||
localBit >>= i;
|
||||
if(bit & 0x01) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1; // if we reached this spot we received a bad number
|
||||
return -1; // if we reached this spot we received a bad number
|
||||
}
|
||||
void ICACHE_FLASH_ATTR setupDHT(void) {
|
||||
gpio_output_set(0, DHTBus, 0, DHTBus); // set up DHTBus as active low output
|
||||
ETS_GPIO_INTR_ATTACH(func, NULL);
|
||||
gpio_output_set(0, DHTBus, 0, DHTBus); // set up DHTBus as active low output
|
||||
ETS_GPIO_INTR_ATTACH(func, NULL);
|
||||
}
|
||||
|
||||
void ICACHE_FLASH_ATTR getDHTData(void) {
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue