/******************************************************************************
Motor Header file

Michael Simmons
Master Project:
Date Created:	25 Oct 2008
Date Modified:	25 Oct 2008

*******************************************************************************

Description:
	The Motor class is designed to control the motors from the PWM pins on
	the robostix.

******************************************************************************/

#ifndef MOTOR_H
#define MOTOR_H

#include "I2cDef.h"

class Motor
{
  private:
    int i2cHandle;
    uint8_t avrAddr;
    int speedF;
    int speedR;
//    uint8_t portd;
//    uint8_t regValue;
    uint16_t lowVal;
    uint16_t highVal;
    uint16_t stopVal;
    uint16_t rangeVal;
    uint8_t servoNum;
    struct I2c_rdwr_ioctl_data rdwr;
    struct I2c_msg msg[2];
    uint8_t buf[I2c_max_len + 3];
    I2c_write_t writeReg;

  public:
    Motor( int, int, int, int );
    int stop();
    int forward( int );
    int reverse( int );
}; //MOTOR_H

#endif
