Added soclet with gpio banks to top

This commit is contained in:
2026-02-22 20:00:42 +01:00
parent a97028c2ba
commit 20cfece6e3
14 changed files with 321 additions and 172 deletions

View File

@@ -1,8 +1,10 @@
#include <stdint.h>
#define GPIO_BASE 0x40000000u
#define VOUT_BASE 0x40000004u
static volatile uint32_t * const gpio = (volatile uint32_t *)GPIO_BASE;
static volatile uint32_t * const vout = (volatile uint32_t *)VOUT_BASE;
static void delay(volatile uint32_t ticks){
while (ticks--) {
@@ -15,8 +17,11 @@ int main(void)
uint32_t v = 0;
for (;;) {
*gpio = v;
v++;
delay(20000u);
for(int i=0; i<1000; i++){
*vout = v;
v++;
delay(5u);
}
*gpio ^= 0xffffffff;
}
}