hello. I want use I2C program. so, I used twi_master_using_app_twi example. SDA is output only 1byte(0x21). I need to output a continuous 5byte. Where do I need to modify the part. thank you.
hello. I want use I2C program. so, I used twi_master_using_app_twi example. SDA is output only 1byte(0x21). I need to output a continuous 5byte. Where do I need to modify the part. thank you.
I have some problem. const pointer(p_data) because, I still send one byte in twi_sensor example.
ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * const p_instance,
uint8_t address,
uint8_t const * p_data,
uint32_t length,
bool xfer_pending)
{
return twi_transfer(p_instance, address,
p_data, length,
xfer_pending, true);
}
so, modified source code from const pointer to array. but build is Not OK.
ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * const p_instance,
uint8_t address,
uint8_t p_data[10],
uint32_t length,
bool xfer_pending)
{
return twi_transfer(p_instance, address,
p_data[10], length,
xfer_pending, true);
}
error messgae as below.
..........\components\drivers_nrf\twi_master\nrf_drv_twi.c(683): error: #167: argument of type "uint8_t" is incompatible with parameter of type "uint8_t *"
what's mean?
p_data[10] -> &p_data[10] buile is OK. but I still send one byte.
p_data[10] -> &p_data[10] buile is OK. but I still send one byte.