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

Function initMtk

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

Source from the content-addressed store, hash-verified

283}
284
285bool initMtk(::Device* uart) {
286 // Initialize the L76K Chip, use GPS + GLONASS + BEIDOU
287 uart_controller_write_bytes(uart, (const uint8_t*)"$PCAS04,7*1E\r\n", 14, 250);
288 kernel::delayMillis(250);
289 // only ask for RMC and GGA
290 uart_controller_write_bytes(uart, (const uint8_t*)"$PCAS03,1,0,0,0,1,0,0,0,0,0,,,0,0*02\r\n", 38, 250);
291 kernel::delayMillis(250);
292 // Switch to Vehicle Mode, since SoftRF enables Aviation < 2g
293 uart_controller_write_bytes(uart, (const uint8_t*)"$PCAS11,3*1E\r\n", 14, 250);
294 kernel::delayMillis(250);
295 return true;
296}
297
298} // namespace tt::hal::gps

Callers 1

initFunction · 0.85

Calls 2

delayMillisFunction · 0.85

Tested by

no test coverage detected