summaryrefslogtreecommitdiff
path: root/src/common/tusb_fifo.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-10-15 17:35:05 +0700
committerhathach <[email protected]>2021-10-15 23:54:31 +0700
commit0b249618b0469529da748e3e5478751cd56acd31 (patch)
tree48fde1b0c69e2d27bd4d3ccc963a6d3ecd6c2546 /src/common/tusb_fifo.c
parent7596cb30797c625a0523e0f68ef65296740538e0 (diff)
fix -Wcast-qual
Diffstat (limited to 'src/common/tusb_fifo.c')
-rw-r--r--src/common/tusb_fifo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index 11b8fc5f3..564687e02 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -102,7 +102,7 @@ static inline uint16_t _ff_mod(uint16_t idx, uint16_t depth)
// TODO generalize with configurable 1 byte or 4 byte each read
static void _ff_push_const_addr(uint8_t * ff_buf, const void * app_buf, uint16_t len)
{
- volatile uint32_t * rx_fifo = (volatile uint32_t *) app_buf;
+ volatile const uint32_t * rx_fifo = (volatile const uint32_t *) app_buf;
// Reading full available 32 bit words from const app address
uint16_t full_words = len >> 2;
@@ -201,7 +201,7 @@ static void _ff_push_n(tu_fifo_t* f, void const * app_buf, uint16_t n, uint16_t
ff_buf += nLin_4n_bytes;
// There could be odd 1-3 bytes before the wrap-around boundary
- volatile uint32_t * rx_fifo = (volatile uint32_t *) app_buf;
+ volatile const uint32_t * rx_fifo = (volatile const uint32_t *) app_buf;
uint8_t rem = nLin_bytes & 0x03;
if (rem > 0)
{