Removed I2C initialisation from GDx EEPROM driver, as the I2C bus is already initialised in platform_init() and the double initialisation made some radios freeze on the splash screen

replace/14274e144a5fb3ded85ef3384d84668d34d44c3b
Silvano Seva 2021-03-14 11:45:15 +01:00
rodzic 92e0abafa2
commit 5d0c7f3d9c
3 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -29,19 +29,15 @@ static const uint8_t devAddr = 0xA0; /* EEPROM I2C address */
void AT24Cx_init()
{
gpio_setMode(I2C_SDA, OPEN_DRAIN);
gpio_setMode(I2C_SCL, OPEN_DRAIN);
gpio_setAlternateFunction(I2C_SDA, 3);
gpio_setAlternateFunction(I2C_SCL, 3);
i2c0_init();
/*
* Nothing to do here, on GDx devices the I2C bus is initialised in
* platform_init() before starting all the other modules.
*/
}
void AT24Cx_terminate()
{
i2c0_terminate();
gpio_setMode(I2C_SDA, INPUT);
gpio_setMode(I2C_SCL, INPUT);
}
void AT24Cx_readData(uint32_t addr, void* buf, size_t len)

Wyświetl plik

@ -105,6 +105,8 @@ void platform_terminate()
adc0_terminate();
pthread_mutex_destroy(&adc_mutex);
i2c0_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW);
}

Wyświetl plik

@ -104,6 +104,8 @@ void platform_terminate()
adc0_terminate();
pthread_mutex_destroy(&adc_mutex);
i2c0_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW);
}