|
PebbleOS v4.47.0-1219-g7c542d7a9
|
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). | |
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.
| void(* pbl_cia402_ops::disable) (struct pbl_cia402 *drive, void *arg) |
Disable the motor, as the disable operation option code (0x605c) says.
| int(* pbl_cia402_ops::enable) (struct pbl_cia402 *drive, void *arg) |
Enable the motor, to follow its targets.
Returns 0 or a negative errno.
| 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.
| 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.
| 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.
| void(* pbl_cia402_ops::switch_off) (struct pbl_cia402 *drive, void *arg) |
Turn the power stage off.
| 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.