diff options
author | neoraider <devnull@localhost> | 2007-04-13 19:58:03 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-04-13 19:58:03 +0200 |
commit | 7da669b97ec71f138c74d562b8a3b219d3f98a50 (patch) | |
tree | 089226274f422ae1b486cf44d36751de47bca01c /Motor.h | |
parent | e26a1dc73313098cef235918d237f9b1a6e4cb5f (diff) | |
download | rc2007-rescue-7da669b97ec71f138c74d562b8a3b219d3f98a50.tar rc2007-rescue-7da669b97ec71f138c74d562b8a3b219d3f98a50.zip |
Makefile angelegt; Grundfunktionen erweitert
Diffstat (limited to 'Motor.h')
-rw-r--r-- | Motor.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#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 |