21#define __weak __attribute__((weak))
24#error Could not determine weak attribute for current compiler
pb_cmd_id_t
Puzzle bus command types.
Definition pb-types.h:33
pb_action_t
Puzzle bus command action types.
Definition pb-types.h:66
pb_global_state_t
Puzzle module global states.
Definition pb-types.h:73
static const char pb_cmd_magic_req[]
Magic sent from main controller to puzzle module (="puzbus")
Definition pb-types.h:85
static const char pb_cmd_magic_res[]
Magic reply from puzzle module back to main controller (="gaming")
Definition pb-types.h:91
uint16_t i2c_addr_t
I²C address (10 or 7 bit)
Definition pb-types.h:30
@ PB_CMD_MAGIC
magic (handshake) (REQ, RES)
Definition pb-types.h:62
@ PB_CMD_PROP
puzzle module property (REQ, RES, SET)
Definition pb-types.h:42
@ PB_CMD_STATE
puzzle module global state variable (REQ, RES, SET)
Definition pb-types.h:53
@ PB_ACTION_RES
response
Definition pb-types.h:68
@ PB_ACTION_REQ
request
Definition pb-types.h:67
@ PB_ACTION_SET
(over)write
Definition pb-types.h:69
@ PB_GS_SOLVED
puzzle completed
Definition pb-types.h:77
@ PB_GS_IDLE
puzzle not started yet
Definition pb-types.h:75
@ PB_GS_PLAYING
puzzle actively being solved
Definition pb-types.h:76
@ PB_GS_NOINIT
uninitialized (only used by puzzle modules)
Definition pb-types.h:74
PB_CMD_MAGIC data
Definition pb-types.h:135
char * magic
magic value
Definition pb-types.h:136
PB_CMD_PROP data
Definition pb-types.h:123
uint8_t * value
new or current value
Definition pb-types.h:125
uint8_t propid
id of state property
Definition pb-types.h:124
PB_CMD_STATE data
Definition pb-types.h:130
pb_global_state_t state
global state
Definition pb-types.h:131
puzzle bus message header / container (shared by all commands)
Definition pb-types.h:94
void * cmd
Command data (dependent on type)
Definition pb-types.h:119
i2c_addr_t sender
I²C address of sender.
Definition pb-types.h:113
pb_cmd_id_t type
Command type (see pb_cmd_id_t)
Definition pb-types.h:100
pb_action_t action
Command action (see pb_action_t)
Definition pb-types.h:106