]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/include/drv/hbridge.h
Add missing file to the release zip
[pes-rpp/rpp-lib.git] / rpp / include / drv / hbridge.h
1 /**
2  * RPP driver implementation for H-Bridge header file.
3  *
4  * @file hbridge.h
5  *
6  * @copyright Copyright (C) 2012-2013 Czech Technical University in Prague
7  *
8  * @author Michal Horn
9  * @author Carlos Jenkins <carlos@jenkins.co.cr>
10  */
11
12
13 #ifndef __DRV_HBR_H
14 #define __DRV_HBR_H
15
16 #include "drv/drv.h"
17
18 // Watchdog related
19 int8_t drv_hbr_wdg_start();
20 int8_t drv_hbr_wdg_stop();
21
22 // Basic H-Bridge API
23 void drv_hbr_set_en(int value);
24 void drv_hbr_set_dir(int direction);
25 int8_t drv_hbr_pwm_set_signal(double period, uint32_t duty);
26 void drv_hbr_pwm_set_duty(uint8_t percent);
27 int8_t drv_hbr_pwm_start();
28 void drv_hbr_pwm_stop();
29
30 // Extended H-Bridge API
31 uint32_t drv_hbr_pwm_get_duty();
32 double drv_hbr_pwm_get_period();
33 int drv_hbr_get_dir();
34 int drv_hbr_get_en();
35
36
37 #endif /* __DRV_HBR_H */