Data Structures | |
struct | XMC_I2C_CH_CONFIG_t |
Macros | |
#define | XMC_I2C0_CH0 XMC_USIC0_CH0 |
#define | XMC_I2C0_CH1 XMC_USIC0_CH1 |
#define | XMC_I2C1_CH0 XMC_USIC1_CH0 |
#define | XMC_I2C1_CH1 XMC_USIC1_CH1 |
#define | XMC_I2C2_CH0 XMC_USIC2_CH0 |
#define | XMC_I2C2_CH1 XMC_USIC2_CH1 |
#define | XMC_I2C_10BIT_ADDR_GROUP (0x7800U) |
Enumerations | |
enum | XMC_I2C_CH_INTERRUPT_NODE_POINTER_t |
USIC IIC Features:
#define XMC_I2C0_CH0 XMC_USIC0_CH0 |
USIC0 channel 0 base address
#define XMC_I2C0_CH1 XMC_USIC0_CH1 |
USIC0 channel 1 base address
#define XMC_I2C1_CH0 XMC_USIC1_CH0 |
USIC1 channel 0 base address
#define XMC_I2C1_CH1 XMC_USIC1_CH1 |
USIC1 channel 1 base address
#define XMC_I2C2_CH0 XMC_USIC2_CH0 |
USIC2 channel 0 base address
#define XMC_I2C2_CH1 XMC_USIC2_CH1 |
USIC2 channel 1 base address
#define XMC_I2C_10BIT_ADDR_GROUP (0x7800U) |
Value to verify the address is 10-bit or not
enum XMC_I2C_CH_CMD_t |
enum XMC_I2C_CH_EVENT_t |
I2C events.
enum XMC_I2C_CH_INPUT_t |
I2C channel interrupt node pointers
I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8].
I2C status.
enum XMC_I2C_CH_STATUS_t |
void XMC_I2C_CH_ClearStatusFlag | ( | XMC_USIC_CH_t *const | channel, |
uint32_t | flag | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
flag | Status flag |
void XMC_I2C_CH_ConfigExternalInputSignalToBRG | ( | XMC_USIC_CH_t *const | channel, |
const uint16_t | pdiv, | ||
const uint32_t | oversampling, | ||
const XMC_USIC_CH_INPUT_COMBINATION_MODE_t | combination_mode | ||
) |
channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
pdiv | Desired divider for the external frequency input. Range: minimum value = 1, maximum value = 1024 |
oversampling | Required oversampling. The value indicates the number of time quanta for one symbol of data. This can be related to the number of samples for each logic state of the data signal. Range: 1 to 32. Value should be chosen based on the protocol used. |
combination_mode | USIC channel input combination mode |
void XMC_I2C_CH_DisableAcknowledgeAddress0 | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_DisableDataTransmission | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel handle of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
void XMC_I2C_CH_DisableEvent | ( | XMC_USIC_CH_t *const | channel, |
uint32_t | event | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
event | ORed values of XMC_I2C_CH_EVENT_t enum |
void XMC_I2C_CH_DisableMasterClock | ( | XMC_USIC_CH_t *const | channel | ) |
channel | A constant pointer to XMC_USIC_CH_t, pointing to the USIC channel base address. |
void XMC_I2C_CH_EnableAcknowledgeAddress0 | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_EnableDataTransmission | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel handle of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
void XMC_I2C_CH_EnableEvent | ( | XMC_USIC_CH_t *const | channel, |
uint32_t | event | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
event | ORed values of XMC_I2C_CH_EVENT_t enum |
void XMC_I2C_CH_EnableMasterClock | ( | XMC_USIC_CH_t *const | channel | ) |
channel | A constant pointer to XMC_USIC_CH_t, pointing to the USIC channel base address. |
uint8_t XMC_I2C_CH_GetReceivedData | ( | const XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
uint8_t XMC_I2C_CH_GetReceiverStatusFlag | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
uint16_t XMC_I2C_CH_GetSlaveAddress | ( | const XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel handler of type XMC_USIC_CH_t |
uint32_t XMC_I2C_CH_GetStatusFlag | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_Init | ( | XMC_USIC_CH_t *const | channel, |
const XMC_I2C_CH_CONFIG_t *const | config | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
config | Constant pointer to I2C channel config structure of type XMC_I2C_CH_CONFIG_t |
void XMC_I2C_CH_InitEx | ( | XMC_USIC_CH_t *const | channel, |
const XMC_I2C_CH_CONFIG_t *const | config, | ||
bool | init_brg | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
config | Constant pointer to I2C channel config structure of type XMC_I2C_CH_CONFIG_t |
init_brg | Selects if the baudrate generator should be configured automatically. |
void XMC_I2C_CH_MasterReceiveAck | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_MasterReceiveNack | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_MasterRepeatedStart | ( | XMC_USIC_CH_t *const | channel, |
const uint16_t | addr, | ||
const XMC_I2C_CH_CMD_t | command | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
addr | I2C master address |
command | read/write command |
void XMC_I2C_CH_MasterStart | ( | XMC_USIC_CH_t *const | channel, |
const uint16_t | addr, | ||
const XMC_I2C_CH_CMD_t | command | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
addr | I2C master address |
command | read/write command |
void XMC_I2C_CH_MasterStop | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_MasterTransmit | ( | XMC_USIC_CH_t *const | channel, |
const uint8_t | data | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
data | data to transmit from I2C channel |
void XMC_I2C_CH_SelectInterruptNodePointer | ( | XMC_USIC_CH_t *const | channel, |
const XMC_I2C_CH_INTERRUPT_NODE_POINTER_t | interrupt_node, | ||
const uint32_t | service_request | ||
) |
channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
interrupt_node | Interrupt node pointer to be configured. Range: XMC_I2C_CH_INTERRUPT_NODE_POINTER_TRANSMIT_SHIFT, XMC_I2C_CH_INTERRUPT_NODE_POINTER_TRANSMIT_BUFFER etc. |
service_request | Service request number. Range: 0 to 5. |
XMC_I2C_CH_STATUS_t XMC_I2C_CH_SetBaudrate | ( | XMC_USIC_CH_t *const | channel, |
const uint32_t | rate | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
rate | baud rate of I2C channel |
XMC_I2C_CH_STATUS_t XMC_I2C_CH_SetBaudrateEx | ( | XMC_USIC_CH_t *const | channel, |
uint32_t | rate, | ||
bool | normal_divider_mode | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
rate | baud rate of I2C channel |
normal_divider_mode | Selects normal divider mode for baudrate generator instead of default fractional divider decreasing jitter of signal at the cost of frequency selection |
void XMC_I2C_CH_SetHoldDelay | ( | XMC_USIC_CH_t *const | channel, |
uint32_t | hdel | ||
) |
channel | A constant pointer to XMC_USIC_CH_t, pointing to the USIC channel base address. |
void XMC_I2C_CH_SetInputSource | ( | XMC_USIC_CH_t *const | channel, |
const XMC_I2C_CH_INPUT_t | input, | ||
const uint8_t | source | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
input | I2C channel input stage of type XMC_I2C_CH_INPUT_t |
source | Input source select for the input stage(0->DX0A, 1->DX1A, .. 7->DX7G) |
void XMC_I2C_CH_SetInterruptNodePointer | ( | XMC_USIC_CH_t *const | channel, |
const uint8_t | service_request | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
service_request | Service request number in the range of 0-5 |
void XMC_I2C_CH_SetSlaveAddress | ( | XMC_USIC_CH_t *const | channel, |
const uint16_t | address | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
address | I2C slave address |
void XMC_I2C_CH_SlaveTransmit | ( | XMC_USIC_CH_t *const | channel, |
const uint8_t | data | ||
) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
data | data to transmit from I2C channel |
void XMC_I2C_CH_Start | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
XMC_I2C_CH_STATUS_t XMC_I2C_CH_Stop | ( | XMC_USIC_CH_t *const | channel | ) |
channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
void XMC_I2C_CH_TriggerServiceRequest | ( | XMC_USIC_CH_t *const | channel, |
const uint32_t | service_request_line | ||
) |
channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
service_request_line | service request number of the event to be triggered. Range: 0 to 5. |