|
Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example
|
|
9 #include "config/hal.h"
10 #include "app_push_button.h"
11 #include "lcd/app_lcd.h"
15 #define PUSH_BUTTON_DEBOUNCE_DELAY_DEFAULT 199 // Push Button needs to be pressed >20ms to trip a PUSH BUTTON switch event
16 #define PUSH_BUTTON_LONG_PRESS_DELAY_DEFAULT 4999 // Push Button needs to be pressed >500ms to trip a PUSH BUTTON switch event
47 volatile uint16_t retval = 1;
83 volatile uint16_t retval = 1;
108 volatile uint16_t retval = 1;
volatile uint16_t appPushButton_Execute(void)
Executes the USER push button monitor.
volatile uint16_t drv_PushButton_Dispose(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.
volatile uint16_t(* event_btn_up)(void)
Function pointer to user function triggering a RELEASE event.
volatile uint16_t debounce_delay
Number of call cycles until a switch event is triggered.
volatile uint16_t appPushButton_EventButtonLongPress(void)
Push button event raised at the "is long pressed" detection.
volatile struct PUSH_BUTTON_STATUS_s status
Status word of the switch object.
volatile uint16_t drv_PushButton_Initialize(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.
Push button function driver data object.
volatile uint16_t appPushButton_EventButtonPressed(void)
Push button event raised at the "is pressed" detection.
volatile uint16_t(* event_btn_down)(void)
Function pointer to user function triggering a PRESSED event.
volatile bool enabled
Bit 15: Enables/disables the Switch button object.
volatile uint16_t appPushButton_EventButtonUp(void)
Push button event raised at the "not pressed" transition.
volatile uint16_t appPushButton_Initialize(void)
Initializes the USER push button on DPSK3.
volatile uint16_t(* event_pressed)(void)
Function pointer to user function triggering a LONG_PRESS event.
volatile uint16_t appPushButton_Dispose(void)
Unloads the push button data object and frees its resources.
volatile uint16_t(* event_long_press)(void)
Function pointer to user function triggering a LONG_PRESS event.
volatile uint16_t screens
volatile uint16_t appPushButton_EventButtonDown(void)
Push button event raised at the "pressed" transition.
volatile uint16_t long_press_delay
Number of call cycles until a "long press" switch event is triggered.
volatile uint16_t drv_PushButton_Execute(volatile struct PUSH_BUTTON_OBJECT_s *pushbtn)
Initializes the push button device driver.