HWA
Bare metal programming with style
Class _usia: Universal Serial Interface

A class _usia object is an USI.

Actions


configure:

hwa( configure, USI,
mode, disconnected // The USI is disabled
| spi_master // The USI acts as a SPI master
| spi_slave // The USI acts as a SPI slave
| twi_master // The USI acts as a I²C master
| twi_slave, // The USI acts as a I²C slave
clock, software // Clocked by software
| compare0 // Clocked by compare unit ? of counter 0
| external_rising // Clocked by external source rising edge
| external_falling // Clocked by external source falling edge
);


read:

uint8_t byte = hw( read, usi0 );


write:

hw( write, usi0, 'A' );


trigger:

hw( trigger, usi0 );
hwa
#define hwa(...)
hwa( action, object [,...] ) stores an action for an object into a HWA context.
Definition: hwa_macros.h:552
hw
#define hw(...)
hw( action, object [,...] ) executes an action immediately on an object.
Definition: hwa_macros.h:523