WPILib 2012
WPILibRoboticsLibraryforFRC
CInterfaces/CRelay.h
00001 #ifndef _C_RELAY_H
00002 #define _C_RELAY_H
00003 
00004 typedef enum {kOff, kOn, kForward, kReverse} RelayValue;
00005 typedef enum {kBothDirections, kForwardOnly, kReverseOnly} RelayDirection;
00006 
00007 void InitRelay(UINT32 channel, RelayDirection direction = kBothDirections);
00008 void InitRelayRelay(UINT8 moduleNumber, UINT32 channel, RelayDirection direction = kBothDirections);
00009 
00010 void DeleteRelay(UINT32 channel);
00011 void DeleteRelay(UINT8 moduleNumber, UINT32 channel);
00012 
00013 void SetRelay(UINT32 channel, RelayValue value);
00014 void SetRelay(UINT8 moduleNumber, UINT32 channel, RelayValue value);
00015 
00016 typedef void *RelayObject;
00017 
00018 RelayObject CreateRelay(UINT8 moduleNumber, UINT32 channel, RelayDirection direction = kBothDirections);
00019 RelayObject CreateRelay(UINT32 channel, RelayDirection direction = kBothDirections);
00020 void SetRelay(RelayObject o, RelayValue value);
00021 void DeleteRelay(RelayObject o);
00022 
00023 #endif
00024 
 All Classes Functions Variables