mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
@@ -45,16 +45,19 @@ void platformDisableIrqCallback() {
|
|||||||
|
|
||||||
void platformSetIrqCallback(PlatformIrqCallback callback) {
|
void platformSetIrqCallback(PlatformIrqCallback callback) {
|
||||||
rfal_platform.callback = callback;
|
rfal_platform.callback = callback;
|
||||||
rfal_platform.thread =
|
|
||||||
furi_thread_alloc_ex("RfalIrqDriver", 1024, rfal_platform_irq_thread, NULL);
|
|
||||||
furi_thread_mark_as_service(rfal_platform.thread);
|
|
||||||
furi_thread_set_priority(rfal_platform.thread, FuriThreadPriorityIsr);
|
|
||||||
furi_thread_start(rfal_platform.thread);
|
|
||||||
|
|
||||||
furi_hal_gpio_add_int_callback(&gpio_nfc_irq_rfid_pull, nfc_isr, NULL);
|
if(!rfal_platform.thread) {
|
||||||
// Disable interrupt callback as the pin is shared between 2 apps
|
rfal_platform.thread =
|
||||||
// It is enabled in rfalLowPowerModeStop()
|
furi_thread_alloc_ex("RfalIrqDriver", 1024, rfal_platform_irq_thread, NULL);
|
||||||
furi_hal_gpio_disable_int_callback(&gpio_nfc_irq_rfid_pull);
|
furi_thread_mark_as_service(rfal_platform.thread);
|
||||||
|
furi_thread_set_priority(rfal_platform.thread, FuriThreadPriorityIsr);
|
||||||
|
furi_thread_start(rfal_platform.thread);
|
||||||
|
|
||||||
|
furi_hal_gpio_add_int_callback(&gpio_nfc_irq_rfid_pull, nfc_isr, NULL);
|
||||||
|
// Disable interrupt callback as the pin is shared between 2 apps
|
||||||
|
// It is enabled in rfalLowPowerModeStop()
|
||||||
|
furi_hal_gpio_disable_int_callback(&gpio_nfc_irq_rfid_pull);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool platformSpiTxRx(const uint8_t* txBuf, uint8_t* rxBuf, uint16_t len) {
|
bool platformSpiTxRx(const uint8_t* txBuf, uint8_t* rxBuf, uint16_t len) {
|
||||||
|
|||||||
Reference in New Issue
Block a user