EE445M RTOS
Taken at the University of Texas Spring 2015
test-display.c
Go to the documentation of this file.
1 /* -*- mode: c; c-basic-offset: 4; -*- */
2 /* Created by Hershal Bhave and Eric Crosson on 2015-01-24 */
3 /* Revision History: Look in Git FGT */
4 
5 /* Standard Libs */
6 #include <stdint.h>
7 #include <stdbool.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 
11 /* TI Includes */
12 #include "inc/hw_ints.h"
13 #include "inc/hw_memmap.h"
14 
15 /* Driverlib Includes */
16 #include "driverlib/debug.h"
17 #include "driverlib/fpu.h"
18 #include "driverlib/gpio.h"
19 #include "driverlib/interrupt.h"
20 #include "driverlib/pin_map.h"
21 #include "driverlib/sysctl.h"
22 #include "driverlib/rom.h"
23 
24 #include <sys/stat.h>
25 
26 #include "libdisplay/ST7735.h"
27 #include "libstd/nexus.h"
28 
32 int main(void) {
33 
34  int j;
35  FPUEnable();
38 
39  /* Enable the GPIO port that is used for the on-board LED. */
41 
42  /* Enable the timer for display driver timings */
44 
45  /* Enable the GPIO pins for the LED (PF2). */
47 
48  /* Enable processor interrupts. */
50 
52 
53  ST7735_OutString("test on screen 0\n");
54  ST7735_OutString("test on screen 0\n");
55 
57 
58  ST7735_OutString2("test on screen 1\n");
59  ST7735_OutString2("test on screen 1\n");
60 
62 }
#define SYSCTL_PERIPH_GPIOF
Definition: sysctl.h:76
#define SYSCTL_OSC_MAIN
Definition: sysctl.h:378
void FPUEnable(void)
Definition: fpu.c:66
#define SYSCTL_USE_OSC
Definition: sysctl.h:350
#define GPIO_PIN_2
Definition: gpio.h:62
#define SYSCTL_XTAL_16MHZ
Definition: sysctl.h:372
void ST7735_InitR(enum initRFlags option)
Definition: ST7735.c:741
void ST7735_OutString2(uint8_t *ptr)
Definition: ST7735.c:1542
int main(void)
Definition: test-display.c:32
#define postpone_death()
Definition: nexus.h:40
void ST7735_OutString(uint8_t *ptr)
Definition: ST7735.c:1535
#define SYSCTL_PERIPH_TIMER0
Definition: sysctl.h:114
void SysCtlPeripheralEnable(uint32_t ui32Peripheral)
Definition: sysctl.c:841
bool IntMasterEnable(void)
void GPIOPinTypeGPIOOutput(uint32_t ui32Port, uint8_t ui8Pins)
Definition: gpio.c:1427
#define ST7735_YELLOW
Definition: ST7735.h:75
void ST7735_DrawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Definition: ST7735.c:849
#define SYSCTL_SYSDIV_1
Definition: sysctl.h:221
void SysCtlClockSet(uint32_t ui32Config)
Definition: sysctl.c:2532
#define GPIO_PORTF_BASE
Definition: hw_memmap.h:74