This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
rc2007-rescue/Motor.h
2007-04-13 17:58:03 +00:00

22 lines
408 B
C++

#ifndef _ROBOCUP_MOTOR_H_
#define _ROBOCUP_MOTOR_H_
#include <stdint.h>
class Motor {
private:
volatile uint8_t *port;
volatile uint8_t *pwmPort;
uint8_t fwdMask;
uint8_t revMask;
int speed;
public:
Motor(volatile uint8_t *port, volatile uint8_t *pwmPort, uint8_t fwdMask, uint8_t revMask);
void setSpeed(int speed);
int getSpeed() {return speed;}
};
#endif