puzzlebox
Loading...
Searching...
No Matches
Events

Functions called on puzzle bus-related events. More...

Detailed Description

Functions

void pb_hook_ev_main_state_update (pb_global_state_t state)
 Main controller state update hook.
 
void pb_hook_ev_module_init ()
 Module initialized hook.
 

Function Documentation

◆ pb_hook_ev_main_state_update()

void pb_hook_ev_main_state_update ( pb_global_state_t state)

The default implementation of this function is empty.

Parameters
stateNew state of main controller
Note
This function is also called when the first STATE REQ command is received, as the main controller state variable used to check if the state actually changed is initialized to PB_GS_NOINIT. In this case, this function is called after pb_hook_ev_module_init().

◆ pb_hook_ev_module_init()

void pb_hook_ev_module_init ( )

The default implementation of this function calls pb_hook_mod_state_write() with PB_GS_IDLE.

This function is called when the first STATE REQ command is received, indicating this puzzle module has been registered successfully by the main controller, and is now part of an active play session.