#include "../../../hw_types.h" #include "../../../src/interrupt.h" #include "../../../hw_ints.h" #include "../../../src/debug.h" #include "../../../src/sysctl.h" #include "../rit128x96x4.h" #include "../../../src/gpio.h" #include "../../../hw_memmap.h" //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void delay_30ms(void) { unsigned int i=0, j=0; for(i=0; i < 250000; i++) //250000 j+=1; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ int main(void) { int iVal=0; SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); // Enable the peripherals used by this example. // SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC); RIT128x96x4Init(1000000); RIT128x96x4StringDraw("EXTERNES DISPLAY",20,50,15); // GPIOPortIntRegister(GPIO_PORTB_BASE, PortBIntHandler); // GPIOPortIntRegister(GPIO_PORTC_BASE, PortCIntHandler); // Initialisierung 16x2 LCD Display //set LCD_DATA0 , LCD_DATA1 , LCD_DATA2 , LCD_DATA3 , LCD_RS to output ports GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5); //set LCD_RS , LCD_RW , LCD_EN to output ports GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_2 | GPIO_PIN_3); //set LCD_DATA0 , LCD_DATA1 , LCD_DATA2 , LCD_DATA3 , LCD_RS to LOW = 0 GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5, 0); //set LCD_RS , LCD_RW , LCD_EN to LOW = 0 GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_2 | GPIO_PIN_3, 0); SysTickPeriodSet(SysCtlClockGet()); SysTickEnable(); // Enable interrupts to the processor. // IntMasterEnable(); // // Enable the interrupts. // IntEnable(INT_GPIOB); IntEnable(INT_GPIOC); delay_30ms(); iVal = GPIOPinRead(GPIO_PORTB_BASE,(GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5)); return 0; }