Merge pull request #28 from kitsunehunter/auto_reader_power
Automatically turn on connected HID reader when starting read functions
This commit is contained in:
commit
d5c329739a
@ -49,6 +49,7 @@ void wiegand_start_read(void *context)
|
||||
App *app = context;
|
||||
data_saved = false;
|
||||
bit_count = 0;
|
||||
furi_hal_power_enable_otg();
|
||||
furi_hal_gpio_init_simple(pinD0, GpioModeInterruptRiseFall);
|
||||
furi_hal_gpio_init_simple(pinD1, GpioModeInterruptRiseFall);
|
||||
furi_hal_gpio_add_int_callback(pinD0, wiegand_isr_d0, NULL);
|
||||
|
@ -51,6 +51,7 @@ static void wiegand_start_scan(void *context)
|
||||
UNUSED(context);
|
||||
data_saved = false;
|
||||
bit_count = 0;
|
||||
furi_hal_power_enable_otg();
|
||||
furi_hal_gpio_init_simple(pinD0, GpioModeInterruptRiseFall);
|
||||
furi_hal_gpio_init_simple(pinD1, GpioModeInterruptRiseFall);
|
||||
furi_hal_gpio_add_int_callback(pinD0, wiegand_scan_isr_d0, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user