MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / initUc6580

Function initUc6580

Tactility/Source/hal/gps/GpsInit.cpp:193–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193bool initUc6580(::Device* uart) {
194 // The Unicore UC6580 can use a lot of sat systems, enable it to
195 // use GPS L1 & L5 + BDS B1I & B2a + GLONASS L1 + GALILEO E1 & E5a + SBAS + QZSS
196 // This will reset the receiver, so wait a bit afterwards
197 // The paranoid will wait for the OK*04 confirmation response after each command.
198 uart_controller_write_bytes(uart, (const uint8_t*)"$CFGSYS,h35155\r\n", 16, 250);
199 kernel::delayMillis(750);
200 // Must be done after the CFGSYS command
201 // Turn off GSV messages, we don't really care about which and where the sats are, maybe someday.
202 uart_controller_write_bytes(uart, (const uint8_t*)"$CFGMSG,0,3,0\r\n", 15, 250);
203 kernel::delayMillis(250);
204 // Turn off GSA messages, TinyGPS++ doesn't use this message.
205 uart_controller_write_bytes(uart, (const uint8_t*)"$CFGMSG,0,2,0\r\n", 15, 250);
206 kernel::delayMillis(250);
207 // Turn off NOTICE __TXT messages, these may provide Unicore some info but we don't care.
208 uart_controller_write_bytes(uart, (const uint8_t*)"$CFGMSG,6,0,0\r\n", 15, 250);
209 kernel::delayMillis(250);
210 uart_controller_write_bytes(uart, (const uint8_t*)"$CFGMSG,6,1,0\r\n", 15, 250);
211 kernel::delayMillis(250);
212 return true;
213}
214
215bool initAtgm336h(::Device* uart) {
216 uint8_t buffer[256];

Callers 1

initFunction · 0.85

Calls 2

delayMillisFunction · 0.85

Tested by

no test coverage detected