|
EE445M RTOS
Taken at the University of Texas Spring 2015
|
#include <switchpp.hpp>


Public Member Functions | |
| lswitch () | |
| lswitch (memory_address_t lswitch_base, memory_address_t lswitch_pin, semaphore *sem, timer_t timer_id, subtimer_t timer_subtimer, uint32_t switch_interrupt, uint32_t interrupt_mask=GPIO_BOTH_EDGES, bool start=false) | |
| virtual void | start (void) |
| virtual void | stop (void) |
| virtual uint32_t | ack (void) |
| void | debounce (void) |
| uint32_t | end_debounce (void) |
| uint32_t | sample (void) |
Public Member Functions inherited from interruptable | |
| interruptable () | |
Public Attributes | |
| uint32_t | debounced_data |
Private Attributes | |
| memory_address_t | base |
| memory_address_t | pin |
| semaphore * | sem |
| timer | tim |
Definition at line 16 of file switchpp.hpp.
| lswitch::lswitch | ( | ) |
| lswitch::lswitch | ( | memory_address_t | lswitch_base, |
| memory_address_t | lswitch_pin, | ||
| semaphore * | sem, | ||
| timer_t | timer_id, | ||
| subtimer_t | timer_subtimer, | ||
| uint32_t | switch_interrupt, | ||
| uint32_t | interrupt_mask = GPIO_BOTH_EDGES, |
||
| bool | start = false |
||
| ) |
Definition at line 20 of file switchpp.cpp.
References base, ctlsys::enable_periph(), pin, sem, start(), tim, and ctlsys::timer_timeout_from_subtimer().

|
virtual |
Implements interruptable.
Definition at line 83 of file switchpp.cpp.
Referenced by GPIOPortE_Handler().

| void lswitch::debounce | ( | void | ) |
Call this in the isr of the switch
Definition at line 65 of file switchpp.cpp.
References timer::start(), and tim.
Referenced by GPIOPortE_Handler().


| uint32_t lswitch::end_debounce | ( | void | ) |
Call this in the isr of the switch's timer
Definition at line 74 of file switchpp.cpp.
References timer::ack(), NULL, semaphore::post(), sample(), sem, and tim.
Referenced by Timer1A_Handler().


| uint32_t lswitch::sample | ( | void | ) |
Return current value of the limit lswitch
Definition at line 88 of file switchpp.cpp.
References base, debounced_data, and pin.
Referenced by end_debounce().

|
virtual |
Implements interruptable.
Definition at line 54 of file switchpp.cpp.
Referenced by lswitch().

|
virtual |
|
private |
| uint32_t lswitch::debounced_data |
Definition at line 40 of file switchpp.hpp.
Referenced by sample(), and switch_responder().
|
private |
|
private |
Definition at line 20 of file switchpp.hpp.
Referenced by end_debounce(), and lswitch().
|
private |
Definition at line 21 of file switchpp.hpp.
Referenced by debounce(), end_debounce(), and lswitch().