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/adc.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/rom.h"
#include "libadc/adc.h"
#include "libstd/nexus.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 () |
int | main (void) |
Variables | |
semaphore_t | HW_ADC_SEQ2_SEM |
uint32_t | ADC0_SEQ2_SAMPLES [4] |
uint32_t * | adc_data_buffer |
uint32_t | red_work = 0 |
uint32_t | blue_work = 0 |
uint32_t | green_work = 0 |
#define HEARTBEAT_MODAL |
Definition at line 24 of file test-adc.c.
void led_blink_blue | ( | ) |
Definition at line 56 of file test-adc.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 44 of file test-adc.c.
References GPIO_PIN_3, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), green_work, HW_ADC_SEQ2_SEM, os_surrender_context, sem_guard, and sem_take.
Referenced by main().
void led_blink_red | ( | ) |
Definition at line 35 of file test-adc.c.
References GPIO_PIN_1, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), os_surrender_context, and red_work.
Referenced by main().
int main | ( | void | ) |
Definition at line 65 of file test-adc.c.
References hw_metadata::adc, ADC0_BASE, ADC0_SEQ2_SAMPLES, adc_channel_init(), ADC_CTL_CH0, ADC_CTL_END, ADC_CTL_IE, adc_data_buffer, adc_init(), adc_interrupt_init(), ADC_TRIGGER_TIMER, hw_timer_metadata::base, hw_adc_metadata::base, hw_adc_metadata::channel, hw_adc_metadata::channel_configuration, DL_SOFT, hw_timer_metadata::frequency, GPIO_PIN_1, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTF_BASE, heart_init(), Hz, INT_TIMER1A, hw_timer_metadata::interrupt, IntMasterDisable(), IntMasterEnable(), led_blink_blue(), led_blink_green(), led_blink_red(), os_launch(), os_threading_init(), hw_timer_metadata::periodic, hw_adc_metadata::sample_sequence, schedule(), SYSCTL_OSC_MAIN, SYSCTL_SYSDIV_1, SYSCTL_USE_OSC, SYSCTL_XTAL_16MHZ, SysCtlClockSet(), adc_trigger_metadata::timer, TIMER1_BASE, TIMER_CFG_PERIODIC, hw_adc_metadata::trigger_metadata, and hw_adc_metadata::trigger_source.
uint32_t ADC0_SEQ2_SAMPLES[4] |
Definition at line 46 of file hardware.c.
Referenced by main().
uint32_t* adc_data_buffer |
Definition at line 30 of file test-adc.c.
Referenced by main().
uint32_t blue_work = 0 |
Definition at line 32 of file test-adc.c.
Referenced by led_blink_blue().
uint32_t green_work = 0 |
Definition at line 33 of file test-adc.c.
Referenced by led_blink_green().
semaphore_t HW_ADC_SEQ2_SEM |
Definition at line 49 of file hardware.c.
Referenced by led_blink_green().
uint32_t red_work = 0 |
Definition at line 31 of file test-adc.c.
Referenced by led_blink_red().