mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
drivers, jc42: fix constness in jc42_init
This commit is contained in:
parent
e4cc780f71
commit
5fa123c8a2
@ -81,7 +81,7 @@ extern const saul_driver_t jc42_temperature_saul_driver;
|
||||
* @return 0 on success
|
||||
* @return -1 on error
|
||||
*/
|
||||
int jc42_init(jc42_t* dev, jc42_params_t* params);
|
||||
int jc42_init(jc42_t* dev, const jc42_params_t* params);
|
||||
|
||||
/**
|
||||
* @brief Get content of configuration register
|
||||
|
@ -78,7 +78,7 @@ int jc42_get_temperature(const jc42_t* dev, int16_t* temperature)
|
||||
return JC42_OK;
|
||||
}
|
||||
|
||||
int jc42_init(jc42_t* dev, jc42_params_t* params)
|
||||
int jc42_init(jc42_t* dev, const jc42_params_t* params)
|
||||
{
|
||||
uint16_t config;
|
||||
dev->i2c = params->i2c;
|
||||
|
@ -50,11 +50,9 @@ extern const saul_driver_t jc42_temperature_saul_driver;
|
||||
void auto_init_jc42(void)
|
||||
{
|
||||
for (unsigned i = 0; i < JC42_NUMOF; i++) {
|
||||
const jc42_params_t *p = &jc42_params[i];
|
||||
|
||||
LOG_DEBUG("[auto_init_saul] initializing jc42 #%u\n", i);
|
||||
|
||||
if (jc42_init(&jc42_devs[i], (jc42_params_t*) p) < 0) {
|
||||
if (jc42_init(&jc42_devs[i], &jc42_params[i]) < 0) {
|
||||
LOG_ERROR("[auto_init_saul] error initializing jc42 #%u\n", i);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user