12#include "dawn/io/sdata.hxx"
13#include "dawn/porting/config.hxx"
14#include "dawn/prog/common.hxx"
35 PROG_TOGGLE_CFG_FIRST = 0,
36 PROG_TOGGLE_CFG_IOBIND = 1,
37 PROG_TOGGLE_CFG_VALUES = 2,
38 PROG_TOGGLE_CFG_LAST = 31
44#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
45 const char *getClassNameStr()
const override
57 int trigger(uint8_t cmd)
override;
73 return CProgToggle::cfgId(
false, size, PROG_TOGGLE_CFG_IOBIND);
78 return CProgToggle::cfgId(
false, 2, PROG_TOGGLE_CFG_VALUES);
94 std::vector<SToggleBind *> binds;
101 static int ioNotifierCb(
void *priv,
io_ddata_t *data);
105 uint32_t readInput(SToggleBind *bind,
io_ddata_t *data);
106 void writeValue(SToggleBind *bind);
107 void refresh(SToggleBind *bind,
io_ddata_t *data);
Descriptor wrapper for individual object configuration.
Base class for all I/O objects.
Base class for all PROG (processing) objects.
Toggle/latch: flips output between two configured values on each rising edge of the input.
int deinit()
De-initialize object.
int doStart()
Start implementation hook.
int trigger(uint8_t cmd)
Execute a trigger command.
bool hasThread() const
Check if a background thread is active.
int configure()
Configure object from descriptor data.
int init()
One-time initialize object after bindings are resolved.
int doStop()
Stop implementation hook.
static ObjectCfgId objectCfg(uint8_t type, uint16_t cls, uint8_t dtype, bool rw, uint16_t size, uint8_t id)
Construct 32-bit ConfigID from component fields.
uint32_t ObjectCfgId
ConfigID type - single 32-bit value.
Out-of-tree user-extension hooks for Dawn.
@ OBJTYPE_PROG
Program/algorithm object type.
@ DTYPE_ANY
Wildcard data type (matches any actual type).
uint32_t ObjectId
ObjectID type - single 32-bit value.
static ObjectId objectId(uint8_t type, uint16_t cls, uint8_t dtype, uint8_t flags, uint16_t priv)
Construct 32-bit ObjectID from component fields.
Heap-allocated dynamic I/O data buffer.
Static (compile-time) I/O data buffer (no timestamp).