kopia lustrzana https://github.com/DL7AD/pecanpico10
Fixed GPS UART implementation
rodzic
54b9d1872f
commit
e1c937bff5
|
@ -49,12 +49,10 @@ bool gps_receive_byte(uint8_t *data) {
|
|||
I2C_read8(UBLOX_MAX_ADDRESS, 0xFF, data);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
if((*data = sdGetTimeout(&SD5, TIME_IMMEDIATE)) != MSG_TIMEOUT) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
#else
|
||||
return sdReadTimeout(&SD5, data, 1, TIME_IMMEDIATE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,7 +38,8 @@ typedef enum {
|
|||
#define UBLOX_MAX_ADDRESS 0x42
|
||||
|
||||
// You can either use I2C (TRUE) or UART (FALSE)
|
||||
#define UBLOX_USE_I2C TRUE
|
||||
#define UBLOX_USE_I2C FALSE
|
||||
#define UBLOX_USE_UART TRUE
|
||||
|
||||
#define isGPSLocked(pos) ((pos)->type == 3 && (pos)->num_svs >= 4 && (pos)->fixOK == true)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue