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 26 #ifdef __cplusplus 27 extern "C" 28 { 29 #endif 30 31 #include "uart.h" 32 33 /*! 34 * Select the edge of the PPS signal which is used to start the 35 * reception of data on the UART. Depending of the GPS, the PPS 36 * signal may go low or high to indicate the presence of data 37 */ 38 typedef enum PpsTrigger_s 39 { 40 PpsTriggerIsRising = 0, 41 PpsTriggerIsFalling, 42 }PpsTrigger_t; 43 44 /*! 45 * \brief Low level handling of the PPS signal from the GPS receiver 46 */ 47 void GpsMcuOnPpsSignal( void* context ); 48 49 /*! 50 * \brief Invert the IRQ trigger edge on the PPS signal 51 */ 52 void GpsMcuInvertPpsTrigger( void ); 53 54 /*! 55 * \brief Low level Initialization of the UART and IRQ for the GPS 56 */ 57 void GpsMcuInit( void ); 58 59 /*! 60 * \brief Switch ON the GPS 61 */ 62 void GpsMcuStart( void ); 63 64 /*! 65 * \brief Switch OFF the GPS 66 */ 67 void GpsMcuStop( void ); 68 69 /*! 70 * Updates the GPS status 71 */ 72 void GpsMcuProcess( void ); 73 74 /*! 75 * \brief IRQ handler for the UART receiver 76 */ 77 void GpsMcuIrqNotify( UartNotifyId_t id ); 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif // __GPS_BOARD_H__ 84