loragw_debug.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. / _____) _ | |
  3. ( (____ _____ ____ _| |_ _____ ____| |__
  4. \____ \| ___ | (_ _) ___ |/ ___) _ \
  5. _____) ) ____| | | || |_| ____( (___| | | |
  6. (______/|_____)_|_|_| \__)_____)\____)_| |_|
  7. (C)2019 Semtech
  8. Description:
  9. LoRa concentrator HAL debug functions
  10. License: Revised BSD License, see LICENSE.TXT file include in the project
  11. */
  12. #ifndef _LORAGW_DBG_H
  13. #define _LORAGW_DBG_H
  14. /* -------------------------------------------------------------------------- */
  15. /* --- DEPENDANCIES --------------------------------------------------------- */
  16. #include "config.h" /* library configuration options (dynamically generated) */
  17. /* -------------------------------------------------------------------------- */
  18. /* --- PUBLIC MACROS -------------------------------------------------------- */
  19. /* -------------------------------------------------------------------------- */
  20. /* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */
  21. /**
  22. @brief
  23. @param
  24. */
  25. void dbg_log_buffer_to_file(FILE * file, uint8_t * buffer, uint16_t size);
  26. /**
  27. @brief
  28. @param
  29. */
  30. void dbg_log_payload_diff_to_file(FILE * file, uint8_t * buffer1, uint8_t * buffer2, uint16_t size);
  31. /**
  32. @brief
  33. @param
  34. */
  35. void dbg_init_random(void);
  36. /**
  37. @brief
  38. @param
  39. */
  40. void dbg_generate_random_payload(uint32_t pkt_cnt, uint8_t * buffer_expected, uint8_t size);
  41. /**
  42. @brief
  43. @param
  44. */
  45. int dbg_check_payload(struct lgw_conf_debug_s * context, FILE * file, uint8_t * payload_received, uint8_t size, uint8_t ref_payload_idx, uint8_t sf);
  46. #endif
  47. /* --- EOF ------------------------------------------------------------------ */