Skip to content

Commit 1df0fcb

Browse files
authoredNov 26, 2024··
Update UART.h
1 parent c9c1ca6 commit 1df0fcb

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed
 

‎cores/arduino/UART.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ typedef uint8_t rx_buffer_index_t;
8181

8282
/* Universal Synchronous and Asynchronous Receiver and Transmitter */
8383

84-
typedef volatile uint8_t register8_t;
85-
typedef volatile uint16_t register16_t;
86-
typedef volatile uint32_t register32_t;
84+
typedef uint8_t register8_t;
85+
typedef uint16_t register16_t;
86+
typedef uint32_t register32_t;
8787

8888
#define _WORDREGISTER(regname) __extension__ union { register16_t regname; struct { register8_t regname##L; register8_t regname##H; }; }
8989

@@ -111,24 +111,24 @@ class UartClass : public HardwareSerial
111111

112112
protected:
113113
StreamMock mockstream;
114-
volatile USART_t * const _hwserial_module;
114+
USART_t * const _hwserial_module;
115115

116-
volatile uint8_t const _hwserial_rx_pin;
117-
volatile uint8_t const _hwserial_tx_pin;
116+
uint8_t const _hwserial_rx_pin;
117+
uint8_t const _hwserial_tx_pin;
118118

119-
volatile uint8_t const _uart_mux;
119+
uint8_t const _uart_mux;
120120

121121
// Has any byte been written to the UART since begin()
122122
bool _written;
123123

124-
volatile rx_buffer_index_t _rx_buffer_head;
125-
volatile rx_buffer_index_t _rx_buffer_tail;
126-
volatile tx_buffer_index_t _tx_buffer_head;
127-
volatile tx_buffer_index_t _tx_buffer_tail;
124+
rx_buffer_index_t _rx_buffer_head;
125+
rx_buffer_index_t _rx_buffer_tail;
126+
tx_buffer_index_t _tx_buffer_head;
127+
tx_buffer_index_t _tx_buffer_tail;
128128

129-
volatile uint8_t _hwserial_dre_interrupt_vect_num;
130-
volatile uint8_t _hwserial_dre_interrupt_elevated;
131-
volatile uint8_t _prev_lvl1_interrupt_vect;
129+
uint8_t _hwserial_dre_interrupt_vect_num;
130+
uint8_t _hwserial_dre_interrupt_elevated;
131+
uint8_t _prev_lvl1_interrupt_vect;
132132

133133
// Don't put any members after these buffers, since only the first
134134
// 32 bytes of this struct can be accessed quickly using the ldd
@@ -140,11 +140,11 @@ class UartClass : public HardwareSerial
140140
//UartClass(){;}
141141
//inline UartClass(volatile USART_t *hwserial_module, uint8_t hwserial_rx_pin, uint8_t hwserial_tx_pin, uint8_t dre_vect_num, uint8_t uart_mux);
142142
UartClass(
143-
volatile USART_t *hwserial_module,
144-
volatile uint8_t hwserial_rx_pin,
145-
volatile uint8_t hwserial_tx_pin,
146-
volatile uint8_t hwserial_dre_interrupt_vect_num,
147-
volatile uint8_t uart_mux) :
143+
USART_t *hwserial_module,
144+
uint8_t hwserial_rx_pin,
145+
uint8_t hwserial_tx_pin,
146+
uint8_t hwserial_dre_interrupt_vect_num,
147+
uint8_t uart_mux) :
148148
_hwserial_module(hwserial_module),
149149
_hwserial_rx_pin(hwserial_rx_pin),
150150
_hwserial_tx_pin(hwserial_tx_pin),

0 commit comments

Comments
 (0)
Please sign in to comment.