mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
sensors/bmm150: configure I2C frequency
This commit is contained in:
@@ -326,6 +326,10 @@ config SENSORS_BMM150
|
||||
|
||||
if SENSORS_BMM150
|
||||
|
||||
config BMM150_I2C_FREQUENCY
|
||||
int "BMM150 I2C frequency"
|
||||
default 400000
|
||||
|
||||
config SENSORS_BMM150_POLL
|
||||
bool "Enables polling sensor data"
|
||||
default n
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define BMM150_I2C_FREQ 400000
|
||||
|
||||
#define BMM150_CHIPID_VAL 0x32
|
||||
|
||||
#define BMM150_CHIPID 0x40
|
||||
@@ -712,7 +710,7 @@ int bmm150_register_uorb(int devno, FAR struct bmm150_config_s *config)
|
||||
|
||||
dev->config.i2c = config->i2c;
|
||||
dev->config.addr = config->addr;
|
||||
dev->freq = BMM150_I2C_FREQ;
|
||||
dev->freq = CONFIG_BMM150_I2C_FREQUENCY;
|
||||
|
||||
/* Register sensor */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user