Table of Contents

Class Ak8963I2cBase

Namespace
Iot.Device.Magnetometer
Assembly
Iot.Device.Ak8963.dll

Abstract class for AK8963 the I2C interface. This sensor can be found as a sub I2C sensor like in the MPU9250. The access is done thru another I2C device and the core I2C primitive are different. Use those 3 primitive to define the access to read and write bytes to the AK8963.

public abstract class Ak8963I2cBase
Inheritance
Ak8963I2cBase
Derived

Constructors

Ak8963I2cBase()

protected Ak8963I2cBase()

Methods

ReadByte(I2cDevice, byte)

Read a byte on a specific register.

public abstract byte ReadByte(I2cDevice i2CDevice, byte reg)

Parameters

i2CDevice I2cDevice

I2C device.

reg byte

The register to read.

Returns

byte

Byte from specific register.

ReadBytes(I2cDevice, byte, SpanByte)

Read bytes on a specific AK8963 register.

public abstract void ReadBytes(I2cDevice i2CDevice, byte reg, SpanByte readBytes)

Parameters

i2CDevice I2cDevice

I2C device.

reg byte

The register to read.

readBytes SpanByte

Span of byte to store the data read.

WriteRegister(I2cDevice, byte, byte)

Write a register of the AK8963.

public abstract void WriteRegister(I2cDevice i2CDevice, byte reg, byte data)

Parameters

i2CDevice I2cDevice

I2C device.

reg byte

The register to write.

data byte

The data byte to write.