Files
fpga_modem/sw/blinky/blinky.c
2026-02-22 18:48:17 +01:00

23 lines
350 B
C

#include <stdint.h>
#define GPIO_BASE 0x40000000u
static volatile uint32_t * const gpio = (volatile uint32_t *)GPIO_BASE;
static void delay(volatile uint32_t ticks){
while (ticks--) {
__asm__ volatile ("nop");
}
}
int main(void)
{
uint32_t v = 0;
for (;;) {
*gpio = v;
v++;
delay(20000u);
}
}