================================================================================
                                样例使用说明
                             Sample Description
================================================================================
功能描述：
此样例演示了通过中断方式，主机发送不定长数据，从机接收不定长数据。主机向从机发送
10字节的数据（0~9），然后从机接收数据（0~9）并存入ShowBuffer；主机向从机发送100
字节数据（1~100），然后从机接收数据（1~100）并存入ShowBuffer；主机向从机发送10
字节的数据（0~9），然后从机接收数据（0~9）并存入ShowBuffer。

Function descriptions:
This example demonstrates how the host sends variable length data and the slave
receives variable length data through interrupt mode. The host sends 10 bytes of
data (0-9) to the slave, and then the slave receives the data (0-9) and stored 
in the ShowBuffer; The host sends 100 bytes of data (1-100) to the slave, and 
then the slave receives the data (1-100) and stored in the ShowBuffer; The host 
sends 10 bytes of data (0-9) to the slave, and then theslave receives the data 
(0-9) and stored in the ShowBuffer.
================================================================================
测试环境：
测试用板：PY32C680_STK
MDK版本： 5.28
IAR版本： 9.20
GCC 版本：GNU Arm Embedded Toolchain 10.3-2021.10

Test environment:
Test board: PY32C680_STK
MDK Version: 5.28
IAR Version: 9.20
GCC Version: GNU Arm Embedded Toolchain 10.3-2021.10
================================================================================
使用步骤：
1. 编译下载程序到MCU，并运行。
2. 先复位从机，然后再复位主机。
3. 复位完成后，按下主机的用户按键，主机和从机开始通讯。
4. 从机进入调试窗口，查看ShowBuffer,分别有三帧数据(0~9)、(1~100)、(0~9)。

Example execution steps:
1. Compile and download the program to the MCU, and run it.
2. Reset the slave device first, and then reset the master device.
3. After the reset, press the user button on the master device to initiate 
   communication between the master and slave.
4. The slave uses the debugging mode to view the ShowBuffer with three frames of
data (0~9), (1~100), and (0~9) respectively..
================================================================================
注意事项：
（1）I2C引脚
PA11     ------> I2C1_SCL
PA8      ------> I2C1_SDA
（2）主机程序和从机程序
主机程序为I2C_TwoBoard_MasterTxIndefiniteLengthData_IT
从机程序为I2C_TwoBoard_SlaveRxIndefiniteLengthData_IT
（3）更改通信速率
如需修改速率，直接修改I2C_SPEEDCLOCK即可。
（4）从机接收单帧数据长度限制
用户可根据需要修改从机程序main.c中宏RX_MAX_LEN的值，RX_MAX_LEN定义了从机单次
接收数据长度（当前样例为200byte）。
（5）建议去掉STK板上R2\R28

Notes:
(1) I2C pin
PA11     ------> I2C1_SCL
PA8      ------> I2C1_SDA
(2) Master program and slave program
Master program: I2C_TwoBoard_MasterTxIndefiniteLengthData_IT
Slave program: I2C_TwoBoard_SlaveRxIndefiniteLengthData_IT
(3) Change communication rate
To modify the speed, simply change the I2C_SPEEDCLOCK value.
(4) Length limit for single frame data received by the slave
Users can modify the value of macro RX_MAX_LEN in the slave program main.c as
needed, which defines the length of data received by the slave in a single
attempt (currently 200bytes).
(5)It is recommended to remove R2\R28 from STK board
================================================================================
