- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please can you explain the Hardwaruser-guide code
BSC-i2c
/*code*/
include wiced_hal_i2c.h.
#define I2C_SLAVE_ADDRESS (0x76)
#define I2C_SLAVE_OPERATION_READ 0
#define I2C_SLAVE_OPERATION_WRITE 1
void test_i2c_driver( void )
{
/*What does it mean ="123456" ¿number bytes?*/
uint8_t data_array[] = "123456";
wiced_hal_i2c_init(WICED_I2C_SDA_P35_SCL_P37);
wiced_hal_i2c_get_speed( );
wiced_hal_i2c_set_speed( I2CM_SPEED_100KHZ );
wiced_hal_i2c_write( data_array, sizeof( data_array ), I2C_SLAVE_ADDRESS);
wiced_hal_i2c_read( data_array, sizeof( data_array ), I2C_SLAVE_ADDRESS);
WICED_BT_TRACE( "Read bytes %s\n\r", data_array );
it does not work
Please Help.
Thanks you team
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the attached code. Use the following API to set the I2C speed.
bsc_SetSpeed(BSC_CTL_SCL_xxxKHZ);
wiced_hal_i2c_set_speed(I2CM_SPEED_xxxKHZ);