8 #include "driverlib/interrupt.h"
10 #include "inc/hw_types.h"
11 #include "inc/hw_gpio.h"
22 uint32_t switch_interrupt, uint32_t interrupt_mask,
bool start) {
28 GPIOPinTypeGPIOInput(
base,
pin);
29 GPIODirModeSet(
base,
pin, GPIO_DIR_MODE_IN);
31 if ((
base == GPIO_PORTF_BASE) && (
pin & GPIO_PIN_0)) {
32 HWREG(
base + GPIO_O_LOCK) = GPIO_LOCK_KEY;
33 HWREG(
base + GPIO_O_CR) = 0x01;
34 HWREG(
base + GPIO_O_LOCK) = 0;
36 GPIOPadConfigSet(
base,
pin, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
40 this->
tim =
timer(timer_id, timer_subtimer, TIMER_CFG_ONE_SHOT, SysCtlClockGet() / 50,
43 GPIOIntTypeSet(
base,
pin, switch_interrupt);
44 IntEnable(interrupt_mask);
uint32_t memory_address_t
uint32_t end_debounce(void)
virtual uint32_t ack(void)
static uint32_t timer_timeout_from_subtimer(uint32_t subtimer)
static void enable_periph(uint32_t sys_periph)