ECE4333 - 2018 - Ahmed & Brandon / Mbed OS PlayBack

Dependencies:   TPixy-Interface

Fork of ManualControlFinal by ECE4333 - 2018 - Ahmed & Brandon

Drivers/motor_driver.h

Committer:
asobhy
Date:
2018-02-19
Revision:
8:a0890fa79084
Parent:
1:3e9684e81312

File content as of revision 8:a0890fa79084:

/******************************************************************************/
// ECE4333
// LAB Partner 1: Ahmed Sobhy - ID: 3594449
// LAB Partner 2: Brandon Kingman - ID: 3470444
// Project: Autonomous Robot Design
// Instructor: Prof. Chris Diduch
/******************************************************************************/

#ifndef MOTOR_DRIVER_H
#define MOTOR_DRIVER_H

//motor configuration
#define PERIOD  40     // period in us -> frequency = 25kHz -- audible frequency is between 20Hz - 20kHz

typedef enum { MOTOR_UNINIT,
               MOTOR_INIT,
               MOTOR_FORWARD,
               MOTOR_REVERSE,
               MOTOR_STOPPED
             } motor_state_t;

motor_state_t motorDriver_init();
motor_state_t motorDriver_forward(int);
motor_state_t motorDriver_reverse(int);
motor_state_t motorDriver_stop();

#endif