Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
1.7 KiB

  1. /*!
  2. * \file gps-board.h
  3. *
  4. * \brief Target board GPS driver implementation
  5. *
  6. * \copyright Revised BSD License, see section \ref LICENSE.
  7. *
  8. * \code
  9. * ______ _
  10. * / _____) _ | |
  11. * ( (____ _____ ____ _| |_ _____ ____| |__
  12. * \____ \| ___ | (_ _) ___ |/ ___) _ \
  13. * _____) ) ____| | | || |_| ____( (___| | | |
  14. * (______/|_____)_|_|_| \__)_____)\____)_| |_|
  15. * (C)2013-2017 Semtech
  16. *
  17. * \endcode
  18. *
  19. * \author Miguel Luis ( Semtech )
  20. *
  21. * \author Gregory Cristian ( Semtech )
  22. */
  23. #ifndef __GPS_BOARD_H__
  24. #define __GPS_BOARD_H__
  25. #ifdef __cplusplus
  26. extern "C"
  27. {
  28. #endif
  29. #include "uart.h"
  30. /*!
  31. * Select the edge of the PPS signal which is used to start the
  32. * reception of data on the UART. Depending of the GPS, the PPS
  33. * signal may go low or high to indicate the presence of data
  34. */
  35. typedef enum PpsTrigger_s
  36. {
  37. PpsTriggerIsRising = 0,
  38. PpsTriggerIsFalling,
  39. }PpsTrigger_t;
  40. /*!
  41. * \brief Low level handling of the PPS signal from the GPS receiver
  42. */
  43. void GpsMcuOnPpsSignal( void* context );
  44. /*!
  45. * \brief Invert the IRQ trigger edge on the PPS signal
  46. */
  47. void GpsMcuInvertPpsTrigger( void );
  48. /*!
  49. * \brief Low level Initialization of the UART and IRQ for the GPS
  50. */
  51. void GpsMcuInit( void );
  52. /*!
  53. * \brief Switch ON the GPS
  54. */
  55. void GpsMcuStart( void );
  56. /*!
  57. * \brief Switch OFF the GPS
  58. */
  59. void GpsMcuStop( void );
  60. /*!
  61. * Updates the GPS status
  62. */
  63. void GpsMcuProcess( void );
  64. /*!
  65. * \brief IRQ handler for the UART receiver
  66. */
  67. void GpsMcuIrqNotify( UartNotifyId_t id );
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif // __GPS_BOARD_H__