DA14580 wkupct

wkupct callback function

Wed, 2018-03-28 19:56--dlo

我想to change the advertising's last byte of the UUID when I wake up from a GPIO interrupt to indicate which GPIO woke it up. Using the beacon_v_5.40.2_0 project, I'm declaring the callback as follow:

void tilt_wakeup_cb(void)
{
if (GetBits16(SYS_STAT_REG, PER_IS_DOWN))
{
// Return GPIO functionality from external wakeup GPIO
if (DEVELOPMENT_DEBUG)
GPIO_reservations();
periph_init();
}
tilt_wkup_flag = 1;
user_advertise_operation();
}

GPIO唤醒中断设置示例

Tue, 2018-03-27 17:26--dlo

I'm using the Dialog Beacon Example project DA1458x_beacon_v_5.40.2_0 and want to implement GPIO wakeup when a pin (GPIO2_0) goes from high to low.

In user_dialog_beacon.c
I make sure #include "wkupct_quadec.h"
Then I wrote:
void tilt_wakeup_cb(void)
{
if (GetBits16(SYS_STAT_REG, PER_IS_DOWN))
{
// Return GPIO functionality from external wakeup GPIO
if (DEVELOPMENT_DEBUG)
GPIO_reservations();
periph_init();
}

}

Subscribe to RSS - DA14580 wkupct