Tbounce_input btn_up, btn_dn, btn_mode, btn_cancel;
////////////////////////////////////////////////////////////////////////////////
void btn_up_on( void )
{
}
////////////////////////////////////////////////////////////////////////////////
void btn_up_off( void )
{
}
////////////////////////////////////////////////////////////////////////////////
void btn_func( void )
{
btn_up.read_pin( !GETBIT( BTNS_IN_REG, BTN_INC ) );
btn_dn.read_pin( !GETBIT( BTNS_IN_REG, BTN_DEC ) );
btn_mode.read_pin( !GETBIT( BTNS_IN_REG, BTN_MODE ) );
btn_cancel.read_pin( !GETBIT( BTNS_IN_REG, BTN_CANCEL ) );
}
////////////////////////////////////////////////////////////////////////////////
void menu_init( void )
{
btn_up.on_press_func = btn_up_on;
btn_up.on_release_func = btn_up_off;
btn_up.set_mode( autorepeat_linear, 30, 10 );
}