Skip to content

Commit 7a2f6a8

Browse files
committed
Merge branch 'fix/twai_hid_provider_word_ctu' into 'master'
fix(driver_twai): hide the provider keyword ctu in idf See merge request espressif/esp-idf!42142
2 parents 57013ba + cee5416 commit 7a2f6a8

File tree

12 files changed

+138
-138
lines changed

12 files changed

+138
-138
lines changed

components/driver/twai/linker.lf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ entries:
1111
archive: libhal.a
1212
entries:
1313
if TWAI_ISR_IN_IRAM = y:
14-
twai_hal_sja1000: twai_hal_decode_interrupt (noflash)
15-
twai_hal_sja1000: twai_hal_get_events (noflash)
16-
twai_hal_sja1000: twai_hal_format_frame (noflash)
17-
twai_hal_sja1000: twai_hal_parse_frame (noflash)
18-
twai_hal_sja1000: twai_hal_set_tx_buffer_and_transmit (noflash)
19-
twai_hal_sja1000: twai_hal_get_rx_msg_count (noflash)
20-
twai_hal_sja1000: twai_hal_read_rx_fifo (noflash)
21-
twai_hal_sja1000: twai_hal_check_state_flags (noflash)
14+
twai_hal_v1: twai_hal_decode_interrupt (noflash)
15+
twai_hal_v1: twai_hal_get_events (noflash)
16+
twai_hal_v1: twai_hal_format_frame (noflash)
17+
twai_hal_v1: twai_hal_parse_frame (noflash)
18+
twai_hal_v1: twai_hal_set_tx_buffer_and_transmit (noflash)
19+
twai_hal_v1: twai_hal_get_rx_msg_count (noflash)
20+
twai_hal_v1: twai_hal_read_rx_fifo (noflash)
21+
twai_hal_v1: twai_hal_check_state_flags (noflash)
2222

2323
if TWAI_ERRATA_FIX_RX_FRAME_INVALID = y || TWAI_ERRATA_FIX_RX_FIFO_CORRUPT = y:
24-
twai_hal_sja1000: twai_hal_prepare_for_reset (noflash)
25-
twai_hal_sja1000: twai_hal_recover_from_reset (noflash)
26-
twai_hal_sja1000: twai_hal_backup_config (noflash)
27-
twai_hal_sja1000: twai_hal_restore_config (noflash)
28-
twai_hal_sja1000: twai_hal_get_reset_lost_rx_cnt (noflash)
24+
twai_hal_v1: twai_hal_prepare_for_reset (noflash)
25+
twai_hal_v1: twai_hal_recover_from_reset (noflash)
26+
twai_hal_v1: twai_hal_backup_config (noflash)
27+
twai_hal_v1: twai_hal_restore_config (noflash)
28+
twai_hal_v1: twai_hal_get_reset_lost_rx_cnt (noflash)

