EE445M RTOS
Taken at the University of Texas Spring 2015
|
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "libuart/uart.h"
#include "libhw/hardware.h"
#include "libheart/heartbeat.h"
Go to the source code of this file.
Macros | |
#define | HEARTBEAT_MODAL |
Functions | |
void | led_blink_red () |
void | led_blink_green () |
void | led_blink_blue () |
void | uart_handler (notification note) |
int | main (void) |
Variables | |
uint32_t | red_work = 0 |
uint32_t | blue_work = 0 |
uint32_t | green_work = 0 |
#define HEARTBEAT_MODAL |
Definition at line 22 of file test-uart.c.
void led_blink_blue | ( | ) |
Definition at line 47 of file test-uart.c.
References blue_work, GPIO_PIN_2, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), and os_surrender_context.
Referenced by main().
void led_blink_green | ( | ) |
Definition at line 38 of file test-uart.c.
References GPIO_PIN_3, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), and green_work.
Referenced by uart_handler().
void led_blink_red | ( | ) |
Definition at line 29 of file test-uart.c.
References GPIO_PIN_1, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), os_surrender_context, and red_work.
Referenced by main().
int main | ( | void | ) |
Accept input on UART 0, and parrot input back out to UART 0.
Definition at line 70 of file test-uart.c.
References DL_SOFT, GPIO_PIN_1, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTF_BASE, heart_init(), hw_daemon(), hw_init_and_subscribe, HW_UART, Hz, INT_UART0, IntMasterDisable(), IntMasterEnable(), led_blink_blue(), led_blink_red(), os_launch(), os_threading_init(), postpone_death, schedule(), SYSCTL_OSC_MAIN, SYSCTL_SYSDIV_1, SYSCTL_USE_OSC, SYSCTL_XTAL_16MHZ, SysCtlClockSet(), UART0_BASE, UART_DEFAULT_BAUD_RATE, uart_handler(), uart_metadata_init, and uart_send_string().
void uart_handler | ( | notification | note | ) |
Read the next character from the UART and write it back to the UART.
Definition at line 59 of file test-uart.c.
References notification::_char, led_blink_green(), and uart_send_char().
Referenced by main().
uint32_t blue_work = 0 |
Definition at line 26 of file test-uart.c.
Referenced by led_blink_blue().
uint32_t green_work = 0 |
Definition at line 27 of file test-uart.c.
Referenced by led_blink_green().
uint32_t red_work = 0 |
Definition at line 25 of file test-uart.c.
Referenced by led_blink_red().