|
EE445M RTOS
Taken at the University of Texas Spring 2015
|
#include <stdint.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.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 "libbutton/button.h"#include "libtimer/timer.h"#include "libschedule/schedule.h"#include "libos/os.h"#include "libheart/heartbeat.h"
Go to the source code of this file.
Macros | |
| #define | HEARTBEAT_MODAL |
| #define | SCHEDLUE_PRIORITY |
| #define | SCHEDULER_MAX_THREADS 16 |
| #define | HEART_RED GPIO_PIN_1 |
| #define | HEART_BLUE GPIO_PIN_2 |
| #define | HEART_GREEN GPIO_PIN_3 |
Functions | |
| void | button_debounce_end (notification button_notification) |
| void | button_debounce_start (notification button_notification) |
| void | postpone_suicide () |
| void | led_blink_red () |
| void | led_blink_blue () |
| void | main (void) |
Variables | |
| volatile uint32_t | button_left_pressed |
| volatile uint32_t | button_right_pressed |
| volatile uint32_t | button_debounced_mailbox |
| volatile uint32_t | button_debounced_wtf |
| volatile semaphore_t | button_debounced_new_data |
| volatile uint32_t | red_work = 0 |
| volatile uint32_t | blue_work = 0 |
| #define HEART_BLUE GPIO_PIN_2 |
Definition at line 34 of file test-edf.c.
| #define HEART_GREEN GPIO_PIN_3 |
Definition at line 35 of file test-edf.c.
| #define HEART_RED GPIO_PIN_1 |
Definition at line 33 of file test-edf.c.
| #define HEARTBEAT_MODAL |
Definition at line 23 of file test-edf.c.
| #define SCHEDLUE_PRIORITY |
Definition at line 24 of file test-edf.c.
| #define SCHEDULER_MAX_THREADS 16 |
Definition at line 25 of file test-edf.c.
| void button_debounce_end | ( | notification | button_notification | ) |
Definition at line 48 of file test-edf.c.
References button_debounced_mailbox, button_debounced_new_data, BUTTONS_BOTH, GPIO_PORTF_BASE, GPIOPinRead(), and sem_post.
Referenced by button_debounce_start(), and main().


| void button_debounce_start | ( | notification | button_notification | ) |
Definition at line 55 of file test-edf.c.
References button_debounce_end(), button_debounced_wtf, BUTTONS_BOTH, GPIO_PORTF_BASE, GPIOPinRead(), hw_channel_init(), hw_subscribe_single_shot, HW_TIMER, Hz, INT_TIMER0A, TIMER0_BASE, TIMER_CFG_ONE_SHOT, and timer_metadata_init.

| void led_blink_blue | ( | ) |
Definition at line 93 of file test-edf.c.
References blue_work, GPIO_PIN_2, GPIO_PORTF_BASE, GPIOPinRead(), and GPIOPinWrite().
Referenced by main().


| void led_blink_red | ( | ) |
Definition at line 84 of file test-edf.c.
References GPIO_PIN_1, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), and red_work.
Referenced by main().


| void main | ( | void | ) |
Definition at line 102 of file test-edf.c.
References button_debounce_end(), button_metadata_init, BUTTONS_BOTH, DL_SOFT, GPIO_BOTH_EDGES, GPIO_PIN_1, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTF_BASE, heart_init(), HW_BUTTON, hw_driver_init(), hw_init, hw_subscribe, HW_TIMER, Hz, INT_TIMER0A, IntMasterDisable(), IntMasterEnable(), led_blink_blue(), led_blink_red(), os_launch(), os_threading_init(), pidwork_init(), postpone_death, postpone_suicide(), schedule(), SYSCTL_OSC_MAIN, SYSCTL_SYSDIV_1, SYSCTL_USE_OSC, SYSCTL_XTAL_16MHZ, SysCtlClockSet(), TIMER0_BASE, TIMER_CFG_ONE_SHOT, and timer_metadata_init.

| void postpone_suicide | ( | ) |
Definition at line 64 of file test-edf.c.
References button_debounced_mailbox, button_debounced_new_data, BUTTON_LEFT, button_left_pressed, BUTTON_RIGHT, button_right_pressed, GPIO_PIN_2, GPIO_PIN_3, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), sem_guard, and sem_take.
Referenced by main().


| volatile uint32_t blue_work = 0 |
Definition at line 46 of file test-edf.c.
Referenced by led_blink_blue().
| volatile uint32_t button_debounced_mailbox |
Definition at line 40 of file test-edf.c.
Referenced by button_debounce_end(), and postpone_suicide().
| volatile semaphore_t button_debounced_new_data |
Definition at line 43 of file test-edf.c.
Referenced by button_debounce_end(), and postpone_suicide().
| volatile uint32_t button_debounced_wtf |
Definition at line 41 of file test-edf.c.
Referenced by button_debounce_start().
| volatile uint32_t button_left_pressed |
Definition at line 37 of file test-edf.c.
Referenced by postpone_suicide().
| volatile uint32_t button_right_pressed |
Definition at line 38 of file test-edf.c.
Referenced by postpone_suicide().
| volatile uint32_t red_work = 0 |
Definition at line 45 of file test-edf.c.
Referenced by led_blink_red().