PID regulator v 1.0
 
Loading...
Searching...
No Matches
cytronDriver.h
Go to the documentation of this file.
1
12
13#ifndef INC_CYTRONDRIVER_H_
14#define INC_CYTRONDRIVER_H_
15
16#include "stm32l0xx.h"
17
23typedef enum {
24 cw = 0, /* Clockwise*/
25 ccw = 1 /* Counterclockwise*/
27
34typedef struct {
35 TIM_HandleTypeDef *timer; /* Timer generujący PWM*/
36 Cytron_Direction direction; /* Kierunek obrotów*/
37
38 uint32_t working_channel; /* Aktualnie pracujący kanał timera*/
40
47 Cytron_Direction direction);
48
54void Cytron_Set_Motor_Speed(driver_struct *driver, uint16_t speed);
55
61void Cytron_Motor_Init(driver_struct *driver, TIM_HandleTypeDef *PWM_timer);
62
63#endif /* INC_CYTRONDRIVER_H_ */
void Cytron_Set_Motor_Speed(driver_struct *driver, uint16_t speed)
Ustawia prędkość obrotów silnika.
Definition cytronDriver.c:36
void Cytron_Set_Motor_Direction(driver_struct *driver, Cytron_Direction direction)
Ustawia kierunek obrotów silnika.
Definition cytronDriver.c:19
void Cytron_Motor_Init(driver_struct *driver, TIM_HandleTypeDef *PWM_timer)
Inicjalizuje sterownik silnika z początkową prędkością 0 i domyślnym kierunkiem.
Definition cytronDriver.c:50
Cytron_Direction
Enum określający kierunek obrotów silnika.
Definition cytronDriver.h:23
Struktura reprezentująca sterownik silnika DC.
Definition cytronDriver.h:34