[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:
@@ -3,10 +3,10 @@
|
||||
|
||||
class __OneWireTiming {
|
||||
public:
|
||||
constexpr static const uint16_t TIMING_A = 6;
|
||||
constexpr static const uint16_t TIMING_A = 9;
|
||||
constexpr static const uint16_t TIMING_B = 64;
|
||||
constexpr static const uint16_t TIMING_C = 60;
|
||||
constexpr static const uint16_t TIMING_D = 10;
|
||||
constexpr static const uint16_t TIMING_C = 64;
|
||||
constexpr static const uint16_t TIMING_D = 14;
|
||||
constexpr static const uint16_t TIMING_E = 9;
|
||||
constexpr static const uint16_t TIMING_F = 55;
|
||||
constexpr static const uint16_t TIMING_G = 0;
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
constexpr static const uint16_t WRITE_0_DRIVE = __OneWireTiming::TIMING_C;
|
||||
constexpr static const uint16_t WRITE_0_RELEASE = __OneWireTiming::TIMING_D;
|
||||
|
||||
constexpr static const uint16_t READ_DRIVE = __OneWireTiming::TIMING_A;
|
||||
constexpr static const uint16_t READ_DRIVE = 3;
|
||||
constexpr static const uint16_t READ_RELEASE = __OneWireTiming::TIMING_E;
|
||||
constexpr static const uint16_t READ_DELAY_POST = __OneWireTiming::TIMING_F;
|
||||
|
||||
@@ -37,18 +37,17 @@ typedef uint32_t OneWiteTimeType;
|
||||
|
||||
class OneWireEmulateTiming {
|
||||
public:
|
||||
constexpr static const OneWiteTimeType RESET_TIMEOUT = {5000};
|
||||
constexpr static const OneWiteTimeType RESET_MIN[2] = {430, 48};
|
||||
constexpr static const OneWiteTimeType RESET_MAX[2] = {960, 80};
|
||||
constexpr static const OneWiteTimeType RESET_MIN = 430;
|
||||
constexpr static const OneWiteTimeType RESET_MAX = 960;
|
||||
|
||||
constexpr static const OneWiteTimeType PRESENCE_TIMEOUT = {20};
|
||||
constexpr static const OneWiteTimeType PRESENCE_MIN[2] = {160, 8};
|
||||
constexpr static const OneWiteTimeType PRESENCE_MAX[2] = {480, 32};
|
||||
constexpr static const OneWiteTimeType PRESENCE_TIMEOUT = 20;
|
||||
constexpr static const OneWiteTimeType PRESENCE_MIN = 160;
|
||||
constexpr static const OneWiteTimeType PRESENCE_MAX = 480;
|
||||
|
||||
constexpr static const OneWiteTimeType MSG_HIGH_TIMEOUT = {15000};
|
||||
constexpr static const OneWiteTimeType SLOT_MAX[2] = {135, 30};
|
||||
constexpr static const OneWiteTimeType MSG_HIGH_TIMEOUT = 15000;
|
||||
constexpr static const OneWiteTimeType SLOT_MAX = 135;
|
||||
|
||||
constexpr static const OneWiteTimeType READ_MIN[2] = {20, 4};
|
||||
constexpr static const OneWiteTimeType READ_MAX[2] = {60, 10};
|
||||
constexpr static const OneWiteTimeType WRITE_ZERO[2] = {30, 8};
|
||||
constexpr static const OneWiteTimeType READ_MIN = 20;
|
||||
constexpr static const OneWiteTimeType READ_MAX = 60;
|
||||
constexpr static const OneWiteTimeType WRITE_ZERO = 30;
|
||||
};
|
Reference in New Issue
Block a user