sx1261_com.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. / _____) _ | |
  3. ( (____ _____ ____ _| |_ _____ ____| |__
  4. \____ \| ___ | (_ _) ___ |/ ___) _ \
  5. _____) ) ____| | | || |_| ____( (___| | | |
  6. (______/|_____)_|_|_| \__)_____)\____)_| |_|
  7. (C)2019 Semtech
  8. Description:
  9. Functions used to handle the sx1261 radio used for LBT/Spectral Scan.
  10. License: Revised BSD License, see LICENSE.TXT file include in the project
  11. */
  12. #ifndef _SX1261_COM_H
  13. #define _SX1261_COM_H
  14. /* -------------------------------------------------------------------------- */
  15. /* --- DEPENDANCIES --------------------------------------------------------- */
  16. #include <stdint.h> /* C99 types*/
  17. #include "loragw_com.h"
  18. #include "sx1261_defs.h"
  19. #include "config.h" /* library configuration options (dynamically generated) */
  20. /* -------------------------------------------------------------------------- */
  21. /* --- PUBLIC MACROS -------------------------------------------------------- */
  22. /* -------------------------------------------------------------------------- */
  23. /* --- PUBLIC CONSTANTS ----------------------------------------------------- */
  24. /* -------------------------------------------------------------------------- */
  25. /* --- PUBLIC TYPES --------------------------------------------------------- */
  26. /* -------------------------------------------------------------------------- */
  27. /* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */
  28. /**
  29. *
  30. */
  31. int sx1261_com_open(lgw_com_type_t com_type, const char *com_path);
  32. /**
  33. *
  34. */
  35. int sx1261_com_close(void);
  36. /**
  37. *
  38. */
  39. int sx1261_com_w(sx1261_op_code_t op_code, uint8_t *data, uint16_t size);
  40. /**
  41. *
  42. */
  43. int sx1261_com_r(sx1261_op_code_t op_code, uint8_t *data, uint16_t size);
  44. /**
  45. *
  46. */
  47. int sx1261_com_set_write_mode(lgw_com_write_mode_t write_mode);
  48. /**
  49. *
  50. */
  51. int sx1261_com_flush(void);
  52. #endif
  53. /* --- EOF ------------------------------------------------------------------ */