Microchip® Advanced Software Framework

event.c File Reference

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 void ast_per_callback ( void  )
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 void eic5_callback ( void  )
static
static void enable_wdt ( void  )
static

Enable WDT.

References wdt_set_ctrl().

Referenced by event_button_init().

bool event_is_push_button_pressed ( void  )

Check if push button is pressed or not.

References event_pbEvent.

Referenced by main().

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.

Parameters
event_qtouch_positionreturned slider position.

References GET_QT_ROTOR_SLIDER_POSITION, and GET_QT_SENSOR_STATE.

Referenced by main().

static void wdt_clear ( void  )
static

Clear WDT.

Referenced by ast_per_callback(), main(), and run_wdt_test_all().

static void wdt_set_ctrl ( uint32_t  ctrl)
static

Set Control register function for WDT.

Referenced by enable_wdt().

volatile bool event_pbEvent = false
volatile uint32_t event_qtouch_sensors_idle_count = 0u

Referenced by ast_per_callback(), and ui_lcd_init().

bool event_qTouchButtonPressed = false