SAM D20 I2C Slave Interrupt Driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include "i2c_slave_interrupt.h"
Functions | |
void | _i2c_slave_interrupt_handler (uint8_t instance) |
static void | _i2c_slave_read (struct i2c_slave_module *const module) |
static void | _i2c_slave_write (struct i2c_slave_module *const module) |
void | i2c_slave_disable_nack_on_address (struct i2c_slave_module *const module) |
Disables sending NACK on address match. More... | |
void | i2c_slave_enable_nack_on_address (struct i2c_slave_module *const module) |
Enables sending of NACK on address match. More... | |
enum status_code | i2c_slave_read_packet_job (struct i2c_slave_module *const module, struct i2c_slave_packet *const packet) |
Initiates a reads packet operation. More... | |
void | i2c_slave_register_callback (struct i2c_slave_module *const module, i2c_slave_callback_t callback, enum i2c_slave_callback callback_type) |
Registers callback for the specified callback type. More... | |
void | i2c_slave_unregister_callback (struct i2c_slave_module *const module, enum i2c_slave_callback callback_type) |
Unregisters callback for the specified callback type. More... | |
enum status_code | i2c_slave_write_packet_job (struct i2c_slave_module *const module, struct i2c_slave_packet *const packet) |
Initiates a write packet operation. More... | |
void _i2c_slave_interrupt_handler | ( | uint8_t | instance | ) |
Interrupt handler for I2C slave
[in] | instance | Sercom instance that triggered the interrupt |
References _i2c_slave_read(), _i2c_slave_write(), _sercom_instances, Assert, I2C_SLAVE_CALLBACK_ERROR, I2C_SLAVE_CALLBACK_ERROR_LAST_TRANSFER, I2C_SLAVE_CALLBACK_READ_COMPLETE, I2C_SLAVE_CALLBACK_READ_REQUEST, I2C_SLAVE_CALLBACK_WRITE_COMPLETE, I2C_SLAVE_CALLBACK_WRITE_REQUEST, I2C_TRANSFER_READ, I2C_TRANSFER_WRITE, STATUS_ERR_IO, STATUS_ERR_OVERFLOW, and STATUS_OK.
Referenced by i2c_slave_init().
|
static |
Reads next data. Used by interrupt handler to get next data byte from master.
[in,out] | module | Pointer to software module structure |
Referenced by _i2c_slave_interrupt_handler().
|
static |
Writes next data. Used by interrupt handler to send next data byte to master.
[in,out] | module | Pointer to software module structure |
Referenced by _i2c_slave_interrupt_handler().