Event Manager.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include "event.h"
Functions | |
static void | ast_per_callback (void) |
Asynchronous timer (ASF) handler for the QTouch acquisition. More... | |
static void | eic5_callback (void) |
External interrupt handler, used by PB0 push button. More... | |
static void | enable_wdt (void) |
Enable WDT. More... | |
void | event_button_init (void) |
Event Button Init. More... | |
bool | event_is_push_button_pressed (void) |
Check if push button is pressed or not. More... | |
bool | event_qtouch_get_button_state (void) |
Return QTouch Button State. More... | |
bool | event_qtouch_get_slider_state (uint8_t *event_qtouch_position) |
Return QTouch Slider State. More... | |
void | event_qtouch_init (void) |
Event Manager QTouch Init. More... | |
static void | wdt_clear (void) |
Clear WDT. More... | |
static void | wdt_set_ctrl (uint32_t ctrl) |
Set Control register function for WDT. More... | |
Variables | |
volatile bool | event_pbEvent = false |
volatile uint32_t | event_qtouch_sensors_idle_count = 0u |
bool | event_qTouchButtonPressed = false |
|
static |
Asynchronous timer (ASF) handler for the QTouch acquisition.
and clear Watchdog counter - generates interrupt every 100ms
References ast_clear_interrupt_flag(), AST_INTERRUPT_PER, event_qtouch_sensors_idle_count, touch_sensors_update_time(), and wdt_clear().
Referenced by event_qtouch_init().
|
static |
External interrupt handler, used by PB0 push button.
References eic_line_clear_interrupt(), eic_line_interrupt_is_pending(), event_pbEvent, sysclk_disable_peripheral_clock(), and sysclk_enable_peripheral_clock().
Referenced by event_button_init().
|
static |
void event_button_init | ( | void | ) |
Event Button Init.
References BPM_BKUP_WAKEUP_SRC_AST, BPM_BKUP_WAKEUP_SRC_EIC, bpm_disable_io_retention(), bpm_enable_backup_pin(), bpm_enable_fast_wakeup(), bpm_enable_io_retention(), bpm_enable_wakeup_source(), eic5_callback(), eic_line_config::eic_async, EIC_ASYNCH_MODE, eic_line_config::eic_edge, EIC_EDGE_FALLING_EDGE, eic_enable(), eic_line_config::eic_filter, EIC_FILTER_DISABLED, eic_line_config::eic_level, EIC_LEVEL_LOW_LEVEL, eic_line_enable(), eic_line_set_callback(), eic_line_set_config(), eic_line_config::eic_mode, EIC_MODE_EDGE_TRIGGERED, enable_wdt(), event_pbEvent, sysclk_disable_peripheral_clock(), and sysclk_enable_peripheral_clock().
Referenced by app_init().
bool event_is_push_button_pressed | ( | void | ) |
bool event_qtouch_get_button_state | ( | void | ) |
Return QTouch Button State.
References event_qTouchButtonPressed, and GET_QT_SENSOR_STATE.
Referenced by main().
bool event_qtouch_get_slider_state | ( | uint8_t * | event_qtouch_position | ) |
Return QTouch Slider State.
event_qtouch_position | returned slider position. |
References GET_QT_ROTOR_SLIDER_POSITION, and GET_QT_SENSOR_STATE.
Referenced by main().
void event_qtouch_init | ( | void | ) |
Event Manager QTouch Init.
References ast_clear_interrupt_flag(), AST_COUNTER_MODE, ast_enable(), AST_INTERRUPT_PER, AST_OSC_32KHZ, ast_per_callback(), AST_PSEL_32KHZ_1HZ, ast_set_callback(), ast_set_config(), ast_write_periodic0_value(), ast_config::counter, ast_config::mode, osc_enable(), OSC_ID_OSC32, osc_is_ready(), ast_config::osc_type, ast_config::psel, sysclk_enable_peripheral_clock(), and touch_sensors_init().
Referenced by app_init().
|
static |
Clear WDT.
Referenced by ast_per_callback(), main(), and run_wdt_test_all().
|
static |
Set Control register function for WDT.
Referenced by enable_wdt().
Referenced by eic5_callback(), event_button_init(), and event_is_push_button_pressed().
volatile uint32_t event_qtouch_sensors_idle_count = 0u |
Referenced by ast_per_callback(), and ui_lcd_init().
Referenced by event_qtouch_get_button_state().