Table of Contents

Class Bmm150I2cBase

Namespace
Iot.Device.Magnetometer
Assembly
Iot.Device.Bmm150.dll

Abstract class for Bmm150 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 Bmm150.

public abstract class Bmm150I2cBase
Inheritance
Bmm150I2cBase
Derived

Constructors

Bmm150I2cBase()

protected Bmm150I2cBase()

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

The register value.

ReadBytes(I2cDevice, byte, SpanByte)

Read bytes on a specific Bmm150 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 Bmm150.

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.