Of course, fixing warnings mean nothing if the code doesn't work.

This commit is contained in:
Sateallia 2023-10-28 23:54:55 +03:00
parent 2bc262decb
commit ff96f10d40
2 changed files with 4 additions and 3 deletions

View File

@ -28,8 +28,9 @@ void delay(int32_t count) {
: "=r"(count): [count]"0"(count) : "cc");
}
uint32_t mmio_read(uint32_t reg) {
return (uintptr_t)reg;
uint32_t mmio_read(uint64_t reg) {
uint64_t *p_reg = (uint64_t*)reg;
return *p_reg;
}
void mmio_write(uint64_t reg, uint32_t data) {

View File

@ -26,7 +26,7 @@
void hcf();
void delay(int32_t);
uint32_t mmio_read(uint32_t);
uint32_t mmio_read(uint64_t);
void mmio_write(uint64_t, uint32_t);
#endif