api-hal-nfc.h 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 listen
  39. */
  40. bool api_hal_nfc_listen(uint32_t timeout);
  41. /**
  42. * NFC data exchange
  43. */
  44. ReturnCode api_hal_nfc_data_exchange(uint8_t* tx_buff, uint16_t tx_len, uint8_t** rx_buff, uint16_t** rx_len, bool deactivate);
  45. /**
  46. * NFC deactivate and start sleep
  47. */
  48. void api_hal_nfc_deactivate();
  49. #ifdef __cplusplus
  50. }
  51. #endif