diff options
| author | Mateusz Holenko <[email protected]> | 2020-01-14 13:37:45 +0100 |
|---|---|---|
| committer | Mateusz Holenko <[email protected]> | 2020-01-14 13:57:17 +0100 |
| commit | c1781e5e7c47e716a558f388beb96454d4bf8627 (patch) | |
| tree | 2b9d9b071de127a8b4e449cb45487b449176f090 /src | |
| parent | 679821e9174f9410960f974eefd46a94e74cfeda (diff) | |
dcd_eptri: Fix rx_buffer/tx_buffer volatile annotation
This makes `rx_buffer` and `tx_buffer` *pointers*
volatile in order to avoid caching them in a register.
The original notation meant "a pointer to a volatile value"
(equivalent of `volatile uint8_t *`). This resulted in
`while(rx_buffer[ep_num] != NULL) ;` loop to get stuck
forever, even though the IRQ handler set the `rx_buffer[ep_num] = NULL`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/valentyusb/eptri/dcd_eptri.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/valentyusb/eptri/dcd_eptri.c b/src/portable/valentyusb/eptri/dcd_eptri.c index d7e1b8a9a..0d388c376 100644 --- a/src/portable/valentyusb/eptri/dcd_eptri.c +++ b/src/portable/valentyusb/eptri/dcd_eptri.c @@ -75,13 +75,13 @@ uint8_t queue_log_offset; #define EP_SIZE 64 uint16_t volatile rx_buffer_offset[16]; -uint8_t volatile * rx_buffer[16]; +uint8_t* volatile rx_buffer[16]; uint16_t volatile rx_buffer_max[16]; volatile uint8_t tx_ep; volatile bool tx_active; volatile uint16_t tx_buffer_offset[16]; -uint8_t volatile * tx_buffer[16]; +uint8_t* volatile tx_buffer[16]; volatile uint16_t tx_buffer_max[16]; volatile uint8_t reset_count; |
