|
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/debug.h"#include "driverlib/gpio.h"#include "driverlib/interrupt.h"#include "driverlib/pin_map.h"#include "driverlib/sysctl.h"#include "driverlib/systick.h"#include "driverlib/uart.h"#include "libos/os.h"#include "libheart/heartbeat.h"#include "libhw/hardware.h"#include "libstd/nexus.h"#include <sys/stat.h>
Go to the source code of this file.
Macros | |
| #define | HEARTBEAT_MODAL |
| #define | UART_FIFO_SIZE 0x7f |
| #define | PIDWORK_BUFFER_SIZE 0x7f |
Functions | |
| void | Thread1 (void) |
| void | Thread2 (void) |
| void | uart_consumer (void) |
| int | main () |
Variables | |
| volatile uint32_t | pidwork |
| volatile uint32_t | highest_pidwork |
| volatile uint32_t | lowest_pidwork |
| volatile uint32_t | pidwork_idx |
| volatile uint32_t * | pidwork_buffer |
| volatile uint32_t | uart_producer_idx |
| volatile uint32_t | uart_consumer_idx |
| volatile char * | uart_fifo |
| volatile uint32_t | uart_dropped_chars |
| #define PIDWORK_BUFFER_SIZE 0x7f |
Definition at line 32 of file test-os.c.
Referenced by main(), pidwork_record(), and Thread2().
| #define UART_FIFO_SIZE 0x7f |
Definition at line 31 of file test-os.c.
Referenced by main(), and uart_consumer().
| int main | ( | void | ) |
A thread that continuously toggles GPIO pin 3 on GPIO_PORT_F.
Definition at line 93 of file test-os.c.
References GPIO_PIN_0, GPIO_PIN_1, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTA_BASE, GPIO_PORTF_BASE, GPIOPinConfigure(), GPIOPinTypeUART(), heart_init(), highest_pidwork, Hz, IntMasterDisable(), IntMasterEnable(), lowest_pidwork, os_add_thread(), OS_INTERACTIVE_POOL, os_launch(), os_threading_init(), pidwork, pidwork_buffer, PIDWORK_BUFFER_SIZE, pidwork_idx, postpone_death, SYSCTL_OSC_MAIN, SYSCTL_PERIPH_GPIOA, SYSCTL_PERIPH_UART0, SYSCTL_SYSDIV_1, SYSCTL_USE_OSC, SYSCTL_XTAL_16MHZ, SysCtlClockGet(), SysCtlClockSet(), SysCtlPeripheralEnable(), Thread1(), Thread2(), UART0_BASE, UART_CONFIG_PAR_NONE, UART_CONFIG_STOP_ONE, UART_CONFIG_WLEN_8, UART_FIFO_SIZE, and UARTConfigSetExpClk().

| void Thread1 | ( | void | ) |
A thread that continuously toggles GPIO pin 1 on GPIO_PORT_F.
Definition at line 46 of file test-os.c.
References atomic, GPIO_PIN_1, GPIO_PIN_2, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), and pidwork.
Referenced by main().


| void Thread2 | ( | void | ) |
A thread that continuously toggles GPIO pin 2 on GPIO_PORT_F.
Definition at line 60 of file test-os.c.
References GPIO_PIN_1, GPIO_PIN_2, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), highest_pidwork, lowest_pidwork, pidwork, pidwork_buffer, PIDWORK_BUFFER_SIZE, and pidwork_idx.
Referenced by main().


| void uart_consumer | ( | void | ) |
Definition at line 79 of file test-os.c.
References GPIO_PIN_1, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), UART0_BASE, uart_consumer_idx, uart_fifo, UART_FIFO_SIZE, uart_producer_idx, and UARTCharPut().

| volatile uint32_t highest_pidwork |
| volatile uint32_t lowest_pidwork |
| volatile uint32_t pidwork |
| volatile uint32_t* pidwork_buffer |
| volatile uint32_t pidwork_idx |
| volatile uint32_t uart_consumer_idx |
Definition at line 41 of file test-os.c.
Referenced by uart_consumer().
| volatile char* uart_fifo |
Definition at line 42 of file test-os.c.
Referenced by uart_consumer().
| volatile uint32_t uart_producer_idx |
Definition at line 40 of file test-os.c.
Referenced by uart_consumer().