Files
learnFPGAProject/FIRMWARE/io.h
2025-09-23 13:44:14 +03:00

11 lines
261 B
C

#include <stdint.h>
#define IO_BASE 0x400000
#define IO_LEDS 4
#define IO_UART_DAT 8
#define IO_UART_CNTL 16
#define IO_IN(port) *(volatile uint32_t*)(IO_BASE + port)
#define IO_OUT(port,val) *(volatile uint32_t*)(IO_BASE + port)=(val)