components/esp_driver_twai/linker.lf

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ archive: libhal.a
1616
entries:
1717
if TWAI_ISR_IN_IRAM = y:
1818
if SOC_TWAI_SUPPORT_FD = y:
19-
twai_hal_ctufd: twai_hal_format_frame (noflash)
20-
twai_hal_ctufd: twai_hal_parse_frame (noflash)
21-
twai_hal_ctufd: twai_hal_set_tx_buffer_and_transmit (noflash)
22-
twai_hal_ctufd: twai_hal_get_rx_msg_count (noflash)
23-
twai_hal_ctufd: twai_hal_read_rx_fifo (noflash)
24-
twai_hal_ctufd: twai_hal_get_events (noflash)
19+
twai_hal_v2: twai_hal_format_frame (noflash)
20+
twai_hal_v2: twai_hal_parse_frame (noflash)
21+
twai_hal_v2: twai_hal_set_tx_buffer_and_transmit (noflash)
22+
twai_hal_v2: twai_hal_get_rx_msg_count (noflash)
23+
twai_hal_v2: twai_hal_read_rx_fifo (noflash)
24+
twai_hal_v2: twai_hal_get_events (noflash)
2525
else:
26-
twai_hal_sja1000: twai_hal_format_frame (noflash)
27-
twai_hal_sja1000: twai_hal_parse_frame (noflash)
28-
twai_hal_sja1000: twai_hal_set_tx_buffer_and_transmit (noflash)
29-
twai_hal_sja1000: twai_hal_get_rx_msg_count (noflash)
30-
twai_hal_sja1000: twai_hal_read_rx_fifo (noflash)
31-
twai_hal_sja1000: twai_hal_get_events (noflash)
32-
twai_hal_sja1000: twai_hal_decode_interrupt (noflash)
33-
twai_hal_sja1000: twai_hal_soft_filter_check_msg (noflash)
26+
twai_hal_v1: twai_hal_format_frame (noflash)
27+
twai_hal_v1: twai_hal_parse_frame (noflash)
28+
twai_hal_v1: twai_hal_set_tx_buffer_and_transmit (noflash)
29+
twai_hal_v1: twai_hal_get_rx_msg_count (noflash)
30+
twai_hal_v1: twai_hal_read_rx_fifo (noflash)
31+
twai_hal_v1: twai_hal_get_events (noflash)
32+
twai_hal_v1: twai_hal_decode_interrupt (noflash)
33+
twai_hal_v1: twai_hal_soft_filter_check_msg (noflash)
3434

3535
if IDF_TARGET_ESP32 = y:
36-
twai_hal_sja1000: twai_hal_prepare_for_reset (noflash)
37-
twai_hal_sja1000: twai_hal_recover_from_reset (noflash)
38-
twai_hal_sja1000: twai_hal_backup_config (noflash)
39-
twai_hal_sja1000: twai_hal_restore_config (noflash)
40-
twai_hal_sja1000: twai_hal_clear_rx_fifo_overrun (noflash)
36+
twai_hal_v1: twai_hal_prepare_for_reset (noflash)
37+
twai_hal_v1: twai_hal_recover_from_reset (noflash)
38+
twai_hal_v1: twai_hal_backup_config (noflash)
39+
twai_hal_v1: twai_hal_restore_config (noflash)
40+
twai_hal_v1: twai_hal_clear_rx_fifo_overrun (noflash)

components/hal/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ elseif(NOT BOOTLOADER_BUILD)
115115

116116
if(CONFIG_SOC_TWAI_SUPPORTED)
117117
if(CONFIG_SOC_TWAI_SUPPORT_FD)
118-
list(APPEND srcs "twai_hal_ctufd.c")
118+
list(APPEND srcs "twai_hal_v2.c")
119119
else()
120-
list(APPEND srcs "twai_hal_sja1000.c")
120+
list(APPEND srcs "twai_hal_v1.c")
121121
endif()
122122
endif()
123123

File renamed without changes.
File renamed without changes.

