[FL-84] iButton app, dallas emulate + cyfral read, cyfral emulate (#253)
* maxim crc function * one wire template device and ds1990 classes * 3 fields for addr * cyfral emulator lib * add cyfral read mode, refract rendering and events * add ADC1_IN14, add adc interrupt * cyfral read mode * rename and move api-hal includes folder * build onewire libs only if we build app * start in mode 0
This commit is contained in:
27
lib/onewire/one_wire_device_ds_1990.cpp
Normal file
27
lib/onewire/one_wire_device_ds_1990.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "one_wire_device_ds_1990.h"
|
||||
|
||||
// TODO fix GPL compability
|
||||
// currently we use rework of OneWireHub
|
||||
|
||||
DS1990::DS1990(
|
||||
uint8_t ID1,
|
||||
uint8_t ID2,
|
||||
uint8_t ID3,
|
||||
uint8_t ID4,
|
||||
uint8_t ID5,
|
||||
uint8_t ID6,
|
||||
uint8_t ID7)
|
||||
: OneWireDevice(ID1, ID2, ID3, ID4, ID5, ID6, ID7) {
|
||||
}
|
||||
|
||||
void DS1990::do_work(OneWireGpioSlave* owner) {
|
||||
uint8_t cmd;
|
||||
|
||||
if(owner->receive(&cmd)) return;
|
||||
|
||||
switch(cmd) {
|
||||
default:
|
||||
return;
|
||||
//owner->raiseSlaveError(cmd);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user