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.
Fork of X_NUCLEO_IHM04A1 by
Functions | |
| 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. | |
| Status_t | L6206_Init (void *init) |
| Start the L6206 library. | |
| uint32_t | L6206_GetBridgeInputPwmFreq (uint8_t bridgeId) |
| Get the PWM frequency of the specified 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. | |
| uint16_t | L6206_GetBridgeStatus (uint8_t deviceId) |
| Get the status of the bridge enabling of the corresponding bridge. | |
| 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. | |
| Status_t | L6206_ReadId (uint8_t *id) |
| Read id. | |
| void | L6206_Run (uint8_t motorId, motorDir_t direction) |
| Runs the motor. | |
| 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. | |
| void | L6206_SetBridgeInputPwmFreq (uint8_t bridgeId, uint32_t newFreq) |
| Changes the PWM frequency of the bridge input. | |
| 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_GetMotorIdUsingbridgeInput (uint8_t bridgeInput) |
| Get the motor Id which is using the specified bridge input. | |
| uint8_t | L6206_GetBridgeInputUsedByMotorId (uint8_t motorId) |
| Get the PWM input used by a given motor. | |
| 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. | |
Function Documentation
| void L6206_AttachErrorHandler | ( | void(*)(uint16_t error) | callback ) | [protected, inherited] |
Attaches a user callback to the error Handler.
The call back will be then called each time the library detects an error
- Parameters:
-
[in] callback Name of the callback to attach to the error Hanlder
- Return values:
-
None
Definition at line 104 of file l6206_class.cpp.
| void L6206_AttachFlagInterrupt | ( | void(*)(void) | callback ) | [protected, inherited] |
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)
- Parameters:
-
[in] callback Name of the callback to attach to the Flag Interrupt
- Return values:
-
None
Definition at line 118 of file l6206_class.cpp.
| void L6206_DisableBridge | ( | uint8_t | bridgeId ) | [protected, inherited] |
Disable the specified bridge.
- Parameters:
-
[in] bridgeId (from 0 for bridge A to 1 for bridge B)
- Return values:
-
None
- Note:
- When input of different brigdes are parallelized together, the disabling of one bridge leads to the disabling of the second one
Definition at line 131 of file l6206_class.cpp.
| void L6206_EnableBridge | ( | uint8_t | bridgeId ) | [protected, inherited] |
Enable the specified bridge.
- Parameters:
-
[in] bridgeId (from 0 for bridge A to 1 for bridge B)
- Return values:
-
None
- Note:
- When input of different brigdes are parallelized together, the enabling of one bridge leads to the enabling of the second one
Definition at line 159 of file l6206_class.cpp.
| void L6206_ErrorHandler | ( | uint16_t | error ) | [protected, inherited] |
Error handler which calls the user callback (if defined)
- Parameters:
-
[in] error Number of the error
- Return values:
-
None
Definition at line 661 of file l6206_class.cpp.
| void L6206_FlagInterruptHandler | ( | void | ) | [protected, inherited] |
Handlers of the flag interrupt which calls the user callback (if defined)
- Return values:
-
None
Definition at line 680 of file l6206_class.cpp.
| uint8_t L6206_GetBridgeIdUsedByMotorId | ( | uint8_t | motorId ) | [protected, inherited] |
Get the bridges Id used by a given motor.
- Parameters:
-
motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
bridgeId 0 for bridge A , 1 for bridge B
Definition at line 707 of file l6206_class.cpp.
| uint32_t L6206_GetBridgeInputPwmFreq | ( | uint8_t | bridgeId ) | [protected, inherited] |
Get the PWM frequency of the specified bridge.
- Parameters:
-
[in] bridgeId 0 for bridge A, 1 for bridge B
- Return values:
-
Freq in Hz
Definition at line 216 of file l6206_class.cpp.
| uint8_t L6206_GetBridgeInputUsedByMotorId | ( | uint8_t | motorId ) | [protected, inherited] |
Get the PWM input used by a given motor.
- Parameters:
-
motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
PWM input 0 for 1A, 1 for 2A, 2 for 1B, 3 for 3B
Definition at line 848 of file l6206_class.cpp.
| uint16_t L6206_GetBridgeStatus | ( | uint8_t | bridgeId ) | [protected, inherited] |
Get the status of the bridge enabling of the corresponding bridge.
- Parameters:
-
[in] bridgeId from 0 for bridge A to 1 for bridge B
- Return values:
-
State of the Enable&Flag pin of the corresponding bridge (1 set, 0 for reset)
Definition at line 296 of file l6206_class.cpp.
| uint16_t L6206_GetCurrentSpeed | ( | uint8_t | motorId ) | [protected, inherited] |
Returns the current speed of the specified motor.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
current speed in % from 0 to 100
Definition at line 226 of file l6206_class.cpp.
| motorState_t L6206_GetDeviceState | ( | uint8_t | motorId ) | [protected, inherited] |
Returns the device state.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
State (STEADY or INACTIVE)
Definition at line 247 of file l6206_class.cpp.
| uint8_t L6206_GetFwVersion | ( | void | ) | [protected, inherited] |
Returns the FW version of the library.
- Return values:
-
L6206_FW_VERSION
Definition at line 266 of file l6206_class.cpp.
| uint16_t L6206_GetMaxSpeed | ( | uint8_t | motorId ) | [protected, inherited] |
Returns the max speed of the specified motor.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
maxSpeed in % from 0 to 100
Definition at line 276 of file l6206_class.cpp.
| uint8_t L6206_GetMotorIdUsingbridgeInput | ( | uint8_t | bridgeInput ) | [protected, inherited] |
Get the motor Id which is using the specified bridge input.
- Parameters:
-
bridgeInput 0 for bridgeInput 1A, 1 for 2A, 2 for 1B, 3 for 3B
- Return values:
-
bridgeId 0 for bridge A , 1 for bridge B
Definition at line 756 of file l6206_class.cpp.
| uint8_t L6206_GetSecondBridgeInputUsedByMotorId | ( | uint8_t | motorId ) | [protected, inherited] |
Get the second PWM input used by a given bidirectionnal motor.
- Parameters:
-
motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
PWM input 0 for 1A, 1 for 2A, 2 for 1B, 3 for 3B
Definition at line 1054 of file l6206_class.cpp.
| void L6206_HardHiz | ( | uint8_t | motorId ) | [protected, inherited] |
Immediatly stops the motor and disable the power bridge.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
None
- Note:
- if two motors uses the same power bridge, the power bridge will be disable only if the two motors are stopped
Definition at line 311 of file l6206_class.cpp.
| void L6206_HardStop | ( | uint8_t | motorId ) | [protected, inherited] |
Stops the motor without disabling the bridge.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
none
Definition at line 386 of file l6206_class.cpp.
| Status_t L6206_Init | ( | void * | init ) | [protected, inherited] |
Start the L6206 library.
- Parameters:
-
[in] init pointer to the initialization data
- Return values:
-
None
Definition at line 187 of file l6206_class.cpp.
| bool L6206_IsBidirectionnalMotor | ( | uint8_t | motorId ) | [protected, inherited] |
Test if motor is bidirectionnal.
- Parameters:
-
motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS
- Return values:
-
True if motor is bidirectionnal, else false
Definition at line 1176 of file l6206_class.cpp.
| Status_t L6206_ReadId | ( | uint8_t * | id ) | [protected, inherited] |
Read id.
- Return values:
-
Id of the l6206 Driver Instance
Definition at line 417 of file l6206_class.cpp.
| void L6206_Run | ( | uint8_t | motorId, |
| motorDir_t | direction | ||
| ) | [protected, inherited] |
Runs the motor.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS [in] direction FORWARD or BACKWARD
- Return values:
-
None
- Note:
- For unidirectionnal motor, direction parameter has no effect
Definition at line 432 of file l6206_class.cpp.
| void L6206_SetBridgeInputPwmFreq | ( | uint8_t | bridgeId, |
| uint32_t | newFreq | ||
| ) | [protected, inherited] |
Changes the PWM frequency of the bridge input.
- Parameters:
-
[in] bridgeId 0 for bridge A, 1 for bridge B [in] newFreq in Hz
- Return values:
-
None
Definition at line 595 of file l6206_class.cpp.
| void L6206_SetDeviceParamsToGivenValues | ( | L6206_Init_t * | initDevicePrm ) | [protected, inherited] |
Set the parameters of the device to values of initDevicePrm structure Set GPIO according to these values.
- Parameters:
-
initDevicePrm structure containing values to initialize the device parameters
- Return values:
-
None
Definition at line 1254 of file l6206_class.cpp.
| void L6206_SetDeviceParamsToPredefinedValues | ( | void | ) | [protected, inherited] |
Sets the parameters of the device to predefined values from l6206_target_config.h.
- Return values:
-
None
Definition at line 1221 of file l6206_class.cpp.
| void L6206_SetDualFullBridgeConfig | ( | uint8_t | newConfig ) | [protected, inherited] |
Set dual full bridge parallelling configuration.
- Parameters:
-
[in] newConfig bridge configuration to apply from dualFullBridgeConfig_t enum
- Return values:
-
None
Definition at line 486 of file l6206_class.cpp.
| bool L6206_SetMaxSpeed | ( | uint8_t | motorId, |
| uint16_t | newMaxSpeed | ||
| ) | [protected, inherited] |
Changes the max speed of the specified device.
- Parameters:
-
[in] motorId from 0 to MAX_NUMBER_OF_BRUSH_DC_MOTORS [in] newMaxSpeed in % from 0 to 100
- Return values:
-
true if the command is successfully executed, else false
Definition at line 554 of file l6206_class.cpp.
| bool L6206_SetNbDevices | ( | uint8_t | nbDevices ) | [protected, inherited] |
Sets the number of devices to be used.
- Parameters:
-
[in] nbDevices (from 1 to MAX_NUMBER_OF_DEVICES)
- Return values:
-
TRUE if successfull, FALSE if failure, attempt to set a number of devices greater than MAX_NUMBER_OF_DEVICES
Definition at line 643 of file l6206_class.cpp.
Generated on Fri Jul 15 2022 09:11:13 by
1.7.2
