Library to handle the X_NUCLEO_IHM02A1 Motor Control Expansion Board based on the L6470 component.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   HelloWorld_IHM02A1 ConcorsoFinal HelloWorld_IHM02A1_mbedOS HelloWorld_IHM02A1-Serialinterpreter ... more

Fork of X_NUCLEO_IHM02A1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

XNucleoIHM02A1 Class Reference

XNucleoIHM02A1 Class Reference

Class representing a X-NUCLEO-IHM02A1 board. More...

#include <XNucleoIHM02A1.h>

Public Member Functions

 XNucleoIHM02A1 (L6470_init_t *init_0, L6470_init_t *init_1, PinName flag_irq, PinName busy_irq, PinName standby_reset, PinName ssel, DevSPI *spi)
 Constructor.
 XNucleoIHM02A1 (L6470_init_t *init_0, L6470_init_t *init_1, PinName flag_irq, PinName busy_irq, PinName standby_reset, PinName ssel, PinName mosi, PinName miso, PinName sclk)
 Constructor.
 ~XNucleoIHM02A1 (void)
 Destructor.
bool init (void)
 Initializing the X-NUCLEO-IHM02A1 board.
L6470 ** get_components (void)
 Getting the array of components.
virtual uint32_t * perform_prepared_actions (void)
 Performing the actions set on the motors with calls to a number of "Prepare<Action>()" methods, one for each motor of the daisy-chain.

Protected Member Functions

bool init_L6470_0 (void)
 Initialize the L6470 component.
bool init_L6470_1 (void)
 Initialize the L6470 component.

Detailed Description

Class representing a X-NUCLEO-IHM02A1 board.

Definition at line 73 of file XNucleoIHM02A1.h.


Constructor & Destructor Documentation

XNucleoIHM02A1 ( L6470_init_t *  init_0,
L6470_init_t *  init_1,
PinName  flag_irq,
PinName  busy_irq,
PinName  standby_reset,
PinName  ssel,
DevSPI *  spi 
)

Constructor.

Parameters:
init_0pointer to the initialization structure of the first motor.
init_1pointer to the initialization structure of the second motor.
flag_irqpin name of the FLAG pin of the component.
busy_irqpin name of the BUSY pin of the component.
standby_resetpin name of the STBY pin of the component.
sselpin name of the SSEL pin of the SPI device to be used for communication.
spiSPI device to be used for communication.

Definition at line 73 of file XNucleoIHM02A1.cpp.

XNucleoIHM02A1 ( L6470_init_t *  init_0,
L6470_init_t *  init_1,
PinName  flag_irq,
PinName  busy_irq,
PinName  standby_reset,
PinName  ssel,
PinName  mosi,
PinName  miso,
PinName  sclk 
)

Constructor.

Parameters:
init_0pointer to the initialization structure of the first motor.
init_1pointer to the initialization structure of the second motor.
flag_irqpin name of the FLAG pin of the component.
busy_irqpin name of the BUSY pin of the component.
standby_resetpin name of the STBY pin of the component.
sselpin name of the SSEL pin of the SPI device to be used for communication.
mosipin name of the MOSI pin of the SPI device to be used for communication.
misopin name of the MISO pin of the SPI device to be used for communication.
sclkpin name of the SCLK pin of the SPI device to be used for communication.

Definition at line 117 of file XNucleoIHM02A1.cpp.

~XNucleoIHM02A1 ( void   )

Destructor.

Definition at line 108 of file XNucleoIHM02A1.h.


Member Function Documentation

L6470** get_components ( void   )

Getting the array of components.

Parameters:
None.
Return values:
Thearray of components.

Definition at line 124 of file XNucleoIHM02A1.h.

bool init ( void   )

Initializing the X-NUCLEO-IHM02A1 board.

Initializing the X_NUCLEO_IHM02A1 board.

Return values:
trueif initialization is successful, false otherwise.

Definition at line 151 of file XNucleoIHM02A1.cpp.

bool init_L6470_0 ( void   ) [protected]

Initialize the L6470 component.

Return values:
trueif initialization is successful, false otherwise.

Definition at line 196 of file XNucleoIHM02A1.cpp.

bool init_L6470_1 ( void   ) [protected]

Initialize the L6470 component.

Return values:
trueif initialization is successful, false otherwise.

Definition at line 210 of file XNucleoIHM02A1.cpp.

virtual uint32_t* perform_prepared_actions ( void   ) [virtual]

Performing the actions set on the motors with calls to a number of "Prepare<Action>()" methods, one for each motor of the daisy-chain.

Parameters:
None.
Return values:
Apointer to the results returned by the components, i.e. an integer value for each of them.

Definition at line 136 of file XNucleoIHM02A1.h.