We are closed from August 1, 2026 to August 16, 2026. Orders placed during this time will be processed starting on August 17, 2026.

Call external drivers

Koheron SDK 0.x documentation. You are reading the stable documentation used by most existing customers. This version uses CONFIG=.../config.yml and the legacy 0.x instrument flow.

For example the driver Laser defined by the file laser.hpp uses the driver Xadc defined by the file xadc.hpp:

Usage

To call the driver Xadc from the driver Laser: * include xadc.hpp file * use ctx.get in the driver Laser constructor * return Xadc object

Example

#include <xadc.hpp>
public:
    Laser(Context& ctx)
    : ctl(ctx.mm.get<mem::control>())
    , sts(ctx.mm.get<mem::status>())
    , xadc(ctx.get<Xadc>())
  private:
    Memory<mem::control>& ctl;
    Memory<mem::status>& sts;
    Xadc& xadc;


Important note

Be careful not to introduce circular dependencies in the constructors.

See also

[email protected]