api-hal-nfc.h 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #pragma once
  2. #include <rfal_nfc.h>
  3. #include <st_errno.h>
  4. #include <stdbool.h>
  5. #include <stdint.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. /**
  10. * Init nfc
  11. */
  12. ReturnCode api_hal_nfc_init();
  13. /**
  14. * Check if nfc worker is busy
  15. */
  16. bool api_hal_nfc_is_busy();
  17. /**
  18. * NFC field on
  19. */
  20. void api_hal_nfc_field_on();
  21. /**
  22. * NFC field off
  23. */
  24. void api_hal_nfc_field_off();
  25. /**
  26. * NFC start sleep
  27. */
  28. void api_hal_nfc_start_sleep();
  29. /**
  30. * NFC stop sleep
  31. */
  32. void api_hal_nfc_exit_sleep();
  33. /**
  34. * NFC poll
  35. */
  36. bool api_hal_nfc_detect(rfalNfcDevice** dev_list, uint8_t* dev_cnt, uint32_t cycles, bool deactivate);
  37. /**
  38. * NFC data exchange
  39. */
  40. ReturnCode api_hal_nfc_data_exchange(rfalNfcDevice* dev, uint8_t* tx_buff, uint16_t tx_len, uint8_t** rx_buff, uint16_t** rx_len, bool deactivate);
  41. /**
  42. * NFC deactivate and start sleep
  43. */
  44. void api_hal_nfc_deactivate();
  45. #ifdef __cplusplus
  46. }
  47. #endif