Skip to content

Commit

Permalink
[emurt] add volatile keyword to mmio register
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Jan 9, 2025
1 parent 53c6c9e commit 5987476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/emurt/emurt.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#define UART_W_REG 0x10000010
#define PERF_REG 0x10000014

void t1_put_char(char c) { *(uint32_t *)(UART_W_REG) = (uint32_t)c; }
void place_counter(int i) { *(int *)(PERF_REG) = i; }
void t1_put_char(char c) { *(uint8_t volatile *)(UART_W_REG) = (uint8_t)c; }
void place_counter(int i) { *(int volatile *)(PERF_REG) = i; }

///////////////////////
// uart
Expand Down

0 comments on commit 5987476

Please sign in to comment.