In a recent project I updated a previously shared .basinc module, so that now M2 chips can also obtain an accurate GPS time with it.
Previously, only supported X2 chips were supported because hserin was used with Scratchpad RAM. In the update it's now possible to use either serial, hserial with buffer and peeksfr, or hserial with Scratchpad. The module communicates to a NEO-M8N board at 9,600bps, so unless Scratchpad is used the M2 or X2 clock rate needs to be set to at least 16MHz.
I hope someone may have a use for it. You can either rename the attached file to have a .basinc extension, or download the master copy from GitHub here. The file itself contains inline documentation and looks quite long but it only consumes about 200 bytes of program space.
Previously, only supported X2 chips were supported because hserin was used with Scratchpad RAM. In the update it's now possible to use either serial, hserial with buffer and peeksfr, or hserial with Scratchpad. The module communicates to a NEO-M8N board at 9,600bps, so unless Scratchpad is used the M2 or X2 clock rate needs to be set to at least 16MHz.
I hope someone may have a use for it. You can either rename the attached file to have a .basinc extension, or download the master copy from GitHub here. The file itself contains inline documentation and looks quite long but it only consumes about 200 bytes of program space.