Question problem i2c CYW20706 & CYBT-343026-eval

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeRi_3276026
Level 1
Level 1
First like given

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

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

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);

View solution in original post

4 Replies