Event Manager.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ast.h"
#include "bpm.h"
#include "eic.h"
#include "sleepmgr.h"
#include "sysclk.h"
#include "touch_api_sam4l.h"
Functions | |
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... | |
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().