1.2.21.74 1.3.25.74 1.4.21.74 1.5.25.74 1.6.22.74 1.7.23.74 1.9.19.74 1.29.23.74 1.30.18.74 1.31.18.74 1.32.26.74 1.33.16.74 1.37.18.74 1.38.21.74 1.39.18.74 1.40.20.74 SERCOMx_I2C_AckActionSet Function

C

/* x = SERCOM instance number */

/* I2C slave mode */

void SERCOMx_I2C_AckActionSet(SERCOM_I2C_SLAVE_ACK_ACTION_SEND ackAction)

Summary

Sets the ACK action for the next byte that will be received from the I2C master

Description

Sets the ACK action for the next byte that will be received from the I2C master. This API must be used when the Smart mode is enabled. In Smart mode, SERCOM automatically sends the ACK/NAK based on the Acknowledgement action set. This API allows the application to set the Acknowledgement action for the next character is received.

Preconditions

SERCOMx_I2C_Initialize must have been called for the associated SERCOM I2C instance.

Parameters

Param Description
SERCOM_I2C_SLAVE_ACK_ACTION_SEND_ACK Acknowledge the next byte thatwill be received.
SERCOM_I2C_SLAVE_ACK_ACTION_SEND_NAK Send NAK for the next byte thatwill be received.

Returns

None.

Example

// Send ACK for the next byte that will be received from the I2C master.
SERCOM0_I2C_AckActionSet(SERCOM_I2C_SLAVE_ACK_ACTION_SEND_ACK);

Remarks

This API is only generated when smart mode is enabled in I2C slave mode