Fledex.Driver.Manager (fledex v0.5.0)

View Source

Summary

Types

The structure to hold the driver related data.

Types

driver_t()

@type driver_t() :: [{driver :: module(), config :: keyword()}]

The structure to hold the driver related data.

It consists of a list (to allow loading of several modules) of tuples with:

  • driver: Which modules should get loaded. Each module usually should have a default configuration, which can then be overwritten with specific settings
  • config: a keyword list to modify the default settings. Each module has their own set of settings. You need to check the driver module documentation for allowed settings

Note: You can specify a driver module several times and give them different settings.

  This allows for example to send the same data to two different SPI ports.

Example:

[{Fledex.Driver.Impl.Kino, update_freq: 10 }]

Functions

remove_invalid_drivers(drivers)

validate_driver(driver_module)