X-CUBE-SPN1-20150128 example source code for one motor compiled under mbed. Tested OK on Nucleo F401. l6474.cpp is modified from original with defines in l6474_target_config.h to select the original behaviour (motor de-energised when halted), or new mode to continue powering with a (reduced) current in the coils (braking/position hold capability). On F401 avoid using mbed's InterruptIn on pins 10-15 (any port). Beware of other conflicts! L0 & F0 are included but untested.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

L6474_Private_Variables

L6474_Private_Variables
[L6474]

Variables

void(* flagInterruptCallback )(void)
 Function pointer to flag interrupt call back.
void(* errorHandlerCallback )(uint16_t)
 Function pointer to error handler call back.
deviceParams_t devicePrm [MAX_NUMBER_OF_DEVICES]
 L6474 Device Paramaters structure.

Variable Documentation

deviceParams_t devicePrm[MAX_NUMBER_OF_DEVICES]

L6474 Device Paramaters structure.

Definition at line 95 of file l6474.cpp.

void(* errorHandlerCallback)(uint16_t)

Function pointer to error handler call back.

Definition at line 86 of file l6474.cpp.

void(* flagInterruptCallback)(void)

Function pointer to flag interrupt call back.

Definition at line 84 of file l6474.cpp.