b.liu | 42f558e | 2024-07-18 14:06:49 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * gnss_n50db.c |
| 3 | * |
| 4 | * MBTK N50-DB GNSS support source file. |
| 5 | * |
| 6 | */ |
| 7 | /****************************************************************************** |
| 8 | |
| 9 | EDIT HISTORY FOR FILE |
| 10 | |
| 11 | WHEN WHO WHAT,WHERE,WHY |
| 12 | -------- -------- ------------------------------------------------------- |
| 13 | 2024/7/18 LiuBin Initial version |
| 14 | |
| 15 | ******************************************************************************/ |
| 16 | #include <stdio.h> |
| 17 | #include <stdlib.h> |
| 18 | #include <unistd.h> |
| 19 | #include <errno.h> |
| 20 | #include <fcntl.h> |
| 21 | #include <pthread.h> |
| 22 | |
| 23 | #include "gnss_n50db.h" |
| 24 | #include "gnss_utils.h" |
| 25 | #include "mbtk_log.h" |
| 26 | |
| 27 | #define UART_BITRATE_NMEA_DEF_FW 115200 // Default bitrate. |
| 28 | |
| 29 | int gnss_n50db_dev_open() |
| 30 | { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | int gnss_n50db_dev_close(int fd) |
| 35 | { |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | int gnss_n50db_open(const char *dev) |
| 40 | { |
| 41 | return gnss_port_open(dev, O_RDWR | O_NONBLOCK | O_NOCTTY, UART_BITRATE_NMEA_DEF_FW, TRUE); |
| 42 | } |
| 43 | |
| 44 | int gnss_n50db_close(int fd) |
| 45 | { |
| 46 | return gnss_port_close(fd); |
| 47 | } |
| 48 | |
| 49 | int gnss_n50db_fw_dl(int fd, const char *fw_name, const char *dev) |
| 50 | { |
| 51 | return GNSS_ERR_UNSUPPORT; |
| 52 | } |
| 53 | |
| 54 | void gnss_n50db_set_cb(const void *data, int data_len) |
| 55 | { |
| 56 | UNUSED(data); |
| 57 | UNUSED(data_len); |
| 58 | } |
| 59 | |
| 60 | gnss_err_enum gnss_n50db_set(int fd, const char *cmd, void *cmd_rsp, int cmd_rsp_len) |
| 61 | { |
| 62 | return GNSS_ERR_UNSUPPORT; |
| 63 | } |
| 64 | |