This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK10 nrf_drv_twi.c warning

I have OCD for compiler warnings... I must use -Wall (I'm a freak like that).
In nrf_drv_twi.c line 433 there is a function twi_clear_bus. This gives an -Wunused-parameter warning.
If you add

static void twi_clear_bus(nrf_drv_twi_t const * const p_instance, nrf_drv_twi_config_t const * p_config)
{
	(void) p_instance;   // new code
    NRF_GPIO->PIN_CNF[p_config->scl] = SCL_PIN_CONF;
    ...

Then the warning goes away

Related