[FL-85][FL-446][FL-720] Dallas key blanks and OneWire lib rework (#313)

* sepate one wire class
* TM2004 writer
* app mode write ds1990
* test another blanks protocol
* new ibutton slave
* one wire states
* tim1 capture compare and update interrupts
* interrupt mgr, new timers IRQ
* discard HAL_TIM_PeriodElapsedCallback from main
* add exti_14 line
* add external interrupt callback
* use int mgr in input
* better interrupt managment
* add interrupt callback enable and disable fns
* properly init app
* changed timings
* rename one wire classes
* use new owb classes
* properly remove interrupts
* new blanks writer
* remove unused tests
* new core includes
* extern c guard
* fix api_interrupt_remove usage
* remove debug info, new way to detect blanks writing
* remove copy constructor
* change keys template
* fix app sources recipe
This commit is contained in:
DrZlo13
2021-01-28 22:30:31 +10:00
committed by GitHub
parent a7951ade69
commit cf1c8fb223
31 changed files with 1099 additions and 869 deletions

View File

@@ -1,8 +1,5 @@
#include "one_wire_device.h"
// TODO fix GPL compability
// currently we use rework of OneWireHub
OneWireDevice::OneWireDevice(
uint8_t id_1,
uint8_t id_2,
@@ -21,6 +18,22 @@ OneWireDevice::OneWireDevice(
id_storage[7] = maxim_crc8(id_storage, 7);
}
void OneWireDevice::send_id(OneWireGpioSlave* owner) const {
owner->send(id_storage, 8);
OneWireDevice::~OneWireDevice() {
if(bus != nullptr) {
bus->deattach();
}
}
void OneWireDevice::send_id() const {
if(bus != nullptr) {
bus->send(id_storage, 8);
}
}
void OneWireDevice::attach(OneWireSlave* _bus) {
bus = _bus;
}
void OneWireDevice::deattach(void) {
bus = nullptr;
}