Emmanuel L. / X_NUCLEO_IHM04A1

Dependents:   HelloWorld_IHM04A1

Fork of X_NUCLEO_IHM04A1 by ST

Embed: (wiki syntax)

« Back to documentation index

BDCMotor Class Reference

BDCMotor Class Reference

An abstract class for BDCMotor components. More...

#include <BDCMotor_class.h>

Inherits Component.

Inherited by L6206.

Public Types

enum  direction_t
 

Rotation modes.

More...

Public Member Functions

virtual void DisableBridge (unsigned int)=0
 Disabling the specified bridge.
virtual void EnableBridge (unsigned int)=0
 Enabling the specified bridge.
virtual unsigned int GetBridgeInputPwmFreq (unsigned int)=0
 Getting the PWM frequency of the specified bridge;.
virtual unsigned int GetBridgeStatus (unsigned int)=0
 Getting the bridge status.
virtual motorState_t GetDeviceState (unsigned int)=0
 Getting the device State.
virtual unsigned int GetSpeed (unsigned int)=0
 Getting the current speed in % of the specified motor.
virtual void HardHiZ (unsigned int)=0
 Stopping the motor and disabling the power bridge immediately.
virtual void HardStop (unsigned int)=0
 Stopping the motor immediately.
virtual void Run (unsigned int, direction_t)=0
 Running the motor.
virtual void SetBridgeInputPwmFreq (unsigned int, unsigned int)=0
 Setting the PWM frequency of the specified bridge.
virtual void SetDualFullBridgeConfig (unsigned int)=0
 Setting the dual bridge configuration mode.
virtual bool SetSpeed (unsigned int, unsigned int)=0
 Setting the speed in %.
virtual int Init (void *init)=0
 Initializing the component.
virtual int ReadID (uint8_t *id)=0
 Getting the ID of the component.

Detailed Description

An abstract class for BDCMotor components.

Definition at line 55 of file BDCMotor_class.h.


Member Enumeration Documentation

Rotation modes.

Definition at line 61 of file BDCMotor_class.h.


Member Function Documentation

virtual void DisableBridge ( unsigned  int ) [pure virtual]

Disabling the specified bridge.

Parameters:
bridgeIdfrom 0 for bridge A to 1 for bridge B.
Return values:
None.

Implemented in L6206.

virtual void EnableBridge ( unsigned  int ) [pure virtual]

Enabling the specified bridge.

Parameters:
bridgeIdfrom 0 for bridge A to 1 for bridge B
Return values:
None.

Implemented in L6206.

virtual unsigned int GetBridgeInputPwmFreq ( unsigned  int ) [pure virtual]

Getting the PWM frequency of the specified bridge;.

Parameters:
bridgeIdfrom 0 for bridge A to 1 for bridge B.
Return values:
Thefrequency in Hz of the specified bridge input PWM.

Implemented in L6206.

virtual unsigned int GetBridgeStatus ( unsigned  int ) [pure virtual]

Getting the bridge status.

Parameters:
bridgeIdfrom 0 for bridge A to 1 for bridge B.
Return values:
Thestatus.

Implemented in L6206.

virtual motorState_t GetDeviceState ( unsigned  int ) [pure virtual]

Getting the device State.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
Return values:
Thedevice state

Implemented in L6206.

virtual unsigned int GetSpeed ( unsigned  int ) [pure virtual]

Getting the current speed in % of the specified motor.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
Return values:
Thecurrent speed in %.

Implemented in L6206.

virtual void HardHiZ ( unsigned  int ) [pure virtual]

Stopping the motor and disabling the power bridge immediately.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
Return values:
None.

Implemented in L6206.

virtual void HardStop ( unsigned  int ) [pure virtual]

Stopping the motor immediately.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
Return values:
None.

Implemented in L6206.

virtual int Init ( void *  init ) [pure virtual, inherited]

Initializing the component.

Parameters:
[in]initpointer to device specific initalization structure.
Return values:
0in case of success, an error code otherwise.

Implemented in L6206.

virtual int ReadID ( uint8_t *  id ) [pure virtual, inherited]

Getting the ID of the component.

Parameters:
[out]idpointer to an allocated variable to store the ID into.
Return values:
0in case of success, an error code otherwise.

Implemented in L6206.

virtual void Run ( unsigned  int,
direction_t   
) [pure virtual]

Running the motor.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
directionThe direction of rotation.
Return values:
None.

Implemented in L6206.

virtual void SetBridgeInputPwmFreq ( unsigned  int,
unsigned  int 
) [pure virtual]

Setting the PWM frequency of the specified bridge.

Parameters:
bridgeIdfrom 0 for bridge A to 1 for bridge B.
frequencyof the PWM in Hz
Return values:
None.

Implemented in L6206.

virtual void SetDualFullBridgeConfig ( unsigned  int ) [pure virtual]

Setting the dual bridge configuration mode.

Parameters:
configuration.The bridge configuration.
Return values:
None.

Implemented in L6206.

virtual bool SetSpeed ( unsigned  int,
unsigned  int 
) [pure virtual]

Setting the speed in %.

Parameters:
motorIdfrom 0 to (MAX_NUMBER_OF_BRUSH_DC_MOTORS - 1).
speedThe new speed in %.
Return values:
truein case of success, "false" otherwise.

Implemented in L6206.