16 volatile int * LEDR_ptr;
46 if ((
fd = open(
"/dev/mem", (O_RDWR | O_SYNC))) == -1)
48 printf (
"ERROR: could not open \"/dev/mem\"...\n");
69 virtual_base = mmap (NULL, span, (PROT_READ | PROT_WRITE), MAP_SHARED,
fd, base);
72 printf (
"ERROR: mmap() failed...\n");
86 printf (
"ERROR: munmap() failed...\n");
void * LW_virtual
Used to map physical addresses for the light-weight bridge Not made by Erick Grant,...
void * virtual_base
Base for the LCD Used to define the address of the LCD.
int fd
Used to open /dev/mem for access to physical addresses Not made by Erick Grant, copyright Terasic Inc...
int increment_leds(int total)
int unmap_physical(void *, unsigned int)
void * map_physical(int, unsigned int, unsigned int)