Lib para L6230
L6230_BLDC.h@0:5b1b141e5837, 2020-06-25 (annotated)
- Committer:
- Marcelocostanzo
- Date:
- Thu Jun 25 17:21:30 2020 +0000
- Revision:
- 0:5b1b141e5837
funcionando V1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Marcelocostanzo | 0:5b1b141e5837 | 1 | #ifndef MBED_L6230_BLDC_H |
Marcelocostanzo | 0:5b1b141e5837 | 2 | #define MBED_L6230_BLDC_H |
Marcelocostanzo | 0:5b1b141e5837 | 3 | |
Marcelocostanzo | 0:5b1b141e5837 | 4 | #include "mbed.h" |
Marcelocostanzo | 0:5b1b141e5837 | 5 | |
Marcelocostanzo | 0:5b1b141e5837 | 6 | class L6230_BLDC { |
Marcelocostanzo | 0:5b1b141e5837 | 7 | |
Marcelocostanzo | 0:5b1b141e5837 | 8 | public: |
Marcelocostanzo | 0:5b1b141e5837 | 9 | L6230_BLDC(PinName en1_pin, PinName en2_pin, PinName en3_pin, PinName out1_pin, PinName out2_pin, PinName out3_pin); |
Marcelocostanzo | 0:5b1b141e5837 | 10 | |
Marcelocostanzo | 0:5b1b141e5837 | 11 | void stop(); |
Marcelocostanzo | 0:5b1b141e5837 | 12 | void turn(bool dir, int delay_time); |
Marcelocostanzo | 0:5b1b141e5837 | 13 | void turn_n_steps(bool dir, int delay_time, int stepNum); |
Marcelocostanzo | 0:5b1b141e5837 | 14 | void one_step(bool dir, int delay_time, int* prevStep); |
Marcelocostanzo | 0:5b1b141e5837 | 15 | |
Marcelocostanzo | 0:5b1b141e5837 | 16 | |
Marcelocostanzo | 0:5b1b141e5837 | 17 | private: |
Marcelocostanzo | 0:5b1b141e5837 | 18 | DigitalOut _en1_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 19 | DigitalOut _en2_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 20 | DigitalOut _en3_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 21 | DigitalOut _out1_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 22 | DigitalOut _out2_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 23 | DigitalOut _out3_pin; |
Marcelocostanzo | 0:5b1b141e5837 | 24 | }; |
Marcelocostanzo | 0:5b1b141e5837 | 25 | |
Marcelocostanzo | 0:5b1b141e5837 | 26 | #endif |