Driver for the TWIS (Two-Wire Slave Interface).
This driver provides access to the main features of the TWIS controller. The TWIS interconnects a TWI slave on a unique two-wire bus. The TWIS is programmable as a slave with sequential or single-byte access. Internal Address access and Ten bit addressing mode is supported.
#define avr32_twi_t avr32_twis_t |
void twis_send_data_ack |
( |
volatile avr32_twis_t * |
twis | ) |
|
Enable ACK transfer in Slave Receiver Mode.
- Parameters
-
twis | Base address of the TWI (i.e. &AVR32_TWIS). |
void twis_send_data_nack |
( |
volatile avr32_twis_t * |
twis, |
|
|
bool |
stop_callback |
|
) |
| |
Enable NACK transfer in Slave Receive Mode.
- Parameters
-
twis | Base address of the TWI (i.e. &AVR32_TWIS). |
stop_callback | Set true to use Stop condition Callback function |
References twis_slave_fct_t::stop, and UL.
Initialize the TWI Slave Module.
- Parameters
-
twis | Base address of the TWI (i.e. &AVR32_TWIS). |
*opt | Options for initializing the TWI module (see twis_options_t) |
*slave_fct | Pointer on application functions |
References twis_options_t::chip, CONF_TWIS_IRQ_LEVEL, CONF_TWIS_IRQ_LINE, cpu_irq_disable, cpu_irq_restore(), cpu_irq_save(), irq_register_handler, twis_options_t::pba_hz, twis_options_t::smbus, twis_options_t::speed, STATUS_OK, twis_options_t::tenbit, twis_inst_slave, and UL.