1 /*! 2 * \file pam7q.h 3 * 4 * \brief PAM7Q GPS receiver 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 __PAM7Q_H__ 24 #define __PAM7Q_H__ 25 26 #ifdef __cplusplus 27 extern "C" 28 { 29 #endif 30 31 #include <stdbool.h> 32 #include <stdint.h> 33 34 void PAM7QInit( void ); 35 36 uint8_t PAM7QGetDeviceAddr( void ); 37 38 void PAM7QSetDeviceAddr( uint8_t addr ); 39 40 bool PAM7QGetGpsData( uint8_t *nmeaString, uint8_t *nmeaStringSize, uint16_t nmeaMaxStringSize ); 41 42 uint8_t PAM7QWrite( uint8_t addr, uint8_t data ); 43 44 uint8_t PAM7QWriteBuffer( uint8_t addr, uint8_t *data, uint8_t size ); 45 46 uint8_t PAM7QRead( uint8_t addr, uint8_t *data ); 47 48 uint8_t PAM7QReadBuffer( uint8_t addr, uint8_t *data, uint8_t size ); 49 50 void GpsMcuOnPpsSignal( void ); 51 52 /* 53 * MPL3115A2 I2C address 54 */ 55 #define PAM7Q_I2C_ADDRESS 0x42 56 57 #define MESSAGE_SIZE_1 0xFD 58 #define MESSAGE_SIZE_2 0xFE 59 60 #define PAYLOAD 0xFF 61 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 #endif // __PAM7Q_H__ 68 69