Home
last modified time | relevance | path

Searched refs:data_rd (Results 1 – 2 of 2) sorted by relevance

/hal_espressif-3.6.0/components/driver/test/
Dtest_i2c.c320 uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); in i2c_slave_read_test() local
333 …len = i2c_slave_read_buffer( I2C_SLAVE_NUM, data_rd + size_rd, DATA_LENGTH, 10000 / portTICK_RATE_… in i2c_slave_read_test()
339 disp_buf(data_rd, size_rd); in i2c_slave_read_test()
341 TEST_ASSERT(data_rd[i] == i); in i2c_slave_read_test()
343 free(data_rd); in i2c_slave_read_test()
352 uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); in master_read_slave_test() local
353 memset(data_rd, 0, DATA_LENGTH); in master_read_slave_test()
367 i2c_master_read(cmd, data_rd, RW_TEST_LENGTH-1, ACK_VAL); in master_read_slave_test()
368 i2c_master_read_byte(cmd, data_rd + RW_TEST_LENGTH-1, NACK_VAL); in master_read_slave_test()
374 printf("%d\n", data_rd[i]); in master_read_slave_test()
[all …]
/hal_espressif-3.6.0/examples/peripherals/i2c/i2c_self_test/main/
Di2c_example_main.c63 static esp_err_t __attribute__((unused)) i2c_master_read_slave(i2c_port_t i2c_num, uint8_t *data_rd in i2c_master_read_slave() argument
72 i2c_master_read(cmd, data_rd, size - 1, ACK_VAL); in i2c_master_read_slave()
74 i2c_master_read_byte(cmd, data_rd + size - 1, NACK_VAL); in i2c_master_read_slave()
212 uint8_t *data_rd = (uint8_t *)malloc(DATA_LENGTH); in i2c_test_task() local
243 ret = i2c_master_read_slave(I2C_MASTER_NUM, data_rd, DATA_LENGTH); in i2c_test_task()
245 ret = i2c_master_read_slave(I2C_MASTER_NUM, data_rd, RW_TEST_LENGTH); in i2c_test_task()
257 disp_buf(data_rd, d_size); in i2c_test_task()