NFC refactoring (#3050)
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.
Starring:
- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer
Supporting roles:
- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance
Special thanks:
@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
2023-10-24 03:08:09 +00:00
|
|
|
#include "furi_hal_nfc_i.h"
|
|
|
|
|
|
|
|
#include <lib/drivers/st25r3916.h>
|
|
|
|
#include <furi_hal_resources.h>
|
|
|
|
|
2024-02-26 12:16:19 +00:00
|
|
|
static void furi_hal_nfc_int_callback(void* context) {
|
|
|
|
UNUSED(context);
|
NFC refactoring (#3050)
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.
Starring:
- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer
Supporting roles:
- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance
Special thanks:
@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
2023-10-24 03:08:09 +00:00
|
|
|
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);
|
2023-10-28 14:22:07 +00:00
|
|
|
furi_hal_gpio_init(&gpio_nfc_irq_rfid_pull, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
NFC refactoring (#3050)
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.
Starring:
- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer
Supporting roles:
- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance
Special thanks:
@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
2023-10-24 03:08:09 +00:00
|
|
|
}
|