Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HelloWorld_IHM04A1
Fork of X_NUCLEO_IHM04A1 by
L6206 Class Reference
[L6206 Private Constants]
Class representing a L6206 component. More...
#include <l6206_class.h>
Inherits BDCMotor.
Public Types | |
| enum | direction_t |
Rotation modes. More... | |
Public Member Functions | |
| L6206 (PinName EN_flag_A, PinName EN_flag_B, PinName pwm_1A, PinName pwm_2A, PinName pwm_1B, PinName pwm_2B) | |
| Constructor. | |
| virtual | ~L6206 (void) |
| Destructor. | |
| virtual int | Init (void *init=NULL) |
| Initializing the component. | |
| virtual int | ReadID (uint8_t *id=NULL) |
| Getting the ID of the component. | |
| virtual void | AttachErrorHandler (void(*callback)(uint16_t error)) |
| Attaches a user callback to the error Handler. | |
| virtual void | AttachFlagInterrupt (void(*callback)(void)) |
| Attaches a user callback to the flag Interrupt The call back will be then called each time the status flag pin will be pulled down due to the occurrence of a programmed alarms ( OCD, thermal alert) | |
| virtual unsigned int | GetSpeed (unsigned int motorId) |
| Returns the current speed of the specified motor. | |
| virtual motorState_t | GetDeviceState (unsigned int motorId) |
| Returns the device state. | |
| virtual uint8_t | GetFwVersion (void) |
| Returns the FW version of the library. | |
| virtual uint16_t | GetMaxSpeed (unsigned int motorId) |
| Returns the max speed of the specified motor. | |
| virtual void | HardStop (unsigned int motorId) |
| Stops the motor without disabling the bridge. | |
| virtual void | Run (unsigned int motorId, direction_t direction) |
| Runs the motor. | |
| virtual bool | SetSpeed (unsigned int motorId, unsigned int newMaxSpeed) |
| Changes the max speed of the specified device. | |
| virtual void | DisableBridge (unsigned int bridgeId) |
| Disable the specified bridge. | |
| virtual void | EnableBridge (unsigned int bridgeId) |
| Enable the specified bridge. | |
| virtual unsigned int | GetBridgeStatus (unsigned int bridgeId) |
| Get the status of the bridge enabling of the corresponding bridge. | |
| virtual void | HardHiZ (unsigned int motorId) |
| Immediatly stops the motor and disable the power bridge. | |
| virtual void | ErrorHandler (uint16_t error) |
| Error handler which calls the user callback (if defined) | |
| virtual void | SetDualFullBridgeConfig (unsigned int newConfig) |
| Set dual full bridge parallelling configuration. | |
| virtual unsigned int | GetBridgeInputPwmFreq (unsigned int bridgeId) |
| Get the PWM frequency of the specified bridge. | |
| virtual void | SetBridgeInputPwmFreq (unsigned int bridgeId, unsigned int newFreq) |
| Changes the PWM frequency of the bridge input. | |
| virtual bool | SetNbDevices (uint8_t nbDevices) |
| Sets the number of devices to be used. | |
| virtual void | EnableFlagIRQ (uint8_t bridgeId) |
| Enabling the FLAG interrupt handling. | |
| virtual void | DisableFlagIRQ (uint8_t bridgeId) |
| Disabling the FLAG interrupt handling. | |
Protected Member Functions | |
| Status_t | L6206_Init (void *init) |
| Start the L6206 library. | |
| Status_t | L6206_ReadId (uint8_t *id) |
| Read id. | |
| void | L6206_AttachErrorHandler (void(*callback)(uint16_t error)) |
| Attaches a user callback to the error Handler. | |
| void | L6206_AttachFlagInterrupt (void(*callback)(void)) |
| Attaches a user callback to the flag Interrupt The call back will be then called each time the status flag pin will be pulled down due to the occurrence of a programmed alarms ( OCD, thermal alert) | |
| void | L6206_DisableBridge (uint8_t bridgeId) |
| Disable the specified bridge. | |
| void | L6206_EnableBridge (uint8_t bridgeId) |
| Enable the specified bridge. | |
| uint16_t | L6206_GetBridgeStatus (uint8_t deviceId) |
| Get the status of the bridge enabling of the corresponding bridge. | |
| uint16_t | L6206_GetCurrentSpeed (uint8_t motorId) |
| Returns the current speed of the specified motor. | |
| motorState_t | L6206_GetDeviceState (uint8_t motorId) |
| Returns the device state. | |
| uint8_t | L6206_GetFwVersion (void) |
| Returns the FW version of the library. | |
| uint16_t | L6206_GetMaxSpeed (uint8_t motorId) |
| Returns the max speed of the specified motor. | |
| void | L6206_HardHiz (uint8_t motorId) |
| Immediatly stops the motor and disable the power bridge. | |
| void | L6206_HardStop (uint8_t motorId) |
| Stops the motor without disabling the bridge. | |
| void | L6206_Run (uint8_t motorId, motorDir_t direction) |
| Runs the motor. | |
| uint32_t | L6206_GetBridgeInputPwmFreq (uint8_t bridgeId) |
| Get the PWM frequency of the specified bridge. | |
| void | L6206_SetBridgeInputPwmFreq (uint8_t bridgeId, uint32_t newFreq) |
| Changes the PWM frequency of the bridge input. | |
| void | L6206_SetDualFullBridgeConfig (uint8_t newConfig) |
| Set dual full bridge parallelling configuration. | |
| bool | L6206_SetMaxSpeed (uint8_t motorId, uint16_t newMaxSpeed) |
| Changes the max speed of the specified device. | |
| bool | L6206_SetNbDevices (uint8_t nbDevices) |
| Sets the number of devices to be used. | |
| void | L6206_ErrorHandler (uint16_t error) |
| Error handler which calls the user callback (if defined) | |
| void | L6206_FlagInterruptHandler (void) |
| Handlers of the flag interrupt which calls the user callback (if defined) | |
| uint8_t | L6206_GetBridgeIdUsedByMotorId (uint8_t motorId) |
| Get the bridges Id used by a given motor. | |
| uint8_t | L6206_GetBridgeInputUsedByMotorId (uint8_t motorId) |
| Get the PWM input used by a given motor. | |
| uint8_t | L6206_GetMotorIdUsingbridgeInput (uint8_t bridgeInput) |
| Get the motor Id which is using the specified bridge input. | |
| uint8_t | L6206_GetSecondBridgeInputUsedByMotorId (uint8_t motorId) |
| Get the second PWM input used by a given bidirectionnal motor. | |
| bool | L6206_IsBidirectionnalMotor (uint8_t motorId) |
| Test if motor is bidirectionnal. | |
| void | L6206_SetDeviceParamsToPredefinedValues (void) |
| Sets the parameters of the device to predefined values from l6206_target_config.h. | |
| void | L6206_SetDeviceParamsToGivenValues (L6206_Init_t *initDevicePrm) |
| Set the parameters of the device to values of initDevicePrm structure Set GPIO according to these values. | |
| void | L6206_OutVal (uint8_t bridgeId, uint8_t val) |
| Utility function to set or unset EN pin for Bridge A or Bridge B. | |
| void | L6206_Board_Delay (uint32_t delay) |
| Making the CPU wait. | |
| void | L6206_Board_DisableBridge (uint8_t bridgeId) |
| Disable the specified bridge. | |
| void | L6206_Board_EnableBridge (uint8_t bridgeId, uint8_t addDelay) |
| Enable the specified bridge. | |
| uint32_t | L6206_Board_GetFlagPinState (uint8_t bridgeId) |
| Returns the FLAG pin state. | |
| void | L6206_Board_GpioInit (void) |
| Initiliases the GPIOs used by the L6206s. | |
| void | L6206_Board_PwmSetFreq (uint8_t bridgeInput, uint32_t newFreq, uint8_t duty) |
| Sets the frequency of PWM used for bridges inputs. | |
| void | L6206_Board_PwmDeInit (uint8_t bridgeInput) |
| Reset the PWM for the specified brigde input. | |
| void | L6206_Board_PwmInit (uint8_t bridgeInput) |
| Set the PWM frequency the for the specified bridge input. | |
| void | L6206_Board_PwmStop (uint8_t bridgeInput) |
| Stops the PWM uses for the specified brige input. | |
Protected Attributes | |
| bool | pwm_1A_activated |
| PWM timer variables. | |
Detailed Description
Class representing a L6206 component.
Definition at line 121 of file l6206_class.h.
Member Enumeration Documentation
enum direction_t [inherited] |
Rotation modes.
Definition at line 61 of file BDCMotor_class.h.
Constructor & Destructor Documentation
| L6206 | ( | PinName | EN_flag_A, |
| PinName | EN_flag_B, | ||
| PinName | pwm_1A, | ||
| PinName | pwm_2A, | ||
| PinName | pwm_1B, | ||
| PinName | pwm_2B | ||
| ) |
Constructor.
Definition at line 130 of file l6206_class.h.
Generated on Sat Jul 16 2022 00:03:02 by
1.7.2
