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-soccer/source/Concept/Framework/defines.h

112 lines
1.5 KiB
C
Raw Normal View History

2007-01-14 18:07:03 +00:00
#ifndef _DEFINES_H
#define _DEFINES_H
#ifndef NULL
#define NULL 0
#endif
//Integer definition
#ifndef int8
#ifdef __int8
#define int8 __int8
#else
#define int8 char
#endif
#endif
#ifndef int16
#ifdef __int16
#define int16 __int16
#else
#define int16 short
2007-01-14 18:07:03 +00:00
#endif
#endif
#ifndef int32
#ifdef __int32
#define int32 __int32
#else
#define int32 long
#endif
#endif
#ifndef int64
#ifdef __int64
#define int64 __int64
#else
#define int64 long long
#endif
#endif
//Unsigned
#ifndef uint8
#define uint8 unsigned int8
#endif
#ifndef uint16
#define uint16 unsigned int16
#endif
#ifndef uint32
#define uint32 unsigned int32
#endif
#ifndef uint64
#define uint64 unsigned int64
#endif
2007-02-15 20:33:05 +00:00
//Constants
#define SPEED_PER_PWM 1
2007-01-14 18:07:03 +00:00
//IO Module Names
enum IOModuleNames
{
//General
IO_START,
//Engines
IO_ENGINE_START = IO_START,
IO_ENGINE_DRIVE_LEFT = IO_ENGINE_START,
IO_ENGINE_DRIVE_RIGHT,
IO_ENGINE_DRIVE_BACK,
2007-02-15 20:33:05 +00:00
IO_ENGINE_DRIBBLER,
2007-01-14 18:07:03 +00:00
IO_ENGINE_END,
2007-02-15 20:33:05 +00:00
//Kicker
IO_KICKER_START = IO_ENGINE_END,
IO_KICKER_MAIN = IO_KICKER_START,
IO_KICKER_END,
2007-01-14 18:07:03 +00:00
//Sensors
2007-02-15 20:33:05 +00:00
IO_SENSOR_START = IO_KICKER_END,
2007-01-14 18:07:03 +00:00
2007-02-15 20:33:05 +00:00
IO_SENSOR_IR_0_DEG = IO_SENSOR_START,
IO_SENSOR_IR_30_DEG,
IO_SENSOR_IR_60_DEG,
IO_SENSOR_IR_100_DEG,
IO_SENSOR_IR_180_DEG,
IO_SENSOR_IR_260_DEG,
IO_SENSOR_IR_300_DEG,
IO_SENSOR_IR_330_DEG,
2007-01-14 18:07:03 +00:00
IO_SENSOR_END,
2007-02-15 20:33:05 +00:00
//Leds
IO_LED_START = IO_SENSOR_END,
IO_LED_MAIN = IO_LED_START,
IO_LED_END,
2007-01-14 18:07:03 +00:00
//General
2007-02-15 20:33:05 +00:00
IO_END = IO_LED_END,
2007-01-14 18:07:03 +00:00
};
#endif