Library used to control ST Nucleo Evaluation board IHM04A1, based on L6206 motor control driver.
Dependencies: ST_INTERFACES
Dependents: HelloWorld_IHM04A1 RoboCane_Motore arm_dcmotor_can arm_linear_can_2 ... more
Fork of X_NUCLEO_IHM04A1 by
L6206 Private Constants
Data Structures | |
| class | L6206 |
| Class representing a L6206 component. More... | |
Functions | |
| virtual | ~L6206 (void) |
| Destructor. | |
| virtual int | init (void *init=NULL) |
| Initializing the component. | |
| virtual int | read_id (uint8_t *id=NULL) |
| Getting the ID of the component. | |
| virtual void | attach_error_handler (void(*callback)(uint16_t error)) |
| Attaches a user callback to the error Handler. | |
| virtual void | attach_flag_interrupt (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 | get_speed (unsigned int motorId) |
| Returns the current speed of the specified motor. | |
| virtual unsigned int | get_device_state (unsigned int motorId) |
| Returns the device state. | |
| virtual uint8_t | get_fw_version (void) |
| Returns the FW version of the library. | |
| virtual uint16_t | get_max_speed (unsigned int motorId) |
| Returns the max speed of the specified motor. | |
| virtual void | hard_stop (unsigned int motorId) |
| Stops the motor without disabling the bridge. | |
| virtual void | run (unsigned int motorId, direction_t direction) |
| Runs the motor. | |
| virtual bool | set_speed (unsigned int motorId, unsigned int newMaxSpeed) |
| Changes the max speed of the specified device. | |
| virtual void | disable_bridge (unsigned int bridgeId) |
| Disable the specified bridge. | |
| virtual void | enable_bridge (unsigned int bridgeId) |
| Enable the specified bridge. | |
| virtual unsigned int | get_bridge_status (unsigned int bridgeId) |
| Get the status of the bridge enabling of the corresponding bridge. | |
| virtual void | hard_hiz (unsigned int motorId) |
| Immediatly stops the motor and disable the power bridge. | |
| virtual void | error_handler (uint16_t error) |
| Error handler which calls the user callback (if defined) | |
| virtual void | set_dual_full_bridge_config (unsigned int newConfig) |
| Set dual full bridge parallelling configuration. | |
| virtual unsigned int | get_bridge_input_pwm_freq (unsigned int bridgeId) |
| Get the PWM frequency of the specified bridge. | |
| virtual void | set_bridge_input_pwm_freq (unsigned int bridgeId, unsigned int newFreq) |
| Changes the PWM frequency of the bridge input. | |
| virtual bool | set_nb_devices (uint8_t nbDevices) |
| Sets the number of devices to be used. | |
| virtual void | enable_flag_irq (uint8_t bridgeId) |
| Enabling the FLAG interrupt handling. | |
| virtual void | disable_flag_irq (uint8_t bridgeId) |
| Disabling the FLAG interrupt handling. | |
| 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. | |
Variables | |
| bool | pwm_1A_activated |
| PWM timer variables. | |
Function Documentation
| virtual void attach_error_handler | ( | void(*)(uint16_t error) | callback ) | [virtual, inherited] |
| virtual void attach_flag_interrupt | ( | void(*)(void) | callback ) | [virtual, 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
| virtual void disable_bridge | ( | unsigned int | bridgeId ) | [virtual, inherited] |
| virtual void disable_flag_irq | ( | uint8_t | bridgeId ) | [virtual, inherited] |
| virtual void enable_bridge | ( | unsigned int | bridgeId ) | [virtual, inherited] |
| virtual void enable_flag_irq | ( | uint8_t | bridgeId ) | [virtual, inherited] |
| virtual void error_handler | ( | uint16_t | error ) | [virtual, inherited] |
| virtual unsigned int get_bridge_input_pwm_freq | ( | unsigned int | bridgeId ) | [virtual, inherited] |
| virtual unsigned int get_bridge_status | ( | unsigned int | bridgeId ) | [virtual, inherited] |
| virtual unsigned int get_device_state | ( | unsigned int | motorId ) | [virtual, inherited] |
| virtual uint8_t get_fw_version | ( | void | ) | [virtual, inherited] |
| virtual uint16_t get_max_speed | ( | unsigned int | motorId ) | [virtual, inherited] |
| virtual unsigned int get_speed | ( | unsigned int | motorId ) | [virtual, inherited] |
| virtual void hard_hiz | ( | unsigned int | motorId ) | [virtual, inherited] |
| virtual void hard_stop | ( | unsigned int | motorId ) | [virtual, inherited] |
| virtual int init | ( | void * | init = NULL ) |
[virtual, inherited] |
| void L6206_Board_Delay | ( | uint32_t | delay ) | [protected, inherited] |
| void L6206_Board_DisableBridge | ( | uint8_t | bridgeId ) | [protected, inherited] |
| void L6206_Board_EnableBridge | ( | uint8_t | bridgeId, |
| uint8_t | addDelay | ||
| ) | [protected, inherited] |
| uint32_t L6206_Board_GetFlagPinState | ( | uint8_t | bridgeId ) | [protected, inherited] |
| void L6206_Board_GpioInit | ( | void | ) | [protected, inherited] |
| void L6206_Board_PwmDeInit | ( | uint8_t | bridgeInput ) | [protected, inherited] |
| void L6206_Board_PwmInit | ( | uint8_t | bridgeInput ) | [protected, inherited] |
| void L6206_Board_PwmSetFreq | ( | uint8_t | bridgeInput, |
| uint32_t | newFreq, | ||
| uint8_t | duty | ||
| ) | [protected, inherited] |
| void L6206_Board_PwmStop | ( | uint8_t | bridgeInput ) | [protected, inherited] |
| void L6206_OutVal | ( | uint8_t | bridgeId, |
| uint8_t | val | ||
| ) | [protected, inherited] |
| virtual int read_id | ( | uint8_t * | id = NULL ) |
[virtual, inherited] |
| virtual void run | ( | unsigned int | motorId, |
| direction_t | direction | ||
| ) | [virtual, inherited] |
| virtual void set_bridge_input_pwm_freq | ( | unsigned int | bridgeId, |
| unsigned int | newFreq | ||
| ) | [virtual, inherited] |
| virtual void set_dual_full_bridge_config | ( | unsigned int | newConfig ) | [virtual, inherited] |
| virtual bool set_nb_devices | ( | uint8_t | nbDevices ) | [virtual, inherited] |
| virtual bool set_speed | ( | unsigned int | motorId, |
| unsigned int | newMaxSpeed | ||
| ) | [virtual, inherited] |
Variable Documentation
Generated on Fri Jul 15 2022 19:41:39 by
1.7.2

X-NUCLEO-IHM04A1 Dual Brush DC Motor Driver