This library is developed in order to parse NMEA0183 string produced by GPS sensor and it use libohiboard as low level driver framework. This library is an evolutions of https://github.com/warcomeb/gpsnmea-embedded.
ChangeLog
- v1.0.0 of 2022/03/04 - First release
External Library
The library use the following external library:
Example
{
{
Uart_sendStringln(OB_UART2,"RMC");
}
{
Uart_sendStringln(OB_UART2,"GGA");
}
}
void main (void)
{
Clock_Config clkConfig =
{
.source = CLOCK_INTERNAL_HSI | CLOCK_EXTERNAL_LSE_CRYSTAL,
.sysSource = CLOCK_SYSTEMSOURCE_HSI,
.hsiState = CLOCK_OSCILLATORSTATE_ON,
.lsiState = CLOCK_OSCILLATORSTATE_OFF,
.lseState = CLOCK_OSCILLATORSTATE_ON,
.output = CLOCK_OUTPUT_SYSCLK | CLOCK_OUTPUT_HCLK | CLOCK_OUTPUT_PCLK1 | CLOCK_OUTPUT_PCLK2,
.ahbDivider = CLOCK_AHBDIVIDER_1,
.apb1Divider = CLOCK_APBDIVIDER_1,
.apb2Divider = CLOCK_APBDIVIDER_1,
};
Uart_Config uart1Config =
{
.clockSource = UART_CLOCKSOURCE_SYSCLK,
.mode = UART_MODE_BOTH,
.rxPin = UART_PINS_PA10,
.txPin = UART_PINS_PA9,
.baudrate = 9600,
.dataBits = UART_DATABITS_EIGHT,
.flowControl = UART_FLOWCONTROL_NONE,
.parity = UART_PARITY_NONE,
.stop = UART_STOPBITS_ONE,
};
Uart_Config uartOutConfig =
{
.clockSource = UART_CLOCKSOURCE_SYSCLK,
.mode = UART_MODE_BOTH,
.rxPin = UART_PINS_PA3,
.txPin = UART_PINS_PA2,
.baudrate = 115200,
.dataBits = UART_DATABITS_EIGHT,
.flowControl = UART_FLOWCONTROL_NONE,
.parity = UART_PARITY_NONE,
.stop = UART_STOPBITS_ONE,
};
Clock_init(&clkConfig);
Uart_init(OB_UART1, &uart1Config);
Uart_init(OB_UART2, &uartOutConfig);
{
.gga = cb,
};
while (1)
{
}
}
Credits
- Marco Giammarini (warcomeb)
License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.