components/soc/esp32c5/register/soc/twaifd_reg.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242
*/
4343
#define TWAIFD_MODE_SETTINGS_REG(i) (REG_TWAI_BASE(i) + 0x4)
4444
/** TWAIFD_RST : WO; bitpos: [0]; default: 0;
45-
* Soft reset. Writing logic 1 resets CTU CAN FD. After writing logic 1, logic 0 does
45+
* Soft reset. Writing logic 1 resets CAN FD. After writing logic 1, logic 0 does
4646
* not need to be written, this bit
4747
* is automatically cleared.
4848
* 0: invalid
@@ -53,11 +53,11 @@ extern "C" {
5353
#define TWAIFD_RST_V 0x00000001U
5454
#define TWAIFD_RST_S 0
5555
/** TWAIFD_BMM : R/W; bitpos: [1]; default: 0;
56-
* Bus monitoring mode. In this mode CTU CAN FD only receives frames and sends only
56+
* Bus monitoring mode. In this mode CAN FD only receives frames and sends only
5757
* recessive bits on CAN
5858
* bus. When a dominant bit is sent, it is re-routed internally so that bus value is
5959
* not changed. When this mode is
60-
* enabled, CTU CAN FD will not transmit any frame from TXT Buffers,
60+
* enabled, CAN FD will not transmit any frame from TXT Buffers,
6161
* 0b0 - BMM_DISABLED - Bus monitoring mode disabled.
6262
* 0b1 - BMM_ENABLED - Bus monitoring mode enabled.
6363
*/
@@ -89,7 +89,7 @@ extern "C" {
8989
#define TWAIFD_AFM_V 0x00000001U
9090
#define TWAIFD_AFM_S 3
9191
/** TWAIFD_FDE : R/W; bitpos: [4]; default: 1;
92-
* Flexible data rate enable. When flexible data rate is enabled CTU CAN FD recognizes
92+
* Flexible data rate enable. When flexible data rate is enabled CAN FD recognizes
9393
* CAN FD frames (FDF bit
9494
* = 1).
9595
* 0b0 - FDE_DISABLE - Flexible data-rate support disabled.
@@ -157,16 +157,16 @@ extern "C" {
157157
#define TWAIFD_TXBBM_S 10
158158
/** TWAIFD_SAM : R/W; bitpos: [11]; default: 0;
159159
* Self-acknowledge mode.\\
160-
* 0b0 - SAM_DISABLE - Do not send dominant ACK bit when CTU CAN FD sends Acknowledge
160+
* 0b0 - SAM_DISABLE - Do not send dominant ACK bit when CAN FD sends Acknowledge
161161
* bit.\\
162-
* 0b1 - SAM_ENABLE - Send dominant ACK bit when CTU CAN FD transmits CAN frame.\\
162+
* 0b1 - SAM_ENABLE - Send dominant ACK bit when CAN FD transmits CAN frame.\\
163163
*/
164164
#define TWAIFD_SAM (BIT(11))
165165
#define TWAIFD_SAM_M (TWAIFD_SAM_V << TWAIFD_SAM_S)
166166
#define TWAIFD_SAM_V 0x00000001U
167167
#define TWAIFD_SAM_S 11
168168
/** TWAIFD_RTRLE : R/W; bitpos: [16]; default: 0;
169-
* Retransmitt Limit Enable. If enabled, CTU CAN FD only attempts to retransmitt each
169+
* Retransmitt Limit Enable. If enabled, CAN FD only attempts to retransmitt each
170170
* frame up to RTR_TH
171171
* times.
172172
* 0b0 - RTRLE_DISABLED - Retransmitt limit is disabled.
@@ -186,7 +186,7 @@ extern "C" {
186186
#define TWAIFD_RTRTH_V 0x0000000FU
187187
#define TWAIFD_RTRTH_S 17
188188
/** TWAIFD_ILBP : R/W; bitpos: [21]; default: 0;
189-
* Internal Loop Back mode. When enabled, CTU CAN FD receives any frame it transmits.
189+
* Internal Loop Back mode. When enabled, CAN FD receives any frame it transmits.
190190
* 0b0 - INT_LOOP_DISABLED - Internal loop-back is disabled.
191191
* 0b1 - INT_LOOP_ENABLED - Internal loop-back is enabled.
192192
*/
@@ -195,18 +195,18 @@ extern "C" {
195195
#define TWAIFD_ILBP_V 0x00000001U
196196
#define TWAIFD_ILBP_S 21
197197
/** TWAIFD_ENA : R/W; bitpos: [22]; default: 0;
198-
* Main enable bit of CTU CAN FD. When enabled, CTU CAN FD communicates on CAN bus.
198+
* Main enable bit of CAN FD. When enabled, CAN FD communicates on CAN bus.
199199
* When disabled, it
200200
* is bus-off and does not take part of CAN bus communication.
201-
* 0b0 - CTU_CAN_DISABLED - The CAN Core is disabled.
202-
* 0b1 - CTU_CAN_ENABLED - The CAN Core is enabled.
201+
* 0b0 - CAN_DISABLED - The CAN Core is disabled.
202+
* 0b1 - CAN_ENABLED - The CAN Core is enabled.
203203
*/
204204
#define TWAIFD_ENA (BIT(22))
205205
#define TWAIFD_ENA_M (TWAIFD_ENA_V << TWAIFD_ENA_S)
206206
#define TWAIFD_ENA_V 0x00000001U
207207
#define TWAIFD_ENA_S 22
208208
/** TWAIFD_NISOFD : R/W; bitpos: [23]; default: 0;
209-
* Non ISO FD. When this bit is set, CTU CAN FD is compliant to NON-ISO CAN FD
209+
* Non ISO FD. When this bit is set, CAN FD is compliant to NON-ISO CAN FD
210210
* specification (no stuff
211211
* count field). This bit should be modified only when SETTINGS[ENA]=0.
212212
* 0b0 - ISO_FD - The CAN Controller conforms to ISO CAN FD specification.
@@ -218,7 +218,7 @@ extern "C" {
218218
#define TWAIFD_NISOFD_V 0x00000001U
219219
#define TWAIFD_NISOFD_S 23
220220
/** TWAIFD_PEX : R/W; bitpos: [24]; default: 0;
221-
* Protocol exception handling. When this bit is set, CTU CAN FD will start
221+
* Protocol exception handling. When this bit is set, CAN FD will start
222222
* integration upon detection of protocol
223223
* exception. This should be modified only when SETTINGS[ENA] = ’0’.
224224
* 0b0 - PROTOCOL_EXCEPTION_DISABLED - Protocol exception handling is disabled.
@@ -229,11 +229,11 @@ extern "C" {
229229
#define TWAIFD_PEX_V 0x00000001U
230230
#define TWAIFD_PEX_S 24
231231
/** TWAIFD_TBFBO : R/W; bitpos: [25]; default: 1;
232-
* All TXT buffers shall go to "TX failed" state when CTU CAN FD becomes bus-off.
232+
* All TXT buffers shall go to "TX failed" state when CAN FD becomes bus-off.
233233
* 0b0 - TXTBUF_FAILED_BUS_OFF_DISABLED - TXT Buffers dont go to "TX failed" state
234-
* when CTU CAN
234+
* when CAN
235235
* FD becomes bus-off.
236-
* 0b1 - TXTBUF_FAILED_BUS_OFF_ENABLED - TXT Buffers go to "TX failed" state when CTU
236+
* 0b1 - TXTBUF_FAILED_BUS_OFF_ENABLED - TXT Buffers go to "TX failed" state when
237237
* CAN FD
238238
* becomes bus-off.
239239
*/
@@ -301,7 +301,7 @@ extern "C" {
301301
#define TWAIFD_EFT_V 0x00000001U
302302
#define TWAIFD_EFT_S 3
303303
/** TWAIFD_RXS : RO; bitpos: [4]; default: 0;
304-
* CTU CAN FD is receiver of CAN Frame.
304+
* CAN FD is receiver of CAN Frame.
305305
* 0: not receiving
306306
* 1: receiving
307307
*/
@@ -310,7 +310,7 @@ extern "C" {
310310
#define TWAIFD_RXS_V 0x00000001U
311311
#define TWAIFD_RXS_S 4
312312
/** TWAIFD_TXS : RO; bitpos: [5]; default: 0;
313-
* CTU CAN FD is transmitter of CAN Frame.
313+
* CAN FD is transmitter of CAN Frame.
314314
* 0: not transmitting
315315
* 1: transmitting
316316
*/
@@ -329,7 +329,7 @@ extern "C" {
329329
#define TWAIFD_EWL_V 0x00000001U
330330
#define TWAIFD_EWL_S 6
331331
/** TWAIFD_IDLE : RO; bitpos: [7]; default: 1;
332-
* Bus is idle (no frame is being transmitted/received) or CTU CAN FD is bus-off.
332+
* Bus is idle (no frame is being transmitted/received) or CAN FD is bus-off.
333333
* 0: active
334334
* 1: not active
335335
*/
@@ -1556,11 +1556,11 @@ extern "C" {
15561556
/** TWAIFD_TXTB0_STATE : RO; bitpos: [3:0]; default: 8;
15571557
* Status of TXT buffer 1.
15581558
* 0b0000 - TXT_NOT_EXIST - TXT buffer does not exist in the core (applies only to TXT
1559-
* buffers 3-8, when CTU
1559+
* buffers 3-8, when
15601560
* CAN FD was synthesized with less than 8 TXT buffers).
1561-
* 0b0001 - TXT_RDY - TXT buffer is in "Ready" state, it is waiting for CTU CAN FD to
1561+
* 0b0001 - TXT_RDY - TXT buffer is in "Ready" state, it is waiting for CAN FD to
15621562
* start transmission from it.
1563-
* 0b0010 - TXT_TRAN - TXT buffer is in "TX in progress" state. CTU CAN FD is
1563+
* 0b0010 - TXT_TRAN - TXT buffer is in "TX in progress" state. CAN FD is
15641564
* transmitting frame.
15651565
* 0b0011 - TXT_ABTP - TXT buffer is in "Abort in progress" state.
15661566
* 0b0100 - TXT_TOK - TXT buffer is in "TX OK" state.
@@ -1716,7 +1716,7 @@ extern "C" {
17161716
#define TWAIFD_TXB8_V 0x00000001U
17171717
#define TWAIFD_TXB8_S 15
17181718
/** TWAIFD_TXT_BUFFER_COUNT : RO; bitpos: [19:16]; default: 4;
1719-
* Number of TXT buffers present in CTU CAN FD. Lowest buffer is always 1. Highest
1719+
* Number of TXT buffers present in CAN FD. Lowest buffer is always 1. Highest
17201720
* buffer
17211721
* is at index equal to number of present buffers.
17221722
*/
@@ -1861,7 +1861,7 @@ extern "C" {
18611861
#define TWAIFD_ALC_ID_FIELD_V 0x00000007U
18621862
#define TWAIFD_ALC_ID_FIELD_S 21
18631863
/** TWAIFD_TS_BITS : RO; bitpos: [29:24]; default: 0;
1864-
* Number of active bits of CTU CAN FD time-base minus 1 (0x3F = 64 bit time-base).
1864+
* Number of active bits of CAN FD time-base minus 1 (0x3F = 64 bit time-base).
18651865
*/
18661866
#define TWAIFD_TS_BITS 0x0000003FU
18671867
#define TWAIFD_TS_BITS_M (TWAIFD_TS_BITS_V << TWAIFD_TS_BITS_S)
@@ -1905,7 +1905,7 @@ extern "C" {
19051905
*/
19061906
#define TWAIFD_RX_FR_CTR_REG(i) (REG_TWAI_BASE(i) + 0x84)
19071907
/** TWAIFD_RX_FR_CTR_VAL : RO; bitpos: [31:0]; default: 0;
1908-
* Number of received frames by CTU CAN FD.
1908+
* Number of received frames by CAN FD.
19091909
*/
19101910
#define TWAIFD_RX_FR_CTR_VAL 0xFFFFFFFFU
19111911
#define TWAIFD_RX_FR_CTR_VAL_M (TWAIFD_RX_FR_CTR_VAL_V << TWAIFD_RX_FR_CTR_VAL_S)
@@ -1917,7 +1917,7 @@ extern "C" {
19171917
*/
19181918
#define TWAIFD_TX_FR_CTR_REG(i) (REG_TWAI_BASE(i) + 0x88)
19191919
/** TWAIFD_TX_CTR_VAL : RO; bitpos: [31:0]; default: 0;
1920-
* Number of transmitted frames by CTU CAN FD.
1920+
* Number of transmitted frames by CAN FD.
19211921
*/
19221922
#define TWAIFD_TX_CTR_VAL 0xFFFFFFFFU
19231923
#define TWAIFD_TX_CTR_VAL_M (TWAIFD_TX_CTR_VAL_V << TWAIFD_TX_CTR_VAL_S)

0 commit comments

Comments
 (0)