iic
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
xiic_slave.c File Reference

Overview

Implements IIC slave transfer APIs.

Contains slave functions for the XIic component. This file is necessary when slave operations, sending and receiving data as a slave on the IIC bus, are desired.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.01b jhl 3/26/02 repartioned the driver 1.01c ecm 12/05/02 new rev 1.13a wgr 03/22/07 Converted to new coding style. 1.15a ktn 03/18/09 Minor changes to comply to Doxygen 2.00a ktn 10/22/09 Converted all register accesses to 32 bit access. Updated to use the HAL APIs/macros. Removed the macro XIic_mEnterCriticalRegion and used XIic_IntrGlobalDisable int its place. Removed the macro XIic_mExitCriticalRegion and used XIic_IntrGlobalEnable in its place. Some of the macros have been renamed to remove _m from the name and some of the macros have been renamed to be consistent, see the xiic_i.h and xiic_l.h files for further information 2.03a rkv 01/25/11 Updated in NAAS interrupt handler to support data received less than FIFO size prior to NAAS interrupt. Fixed for CR590212. 2.04a sdm 07/22/11 Added IsSlaveSetAckOff flag to the instance structure. The IsSlaveSetAckOff is set when the Slave has set the Ack Off in the RecvSlaveData function and is cleared in the NotAddrAsSlaveHandler when the master has released the bus. This flag is to be used by slave applications for recovering when it has gone out of sync with the master. CR 615004. 3.1 adk 01/08/15 When configured as a slave return the actual number of bytes have been received/sent by the Master to the user callback (CR: 828504). 3.7 rna 10/06/20 Flush the RxFIFO in NAAS handler only when the FIFO is not empty and the controller is still in NAAS state. 3.15 vlt 01/27/26 Fixed codespell issues. 3.16 vn 07/30/26 Fix Doxygen warnings 3.16 tb 09/22/26 Align Doxygen comments with AMD documentation standards

#include "xiic.h"
#include "xiic_i.h"

Functions

void XIic_SlaveInclude (void)
 Includes slave code so slave events are processed. More...
 
int XIic_SlaveSend (XIic *InstancePtr, u8 *TxMsgPtr, int ByteCount)
 Sends data as a slave on the IIC bus. More...
 
int XIic_SlaveRecv (XIic *InstancePtr, u8 *RxMsgPtr, int ByteCount)
 Receives data as a slave on the IIC bus. More...