Two-Wire Interface High Speed (TWIHS) driver for SAM.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
|
static void | twihs_clear_disable_clock_wait_state (Twihs *p_twihs) |
| Clear clock wait state disable mode. More...
|
|
static void | twihs_disable_alternative_command (Twihs *p_twihs) |
| Enable alternative command mode. More...
|
|
static void | twihs_disable_clock_wait_state (Twihs *p_twihs) |
| Clock stretching disabled in slave mode, OVRE and UNRE will indicate overrun and underrun. More...
|
|
static void | twihs_disable_highspeed (Twihs *p_twihs) |
| Disable high speed mode. More...
|
|
void | twihs_disable_interrupt (Twihs *p_twihs, uint32_t ul_sources) |
| Disable TWIHS interrupts. More...
|
|
void | twihs_disable_master_mode (Twihs *p_twihs) |
| Disable TWIHS master mode. More...
|
|
static void | twihs_disable_pec (Twihs *p_twihs) |
| Disable packet error checking. More...
|
|
static void | twihs_disable_slave_addr1_matching (Twihs *p_twihs) |
| Slave Address 1 matching disabled. More...
|
|
static void | twihs_disable_slave_addr2_matching (Twihs *p_twihs) |
| Slave Address 2 matching disabled. More...
|
|
static void | twihs_disable_slave_addr3_matching (Twihs *p_twihs) |
| Slave Address 3 matching disabled. More...
|
|
static void | twihs_disable_slave_data_matching (Twihs *p_twihs) |
| First received data matching disabled. More...
|
|
static void | twihs_disable_slave_default_addr (Twihs *p_twihs) |
| Acknowledge of the SMBus Default Address disabled. More...
|
|
void | twihs_disable_slave_mode (Twihs *p_twihs) |
| Disable TWIHS slave mode. More...
|
|
static void | twihs_disable_slave_nack (Twihs *p_twihs) |
| Normal value to be returned in the ACK cycle of the data phase in slave receiver mode. More...
|
|
static void | twihs_disable_smbus (Twihs *p_twihs) |
| Disable SMBus mode. More...
|
|
static void | twihs_disable_smbus_host_header (Twihs *p_twihs) |
| Acknowledge of the SMBus Host Header disabled. More...
|
|
static void | twihs_enable_alternative_command (Twihs *p_twihs) |
| Enable alternative command mode. More...
|
|
static void | twihs_enable_highspeed (Twihs *p_twihs) |
| Enable high speed mode. More...
|
|
void | twihs_enable_interrupt (Twihs *p_twihs, uint32_t ul_sources) |
| Enable TWIHS interrupts. More...
|
|
void | twihs_enable_master_mode (Twihs *p_twihs) |
| Enable TWIHS master mode. More...
|
|
static void | twihs_enable_pec (Twihs *p_twihs) |
| Enable packet error checking. More...
|
|
static void | twihs_enable_slave_addr1_matching (Twihs *p_twihs) |
| Slave Address 1 matching enabled. More...
|
|
static void | twihs_enable_slave_addr2_matching (Twihs *p_twihs) |
| Slave Address 2 matching enabled. More...
|
|
static void | twihs_enable_slave_addr3_matching (Twihs *p_twihs) |
| Slave Address 3 matching enabled. More...
|
|
static void | twihs_enable_slave_data_matching (Twihs *p_twihs) |
| First received data matching enabled. More...
|
|
static void | twihs_enable_slave_default_addr (Twihs *p_twihs) |
| Acknowledge of the SMBus Default Address enabled. More...
|
|
void | twihs_enable_slave_mode (Twihs *p_twihs) |
| Enable TWIHS slave mode. More...
|
|
static void | twihs_enable_slave_nack (Twihs *p_twihs) |
| NACK value to be returned in the ACK cycle of the data phase in slave receiver mode. More...
|
|
static void | twihs_enable_smbus (Twihs *p_twihs) |
| Enable SMBus mode. More...
|
|
static void | twihs_enable_smbus_host_header (Twihs *p_twihs) |
| Acknowledge of the SMBus Host Header enabled. More...
|
|
static void | twihs_enable_smbus_quick_command (Twihs *p_twihs) |
| If Master mode is enabled, a SMBUS Quick Command is sent. More...
|
|
uint32_t | twihs_get_interrupt_mask (Twihs *p_twihs) |
| Read TWIHS interrupt mask. More...
|
|
uint32_t | twihs_get_interrupt_status (Twihs *p_twihs) |
| Get TWIHS interrupt status. More...
|
|
Pdc * | twihs_get_pdc_base (Twihs *p_twihs) |
| Get TWIHS PDC base address. More...
|
|
void | twihs_mask_slave_addr (Twihs *p_twihs, uint32_t ul_mask) |
| A mask can be applied on the slave device address in slave mode in order to allow multiple address answer. More...
|
|
uint32_t | twihs_master_init (Twihs *p_twihs, const twihs_options_t *p_opt) |
| Initialize TWIHS master mode. More...
|
|
uint32_t | twihs_master_read (Twihs *p_twihs, twihs_packet_t *p_packet) |
| Read multiple bytes from a TWIHS compatible slave device. More...
|
|
uint32_t | twihs_master_write (Twihs *p_twihs, twihs_packet_t *p_packet) |
| Write multiple bytes to a TWIHS compatible slave device. More...
|
|
uint32_t | twihs_probe (Twihs *p_twihs, uint8_t uc_slave_addr) |
| Test if a chip answers a given I2C address. More...
|
|
uint8_t | twihs_read_byte (Twihs *p_twihs) |
| Reads a byte from the TWIHS bus. More...
|
|
void | twihs_read_write_protection_status (Twihs *p_twihs, uint32_t *p_status) |
| Read the write protection status. More...
|
|
static void | twihs_request_pec (Twihs *p_twihs) |
| Request a packet error checking. More...
|
|
void | twihs_reset (Twihs *p_twihs) |
| Reset TWIHS. More...
|
|
static void | twihs_send_clear (Twihs *p_twihs) |
| If master mode is enabled, send a bus clear command. More...
|
|
void | twihs_set_alternative_command (Twihs *p_twihs, uint32_t ul_alt_cmd) |
| Set length/direction/PEC for alternative command mode. More...
|
|
void | twihs_set_filter (Twihs *p_twihs, uint32_t ul_filter) |
| Set the filter for TWIHS. More...
|
|
void | twihs_set_slave_addr (Twihs *p_twihs, uint32_t ul_device_addr) |
| Set TWIHS slave address. More...
|
|
void | twihs_set_sleepwalking (Twihs *p_twihs, uint32_t ul_matching_addr1, bool flag1, uint32_t ul_matching_addr2, bool flag2, uint32_t ul_matching_addr3, bool flag3, uint32_t ul_matching_data, bool flag) |
| Set sleepwalking match mode. More...
|
|
uint32_t | twihs_set_speed (Twihs *p_twihs, uint32_t ul_speed, uint32_t ul_mck) |
| Set the I2C bus speed in conjunction with the clock frequency. More...
|
|
void | twihs_set_write_protection (Twihs *p_twihs, bool flag) |
| Enables/Disables write protection mode. More...
|
|
void | twihs_slave_init (Twihs *p_twihs, uint32_t ul_device_addr) |
| Initialize TWIHS slave mode. More...
|
|
uint32_t | twihs_slave_read (Twihs *p_twihs, uint8_t *p_data) |
| Read data from master. More...
|
|
uint32_t | twihs_slave_write (Twihs *p_twihs, uint8_t *p_data) |
| Write data to TWIHS bus. More...
|
|
void | twihs_smbus_set_timing (Twihs *p_twihs, uint32_t ul_timing) |
| Set the prescaler, TLOW:SEXT, TLOW:MEXT and clock high max cycles for SMBUS mode. More...
|
|
void | twihs_write_byte (Twihs *p_twihs, uint8_t uc_byte) |
| Sends a byte of data to one of the TWIHS slaves on the bus. More...
|
|