Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
S
 sched_add
 sched_busy_wait
 SCHED_CATFLAG
 sched_catflags
 SCHED_CLOCK_PRESCALE
 SCHED_CLOCK_PRESCALE_LOG
 sched_delta
 sched_find
 SCHED_FIND
 sched_get_at
 sched_get_timestamp
 sched_init
 sched_invoke
 sched_invoke_all
 sched_isr_tcww
 sched_list_size
 SCHED_MAX_TASKS
 sched_ptr_query
 sched_query
 sched_remove
 sched_remove_all
 sched_run
 sched_task
 sched_task_handler
 sched_task_tcww
 sched_tick_count_h
 SCHED_TICK_MUSECS
 sched_ticks
 sched_time
 sched_time_add
 sched_time_gt
 sched_time_gte
 sched_time_is_zero
 SCHED_TIME_LH
 sched_time_lt
 sched_time_lte
 SCHED_TIME_MAX
 SCHED_TIME_MAX_MS
 SCHED_TIME_MAX_MUSECS
 SCHED_TIME_MAX_TICKS
 SCHED_TIME_MS
 SCHED_TIME_MUSECS
 sched_time_sub
 SCHED_TIME_TO_MS
 SCHED_TIME_TO_MUSECS
 SCHED_TIME_TO_TICKS
 SCHED_TIME_ZERO
 sched_wake
 sched_wake_all
 SET_BITFIELD_AT
 size, memmon_spec
 SPI Interface Constants and Helper Macros
 SPI Module State/Result Codes
 SPI_ACTIVE
 SPI_DDR
 SPI_DISABLED
 SPI_E_LENGTH
 SPI_E_STATE
 SPI_E_UNSPECIFIED
 SPI_IS_ACTIVE
 SPI_IS_READY
 SPI_MISO
 SPI_MOSI
 SPI_PINR
 SPI_PORT
 SPI_READY
 spi_request_state
 SPI_SCK
 SPI_SLAVE
 SPI_SS
 SPI_SS_PULLUP
 spi_state
 spi_task_cats
 spihelper.h
 spihelper_async_mstr_init
 spihelper_exchange_bytes
 spihelper_init
 spihelper_mstr_init
 spihelper_request
 spihelper_shutdown
 srcadr, ttlv_s_inm_header
 st, sched_task
 Standard TTLV Message Lengths
 std_tlv.h
