#ifndef HD_LCDRPI_H #define HD_LCDRPI_H #include "lcd.h" /* for Driver */ // initialise this particular driver int hd_init_rpi(Driver *drvthis); /* rpi_map is addcessed through the hd44780_private_data struct. Data stored here is used for mapping physical GPIO pins to BCM2835 gpio */ struct rpi_gpio_map { int enable; int rs; int d7; int d6; int d5; int d4; }; #define BCM2708_PERI_BASE 0x20000000 #define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) /* GPIO controller */ #define PAGE_SIZE (4*1024) #define BLOCK_SIZE (4*1024) #define INP_GPIO(g) *(gpio_map+((g)/10)) &= ~(7<<(((g)%10)*3)) #define SET_GPIO(g,a) *(gpio_map+(a?7:10))=1<<(g%32); #endif // HD_LCDRPI_H