mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
[FL-3629] fbt: reworked assets & resources handling (#3160)
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
28
targets/f7/furi_hal/furi_hal_nfc_irq.c
Normal file
28
targets/f7/furi_hal/furi_hal_nfc_irq.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "furi_hal_nfc_i.h"
|
||||
|
||||
#include <lib/drivers/st25r3916.h>
|
||||
#include <furi_hal_resources.h>
|
||||
|
||||
static void furi_hal_nfc_int_callback() {
|
||||
furi_hal_nfc_event_set(FuriHalNfcEventInternalTypeIrq);
|
||||
}
|
||||
|
||||
uint32_t furi_hal_nfc_get_irq(FuriHalSpiBusHandle* handle) {
|
||||
uint32_t irq = 0;
|
||||
while(furi_hal_gpio_read_port_pin(gpio_nfc_irq_rfid_pull.port, gpio_nfc_irq_rfid_pull.pin)) {
|
||||
irq |= st25r3916_get_irq(handle);
|
||||
}
|
||||
return irq;
|
||||
}
|
||||
|
||||
void furi_hal_nfc_init_gpio_isr() {
|
||||
furi_hal_gpio_init(
|
||||
&gpio_nfc_irq_rfid_pull, GpioModeInterruptRise, GpioPullDown, GpioSpeedVeryHigh);
|
||||
furi_hal_gpio_add_int_callback(&gpio_nfc_irq_rfid_pull, furi_hal_nfc_int_callback, NULL);
|
||||
furi_hal_gpio_enable_int_callback(&gpio_nfc_irq_rfid_pull);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_deinit_gpio_isr() {
|
||||
furi_hal_gpio_remove_int_callback(&gpio_nfc_irq_rfid_pull);
|
||||
furi_hal_gpio_init(&gpio_nfc_irq_rfid_pull, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
||||
}
|
||||
Reference in New Issue
Block a user