| 
    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_gpio.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/timer.h"#include "driverlib/adc.h"#include "libos/os.h"#include "libos/jitter.h"#include "libheart/heartbeat.h"#include "libbutton/button.h"#include "libtimer/timer.h"#include "libhw/hardware.h"#include "libos/semaphore.h"#include "libadc/adc.h"#include "libuart/uart.h"#include "libshell/shell.h"
Go to the source code of this file.
Macros | |
| #define | HEARTBEAT_MODAL | 
Functions | |
| void | button_debounce_end (notification button_notification) | 
| void | button_debounce_start (notification button_notification) | 
| void | led_blink_red () | 
| void | led_blink_green () | 
| void | led_blink_blue () | 
| void | postpone_suicide () | 
| int | main () | 
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 | 
| uint32_t | red_work = 0 | 
| uint32_t | blue_work = 0 | 
| uint32_t | green_work = 0 | 
| #define HEARTBEAT_MODAL | 
Definition at line 26 of file test-debounce.c.
| void button_debounce_end | ( | notification | button_notification | ) | 
Definition at line 52 of file test-debounce.c.
References button_debounced_mailbox, button_debounced_new_data, BUTTONS_BOTH, GPIO_PORTF_BASE, GPIOPinRead(), and sem_post.
Referenced by button_debounce_start().


| void button_debounce_start | ( | notification | button_notification | ) | 
Definition at line 59 of file test-debounce.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.
Referenced by main().


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


| void led_blink_green | ( | ) | 
Definition at line 77 of file test-debounce.c.
References GPIO_PIN_3, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), and green_work.
Referenced by postpone_suicide().


| void led_blink_red | ( | ) | 
Definition at line 68 of file test-debounce.c.
References GPIO_PIN_1, GPIO_PORTF_BASE, GPIOPinRead(), GPIOPinWrite(), os_surrender_context, and red_work.

| int main | ( | void | ) | 
Definition at line 112 of file test-debounce.c.
References button_debounce_start(), button_debounced_mailbox, button_debounced_new_data, button_left_pressed, button_metadata_init, button_right_pressed, 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(), os_launch(), os_threading_init(), postpone_suicide(), schedule(), sem_init, 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 95 of file test-debounce.c.
References button_debounced_mailbox, button_debounced_new_data, BUTTON_LEFT, button_left_pressed, BUTTON_RIGHT, button_right_pressed, led_blink_blue(), led_blink_green(), sem_guard, and sem_take.
Referenced by main().


| uint32_t blue_work = 0 | 
Definition at line 49 of file test-debounce.c.
Referenced by led_blink_blue().
| volatile uint32_t button_debounced_mailbox | 
Definition at line 43 of file test-debounce.c.
Referenced by button_debounce_end(), main(), and postpone_suicide().
| volatile semaphore_t button_debounced_new_data | 
Definition at line 46 of file test-debounce.c.
Referenced by button_debounce_end(), main(), and postpone_suicide().
| volatile uint32_t button_debounced_wtf | 
Definition at line 44 of file test-debounce.c.
Referenced by button_debounce_start().
| volatile uint32_t button_left_pressed | 
Definition at line 40 of file test-debounce.c.
Referenced by main(), and postpone_suicide().
| volatile uint32_t button_right_pressed | 
Definition at line 41 of file test-debounce.c.
Referenced by main(), and postpone_suicide().
| uint32_t green_work = 0 | 
Definition at line 50 of file test-debounce.c.
Referenced by led_blink_green().
| uint32_t red_work = 0 | 
Definition at line 48 of file test-debounce.c.
Referenced by led_blink_red().