stm32f1 suppport. changes

This commit is contained in:
livello
2018-07-19 05:44:27 +03:00
parent 09726be883
commit 40479ba2c8
12 changed files with 315 additions and 270 deletions

View File

@@ -41,6 +41,7 @@ unsigned long owTimer = 0;
owChangedType owChanged;
int owUpdate() {
#ifndef OWIRE_DISABLE
unsigned long finish = millis() + OW_UPDATE_INTERVAL;
short sr;
@@ -80,11 +81,12 @@ int owUpdate() {
Serial.print(F("1-wire count: "));
Serial.println(t_count);
#endif
}
int owSetup(owChangedType owCh) {
#ifndef OWIRE_DISABLE
//// todo - move memory allocation to here
if (net) return true; // Already initialized
#ifdef DS2482_100_I2C_TO_1W_BRIDGE
@@ -138,6 +140,7 @@ net = new OneWire (USE_1W_PIN);
delay(500);
#endif
}
@@ -182,6 +185,7 @@ int owFind(DeviceAddress addr) {
}
void owAdd(DeviceAddress addr) {
#ifndef OWIRE_DISABLE
if (t_count>=t_max) return;
wstat[t_count] = SW_FIND; //Newly detected
memcpy(term[t_count], addr, 8);
@@ -198,4 +202,5 @@ void owAdd(DeviceAddress addr) {
// sensors.requestTemperaturesByAddress(term[t_count]);
}
t_count++;
#endif
}