EE445M RTOS
Taken at the University of Texas Spring 2015
|
#include "adcpp.hpp"
#include "blinker.hpp"
#include "timerpp.hpp"
#include "uartpp.hpp"
#include "shellpp.hpp"
#include "semaphorepp.hpp"
#include "motorpp.hpp"
#include "ir.hpp"
#include "drivepp.hpp"
#include "canpp.hpp"
#include "ctlsysctl.hpp"
#include "pingpp.hpp"
#include "libos/os.h"
#include "libschedule/schedule.h"
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "driverlib/adc.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/uart.h"
#include "driverlib/pwm.h"
Go to the source code of this file.
Macros | |
#define | thread(x) |
#define | can_data_length 5*2 |
#define | UART0_RX_BUFFER_SIZE 8 |
Functions | |
void | thread_blink_red () |
void | thread_blink_blue () |
void | thread_blink_green () |
void | thread_uart_update () |
void | __cxa_pure_virtual () |
void | Timer0A_Handler () |
void | Timer1A_Handler () |
void | GPIOPortD_Handler () |
void | UART0_Handler (void) |
void | ADC0Seq0_Handler (void) |
void | CAN0_Handler (void) |
void | ping_handler () |
void | can_handler (void) |
void | can_transmitter (void) |
void | shell_handler () |
void | can_prepare_dummy_data (void) |
int | main (void) |
Variables | |
blinker | blink |
timer | timer0a |
uart | uart0 |
shell | shell0 |
adc | adc0 |
ir | ir0 |
ir | ir1 |
ir | ir2 |
ir | ir3 |
ping | ping0 |
semaphore * | ping0_sem |
const uint32_t | can_msg_id = 1 |
const bool | can_sender = true |
can | can0 |
uint8_t | can_data [5 *2] |
static semaphore | UART0_RX_SEM |
static buffer< char, 8 > | UART0_RX_BUFFER |
uint32_t | blink_count_red = 0 |
uint32_t | blink_count_green = 0 |
uint32_t | blink_count_blue = 0 |
#define can_data_length 5*2 |
Definition at line 49 of file sense-main.cpp.
Referenced by can_prepare_dummy_data(), can_transmitter(), and main().
#define thread | ( | x | ) |
Definition at line 34 of file sense-main.cpp.
Referenced by thread_blink_blue(), thread_blink_green(), thread_blink_red(), and thread_uart_update().
#define UART0_RX_BUFFER_SIZE 8 |
Definition at line 55 of file sense-main.cpp.
void __cxa_pure_virtual | ( | ) |
Definition at line 95 of file sense-main.cpp.
void ADC0Seq0_Handler | ( | void | ) |
Definition at line 140 of file sense-main.cpp.
References adc::ack(), adc::sample(), and ir::sample().
void CAN0_Handler | ( | void | ) |
Definition at line 151 of file sense-main.cpp.
References can::ack(), can::error_tx(), semaphore::post(), and can::recv_sem.
void can_handler | ( | void | ) |
Definition at line 178 of file sense-main.cpp.
References can_data, can::get(), semaphore::guard(), uart::printf(), and can::recv_sem.
Referenced by main().
void can_prepare_dummy_data | ( | void | ) |
Definition at line 284 of file sense-main.cpp.
References can_data, and can_data_length.
Referenced by main().
void can_transmitter | ( | void | ) |
Definition at line 192 of file sense-main.cpp.
References can_data, can_data_length, can_msg_id, ping::distance(), ir::distance(), PIN_BLUE, uart::printf(), sens_ir_left, sens_ir_left_front, sens_ir_right, sens_ir_right_front, sens_ping_front, blinker::toggle(), and can::transmit().
Referenced by main().
void GPIOPortD_Handler | ( | ) |
Definition at line 105 of file sense-main.cpp.
References ping::handle_gpio().
int main | ( | void | ) |
Definition at line 291 of file sense-main.cpp.
References can_data_length, can_handler(), can_prepare_dummy_data(), can_sender, can_transmitter(), adc::configure_sequence(), adc::configure_timer_interrupt(), ping::get_sem(), ping_handler(), ctlsys::set_clock(), shell_handler(), adc::start(), and UART0_RX_SEM.
void ping_handler | ( | ) |
Definition at line 165 of file sense-main.cpp.
References semaphore::guard(), ping::sample(), and ping::start().
Referenced by main().
void shell_handler | ( | ) |
Definition at line 270 of file sense-main.cpp.
References shell::accept(), buffer< T, N >::get(), and semaphore::guard().
Referenced by main().
void thread_blink_blue | ( | ) |
Definition at line 71 of file sense-main.cpp.
References blink_count_blue, PIN_BLUE, thread, and blinker::toggle().
void thread_blink_green | ( | ) |
Definition at line 79 of file sense-main.cpp.
References blink_count_green, PIN_GREEN, thread, and blinker::toggle().
void thread_blink_red | ( | ) |
Definition at line 63 of file sense-main.cpp.
References blink_count_red, PIN_RED, thread, and blinker::toggle().
void thread_uart_update | ( | ) |
Definition at line 87 of file sense-main.cpp.
References uart::atomic_printf(), blink_count_blue, blink_count_green, blink_count_red, and thread.
void Timer0A_Handler | ( | ) |
Definition at line 97 of file sense-main.cpp.
References timer::ack().
void Timer1A_Handler | ( | ) |
Definition at line 101 of file sense-main.cpp.
References ping::handle_timer().
void UART0_Handler | ( | void | ) |
Definition at line 109 of file sense-main.cpp.
References uart::ack(), blinker::blink(), uart::get_char(), uart::LAST_WAS_CR, buffer< T, N >::notify(), and PIN_RED.
adc adc0 |
Definition at line 44 of file sense-main.cpp.
blinker blink |
Definition at line 40 of file sense-main.cpp.
uint32_t blink_count_blue = 0 |
Definition at line 61 of file sense-main.cpp.
Referenced by thread_blink_blue(), and thread_uart_update().
uint32_t blink_count_green = 0 |
Definition at line 60 of file sense-main.cpp.
Referenced by thread_blink_green(), and thread_uart_update().
uint32_t blink_count_red = 0 |
Definition at line 59 of file sense-main.cpp.
Referenced by thread_blink_red(), and thread_uart_update().
can can0 |
Definition at line 52 of file sense-main.cpp.
uint8_t can_data[5 *2] |
Definition at line 53 of file sense-main.cpp.
Referenced by can_handler(), can_prepare_dummy_data(), and can_transmitter().
const uint32_t can_msg_id = 1 |
Definition at line 50 of file sense-main.cpp.
Referenced by can_transmitter().
const bool can_sender = true |
Definition at line 51 of file sense-main.cpp.
Referenced by main().
ir ir0 |
Definition at line 45 of file sense-main.cpp.
ir ir1 |
Definition at line 45 of file sense-main.cpp.
ir ir2 |
Definition at line 45 of file sense-main.cpp.
ir ir3 |
Definition at line 45 of file sense-main.cpp.
ping ping0 |
Definition at line 46 of file sense-main.cpp.
semaphore* ping0_sem |
Definition at line 47 of file sense-main.cpp.
shell shell0 |
Definition at line 43 of file sense-main.cpp.
timer timer0a |
Definition at line 41 of file sense-main.cpp.
uart uart0 |
Definition at line 42 of file sense-main.cpp.
|
static |
Definition at line 57 of file sense-main.cpp.
|
static |
Definition at line 56 of file sense-main.cpp.
Referenced by main().