UP Task,Argpase
This commit is contained in:
@@ -29,7 +29,7 @@ uint8_t SDA_Read() {
|
||||
}
|
||||
|
||||
void Test_iic() {
|
||||
HW_Dev_IIC dev = {
|
||||
SW_Dev_IIC dev = {
|
||||
.CLK_SET = CLK_Pin,
|
||||
.SDA_SET = SDA_Set,
|
||||
.SDA = SDA_Read,
|
||||
@@ -38,14 +38,14 @@ void Test_iic() {
|
||||
};
|
||||
uint8_t internalAddress = 0x56;
|
||||
|
||||
uint32_t len = 10;
|
||||
uint32_t len = 64;
|
||||
uint8_t writeData[len];
|
||||
uint8_t readData[len];
|
||||
for (int i = 0; i < len; ++i) {
|
||||
writeData[i] = rand() % 10;
|
||||
writeData[i] = rand() % 200;
|
||||
}
|
||||
HW_IIC_WL(dev, internalAddress, writeData, len);
|
||||
SW_IIC_WL(dev, internalAddress, writeData, len);
|
||||
BufPrint("<IIC> TX", writeData, 8, len, 16);
|
||||
HW_IIC_RL(dev, internalAddress, readData, len, 1);
|
||||
SW_IIC_RL(dev, internalAddress, readData, len, 1);
|
||||
BufPrint("<IIC> RX", readData, 8, len, 16);
|
||||
}
|
Reference in New Issue
Block a user