drivers: gnss: lcx7g: Add Kconfigs for configurable buffers

Added Kconfigs to define the size of:
- UART backend receive buffer
- UART backend transmit buffer
- Satellites array size

and increased the UART RX buffer size a default to 256 as 128
is just on the edge of to small at a baudrate of 115200.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit is contained in:
Bjarki Arge Andreasen 2024-01-24 10:39:29 +01:00 committed by Fabio Baltieri
parent 41240f9fb1
commit 98d95851c6
2 changed files with 23 additions and 3 deletions

View file

@ -15,3 +15,23 @@ config GNSS_QUECTEL_LCX6G
select GNSS_NMEA0183_MATCH
help
Enable quectel LCX6G series GNSS modem driver.
if GNSS_QUECTEL_LCX6G
config GNSS_QUECTEL_LCX6G_UART_RX_BUF_SIZE
int "Size of UART backend receive buffer"
default 256
config GNSS_QUECTEL_LCX6G_UART_TX_BUF_SIZE
int "Size of UART backend transmit buffer"
default 64
if GNSS_SATELLITES
config GNSS_QUECTEL_LCX6G_SAT_ARRAY_SIZE
int "Size of GNSS satellites array"
default 24
endif # GNSS_SATELLITES
endif # GNSS_QUECTEL_LCX6G

View file

@ -44,14 +44,14 @@ struct quectel_lcx6g_config {
struct quectel_lcx6g_data {
struct gnss_nmea0183_match_data match_data;
#if CONFIG_GNSS_SATELLITES
struct gnss_satellite satellites[24];
struct gnss_satellite satellites[CONFIG_GNSS_QUECTEL_LCX6G_SAT_ARRAY_SIZE];
#endif
/* UART backend */
struct modem_pipe *uart_pipe;
struct modem_backend_uart uart_backend;
uint8_t uart_backend_receive_buf[128];
uint8_t uart_backend_transmit_buf[64];
uint8_t uart_backend_receive_buf[CONFIG_GNSS_QUECTEL_LCX6G_UART_RX_BUF_SIZE];
uint8_t uart_backend_transmit_buf[CONFIG_GNSS_QUECTEL_LCX6G_UART_TX_BUF_SIZE];
/* Modem chat */
struct modem_chat chat;