Configures the I2C module for master mode (the only one currently implemented).
void i2chelper_mstr_init( uint8_t twbr, sched_catflags task_cats )
Initiates an I2C request operation consisting of a transmit phase followed by a receive phase.
i2c_state i2chelper_request( i2c_slave_addr addr, uint8_t n_out, volatile const uint8_t * bfr_out, uint8_t n_in, volatile uint8_t * bfr_in )
Shuts down the I2C module.
void i2chelper_shutdown( void )
Starts an asynchronous register read operation.
i2c_state mcp23018_begin_read( i2c_slave_addr addr, mcp23018_reg r )
Starts an asynchronous register write operation.
i2c_state mcp23018_begin_write( i2c_slave_addr addr, mcp23018_reg r, uint8_t v )
Register address validator.
uint8_t mcp23018_is_valid_reg( mcp23018_reg r )
Tests whether there is an ongoing I2C operation.
i2c_state mcp23018_poll_read( uint8_t * v )
Performs a synchronous register read operation.
i2c_state mcp23018_read( i2c_slave_addr addr, mcp23018_reg r, uint8_t * v )
Performs a synchronous register write operation.
i2c_state mcp23018_write( i2c_slave_addr addr, mcp23018_reg r, uint8_t v )
Updates potentiometer wiper settings in the selected MCP4x device.
uint8_t mcp4x_set_wiper( uint8_t pot_bits, uint8_t pos )
Disables potentiometers in the selected MCP4x device.
uint8_t mcp4x_shutdown( uint8_t pot_bits )
Registers a memory monitor.
uint8_t memmon_add( const memmon_spec * mon )
Obtains the amount of available unused RAM.
ptrdiff_t memmon_get_free_ram( void )
Initializes the memory monitor module.
void memmon_init( uint8_t task_num_cat, uint8_t max_mon, memmon_spec * mon_array, sched_time delay, uint8_t tlv_typ, uint8_t inm_dstadr )
Unregisters a memory monitor with a specified index number.
uint8_t memmon_remove( uint8_t mon_i )
Unregisters a memory monitor monitoring a specified location.
uint8_t memmon_remove_ptr( memmon_cptr mon_ptr )
Shuts down the memory monitor module.
void memmon_shutdown( void )
Sends a 1-byte input command (one that receives a single input data byte in response) to the nRF24x.
uint8_t nrf24x_in_1( uint8_t cmd, uint8_t * data_p )
Used to finish an asynchronous input command sent to the nRF24x and fetch the received input data.
uint8_t nrf24x_in_finish( uint8_t * bfr_in )
Sends an N-byte input command (one that receives a specified number of input data bytes in response) to the nRF24x.
uint8_t nrf24x_in_n( uint8_t cmd, uint8_t n_in, uint8_t * bfr_in )
Sends a 0-byte output command (one that consists only of a command word) to the nRF24x.
uint8_t nrf24x_out_0( uint8_t cmd )
Sends a 1-byte output command (one that consists of a command word and a single output data byte) to the nRF24x.
uint8_t nrf24x_out_1( uint8_t cmd, uint8_t data )
Sends an N-byte output command (one that consists of a command word and a specified number of output data bytes) to the nRF24x.
uint8_t nrf24x_out_n( uint8_t cmd, uint8_t n_out, uint8_t * bfr_out )
Adds the specified task to the task list.
uint8_t sched_add( const sched_task * task )
Busy waits a specified duration of time.
void sched_busy_wait( sched_time duration )
Queries the task list.
sched_task *sched_find( uint8_t st_mask, uint8_t st_val, uint8_t start_i )
Accesses the task list by index.
sched_task *sched_get_at( uint8_t i )
Gets a scheduler timestamp corresponding to the current time.
sched_time sched_get_timestamp( void )
Initializes the task scheduler.
void sched_init( void )
Invokes a matching task on the task list.
uint8_t sched_invoke( uint8_t st_mask, uint8_t st_val, uint8_t start_i )
Invokes all matching tasks on the task list.
void sched_invoke_all( uint8_t st_mask, uint8_t st_val )
Queries the task list.
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 )
Marks a matching task on the task list for removal.
uint8_t sched_remove( uint8_t st_mask, uint8_t st_val, uint8_t start_i )
Marks all matching tasks on the task list for removal.
void sched_remove_all( uint8_t st_mask, uint8_t st_val )
Enters the main loop of the task scheduler.
void sched_run( void ) __attribute__ ((noreturn))
The type of pointers to functions that implement a task handler procedure.
typedef void ( * sched_task_handler )(struct sched_task *task)
Adds sched_time b to sched_time a.
sched_time sched_time_add( sched_time a, sched_time b )
Tests whether sched_time a contains a greater integer value than b.
uint8_t sched_time_gt( sched_time a, sched_time b )
Tests whether sched_time a contains a greater-or-equal integer value than b.
uint8_t sched_time_gte( sched_time a, sched_time b )
Tests whether a sched_time contains a zero value.
uint8_t sched_time_is_zero( sched_time t )
Tests whether sched_time a contains a lesser integer value than b.
uint8_t sched_time_lt( sched_time a, sched_time b )
Tests whether sched_time a contains a lesser-or-equal integer value than b.
uint8_t sched_time_lte( sched_time a, sched_time b )
Subtracts sched_time b from sched_time a.
sched_time sched_time_sub( sched_time a, sched_time b )
Awakens and optionally notifies a matching task on the task list.
uint8_t sched_wake( uint8_t st_mask, uint8_t st_val, uint8_t start_i, uint8_t notify )
Awakens and optionally notifies all matching tasks on the task list.
void sched_wake_all( uint8_t st_mask, uint8_t st_val, uint8_t notify )
Configures the SPI module for Master mode and sets task categories for notifications.
void spihelper_async_mstr_init( uint8_t ss_b, uint8_t ss_c, uint8_t ss_d, uint8_t ctrl, sched_catflags task_cats )
Synchronously exchanges a single pair of bytes via the SPI peripheral.
uint8_t spihelper_exchange_bytes( uint8_t data_out )
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_init( uint8_t ctrl )
Configures the SPI module for Master mode.
void spihelper_mstr_init( uint8_t ss_b, uint8_t ss_c, uint8_t ss_d, uint8_t ctrl )
Initiates an SPI request operation consisting of a transmit phase followed by a receive phase.
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 )
Disables the SPI module.
void spihelper_shutdown( void )