cu-ist8310 1.2.0

Copper source driver for the IST8310 digital magnetometer.
docs.rs failed to build cu-ist8310-1.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: cu-ist8310-1.1.0

cu-ist8310

Copper source component for the iSentek IST8310 magnetometer.

Output

cu_ist8310::Ist8310Source emits cu_sensor_payloads::MagnetometerPayload (magnetic flux density in microtesla) at 100 Hz.

How To Use

  1. Add the crate dependency:
cu-ist8310 = { path = "../../components/sources/cu_ist8310", default-features = false, features = ["defmt"] }
  1. Define the task type alias in your app:
pub type Ist8310Source = cu_ist8310::Ist8310Source<MyIst8310Bus>;

MyIst8310Bus is your board/resource type that implements cu_ist8310::Ist8310Bus.

  1. Add the source task in copperconfig.ron:
(
    id: "ist8310",
    type: "tasks::Ist8310Source",
    logging: (enabled: true),
    resources: {"i2c": "fc.i2c2_ist8310"},
)
  1. Connect it to a consumer:
(
    src: "ist8310",
    dst: "mag_logger",
    msg: "cu_sensor_payloads::MagnetometerPayload",
)

The source has no component-specific config fields; wiring the resource and connection is enough.