PebbleOS v4.47.0-1219-g7c542d7a9
Loading...
Searching...
No Matches
pbl_cia402_ops Struct Reference

Drive callbacks, each optional. More...

#include <cia402.h>

Data Fields

int(* switch_on )(struct pbl_cia402 *drive, void *arg)
 Turn the power stage on, without driving the motor.
 
void(* switch_off )(struct pbl_cia402 *drive, void *arg)
 Turn the power stage off.
 
int(* enable )(struct pbl_cia402 *drive, void *arg)
 Enable the motor, to follow its targets.
 
void(* disable )(struct pbl_cia402 *drive, void *arg)
 Disable the motor, as the disable operation option code (0x605c) says.
 
void(* quick_stop )(struct pbl_cia402 *drive, void *arg)
 Stop the motor as the quick stop option code (0x605a) says, then call pbl_cia402_quick_stop_done().
 
void(* fault )(struct pbl_cia402 *drive, uint16_t code, void *arg)
 React to a fault as the fault reaction option code (0x605e) says, then call pbl_cia402_fault_reaction_done().
 
int(* set_mode )(struct pbl_cia402 *drive, enum pbl_cia402_mode mode, void *arg)
 Change the mode of operation, one the drive supports (0x6502).
 

Detailed Description

Drive callbacks, each optional.

The power stage is on in switched on, operation enabled, quick stop active and fault reaction active; the motor is enabled, following its targets, in operation enabled, and still energized in quick stop active and fault reaction active, as their ramps run.

Field Documentation

◆ disable

void(* pbl_cia402_ops::disable) (struct pbl_cia402 *drive, void *arg)

Disable the motor, as the disable operation option code (0x605c) says.

◆ enable

int(* pbl_cia402_ops::enable) (struct pbl_cia402 *drive, void *arg)

Enable the motor, to follow its targets.

Returns 0 or a negative errno.

◆ fault

void(* pbl_cia402_ops::fault) (struct pbl_cia402 *drive, uint16_t code, void *arg)

React to a fault as the fault reaction option code (0x605e) says, then call pbl_cia402_fault_reaction_done().

Without it, the reaction is done at once.

◆ quick_stop

void(* pbl_cia402_ops::quick_stop) (struct pbl_cia402 *drive, void *arg)

Stop the motor as the quick stop option code (0x605a) says, then call pbl_cia402_quick_stop_done().

Without it, the quick stop is done at once.

◆ set_mode

int(* pbl_cia402_ops::set_mode) (struct pbl_cia402 *drive, enum pbl_cia402_mode mode, void *arg)

Change the mode of operation, one the drive supports (0x6502).

Returns 0, or a negative errno to refuse it.

◆ switch_off

void(* pbl_cia402_ops::switch_off) (struct pbl_cia402 *drive, void *arg)

Turn the power stage off.

◆ switch_on

int(* pbl_cia402_ops::switch_on) (struct pbl_cia402 *drive, void *arg)

Turn the power stage on, without driving the motor.

Returns 0 or a negative errno.


The documentation for this struct was generated from the following file: