CONFIG_AK8975_I2C_ADDR

I2C address

Type: hex

Help

I2C address of the AK8975 sensor. Choose:

  • 0x0C if CAD1 connected to GND and CAD0 is connected to GND
  • 0x0D if CAD1 connected to GND and CAD0 is connected to VDD
  • 0x0E if CAD1 connected to VDD and CAD0 is connected to GND
  • 0x0F if CAD1 connected to VDD and CAD0 is connected to VDD

If the AK8975 sensor is part of a MPU9159 chip, the I2C address needs to be 0x0C.

Direct dependencies

AK8975 && SENSOR

(Includes any dependencies from ifs and menus.)

Default

  • 0x0C

Kconfig definition

At drivers/sensor/ak8975/Kconfig:20

Included via Kconfig:8Kconfig.zephyr:37drivers/Kconfig:54drivers/sensor/Kconfig:31

Menu path: (Top) → Device Drivers → Sensor Drivers → AK8975 Magnetometer

config AK8975_I2C_ADDR
    hex "I2C address"
    range 0x0C 0x0F
    default 0x0C
    depends on AK8975 && SENSOR
    help
      I2C address of the AK8975 sensor. Choose:

      - 0x0C if CAD1 connected to GND and CAD0 is connected to GND
      - 0x0D if CAD1 connected to GND and CAD0 is connected to VDD
      - 0x0E if CAD1 connected to VDD and CAD0 is connected to GND
      - 0x0F if CAD1 connected to VDD and CAD0 is connected to VDD

      If the AK8975 sensor is part of a MPU9159 chip, the I2C address
      needs to be 0x0C.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)