LRAT - UBloxGPS

Dependents:   LRAT-example-lorawan-REFACTOR-and-CLEAN-Branch

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers neo-m8m.h Source File

neo-m8m.h

00001 #ifndef NEO_M8M_H_
00002 #define NEO_M8M_H_
00003 
00004 #include "mbed.h"
00005 
00006 /*
00007  * Custom NEO-M8M library used into interact with the
00008  * UBlox NEO-M8M GPS module on the LRAT and Disco Prototype Board
00009  */
00010 
00011 class NeoM8M
00012 {   
00013     public:
00014     
00015         /**
00016          */
00017         NeoM8M();
00018         
00019         /**
00020          */
00021         NeoM8M(I2C *_i2c);
00022         
00023         /**
00024          */
00025         virtual ~NeoM8M();
00026         
00027         /**
00028          */
00029         void setI2C(I2C *_i2c);
00030         
00031         /**
00032          */
00033         void init(char *_buf, uint8_t *_pos, uint32_t *_mytime, double *_mylat, double *_mylon);
00034         
00035         /**
00036          */
00037         int read();
00038         
00039         /**
00040          */
00041         void sleep();
00042         
00043         /**
00044          */
00045         void wake();
00046 
00047         /**
00048          */
00049         void ubxRead();
00050         
00051         /**
00052          */
00053         char *buf;
00054         double *mylat;
00055         double *mylon;
00056         uint8_t *pos;
00057         uint32_t *mytime;
00058         
00059         /**
00060          */
00061         static char sleepCommand[12];
00062         static char wakeCommand[12];
00063         static char resetDefaults[21];
00064         
00065     private:
00066         
00067         /**
00068          */
00069         void executeCommand(char *command, int length);
00070         
00071         /**
00072          */
00073         I2C *i2c;
00074 };
00075 
00076 #endif