mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge 2800a0bed5e6c99dce9b8782c2b08af519110672 into 0461e2ff88369c3da0d4caced31e8488f53376cd
This commit is contained in:
commit
856f292097
@ -728,8 +728,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_app_ctrl(uart_dev_t *hw)
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->conf0.sw_rts = 0;
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
||||
@ -746,12 +744,9 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_half_duplex(uart_dev_t *hw)
|
||||
hw->conf0.sw_rts = 1;
|
||||
// Half duplex mode
|
||||
hw->rs485_conf.tx_rx_en = 0;
|
||||
// Setting this bit will allow data to be transmitted while receiving data(full-duplex mode).
|
||||
// But note that this full-duplex mode has no conflict detection function
|
||||
hw->rs485_conf.rx_busy_tx_en = 0;
|
||||
// This is to void collision
|
||||
hw->rs485_conf.rx_busy_tx_en = 1;
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
||||
@ -769,8 +764,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_collision_detect(uart_dev_t *hw)
|
||||
hw->rs485_conf.tx_rx_en = 1;
|
||||
// Transmitter should send data when the receiver is busy,
|
||||
hw->rs485_conf.rx_busy_tx_en = 1;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->conf0.sw_rts = 0;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
@ -731,8 +731,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_app_ctrl(uart_dev_t *hw)
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->conf0.sw_rts = 0;
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
||||
@ -747,14 +745,11 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_half_duplex(uart_dev_t *hw)
|
||||
{
|
||||
// Enable receiver, sw_rts = 1 generates low level on RTS pin
|
||||
hw->conf0.sw_rts = 1;
|
||||
// Half duplex mode
|
||||
// Must be set to 0 to automatically remove echo
|
||||
hw->rs485_conf.tx_rx_en = 0;
|
||||
// Setting this bit will allow data to be transmitted while receiving data(full-duplex mode).
|
||||
// But note that this full-duplex mode has no conflict detection function
|
||||
hw->rs485_conf.rx_busy_tx_en = 0;
|
||||
// This is to void collision
|
||||
hw->rs485_conf.rx_busy_tx_en = 1;
|
||||
hw->conf0.irda_en = 0;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
||||
@ -772,8 +767,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_collision_detect(uart_dev_t *hw)
|
||||
hw->rs485_conf.tx_rx_en = 1;
|
||||
// Transmitter should send data when the receiver is busy,
|
||||
hw->rs485_conf.rx_busy_tx_en = 1;
|
||||
hw->rs485_conf.dl0_en = 1;
|
||||
hw->rs485_conf.dl1_en = 1;
|
||||
hw->conf0.sw_rts = 0;
|
||||
hw->rs485_conf.en = 1;
|
||||
}
|
||||
|
@ -1050,8 +1050,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_app_ctrl(uart_dev_t *hw)
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -1073,12 +1071,9 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_half_duplex(uart_dev_t *hw)
|
||||
hw->conf0_sync.sw_rts = 1;
|
||||
// Half duplex mode
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 0;
|
||||
// Setting this bit will allow data to be transmitted while receiving data(full-duplex mode).
|
||||
// But note that this full-duplex mode has no conflict detection function
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 0;
|
||||
// This is to void collision
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -1101,8 +1096,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_collision_detect(uart_dev_t *hw)
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 1;
|
||||
// Transmitter should send data when the receiver is busy,
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
|
@ -872,8 +872,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_app_ctrl(uart_dev_t *hw)
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -891,12 +889,9 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_half_duplex(uart_dev_t *hw)
|
||||
hw->conf0_sync.sw_rts = 1;
|
||||
// Half duplex mode
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 0;
|
||||
// Setting this bit will allow data to be transmitted while receiving data(full-duplex mode).
|
||||
// But note that this full-duplex mode has no conflict detection function
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 0;
|
||||
// This is to void collision
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -915,8 +910,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_collision_detect(uart_dev_t *hw)
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 1;
|
||||
// Transmitter should send data when the receiver is busy,
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
|
@ -1180,8 +1180,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_app_ctrl(uart_dev_t *hw)
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -1203,12 +1201,9 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_rs485_half_duplex(uart_dev_t *hw)
|
||||
hw->conf0_sync.sw_rts = 1;
|
||||
// Half duplex mode
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 0;
|
||||
// Setting this bit will allow data to be transmitted while receiving data(full-duplex mode).
|
||||
// But note that this full-duplex mode has no conflict detection function
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 0;
|
||||
// This is to void collision
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->conf0_sync.irda_en = 0;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
}
|
||||
@ -1231,8 +1226,6 @@ FORCE_INLINE_ATTR void uart_ll_set_mode_collision_detect(uart_dev_t *hw)
|
||||
hw->rs485_conf_sync.rs485tx_rx_en = 1;
|
||||
// Transmitter should send data when the receiver is busy,
|
||||
hw->rs485_conf_sync.rs485rxby_tx_en = 1;
|
||||
hw->rs485_conf_sync.dl0_en = 1;
|
||||
hw->rs485_conf_sync.dl1_en = 1;
|
||||
hw->conf0_sync.sw_rts = 0;
|
||||
hw->rs485_conf_sync.rs485_en = 1;
|
||||
uart_ll_update(hw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user