uint16_t addr = 0x29;// 0x19 0x20 0x30 0x31 0x32 0x31
以上地址都试过。。。。
---------------------------------------------
int main(void)
{
uint8_t a88;
uint8_t r8;
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_I2C1_Init();
MX_SAI1_Init();
uint16_t addr = 0x29;// 0x19 0x20 0x30 0x31 0x32 0x31
HAL_Delay(100);
HAL_I2C_Mem_Read(&hi2c1, addr, 0x0f, 1, &a88, 1, 1000);
HAL_Delay(100);
printf("%x\n", a88);
a88=0x96;
HAL_I2C_Mem_Write(&hi2c1, addr, 0x2e, 1, &a88, 1, 1000);
while (1)
{
HAL_SAI_Receive( &hsai_BlockA1,&r8,1,1000);
}
}
|