#include "../../../hw_sysctl.h" #include "../../../hw_memmap.h" #include "../../../hw_types.h" #include "../../../src/sysctl.h" #include "../../../src/gpio.h" #include "../rit128x96x4.h" int main(void) { // Initialisierung OLED DISPLAY RIT128x96x4Init(1000000); RIT128x96x4StringDraw("EXTERNES DISPLAY",20,50,15); // Ports aktivieren SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); // Ports als Ausgang definieren GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_0 | GPIO_PIN1 | GPIO_PIN_2 | GPIO_PIN_3 ); // Ports setzen auf LOW danach auf HIGH GPIOPinWrite(GPIO_PORTE_BASE , GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 , 0x00); GPIOPinWrite(GPIO_PORTE_BASE , GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 , 0x0F); // Dient zur Kontrolle ob die PINS gesetzt werden if(GPIO_PIN_0 == 1) { RIT128x96x4StringDraw("LCD_D4 ist High" ,0,10,15); } else { (RIT128x96x4StringDraw("LCD_D4 ist LOW" ,0,20,15)); } if(GPIO_PIN_1 == 1) { RIT128x96x4StringDraw("LCD_D5 ist High" ,0,30,15); } else { (RIT128x96x4StringDraw("LCD_D5 ist LOW" ,0,40,15)); } if(GPIO_PIN_2 == 1) { RIT128x96x4StringDraw("LCD_D6 ist High" ,0,50,15); } else { (RIT128x96x4StringDraw("LCD_D6 ist LOW" ,0,60,15)); } if(GPIO_PIN_3 == 1) { RIT128x96x4StringDraw("LCD_D7 ist High" ,0,70,15); } else { (RIT128x96x4StringDraw("LCD_D7 ist LOW" ,0,80,15)); } return 0; }