-
i2c读从设备问题,不知道为何只能读到1个字节
读取代码如下:uint8_tread_len(uint8_taddr,uint8_treg,uint8_tlen,uint8_t*buf){while(i2c_flag_get(I2CX,I2C_FLAG_I2CBSY));i2c_start_on_bus(I2CX);while(!i2c_flag_get(I2CX,I2C_FLAG_SBSEND));i2c_master_addressing(I2CX,addr
2022-09-22 1
读取代码如下:uint8_tread_len(uint8_taddr,uint8_treg,uint8_tlen,uint8_t*buf){while(i2c_flag_get(I2CX,I2C_FLAG_I2CBSY));i2c_start_on_bus(I2CX);while(!i2c_flag_get(I2CX,I2C_FLAG_SBSEND));i2c_master_addressing(I2CX,addr