Splitting library into own file. Adding onewire.
The mqtt.c file was getting pretty big, so the example code is now in main.c. Also, we need a onewire library, so I've started to write on in onewire.c. We will need to make some changes to the Makefile as well, but I will need to consult a couple of resources for that. Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
parent
c8bff5cace
commit
70cf55efdf
6 changed files with 185 additions and 111 deletions
38
onewire.c
Normal file
38
onewire.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <stdint.h>
|
||||
#include "gpio.h"
|
||||
#include "hw_timer.c"
|
||||
#include "onewire.h"
|
||||
|
||||
LOCAL void timerISR(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOCAL void reset(oneWire_t *owDev) {
|
||||
// reset the ow line, check for presence?
|
||||
}
|
||||
|
||||
LOCAL void ICACHE_FLASH_ATTR transact(oneWire_t *owDev, ds18b20_cmds cmd) {
|
||||
switch(cmd) {
|
||||
case READ_ROM:
|
||||
break;
|
||||
case MATCH_ROM:
|
||||
break;
|
||||
case SEARCH_ROM:
|
||||
break;
|
||||
case ALARM_SEARCH:
|
||||
break;
|
||||
case SKIP_ROM:
|
||||
break;
|
||||
case CONVERT_T:
|
||||
break;
|
||||
case SCRATCH_READ:
|
||||
break;
|
||||
case SCRATCH_WRITE:
|
||||
break;
|
||||
case SCRATCH_COPY:
|
||||
break;
|
||||
case E2_RECALL:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue