#include <stdlib.h> 
 
 
 
 
#define CALLBACK_PERIOD_S   1
#define CALLBACK_PERIOD_MS  (CALLBACK_PERIOD_S * 1000)
 
#define EXECUTION_TIME_US   100
 
static uint32_t blink_holdoff;
 
static uint32_t blink_func(void)
{
    static uint32_t counter = 0;
 
    if (blink_holdoff > 0)
    {
        blink_holdoff--;
    }
    else
    {
        
        uint32_t bits = counter;
        for (uint_fast8_t led_id = 0; led_id < num_leds; led_id++)
        {
            bits >>= 1;
        }
 
        counter++;
    }
 
    return CALLBACK_PERIOD_MS;
}
 
static void button_press_func(uint8_t button_id, 
button_event_e event)
 
{
    (void) event;
 
    
    blink_holdoff = 5;
 
    
}
 
static void button_release_func(uint8_t button_id, 
button_event_e event)
 
{
    (void) event;
 
    
    blink_holdoff = 5;
 
    
}
 
{
    (void) functions;
 
    
    {
        
        
        return;
    }
 
    for (uint_fast8_t button_id = 0; button_id < num_buttons; button_id++)
    {
                                  button_press_func);
                                  button_release_func);
    }
 
    
    
    blink_holdoff = 0;
 
                                   EXECUTION_TIME_US);
 
    
    lib_state->startStack();
}