Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / drivers / 1-wire.c
blob0811fed174466e8cc4ce7da181da33dda00d4127
2 #include <string.h>
4 #include "drivers/1-wire.h"
5 #include "drivers/1-wire/ds2482.h"
7 #ifdef USE_1WIRE
9 #ifdef USE_1WIRE_DS2482
10 static bool ds2482Detected = false;
11 static owDev_t ds2482Dev;
12 #endif
14 void owInit(void)
16 memset(&ds2482Dev, 0, sizeof(ds2482Dev));
17 #ifdef USE_1WIRE_DS2482
18 if (ds2482Detect(&ds2482Dev)) ds2482Detected = true;
19 #endif
22 owDev_t *getOwDev(void)
24 return ds2482Detected ? &ds2482Dev : NULL;
27 #endif /* USE_1WIRE */