29#define DIGITAL_SIGNAL_MS(x) ((x) * 100000000UL)
30#define DIGITAL_SIGNAL_US(x) ((x) * 100000UL)
31#define DIGITAL_SIGNAL_NS(x) ((x) * 100UL)
32#define DIGITAL_SIGNAL_PS(x) ((x) / 10UL)
void digital_signal_add_period_with_level(DigitalSignal *signal, uint32_t ticks, bool level)
Append one period to the end of the DigitalSignal instance, with the level specified.
Definition digital_signal.c:80
void digital_signal_add_period(DigitalSignal *signal, uint32_t ticks)
Append one period to the end of the DigitalSignal instance.
Definition digital_signal.c:40
bool digital_signal_get_start_level(const DigitalSignal *signal)
Get the current start level contained in the DigitalSignal instance.
Definition digital_signal.c:22
void digital_signal_set_start_level(DigitalSignal *signal, bool level)
Set the start level contained in the DigitalSignal instance.
Definition digital_signal.c:28
void digital_signal_free(DigitalSignal *signal)
Delete a previously allocated DigitalSignal instance.
Definition digital_signal.c:16
DigitalSignal * digital_signal_alloc(uint32_t max_size)
Allocate a DigitalSignal instance with a defined maximum size.
Definition digital_signal.c:8
uint32_t digital_signal_get_size(const DigitalSignal *signal)
Get the number of periods currently stored in a DigitalSignal instance.
Definition digital_signal.c:34
DigitalSignal structure type.
Definition digital_signal_i.h:17
uint32_t max_size
Maximum period count this instance can hold.
Definition digital_signal_i.h:20