/* Configure the push button. 
Configure the PIO as inputs and generate corresponding interrupt when pressed or released.  */
static void configure_button(void)
/* Configure the push button. 
Configure the PIO as inputs and generate corresponding interrupt when pressed or released.  */
static void configure_button(void)
{
	pio_set_debounce_filter(PIN_PUSHBUTTON_WAKEUP_PIO,
			PIN_PUSHBUTTON_WAKEUP_MASK, 10);
	pio_handler_set(PIN_PUSHBUTTON_WAKEUP_PIO, PIN_PUSHBUTTON_WAKEUP_ID,
			PIN_PUSHBUTTON_WAKEUP_MASK, PIN_PUSHBUTTON_WAKEUP_ATTR,
			button_handler);
	NVIC_EnableIRQ((IRQn_Type)PIN_PUSHBUTTON_WAKEUP_ID);
	pio_enable_interrupt(PIN_PUSHBUTTON_WAKEUP_PIO,
			PIN_PUSHBUTTON_WAKEUP_MASK);
}