forked from pehladik/geicar
-
Notifications
You must be signed in to change notification settings - Fork 8
/
steering.h
39 lines (29 loc) · 710 Bytes
/
steering.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _STERRING_H_
#define _STERRING_H_
#include "stm32f1xx_hal.h"
#include "stm32f1xx_hal_gpio.h"
/**
* Set the max and min value of the steering wheels sensor
**/
void steering_Init(void);
/**
* Set the speed of the steering motor. Speed value has to be between 0 and 100
**/
void steering_set_speed(GPIO_PinState en_steering, int speed);
/**
* Return the steering angle.
**/
int steering_get_angle(void);
/**
* Command the front wheel position
**/
void steering_set_position (GPIO_PinState en_steering, int msg_CAN);
/**
* Cmd wheels with buttons
*/
void steering_move_with_button(void);
/**
* Return 1 if a steering control button is pressed
*/
int steering_is_a_button_pressed(void);
#endif