uint8_t sched_add(const sched_task *task)
Adds the specified task to the task list.
void sched_busy_wait(sched_time duration)
Busy waits a specified duration of time.
Maps task category numbers to the corresponding bit flags.
typedef uint16_t sched_catflags
The type of fields containing sets of bit flags that correspond to task categories.
The CPU clock prescale value of the timer that the scheduler uses to keep track of elapsed time.
The two-logarithm of the CPU clock prescale value of the timer that the scheduler uses to keep track of elapsed time.
extern sched_time sched_delta
The scheduler iteration time delta.
sched_task *sched_find(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i)
Queries the task list.
Deprecated, kept for backward compatibility.
sched_task *sched_get_at(uint8_t i)
Accesses the task list by index.
sched_time sched_get_timestamp(void)
Gets a scheduler timestamp corresponding to the current time.
void sched_init(void)
Initializes the task scheduler.
uint8_t sched_invoke(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i)
Invokes a matching task on the task list.
void sched_invoke_all(uint8_t st_mask,
uint8_t st_val)
Invokes all matching tasks on the task list.
extern volatile sched_catflags sched_isr_tcww
This is the ISR-Task Category Wakeup Word (I-TCWW), a variable that contains bit flags representing a set of task categories that should be notified at the start of the next scheduler iteration.
extern uint8_t sched_list_size
Current size of the task list.
The maximum number of tasks that can be scheduled simultaneously.
sched_task *sched_ptr_query(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i,
uint8_t *task_i_p)
Queries the task list.
uint8_t sched_query(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i)
Queries the task list.
uint8_t sched_remove(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i)
Marks a matching task on the task list for removal.
void sched_remove_all(uint8_t st_mask,
uint8_t st_val)
Marks all matching tasks on the task list for removal.
void sched_run(void) __attribute__ ((noreturn))
Enters the main loop of the task scheduler.
typedef struct sched_task
Represents an instance of a task that can be scheduled for execution.
typedef void (*sched_task_handler)(struct sched_task *task)
The type of pointers to functions that implement a task handler procedure.
extern sched_catflags sched_task_tcww
This is the Task-Task Category Wakeup Word (T-TCWW), a variable that contains bit flags representing a set of task categories that should be notified at the start of the next scheduler iteration.
extern volatile uint16_t sched_tick_count_h
High bytes (“bigticks”) of the scheduling clock’s tick count.
The duration in microseconds of a scheduler tick.
extern sched_time sched_ticks
The scheduler iteration timestamp.
typedef struct sched_time
Represents either a duration or a scheduler timestamp.
sched_time sched_time_add(sched_time a,
sched_time b)
Adds sched_time b to sched_time a.
uint8_t sched_time_gt(sched_time a,
sched_time b)
Tests whether sched_time a contains a greater integer value than b.
uint8_t sched_time_gte(sched_time a,
sched_time b)
Tests whether sched_time a contains a greater-or-equal integer value than b.
uint8_t sched_time_is_zero(sched_time t)
Tests whether a sched_time contains a zero value.
Constructs a sched_time value representing the given duration in smallticks and bigticks.
uint8_t sched_time_lt(sched_time a,
sched_time b)
Tests whether sched_time a contains a lesser integer value than b.
uint8_t sched_time_lte(sched_time a,
sched_time b)
Tests whether sched_time a contains a lesser-or-equal integer value than b.
A sched_time value representing the longest representable duration.
The longest duration representable by a sched_time, in milliseconds (rounded down).
The longest duration representable by a sched_time, in microseconds.
The largest number of smallticks storable in a sched_time, including those stored as bigticks.
Constructs a sched_time value representing the given duration in milliseconds.
Constructs a sched_time value representing the given duration in microseconds.
sched_time sched_time_sub(sched_time a,
sched_time b)
Subtracts sched_time b from sched_time a.
Evaluates to the duration in milliseconds represented by a given sched_time value.
Evaluates to the duration in microseconds represented by a given sched_time value.
Evaluates to the total number of smallticks stored in a given sched_time value.
A sched_time value representing a zero duration (no time at all).
uint8_t sched_wake(uint8_t st_mask,
uint8_t st_val,
uint8_t start_i,
uint8_t notify)
Awakens and optionally notifies a matching task on the task list.
void sched_wake_all(uint8_t st_mask,
uint8_t st_val,
uint8_t notify)
Awakens and optionally notifies all matching tasks on the task list.
Maps a field size, a field offset and two arbitary integers to an integer that has a bitfield with the specified size at the specified offset, containing bits from the second arbitrary integer, while the remaining bits are equal to the corresponding bits in the first arbitrary integer.
uint8_t size
Size in bytes of the memory location to monitor.
NOTE: The error codes are those with names starting with “SPI_E_”.
module is currently performing an operation
Reference to the I/O direction register (DDRx) for the pins used by the SPI peripheral.
module is disabled
SPI length error (bytes to transmit and receive both zero)
attempted operation not allowed in current module state
unspecified error
Evaluates to a true value if and only if the SPI module is busy with an ongoing asynchronous operation.
Evaluates to a true value if and only if the SPI module is initialized and ready to begin a new asynchronous operation.
Register bit number of the MISO pin of the SPI peripheral.
Register bit number of the MOSI pin of the SPI peripheral.
Reference to the I/O input register (PINx) for the pins used by the SPI peripheral.
Reference to the I/O output register (PORTx) for the pins used by the SPI peripheral.
module is idle as master and ready to begin a new operation
extern volatile spi_state spi_request_state
Contains a state code representing the current state of the SPI module.
Register bit number of the SCK pin of the SPI peripheral.
module is configured as a slave
Register bit number of the SS pin of the SPI peripheral.
Alias of the bit number of the MSTR bit in the SPCR register.
typedef uint8_t spi_state
The type of state and result codes for the SPI module.
extern volatile sched_catflags spi_task_cats
Tasks in the categories indicated by this sched_catflags value will be notified by the SPI module’s ISR when a request operation finishes (either successfully or with an error).
Helper module for SPI communication.
void spihelper_async_mstr_init(uint8_t ss_b,
uint8_t ss_c,
uint8_t ss_d,
uint8_t ctrl,
sched_catflags task_cats)
Configures the SPI module for Master mode and sets task categories for notifications.
uint8_t spihelper_exchange_bytes(uint8_t data_out)
Synchronously exchanges a single pair of bytes via the SPI peripheral.
void spihelper_init(uint8_t ctrl)
Configures the SPI module for either Master or Slave mode, depending on the value of the Master/Slave Select (MSTR) bit in the ctrl argument.
void spihelper_mstr_init(uint8_t ss_b,
uint8_t ss_c,
uint8_t ss_d,
uint8_t ctrl)
Configures the SPI module for Master mode.
spi_state spihelper_request(uint8_t n_out,
volatile const uint8_t *bfr_out,
uint8_t n_in,
uint8_t offset_in,
volatile uint8_t *bfr_in)
Initiates an SPI request operation consisting of a transmit phase followed by a receive phase.
void spihelper_shutdown(void)
Disables the SPI module.
uint8_t srcadr
INM address of the source node.
uint8_t st
Task control and status byte (TCSB) of the task instance.
Common message types, result codes and payload data types for the Task-based TLV/INM (TTLV) communication module (task_tlv.h).
Close