8#include "dawn/io/common.hxx"
9#include "dawn/porting/config.hxx"
10#include "dawn/porting/pwm.hxx"
36 , channels(CONFIG_PWM_NCHANNELS)
37 , freq(CONFIG_DAWN_IO_PWM_DEFAULT_FREQ)
44#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
45 const char *getClassNameStr()
const override
57 int trigger(uint8_t cmd)
override;
107#ifdef CONFIG_DAWN_IO_TIMESTAMP
112 int configureDesc(
const CDescObject &desc);
Descriptor wrapper for individual object configuration.
Template helper for creating ObjectIDs for I/O types.
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Base class for all I/O objects.
@ IO_CLASS_PWM
PWM output.
Pulse Width Modulation (PWM) output I/O type.
@ IO_PWM_CFG_POL
PWM polarity configuration.
@ IO_PWM_CFG_FREQ
PWM frequency configuration.
@ IO_PWM_CFG_DT
PWM dead time configuration.
@ IO_PWM_CFG_LAST
Last config ID marker (reserved).
@ IO_PWM_CFG_FIRST
First config ID (reserved).
int configure()
Configure object from descriptor data.
bool isRead() const
Check if IO supports read operations.
int init()
One-time initialize object after bindings are resolved.
int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
bool isBatch() const
Check if IO supports batch operations.
int onSetObjConfig(SObjectCfg::ObjectCfgId objcfg, uint32_t *data, size_t len)
Pre-update hook for runtime configuration writes.
size_t getDataSize() const
Get data size in bytes.
bool isWrite() const
Check if IO supports write operations.
int doStart()
Start implementation hook.
int deinit()
De-initialize object.
int trigger(uint8_t cmd)
Execute a trigger command.
bool isNotify() const
Check if IO supports notifications.
int doStop()
Stop implementation hook.
size_t getDataDim() const
Get data vector dimension.
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_IO
Input/Output object type.
@ DTYPE_UINT32
Unsigned 32-bit integer (0 to 4294967295).
uint32_t ObjectId
ObjectID type - single 32-bit value.