mit

Dependencies:   QEI mbed-src

Committer:
coldplay
Date:
Mon Dec 24 03:47:49 2018 +0000
Revision:
5:e90c8b57811c
Parent:
4:5ae9f8b3a16f
mit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
abuchan 4:5ae9f8b3a16f 1 #include "mbed.h"
abuchan 4:5ae9f8b3a16f 2
abuchan 4:5ae9f8b3a16f 3 #ifndef HBRIDGE_H
abuchan 4:5ae9f8b3a16f 4 #define HBRIDGE_H
abuchan 4:5ae9f8b3a16f 5
abuchan 4:5ae9f8b3a16f 6 class HBridge {
abuchan 4:5ae9f8b3a16f 7 public:
abuchan 4:5ae9f8b3a16f 8 HBridge(PinName pwm_pin, PinName min_1_pin, PinName min_2_pin, float pwm_period);
abuchan 4:5ae9f8b3a16f 9
abuchan 4:5ae9f8b3a16f 10 float output;
abuchan 4:5ae9f8b3a16f 11
coldplay 5:e90c8b57811c 12
abuchan 4:5ae9f8b3a16f 13 void set_output(float output);
coldplay 5:e90c8b57811c 14 void forward();
coldplay 5:e90c8b57811c 15 void back();
coldplay 5:e90c8b57811c 16 void initialize();
abuchan 4:5ae9f8b3a16f 17
abuchan 4:5ae9f8b3a16f 18 private:
abuchan 4:5ae9f8b3a16f 19 PwmOut pwm_pin_;
abuchan 4:5ae9f8b3a16f 20 DigitalOut min_1_pin_;
abuchan 4:5ae9f8b3a16f 21 DigitalOut min_2_pin_;
abuchan 4:5ae9f8b3a16f 22
abuchan 4:5ae9f8b3a16f 23 };
abuchan 4:5ae9f8b3a16f 24
abuchan 4:5ae9f8b3a16f 25 #endif