Motor driver library for the AP1017.
AKM Development Platform
AP1017 Motor Driver
Import libraryAP1017
Motor driver library for the AP1017.
Diff: AP1017.h
- Revision:
- 6:d4d3bc82d446
- Parent:
- 4:c36159701cde
- Child:
- 7:b19dbc46ac0e
diff -r 2da4339149a6 -r d4d3bc82d446 AP1017.h --- a/AP1017.h Fri Apr 21 20:43:25 2017 +0000 +++ b/AP1017.h Fri Apr 21 23:22:06 2017 +0000 @@ -2,11 +2,8 @@ #define __AP1017_H #include "mbed.h" - -#define MAX_FREQUENCY 5000 -#define ENABLE_PIN P0_10 -#define INA_PIN P0_11 -#define INB_PIN P0_9 +#include "tca9554a.h" +#include "I2C.h" /** * This is a device driver for the AP1017 with pulse width modulation. @@ -122,7 +119,9 @@ float dutyCycle; // Given as proportion: 0.00 to 1.00 Rotation direction; - PwmOut *motor; // Motor object + I2C *i2cMotor; // I2C motor signal + //PwmOut *motor; // Motor object + TCA9554A *motor; // Motor object DigitalOut *inA; // Directions setting pin A DigitalOut *inB; // Direction setting pin B