drivers: modem: ublox-sara-r4: inform modem_context about HW flow control
If HW flow control is enabled, then modem_context framework won't drain UART FIFO blindly, but will stop when there is no more space in RX ring_buf. This prevents data loss by "pausing" incoming data on hardware level. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
f27de1f1bb
commit
ad0dc48067
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,7 @@ static struct modem_pin modem_pins[] = {
|
|||
};
|
||||
|
||||
#define MDM_UART_DEV_NAME DT_INST_BUS_LABEL(0)
|
||||
#define MDM_UART_NODE DT_BUS(DT_DRV_INST(0))
|
||||
|
||||
#define MDM_POWER_ENABLE 1
|
||||
#define MDM_POWER_DISABLE 0
|
||||
|
@ -1754,6 +1755,8 @@ static int modem_init(const struct device *dev)
|
|||
}
|
||||
|
||||
/* modem interface */
|
||||
mdata.iface_data.hw_flow_control = DT_PROP(MDM_UART_NODE,
|
||||
hw_flow_control);
|
||||
mdata.iface_data.rx_rb_buf = &mdata.iface_rb_buf[0];
|
||||
mdata.iface_data.rx_rb_buf_len = sizeof(mdata.iface_rb_buf);
|
||||
ret = modem_iface_uart_init(&mctx.iface, &mdata.iface_data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue