22 lines
553 B
C
22 lines
553 B
C
|
|
#ifndef __WEMOS_MOTOR_H
|
|
#define __WEMOS_MOTOR_H
|
|
|
|
#define MAX_NUM_MOTORS 2
|
|
|
|
extern void wemos_motor_init();
|
|
extern void wemos_motor_initMotor(uint8_t motorNumber, uint8_t address, uint32_t freq);
|
|
extern void wemos_motor_set_freq(uint8_t motorNumber, uint32_t freq);
|
|
extern void wemos_motor_setmotor(uint8_t motorNumber, uint8_t dir, float pwm_val);
|
|
extern void wemos_motor_stop(uint8_t motorNumber);
|
|
extern void wemos_motor_standby(uint8_t motorNumber);
|
|
|
|
#define _SHORT_BRAKE 0
|
|
#define _CCW 1
|
|
#define _CW 2
|
|
#define _STOP 3
|
|
#define _STANDBY 4
|
|
|
|
#endif
|
|
|