main_ubi_sdk v 0.1.3
This is UBI4 documentation
motor_driver_h_bridge_pwm.h
Go to the documentation of this file.
1/*
2 * motor_driver_h_bridge.h
3 *
4 * Created on: Mar 5, 2025
5 * Author: Andrey Ovodov
6 */
7
8#ifndef MOTORS_DRIVERS_MOTOR_DRIVER_H_BRIDGE_H_
9#define MOTORS_DRIVERS_MOTOR_DRIVER_H_BRIDGE_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15
16#include "../motor_driver.h"
17#include "stdbool.h"
18
19#include "HAL_DRIVERS.h"
20
21
22typedef struct
23{
25
26 uint32_t max_ccr;
27 uint32_t min_ccr;
28
29 volatile uint32_t *fwd_ccr_pin;
31
32 volatile uint32_t *rev_ccr_pin;
34
35 volatile GPIO_TypeDef *sleep_GPIO_port;
36 uint32_t sleep_pin;
37
39
40
49
50
51
53
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* MOTORS_DRIVERS_MOTOR_DRIVER_H_BRIDGE_H_ */
void(* DriverSelfFuncWithParam_t)(void *self, uint8_t param)
Definition motor_driver.h:14
void MotorDriverHBridgePWMInit(motor_driver_h_bridge_pwm_t *self, motor_driver_h_bridge_pwm_init_t *init)
Definition motor_driver_h_bridge_pwm.c:47
Definition motor_driver.h:19
Definition motor_driver.h:26
Definition motor_driver_h_bridge_pwm.h:23
uint32_t max_ccr
Definition motor_driver_h_bridge_pwm.h:26
volatile uint32_t * fwd_ccr_pin
Definition motor_driver_h_bridge_pwm.h:29
volatile GPIO_TypeDef * sleep_GPIO_port
Definition motor_driver_h_bridge_pwm.h:35
uint32_t sleep_pin
Definition motor_driver_h_bridge_pwm.h:36
uint32_t fwd_timer_period
Definition motor_driver_h_bridge_pwm.h:30
volatile uint32_t * rev_ccr_pin
Definition motor_driver_h_bridge_pwm.h:32
uint32_t rev_timer_period
Definition motor_driver_h_bridge_pwm.h:33
motor_driver_base_init_t Base
Definition motor_driver_h_bridge_pwm.h:24
uint32_t min_ccr
Definition motor_driver_h_bridge_pwm.h:27
Definition motor_driver_h_bridge_pwm.h:42
motor_driver_h_bridge_pwm_init_t * init
Definition motor_driver_h_bridge_pwm.h:44
DriverSelfFuncWithParam_t SleepControl
Definition motor_driver_h_bridge_pwm.h:46
motor_driver_base_t Base
Definition motor_driver_h_bridge_pwm.h:43