[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:
@@ -1,6 +1,7 @@
|
||||
#include "ibutton.h"
|
||||
#include "ibutton_mode_dallas_read.h"
|
||||
#include "ibutton_mode_dallas_emulate.h"
|
||||
#include "ibutton_mode_dallas_write.h"
|
||||
#include "ibutton_mode_cyfral_read.h"
|
||||
#include "ibutton_mode_cyfral_emulate.h"
|
||||
|
||||
@@ -8,8 +9,9 @@
|
||||
void AppiButton::run() {
|
||||
mode[0] = new AppiButtonModeDallasRead(this);
|
||||
mode[1] = new AppiButtonModeDallasEmulate(this);
|
||||
mode[2] = new AppiButtonModeCyfralRead(this);
|
||||
mode[3] = new AppiButtonModeCyfralEmulate(this);
|
||||
mode[2] = new AppiButtonModeDallasWrite(this);
|
||||
mode[3] = new AppiButtonModeCyfralRead(this);
|
||||
mode[4] = new AppiButtonModeCyfralEmulate(this);
|
||||
|
||||
switch_to_mode(0);
|
||||
|
||||
@@ -21,6 +23,7 @@ void AppiButton::run() {
|
||||
gpio_init(red_led_record, GpioModeOutputOpenDrain);
|
||||
gpio_init(green_led_record, GpioModeOutputOpenDrain);
|
||||
|
||||
api_hal_timebase_insomnia_enter();
|
||||
app_ready();
|
||||
|
||||
AppiButtonEvent event;
|
||||
@@ -29,9 +32,10 @@ void AppiButton::run() {
|
||||
if(event.type == AppiButtonEvent::EventTypeKey) {
|
||||
// press events
|
||||
if(event.value.input.state && event.value.input.input == InputBack) {
|
||||
printf("[ibutton] bye!\n");
|
||||
// TODO remove all widgets create by app
|
||||
widget_enabled_set(widget, false);
|
||||
gui_remove_widget(gui, widget);
|
||||
api_hal_timebase_insomnia_exit();
|
||||
|
||||
osThreadExit();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user