puzzlebox
Loading...
Searching...
No Matches
pbdrv-mod

Puzzle module driver (superset of pbdrv) More...

Detailed Description

pbdrv-mod is a superset of pbdrv, and includes functions specific to puzzle bus modules. pbdrv-mod compiles to an object file instead of a static library because it may depend on functions from external libraries. pbdrv-mod is still considered standalone, but requires either using an existing driver, or (partially) implementing the driver functions.

Like pbdrv, pbdrv-mod can be used by including this folder in your CMakeLists.txt file and linking the library with your executable. Please see the drivers page for target-specific usage instructions.

Example
# include pbdrv
add_subdirectory(lib/pbdrv)
# link with executable
target_link_libraries(main pbdrv-mod)
Note
In most cases, the hooks should be sufficient to realize extensions or custom behavior not provided by pbdrv-mod.
Most pb_* functions have a weak implementation, which may be overwritten by a custom implementation. This allows you to use the default implementation where possible, and only implement extensions required for your puzzle module.
See also
pbdrv

Components

 Module
 Puzzle module metadata and auxiliary utility functions.
 
 I²C
 I²C send/receive handlers.
 
 Drivers
 Platform-specific pbdrv-mod implementations.
 
 Extensions
 Platform-specific pbdrv implementations.
 
 Hook
 Functions for (partially) overriding default behavior.
 
 Buffer
 Binary data buffer type used in pbdrv.
 
 Memory
 Platform-specific memory management functions.
 
 Message
 Message (de)serialization.
 
 Routing
 Parsed message handler routing.
 
 Send
 Functions for directly creating serialized message buffers.
 
 Serial
 Internal (de)serialization functions using mpack.
 
 Types
 Datatypes used within pbdrv.
 
 Bus
 Constants for the puzzle bus hardware.