b.liu | 8f231a1 | 2024-05-31 17:55:06 +0800 | [diff] [blame] | 1 | /* |
| 2 | * gnss_utils.h |
| 3 | * |
| 4 | * GNSS utils header. |
| 5 | * |
| 6 | * Author : lb |
| 7 | * Date : 2024/5/28 11:27:34 |
| 8 | */ |
| 9 | #ifndef _GNSS_UTILS_H |
| 10 | #define _GNSS_UTILS_H |
| 11 | #include <libubus.h> |
| 12 | |
| 13 | #include "mbtk_type.h" |
| 14 | |
| 15 | int uart_baud_get(int baud); |
| 16 | |
| 17 | int gnss_port_open(const char *dev, int flag, int baud, bool tty); |
| 18 | |
| 19 | int gnss_port_close(int fd); |
| 20 | |
| 21 | int gnss_set_baudrate(int fd, int baudrate); |
| 22 | |
| 23 | uint16 get_crc16 (const char *ptr, uint16 count); |
| 24 | |
| 25 | int gnss_pty_open(int *master_fd, int *slave_fd, const char *dev); |
| 26 | |
| 27 | int gnss_nmea_sscanf(const char *str, char *ret,...); |
| 28 | |
| 29 | void gnssStartTimer(struct uloop_timeout *timeout, int timeVal); |
| 30 | |
| 31 | void gnssStopTimer(struct uloop_timeout *timeout); |
| 32 | |
| 33 | |
| 34 | #endif /* _GNSS_UTILS_H */ |