Browse Source

drivers, adxl345: fix constness in adxl345_init

master
smlng 6 years ago
parent
commit
8664ca3cba
  1. 2
      drivers/adxl345/adxl345.c
  2. 2
      drivers/include/adxl345.h

2
drivers/adxl345/adxl345.c

@ -34,7 +34,7 @@
#define BUS (dev->i2c)
#define ADDR (dev->addr)
int adxl345_init(adxl345_t *dev, adxl345_params_t* params)
int adxl345_init(adxl345_t *dev, const adxl345_params_t* params)
{
uint8_t reg;

2
drivers/include/adxl345.h

@ -168,7 +168,7 @@ typedef struct {
* @return ADXL345_NOI2C if initialization of I2C bus failed
* @return ADXL345_NODEV if accelerometer test failed
*/
int adxl345_init(adxl345_t *dev, adxl345_params_t* params);
int adxl345_init(adxl345_t *dev, const adxl345_params_t* params);
/**
* @brief Read accelerometer's data
*

Loading…
Cancel
Save