WPILib 2012
WPILibRoboticsLibraryforFRC
|
00001 // Copyright (c) National Instruments 2008. All Rights Reserved. 00002 // Do Not Edit... this file is generated! 00003 00004 #ifndef __nFRC_2012_1_6_4_DMA_h__ 00005 #define __nFRC_2012_1_6_4_DMA_h__ 00006 00007 #include "tSystemInterface.h" 00008 00009 namespace nFPGA 00010 { 00011 namespace nFRC_2012_1_6_4 00012 { 00013 00014 class tDMA 00015 { 00016 public: 00017 tDMA(){} 00018 virtual ~tDMA(){} 00019 00020 virtual tSystemInterface* getSystemInterface() = 0; 00021 static tDMA* create(tRioStatusCode *status); 00022 00023 typedef enum 00024 { 00025 kNumSystems = 1, 00026 } tIfaceConstants; 00027 00028 typedef 00029 union{ 00030 struct{ 00031 unsigned Pause : 1; 00032 unsigned Enable_AI0_Low : 1; 00033 unsigned Enable_AI0_High : 1; 00034 unsigned Enable_AIAveraged0_Low : 1; 00035 unsigned Enable_AIAveraged0_High : 1; 00036 unsigned Enable_AI1_Low : 1; 00037 unsigned Enable_AI1_High : 1; 00038 unsigned Enable_AIAveraged1_Low : 1; 00039 unsigned Enable_AIAveraged1_High : 1; 00040 unsigned Enable_Accumulator0 : 1; 00041 unsigned Enable_Accumulator1 : 1; 00042 unsigned Enable_DI : 1; 00043 unsigned Enable_AnalogTriggers : 1; 00044 unsigned Enable_Counters_Low : 1; 00045 unsigned Enable_Counters_High : 1; 00046 unsigned Enable_CounterTimers_Low : 1; 00047 unsigned Enable_CounterTimers_High : 1; 00048 unsigned Enable_Encoders : 1; 00049 unsigned Enable_EncoderTimers : 1; 00050 unsigned ExternalClock : 1; 00051 }; 00052 struct{ 00053 unsigned value : 20; 00054 }; 00055 } tConfig; 00056 typedef 00057 union{ 00058 struct{ 00059 unsigned ExternalClockSource_Channel : 4; 00060 unsigned ExternalClockSource_Module : 1; 00061 unsigned ExternalClockSource_AnalogTrigger : 1; 00062 unsigned RisingEdge : 1; 00063 unsigned FallingEdge : 1; 00064 }; 00065 struct{ 00066 unsigned value : 8; 00067 }; 00068 } tExternalTriggers; 00069 00070 00071 00072 typedef enum 00073 { 00074 } tRate_IfaceConstants; 00075 00076 virtual void writeRate(unsigned int value, tRioStatusCode *status) = 0; 00077 virtual unsigned int readRate(tRioStatusCode *status) = 0; 00078 00079 00080 typedef enum 00081 { 00082 } tConfig_IfaceConstants; 00083 00084 virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; 00085 virtual void writeConfig_Pause(bool value, tRioStatusCode *status) = 0; 00086 virtual void writeConfig_Enable_AI0_Low(bool value, tRioStatusCode *status) = 0; 00087 virtual void writeConfig_Enable_AI0_High(bool value, tRioStatusCode *status) = 0; 00088 virtual void writeConfig_Enable_AIAveraged0_Low(bool value, tRioStatusCode *status) = 0; 00089 virtual void writeConfig_Enable_AIAveraged0_High(bool value, tRioStatusCode *status) = 0; 00090 virtual void writeConfig_Enable_AI1_Low(bool value, tRioStatusCode *status) = 0; 00091 virtual void writeConfig_Enable_AI1_High(bool value, tRioStatusCode *status) = 0; 00092 virtual void writeConfig_Enable_AIAveraged1_Low(bool value, tRioStatusCode *status) = 0; 00093 virtual void writeConfig_Enable_AIAveraged1_High(bool value, tRioStatusCode *status) = 0; 00094 virtual void writeConfig_Enable_Accumulator0(bool value, tRioStatusCode *status) = 0; 00095 virtual void writeConfig_Enable_Accumulator1(bool value, tRioStatusCode *status) = 0; 00096 virtual void writeConfig_Enable_DI(bool value, tRioStatusCode *status) = 0; 00097 virtual void writeConfig_Enable_AnalogTriggers(bool value, tRioStatusCode *status) = 0; 00098 virtual void writeConfig_Enable_Counters_Low(bool value, tRioStatusCode *status) = 0; 00099 virtual void writeConfig_Enable_Counters_High(bool value, tRioStatusCode *status) = 0; 00100 virtual void writeConfig_Enable_CounterTimers_Low(bool value, tRioStatusCode *status) = 0; 00101 virtual void writeConfig_Enable_CounterTimers_High(bool value, tRioStatusCode *status) = 0; 00102 virtual void writeConfig_Enable_Encoders(bool value, tRioStatusCode *status) = 0; 00103 virtual void writeConfig_Enable_EncoderTimers(bool value, tRioStatusCode *status) = 0; 00104 virtual void writeConfig_ExternalClock(bool value, tRioStatusCode *status) = 0; 00105 virtual tConfig readConfig(tRioStatusCode *status) = 0; 00106 virtual bool readConfig_Pause(tRioStatusCode *status) = 0; 00107 virtual bool readConfig_Enable_AI0_Low(tRioStatusCode *status) = 0; 00108 virtual bool readConfig_Enable_AI0_High(tRioStatusCode *status) = 0; 00109 virtual bool readConfig_Enable_AIAveraged0_Low(tRioStatusCode *status) = 0; 00110 virtual bool readConfig_Enable_AIAveraged0_High(tRioStatusCode *status) = 0; 00111 virtual bool readConfig_Enable_AI1_Low(tRioStatusCode *status) = 0; 00112 virtual bool readConfig_Enable_AI1_High(tRioStatusCode *status) = 0; 00113 virtual bool readConfig_Enable_AIAveraged1_Low(tRioStatusCode *status) = 0; 00114 virtual bool readConfig_Enable_AIAveraged1_High(tRioStatusCode *status) = 0; 00115 virtual bool readConfig_Enable_Accumulator0(tRioStatusCode *status) = 0; 00116 virtual bool readConfig_Enable_Accumulator1(tRioStatusCode *status) = 0; 00117 virtual bool readConfig_Enable_DI(tRioStatusCode *status) = 0; 00118 virtual bool readConfig_Enable_AnalogTriggers(tRioStatusCode *status) = 0; 00119 virtual bool readConfig_Enable_Counters_Low(tRioStatusCode *status) = 0; 00120 virtual bool readConfig_Enable_Counters_High(tRioStatusCode *status) = 0; 00121 virtual bool readConfig_Enable_CounterTimers_Low(tRioStatusCode *status) = 0; 00122 virtual bool readConfig_Enable_CounterTimers_High(tRioStatusCode *status) = 0; 00123 virtual bool readConfig_Enable_Encoders(tRioStatusCode *status) = 0; 00124 virtual bool readConfig_Enable_EncoderTimers(tRioStatusCode *status) = 0; 00125 virtual bool readConfig_ExternalClock(tRioStatusCode *status) = 0; 00126 00127 00128 typedef enum 00129 { 00130 kNumExternalTriggersElements = 4, 00131 } tExternalTriggers_IfaceConstants; 00132 00133 virtual void writeExternalTriggers(unsigned char bitfield_index, tExternalTriggers value, tRioStatusCode *status) = 0; 00134 virtual void writeExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; 00135 virtual void writeExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; 00136 virtual void writeExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; 00137 virtual void writeExternalTriggers_RisingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; 00138 virtual void writeExternalTriggers_FallingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; 00139 virtual tExternalTriggers readExternalTriggers(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00140 virtual unsigned char readExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00141 virtual unsigned char readExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00142 virtual bool readExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00143 virtual bool readExternalTriggers_RisingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00144 virtual bool readExternalTriggers_FallingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; 00145 00146 00147 00148 00149 private: 00150 tDMA(const tDMA&); 00151 void operator=(const tDMA&); 00152 }; 00153 00154 } 00155 } 00156 00157 #endif // __nFRC_2012_1_6_4_DMA_h__