VERA driver rewrite

This commit is contained in:
Kyle J Cardoza 2024-07-15 19:33:12 -04:00
parent 59e15a5c42
commit fdf3be48b2
1 changed files with 4 additions and 2 deletions

View File

@ -34,7 +34,7 @@ void vera_address_set(uint32_t address) {
void vera_mem_read(void *dest, uint32_t src, size_t length) {
uint8_t *destination = dest;
vera_address_select(0);
vera_address_set(src | AUTO_INC_1);
@ -47,8 +47,10 @@ void vera_mem_write(uint32_t dest, void *src, size_t length) {
vera_address_select(0);
vera_address_set(dest | AUTO_INC_1);
uint8_t *source = src;
for (size_t count = 0; count < length; count += 1) {
vera_data_0_write(*((uint8_t *)(src)));
vera_data_0_write(*(source + count));
}
}