async_labjack/labjack/
errors.rs

1//! All labjack error codes.
2// This file is autogenerated, do not modify!. See `generate_tags.rs`
3use crate::helpers::macros::back_to_enum;
4use thiserror::Error;
5
6back_to_enum! {
7    /// Enum containing all labjack error codes. These can be obtained by reading the
8    /// [`crate::labjack::all_tags::LAST_ERR_DETAIL`] tag.
9    #[derive(Debug, Error)]
10    #[repr(u16)]
11    pub enum LabjackErrorCode {
12        #[error("LjSuccess")]
13        LjSuccess = 0,
14        #[error("FeatureNotImplemented")]
15        FeatureNotImplemented = 254,
16        /// Feature is not supported on this device.
17        #[error("Feature is not supported on this device.")]
18        FeatureNotSupported = 2012,
19        /// Response packet greater than max packet size.
20        #[error("Response packet greater than max packet size.")]
21        ModbusRspOverflow = 2300,
22        /// Command packet greater than max packet size
23        #[error("Command packet greater than max packet size")]
24        ModbusCmdOverflow = 2301,
25        #[error("ModbusStringCmdTooBig")]
26        ModbusStringCmdTooBig = 2310,
27        #[error("ModbusStringParamTooBig")]
28        ModbusStringParamTooBig = 2311,
29        #[error("ModbusStringBadNumParams")]
30        ModbusStringBadNumParams = 2312,
31        /// Register data types does not match the number of registers in the request.
32        #[error("Register data types does not match the number of registers in the request.")]
33        ModbusInvalidNumRegisters = 2313,
34        #[error("ModbusReadTooLarge")]
35        ModbusReadTooLarge = 2314,
36        /// Register or group of registers requires the access be in an even number of registers.
37        #[error("Register or group of registers requires the access be in an even number of registers.")]
38        ModbusNumRegsMustBeEven = 2315,
39        /// Strings must be terminated with a null (\0, 0x00).
40        #[error("Strings must be terminated with a null (\0, 0x00).")]
41        ModbusStringMissingNull = 2316,
42        /// The UDP discovery socket has been set to discovery only. Only a few registers may be read while in this mode.
43        #[error("The UDP discovery socket has been set to discovery only. Only a few registers may be read while in this mode.")]
44        UdpDiscoveryOnlyModeIsEnabled = 2317,
45        #[error("StartupConfigInvalidCode")]
46        StartupConfigInvalidCode = 2330,
47        /// An attempt was made to read beyond the configuration structure.
48        #[error("An attempt was made to read beyond the configuration structure.")]
49        StartupConfigInvalidRead = 2331,
50        /// The FIFO can not contain any data when data size is being changed.
51        #[error("The FIFO can not contain any data when data size is being changed.")]
52        UserRamFifoMustBeEmpty = 2340,
53        /// The FIFO contains fewer values than requested.
54        #[error("The FIFO contains fewer values than requested.")]
55        UserRamFifoInsufficientValues = 2343,
56        /// FIFO does not have enough free space to hold the requested write. No data was added to the FIFO.
57        #[error("FIFO does not have enough free space to hold the requested write. No data was added to the FIFO.")]
58        UserRamFifoInsufficientSpace = 2344,
59        /// The number of bytes allocated to the FIFO must be even..
60        #[error("The number of bytes allocated to the FIFO must be even..")]
61        UserRamFifoSizeMustBeEven = 2345,
62        #[error("IntflashAddInvalid")]
63        IntflashAddInvalid = 2350,
64        #[error("IntflashCodeInvalid")]
65        IntflashCodeInvalid = 2351,
66        /// Attempted to read or write a section that is not allowed.
67        #[error("Attempted to read or write a section that is not allowed.")]
68        IntflashOpProhibited = 2352,
69        /// Attempted to write or read beyond the currently selected section.
70        #[error("Attempted to write or read beyond the currently selected section.")]
71        IntflashSectionOverwrite = 2353,
72        /// Specified Key and Address mismatch.
73        #[error("Specified Key and Address mismatch.")]
74        IntflashKeyInvalid = 2354,
75        /// A write to flash failed to set one or more bits to the desired values.
76        #[error("A write to flash failed to set one or more bits to the desired values.")]
77        FlashVerificationFailed = 2355,
78        /// One or more bits failed to set during a flash erase operation.
79        #[error("One or more bits failed to set during a flash erase operation.")]
80        FlashEraseFailed = 2356,
81        /// Flash can not be accessed due to the WiFi module booting up.
82        #[error("Flash can not be accessed due to the WiFi module booting up.")]
83        IntflashUnavailable = 2358,
84        /// The file system can not be accessed due to the WiFi module booting up.
85        #[error("The file system can not be accessed due to the WiFi module booting up.")]
86        FileioUnavailable = 2359,
87        /// Specified range not available on this device.
88        #[error("Specified range not available on this device.")]
89        AinRangeInvalid = 2370,
90        /// Specified settling is greater than device max.
91        #[error("Specified settling is greater than device max.")]
92        AinSettlingInvalid = 2371,
93        /// Analog input system currently set to binary. Some operations, such as AIN_EF, will fail.
94        #[error("Analog input system currently set to binary. Some operations, such as AIN_EF, will fail.")]
95        AinSetToBinary = 2372,
96        /// For channel range 0-13: Negative channel must be even channel number + 1.  For extended channel range 48-127: Negative channel must be channel number + 8.
97        #[error("For channel range 0-13: Negative channel must be even channel number + 1.  For extended channel range 48-127: Negative channel must be channel number + 8.")]
98        AinNegativeChannelInvalid = 2373,
99        /// Only a value of zero may be written to this address.
100        #[error("Only a value of zero may be written to this address.")]
101        AinAllZeroOnly = 2374,
102        /// Selected resolution is invalid. Valid range is 0-5 for T4 and 0-12 for T7.
103        #[error("Selected resolution is invalid. Valid range is 0-5 for T4 and 0-12 for T7.")]
104        AinResolutionInvalid = 2375,
105        /// The selected AIN rate configuration is invalid for the desired resolution index or vise-versa.
106        #[error("The selected AIN rate configuration is invalid for the desired resolution index or vise-versa.")]
107        AinRateInvalid = 2376,
108        /// The AIN channel has been disabled
109        #[error("The AIN channel has been disabled")]
110        AinChnDisabled = 2377,
111        #[error("LuaVmStateNoChange")]
112        LuaVmStateNoChange = 2380,
113        #[error("LuaInitializationError")]
114        LuaInitializationError = 2381,
115        /// Requested more than the max possible number of IO floats.
116        #[error("Requested more than the max possible number of IO floats.")]
117        LuaInvalidNumIoFloats = 2382,
118        /// Attempt to read/write beyond the currently allocated IO space.
119        #[error("Attempt to read/write beyond the currently allocated IO space.")]
120        LuaIoFloatmemOverflow = 2383,
121        #[error("LuaInvalidMode")]
122        LuaInvalidMode = 2384,
123        /// A running script is preventing the requested operation.
124        #[error("A running script is preventing the requested operation.")]
125        LuaIsRunning = 2385,
126        /// Attempted to run a program that is not present.
127        #[error("Attempted to run a program that is not present.")]
128        LuaCodeBufferEmpty = 2386,
129        /// Attempted to read from debug buffer while debug is disabled.
130        #[error("Attempted to read from debug buffer while debug is disabled.")]
131        LuaDebugIsDisabled = 2387,
132        /// The Lua table provided is too small to process the request.
133        #[error("The Lua table provided is too small to process the request.")]
134        LuaTableSmallerThanSpecifiedSize = 2388,
135        /// The Lua VM is being closed, usually takes less than 100 ms.
136        #[error("The Lua VM is being closed, usually takes less than 100 ms.")]
137        LuaIsClosing = 2389,
138        /// Insufficient RAM to perform the requested action. Often occurs when a loaded Lua script is too large.
139        #[error("Insufficient RAM to perform the requested action. Often occurs when a loaded Lua script is too large.")]
140        SystemMemoryBereft = 2400,
141        /// Attempted to overwrite a buffer.
142        #[error("Attempted to overwrite a buffer.")]
143        SystemMemoryOverwrite = 2401,
144        /// Invalid code supplied when issuing a reboot.
145        #[error("Invalid code supplied when issuing a reboot.")]
146        SystemRebootCodeInvalid = 2402,
147        #[error("SystemReadOverrun")]
148        SystemReadOverrun = 2403,
149        #[error("SystemInvalidPin")]
150        SystemInvalidPin = 2404,
151        /// NVRAM is not available on this device.
152        #[error("NVRAM is not available on this device.")]
153        SystemNvramUnavailable = 2405,
154        /// The specified NVRAM location is not available on this device.
155        #[error("The specified NVRAM location is not available on this device.")]
156        SystemNvramInvalidAddress = 2406,
157        /// The requested wait time is beyond the max allowed.
158        #[error("The requested wait time is beyond the max allowed.")]
159        SystemWaitTooLong = 2407,
160        /// The firmware image is not compatible with this device. Typically due to flash chip incompatibility.
161        #[error("The firmware image is not compatible with this device. Typically due to flash chip incompatibility.")]
162        SystemIncompatibleFirmwareVersion = 2408,
163        /// Attempted to write a device name with invalid characters.
164        #[error("Attempted to write a device name with invalid characters.")]
165        DeviceNameMustBeAlphanum = 2420,
166        /// Unknown value specified.
167        #[error("Unknown value specified.")]
168        PowerInvalidSetting = 2450,
169        /// Core must be running at 20MHz minimum for USB to operate.
170        #[error("Core must be running at 20MHz minimum for USB to operate.")]
171        PowerUsbNeeds20mhzOrMore = 2451,
172        /// Core must be running at 20MHz minimum for Ethernet to operate.
173        #[error("Core must be running at 20MHz minimum for Ethernet to operate.")]
174        PowerEthNeeds20mhzOrMore = 2452,
175        /// Core must be running at 20MHz minimum for AIN to operate.
176        #[error("Core must be running at 20MHz minimum for AIN to operate.")]
177        PowerAinNeeds20mhzOrMore = 2453,
178        /// Core must be running at 20MHz minimum to use stream mode.
179        #[error("Core must be running at 20MHz minimum to use stream mode.")]
180        PowerStreamNeeds20mhzOrMore = 2454,
181        /// Core must be running at 20MHz minimum to use the SD card.
182        #[error("Core must be running at 20MHz minimum to use the SD card.")]
183        PowerSdNeeds20mhzOrMore = 2455,
184        /// Can not change the power level of the connected medium.
185        #[error("Can not change the power level of the connected medium.")]
186        PowerCanNotChangeUsedConnection = 2456,
187        /// The written power mode is the same as the current setting.
188        #[error("The written power mode is the same as the current setting.")]
189        PowerNoChange = 2459,
190        /// Analog input system is powered down.
191        #[error("Analog input system is powered down.")]
192        PowerAnalogOff = 2460,
193        /// WiFi needs to be connected to a network before the requested action can be performed.
194        #[error("WiFi needs to be connected to a network before the requested action can be performed.")]
195        WifiNotAssociated = 2490,
196        #[error("HwDioNotAvailable")]
197        HwDioNotAvailable = 2500,
198        /// The digital line addressed is set to analog. Digital operations cannot be performed.
199        #[error("The digital line addressed is set to analog. Digital operations cannot be performed.")]
200        DioSetToAnalog = 2501,
201        /// Counter A is being used by another system. Typically this is due to a high speed counter being enabled while trying to enable a DIO_EF clock that requires the same resource or vise-versa
202        #[error("Counter A is being used by another system. Typically this is due to a high speed counter being enabled while trying to enable a DIO_EF clock that requires the same resource or vise-versa")]
203        HwCntraNotAvailable = 2508,
204        /// Counter B is being used by another system. Typically this is due to a high speed counter being enabled while trying to enable a DIO_EF clock that requires the same resource or vise-versa
205        #[error("Counter B is being used by another system. Typically this is due to a high speed counter being enabled while trying to enable a DIO_EF clock that requires the same resource or vise-versa")]
206        HwCntrbNotAvailable = 2509,
207        /// Counter C is being used by another system.
208        #[error("Counter C is being used by another system.")]
209        HwCntrcNotAvailable = 2510,
210        /// Counter D is being used by another system. Typically this is due to a high speed counter that shares a resource with the stream clock being enabled while trying to enable stream mode or vise-versa
211        #[error("Counter D is being used by another system. Typically this is due to a high speed counter that shares a resource with the stream clock being enabled while trying to enable stream mode or vise-versa")]
212        HwCntrdNotAvailable = 2511,
213        #[error("HwCio0NotAvailable")]
214        HwCio0NotAvailable = 2520,
215        #[error("HwCio1NotAvailable")]
216        HwCio1NotAvailable = 2521,
217        /// DAC1 is an active stream out target and therefore unavailable.
218        #[error("DAC1 is an active stream out target and therefore unavailable.")]
219        HwDac1NotAvailable = 2523,
220        /// The LEDs cannot be controlled when the LED power mode is not set to manual.
221        #[error("The LEDs cannot be controlled when the LED power mode is not set to manual.")]
222        HwLedsNotAvailable = 2524,
223        /// The DIO accessed does not support any extended features.
224        #[error("The DIO accessed does not support any extended features.")]
225        EfDioHasNoTncFeatures = 2550,
226        /// The selected type is not recognized.
227        #[error("The selected type is not recognized.")]
228        EfInvalidType = 2551,
229        /// The selected type is not recognized.
230        #[error("The selected type is not recognized.")]
231        EfTypeNotSupported = 2552,
232        /// The requested type is not supported on this DIO pin.
233        #[error("The requested type is not supported on this DIO pin.")]
234        EfPinTypeMismatch = 2553,
235        /// Attempted to disable a clock source that is not running.
236        #[error("Attempted to disable a clock source that is not running.")]
237        EfClockSourceNotEnabled = 2554,
238        /// A number greater than 16-bits was written to a clock source configured for 16-bits. Commonly occurs when an incorrect value is applied to CONFIG_A or CONFIG_B for an output feature such as PWM or pulse output.
239        #[error("A number greater than 16-bits was written to a clock source configured for 16-bits. Commonly occurs when an incorrect value is applied to CONFIG_A or CONFIG_B for an output feature such as PWM or pulse output.")]
240        Ef32bitDataInto16bitReg = 2555,
241        #[error("EfSetTo32bit")]
242        EfSetTo32bit = 2556,
243        #[error("EfSmoothValueOutOfRange")]
244        EfSmoothValueOutOfRange = 2557,
245        /// Both Clock_Source 1 and Clock_Source 2 must be disabled before enabling Clock_Source 0.
246        #[error("Both Clock_Source 1 and Clock_Source 2 must be disabled before enabling Clock_Source 0.")]
247        Ef32bitRequiresBothClock0and1 = 2558,
248        /// The specified divisor value is not supported. Supported values are: 1,2,4,8,16,32,64,256. This code was formerly named EF_PRESCALE_VALUE_INVALID
249        #[error("The specified divisor value is not supported. Supported values are: 1,2,4,8,16,32,64,256. This code was formerly named EF_PRESCALE_VALUE_INVALID")]
250        EfDivisorValueInvalid = 2559,
251        /// The pin is already in use by another system.
252        #[error("The pin is already in use by another system.")]
253        EfPinReserved = 2560,
254        /// The specified DIO_EF address is not supported on this device.
255        #[error("The specified DIO_EF address is not supported on this device.")]
256        EfInvalidDioNumber = 2561,
257        /// The DIO line must be set to output low to ensure proper signal generation.
258        #[error("The DIO line must be set to output low to ensure proper signal generation.")]
259        EfLineMustBeLowBeforeStarting = 2563,
260        #[error("EfInvalidDivisor")]
261        EfInvalidDivisor = 2564,
262        /// The DIO_EF_CONFIG value written determines a DIO line transition point relative to the count of a ClockSource. To prevent signal glitches, the value must be less than the selected ClockSource's roll value.
263        #[error("The DIO_EF_CONFIG value written determines a DIO line transition point relative to the count of a ClockSource. To prevent signal glitches, the value must be less than the selected ClockSource's roll value.")]
264        EfValueGreaterThanPeriod = 2565,
265        /// The index of a DIO_EF can not be changed while that DIO_EF is enabled.
266        #[error("The index of a DIO_EF can not be changed while that DIO_EF is enabled.")]
267        EfCanNotChangeIndexWhileEnabled = 2566,
268        /// The specified type index is not supported.
269        #[error("The specified type index is not supported.")]
270        AinEfInvalidType = 2580,
271        /// Too many samples specified.
272        #[error("Too many samples specified.")]
273        AinEfInvalidNumSamples = 2581,
274        #[error("AinEfCalculationError")]
275        AinEfCalculationError = 2582,
276        /// The AIN_EF channel has not been initialized. To initialize, set the index configuration to a non-zero value.
277        #[error("The AIN_EF channel has not been initialized. To initialize, set the index configuration to a non-zero value.")]
278        AinEfChannelInactive = 2583,
279        /// The final value calculated for the AIN_EF is outside of the range the feature supports. This often indicates that there is some configuration issue.
280        #[error("The final value calculated for the AIN_EF is outside of the range the feature supports. This often indicates that there is some configuration issue.")]
281        AinEfCalculationOutOfRange = 2584,
282        /// AIN_EF is not supported on the specified channel, or the specified channel does not exist.
283        #[error("AIN_EF is not supported on the specified channel, or the specified channel does not exist.")]
284        AinEfInvalidChannel = 2585,
285        /// The register address specified for CJC measurement is not supported.
286        #[error("The register address specified for CJC measurement is not supported.")]
287        AinEfInvalidCjcRegister = 2586,
288        /// Could not start the data collection stream.
289        #[error("Could not start the data collection stream.")]
290        AinEfStreamStartFailure = 2587,
291        /// Failed to detect a period to perform calculations over.
292        #[error("Failed to detect a period to perform calculations over.")]
293        AinEfCouldNotFindPeriod = 2588,
294        /// The selected AIN must be set to differential.
295        #[error("The selected AIN must be set to differential.")]
296        AinEfMustBeDifferential = 2589,
297        /// The data collection time (number of samples / scan_rate) is too big. Limit is set to 180 ms.
298        #[error("The data collection time (number of samples / scan_rate) is too big. Limit is set to 180 ms.")]
299        AinEfScanTimeTooLong = 2590,
300        /// The excitation circuit index specified is not valid, use a different excitation circuit.
301        #[error("The excitation circuit index specified is not valid, use a different excitation circuit.")]
302        AinEfInvalidExcitationIndex = 2591,
303        /// The list of channels to stream is empty.
304        #[error("The list of channels to stream is empty.")]
305        StreamNeedAtLeastOneChn = 2600,
306        /// The stream clock base is read only.
307        #[error("The stream clock base is read only.")]
308        StreamClockBaseNotWritable = 2601,
309        #[error("StreamExtclkAndGateMx")]
310        StreamExtclkAndGateMx = 2602,
311        /// Stream data can not be read with commands while in spontaneous mode.
312        #[error("Stream data can not be read with commands while in spontaneous mode.")]
313        StreamInSpontaneousMode = 2603,
314        /// STREAM_SAMPLES_PER_PACKET is set to a value greater than the USB interface can support.
315        #[error("STREAM_SAMPLES_PER_PACKET is set to a value greater than the USB interface can support.")]
316        StreamUsbPktOverflow = 2604,
317        /// The requested operation can not be performed while stream is running.
318        #[error("The requested operation can not be performed while stream is running.")]
319        StreamIsActive = 2605,
320        /// Stream resolution can not be greater than 8.
321        #[error("Stream resolution can not be greater than 8.")]
322        StreamConfigInvalid = 2606,
323        /// The channel list contains an unstreamable address.
324        #[error("The channel list contains an unstreamable address.")]
325        StreamChnListInvalid = 2607,
326        /// The scan rate times the number of channels per scan is too great for this device.
327        #[error("The scan rate times the number of channels per scan is too great for this device.")]
328        StreamScanRateInvalid = 2608,
329        #[error("StreamOutBuffTooBig")]
330        StreamOutBuffTooBig = 2609,
331        /// An invalid stream out number was specified.
332        #[error("An invalid stream out number was specified.")]
333        StreamOutNumInvalid = 2610,
334        /// An unsupported data types was specified.
335        #[error("An unsupported data types was specified.")]
336        StreamDataTypeInvalid = 2611,
337        /// Stream must be set to either spontaneous or command-response.
338        #[error("Stream must be set to either spontaneous or command-response.")]
339        StreamTargetConfigInvalid = 2612,
340        /// Attempted to write more data than the buffer can hold. Extra data was discarded.
341        #[error("Attempted to write more data than the buffer can hold. Extra data was discarded.")]
342        StreamOutBuffFull = 2613,
343        /// The specified address cannot be a stream out target.
344        #[error("The specified address cannot be a stream out target.")]
345        StreamOutTargetInvalid = 2614,
346        /// The specified buffer was either too large or was not a power of 2.
347        #[error("The specified buffer was either too large or was not a power of 2.")]
348        StreamBuffSizeInvalid = 2615,
349        #[error("StreamOutBuffLoopOverwrite")]
350        StreamOutBuffLoopOverwrite = 2616,
351        /// The buffer size must be set before data can be written to it.
352        #[error("The buffer size must be set before data can be written to it.")]
353        StreamOutBuffDne = 2617,
354        /// The specified number of samples per packet is too large.
355        #[error("The specified number of samples per packet is too large.")]
356        StreamSamplesPerPktInvalid = 2618,
357        #[error("StreamBufferDne")]
358        StreamBufferDne = 2619,
359        /// Stream was already disabled.
360        #[error("Stream was already disabled.")]
361        StreamNotRunning = 2620,
362        /// Specified settling time is greater than the max possible.
363        #[error("Specified settling time is greater than the max possible.")]
364        StreamSettlingInvalid = 2621,
365        /// The loop size is too big for the current buffer size.
366        #[error("The loop size is too big for the current buffer size.")]
367        StreamOutLoopTooBig = 2622,
368        /// There is a mismatch between the stream out buffer type and target register.
369        #[error("There is a mismatch between the stream out buffer type and target register.")]
370        StreamOutDataTrgtMissmatch = 2623,
371        /// Selected divisor can not be used.
372        #[error("Selected divisor can not be used.")]
373        StreamInvalidDivisor = 2624,
374        /// The requested channel can not be streamed.
375        #[error("The requested channel can not be streamed.")]
376        StreamChnCanNotBeStreamed = 2625,
377        /// The high resolution converter cannot be used while stream out is used to update a DAC.
378        #[error("The high resolution converter cannot be used while stream out is used to update a DAC.")]
379        StreamOutDacInUse = 2626,
380        /// The STREAM_OUT#_ENABLE register must be set to 1 before writing STREAM_OUT#_LOOP_NUM_VALUES, STREAM_OUT#_SET_LOOP, or any of the STREAM_OUT#_BUFFER_ registers.
381        #[error("The STREAM_OUT#_ENABLE register must be set to 1 before writing STREAM_OUT#_LOOP_NUM_VALUES, STREAM_OUT#_SET_LOOP, or any of the STREAM_OUT#_BUFFER_ registers.")]
382        StreamOutNeedsToBeEnabled = 2627,
383        /// DAC1_FREQUENCY_OUT_ENABLE should be disabled before streaming at rates above 10kHz due to poor frequency output performance at higher stream rates.
384        #[error("DAC1_FREQUENCY_OUT_ENABLE should be disabled before streaming at rates above 10kHz due to poor frequency output performance at higher stream rates.")]
385        CannotStreamFastWithDac1FrequencyOutEnabled = 2628,
386        /// DAC1_FREQUENCY_OUT_ENABLE should not be enabled while streaming at rates above 10kHz due to poor frequency output performance at higher stream rates.
387        #[error("DAC1_FREQUENCY_OUT_ENABLE should not be enabled while streaming at rates above 10kHz due to poor frequency output performance at higher stream rates.")]
388        CannotEnableDac1FrequencyOutWithFastStream = 2629,
389        /// The stream trigger index is not valid for this device
390        #[error("The stream trigger index is not valid for this device")]
391        StreamTriggerIndexInvalid = 2630,
392        /// Stream can only be run at a max of 250Hz when streaming TEMPERATURE(0:7) registers
393        #[error("Stream can only be run at a max of 250Hz when streaming TEMPERATURE(0:7) registers")]
394        StreamRateInvalidForCjc = 2631,
395        /// The specified Software Watchdog timeout is too short.
396        #[error("The specified Software Watchdog timeout is too short.")]
397        SwdtRolltInvalid = 2670,
398        /// The watchdog must be disabled before the requested operation can be performed.
399        #[error("The watchdog must be disabled before the requested operation can be performed.")]
400        SwdtEnabled = 2671,
401        /// The specified Software Watchdog DIO configurations are not valid.
402        #[error("The specified Software Watchdog DIO configurations are not valid.")]
403        SwdtDioSettingsInvalid = 2672,
404        /// The specified Software Watchdog DAC0 configurations are not valid.
405        #[error("The specified Software Watchdog DAC0 configurations are not valid.")]
406        SwdtDac0SettingsInvalid = 2673,
407        /// The specified Software Watchdog DAC1 configurations are not valid.
408        #[error("The specified Software Watchdog DAC1 configurations are not valid.")]
409        SwdtDac1SettingsInvalid = 2674,
410        #[error("RtcTimeInvalid")]
411        RtcTimeInvalid = 2690,
412        /// The specified SNTP update interval is too short.
413        #[error("The specified SNTP update interval is too short.")]
414        RtcSntpTimeInvalid = 2691,
415        /// The requested operation can not be performed on units without a real-time-clock.
416        #[error("The requested operation can not be performed on units without a real-time-clock.")]
417        RtcNotPresent = 2692,
418        /// Valid modes are 0-3.
419        #[error("Valid modes are 0-3.")]
420        SpiModeInvalid = 2700,
421        /// SPI RX data is not available in the RX buffer.
422        #[error("SPI RX data is not available in the RX buffer.")]
423        SpiNoDataAvailable = 2701,
424        /// Attempted to set an invalid pin.
425        #[error("Attempted to set an invalid pin.")]
426        SpiCsPinInvalid = 2702,
427        /// Attempted to set an invalid pin.
428        #[error("Attempted to set an invalid pin.")]
429        SpiClkPinInvalid = 2703,
430        /// Attempted to set an invalid pin.
431        #[error("Attempted to set an invalid pin.")]
432        SpiMisoPinInvalid = 2704,
433        /// Attempted to set an invalid pin.
434        #[error("Attempted to set an invalid pin.")]
435        SpiMosiPinInvalid = 2705,
436        /// Selected pin is not available.
437        #[error("Selected pin is not available.")]
438        SpiCsPinReserved = 2706,
439        /// Selected pin is not available.
440        #[error("Selected pin is not available.")]
441        SpiClkPinReserved = 2707,
442        /// Selected pin is not available.
443        #[error("Selected pin is not available.")]
444        SpiMisoPinReserved = 2708,
445        /// Selected pin is not available.
446        #[error("Selected pin is not available.")]
447        SpiMosiPinReserved = 2709,
448        /// The specified TX buffer size is too large.
449        #[error("The specified TX buffer size is too large.")]
450        SpiTransferSizeTooLarge = 2710,
451        /// SPI buffer has not been initialized, please set SPI_NUM_BYTES before running SPI_GO.
452        #[error("SPI buffer has not been initialized, please set SPI_NUM_BYTES before running SPI_GO.")]
453        SpiNullBuffer = 2712,
454        /// One or both of the I2C lines are held low. Check hardware and reset the bus.
455        #[error("One or both of the I2C lines are held low. Check hardware and reset the bus.")]
456        I2cBusBusy = 2720,
457        /// Attempted to read from an empty buffer.
458        #[error("Attempted to read from an empty buffer.")]
459        I2cNoDataAvailable = 2721,
460        /// Attempted to set an invalid pin.
461        #[error("Attempted to set an invalid pin.")]
462        I2cSdaPinInvalid = 2722,
463        /// Attempted to set an invalid pin.
464        #[error("Attempted to set an invalid pin.")]
465        I2cSclPinInvalid = 2723,
466        /// The selected pin is not available.
467        #[error("The selected pin is not available.")]
468        I2cSdaPinReserved = 2724,
469        /// The selected pin is not available.
470        #[error("The selected pin is not available.")]
471        I2cSclPinReserved = 2725,
472        /// The specified TX buffer size is too large.
473        #[error("The specified TX buffer size is too large.")]
474        I2cTxSizeTooLarge = 2726,
475        /// The specified RX buffer size is too large.
476        #[error("The specified RX buffer size is too large.")]
477        I2cRxSizeTooLarge = 2727,
478        /// The data that was attempted to be written to the I2C TX buffer exceeded the maximum TX buffer size. Only data up to the maximum buffer size was placed in the TX buffer.
479        #[error("The data that was attempted to be written to the I2C TX buffer exceeded the maximum TX buffer size. Only data up to the maximum buffer size was placed in the TX buffer.")]
480        I2cBufferOverrun = 2728,
481        /// The throttle setting is too low, watchdog may fire. Minimum value = 46000
482        #[error("The throttle setting is too low, watchdog may fire. Minimum value = 46000")]
483        I2cSpeedTooLow = 2729,
484        /// Slave device did not respond.
485        #[error("Slave device did not respond.")]
486        SbusCommTimeOut = 2740,
487        /// Slave device did not acknowledge the data transfer.
488        #[error("Slave device did not acknowledge the data transfer.")]
489        SbusNoAck = 2741,
490        #[error("SbusCustomModeInvalid")]
491        SbusCustomModeInvalid = 2742,
492        /// Attempted to set an invalid pin.
493        #[error("Attempted to set an invalid pin.")]
494        SbusInvalidDioNum = 2743,
495        /// Command-response reads can not be used while the background service is running.
496        #[error("Command-response reads can not be used while the background service is running.")]
497        SbusBackgroundServiceOn = 2744,
498        /// SHT communication checksum failed.
499        #[error("SHT communication checksum failed.")]
500        SbusChecksumError = 2745,
501        /// SCL must be even and SDA must be SCL+1.
502        #[error("SCL must be even and SDA must be SCL+1.")]
503        TdacSdaSclInvalid = 2760,
504        /// Attempted to set an invalid pin.
505        #[error("Attempted to set an invalid pin.")]
506        TdacSclInvalid = 2761,
507        /// The specified channel not supported on this device.
508        #[error("The specified channel not supported on this device.")]
509        TdacInvalidChannel = 2762,
510        /// Failed to read the TDAC calibration.
511        #[error("Failed to read the TDAC calibration.")]
512        TdacCalReadFailure = 2763,
513        /// The TDAC did not respond to communication attempts.
514        #[error("The TDAC did not respond to communication attempts.")]
515        TdacNotFound = 2764,
516        /// A TDAC has not been initialized, try writing to the the TDAC first with the TDAC# register.
517        #[error("A TDAC has not been initialized, try writing to the the TDAC first with the TDAC# register.")]
518        TdacNotInitialized = 2765,
519        /// Unknown function specified.
520        #[error("Unknown function specified.")]
521        OnewireUnsupportedFunction = 2770,
522        /// Unable to detect any devices on the bus.
523        #[error("Unable to detect any devices on the bus.")]
524        OnewireNoPresencePulse = 2771,
525        /// The specified number of data bits is not supported.
526        #[error("The specified number of data bits is not supported.")]
527        AsynchNumDataBitsInvalid = 2780,
528        /// The number of bytes to send is invalid.
529        #[error("The number of bytes to send is invalid.")]
530        AsynchNumToWriteInvalid = 2781,
531        /// The specified buffer size is invalid. Max is 2048.
532        #[error("The specified buffer size is invalid. Max is 2048.")]
533        AsynchReadBuffSizeInvalid = 2782,
534        /// The baud rate is too high for this device.
535        #[error("The baud rate is too high for this device.")]
536        AsynchBaudTooHigh = 2783,
537        /// The specified operation can not be performed while enabled.
538        #[error("The specified operation can not be performed while enabled.")]
539        AsynchIsEnabled = 2784,
540        /// The specified operation can not be performed while disabled.
541        #[error("The specified operation can not be performed while disabled.")]
542        AsynchIsNotEnabled = 2785,
543        /// The transmit buffer is full.
544        #[error("The transmit buffer is full.")]
545        AsynchTxBufferFull = 2786,
546        /// Transmission timed out. Do not write more than 100 ms at a time.
547        #[error("Transmission timed out. Do not write more than 100 ms at a time.")]
548        AsynchTxTimeout = 2787,
549        /// The baud rate is zero. Please specify a baud rate.
550        #[error("The baud rate is zero. Please specify a baud rate.")]
551        AsynchBaudZero = 2788,
552        /// A hard error occurred in the low level disk I/O layer.
553        #[error("A hard error occurred in the low level disk I/O layer.")]
554        FileIoDiskError = 2801,
555        /// Assertion failed.
556        #[error("Assertion failed.")]
557        FileIoInternalError = 2802,
558        /// The physical drive cannot work.
559        #[error("The physical drive cannot work.")]
560        FileIoNotReady = 2803,
561        /// Could not find the file.
562        #[error("Could not find the file.")]
563        FileIoNoFile = 2804,
564        /// Could not find the path.
565        #[error("Could not find the path.")]
566        FileIoNoPath = 2805,
567        /// The path name format is invalid.
568        #[error("The path name format is invalid.")]
569        FileIoPathNameInvalid = 2806,
570        /// Access denied due to prohibited access or the directory is full.
571        #[error("Access denied due to prohibited access or the directory is full.")]
572        FileIoDenied = 2807,
573        /// Access denied due to prohibited access.
574        #[error("Access denied due to prohibited access.")]
575        FileIoExist = 2808,
576        /// The file/directory object is invalid. In the context of performing an ls command, this indicates that there are no more files.
577        #[error("The file/directory object is invalid. In the context of performing an ls command, this indicates that there are no more files.")]
578        FileIoInvalidObject = 2809,
579        /// The physical drive is write protected.
580        #[error("The physical drive is write protected.")]
581        FileIoWriteProtected = 2810,
582        /// The logical drive number is invalid.
583        #[error("The logical drive number is invalid.")]
584        FileIoInvalidDrive = 2811,
585        /// The volume has no work area.
586        #[error("The volume has no work area.")]
587        FileIoNotEnabled = 2812,
588        /// There is no valid FAT12, FAT16, or FAT32 volume.
589        #[error("There is no valid FAT12, FAT16, or FAT32 volume.")]
590        FileIoNoFilesystem = 2813,
591        /// The f_mkfs() function aborted due to any parameter error.
592        #[error("The f_mkfs() function aborted due to any parameter error.")]
593        FileIoMkfsAborted = 2814,
594        /// Could not get granted access to the volume within the defined timeout period.
595        #[error("Could not get granted access to the volume within the defined timeout period.")]
596        FileIoTimeout = 2815,
597        /// The operation is rejected according to the file sharing policy.
598        #[error("The operation is rejected according to the file sharing policy.")]
599        FileIoLocked = 2816,
600        /// LFN working buffer could not be allocated.
601        #[error("LFN working buffer could not be allocated.")]
602        FileIoNotEnoughCore = 2817,
603        /// The number of open files is greater than the allowable limit (files > _FS_SHARE).
604        #[error("The number of open files is greater than the allowable limit (files > _FS_SHARE).")]
605        FileIoTooManyOpenFiles = 2818,
606        /// The given parameter is invalid.
607        #[error("The given parameter is invalid.")]
608        FileIoInvalidParameter = 2819,
609        /// The WiFi module associated to the network.
610        #[error("The WiFi module associated to the network.")]
611        WifiAssociated = 2900,
612        /// The WiFi module is attempting to associate to the network.
613        #[error("The WiFi module is attempting to associate to the network.")]
614        WifiAssociating = 2901,
615        /// The WiFi module failed to associate to the network.
616        #[error("The WiFi module failed to associate to the network.")]
617        WifiAssociationFailed = 2902,
618        /// The WiFi module is not currently powered.
619        #[error("The WiFi module is not currently powered.")]
620        WifiUnpowered = 2903,
621        /// The WiFi module is initializing.
622        #[error("The WiFi module is initializing.")]
623        WifiBootingUp = 2904,
624        /// The WiFi module was unable to properly initialize.
625        #[error("The WiFi module was unable to properly initialize.")]
626        WifiCouldNotStart = 2905,
627        /// The WiFi module is attempting to apply the desired network settings.
628        #[error("The WiFi module is attempting to apply the desired network settings.")]
629        WifiApplyingSettings = 2906,
630        /// The WiFi module has begun the process of claiming a DHCP lease.
631        #[error("The WiFi module has begun the process of claiming a DHCP lease.")]
632        WifiDhcpStarted = 2907,
633        /// The WiFi module is in an unspecified state.
634        #[error("The WiFi module is in an unspecified state.")]
635        WifiOther = 2909,
636        /// The WiFi module is getting ready to start an update.
637        #[error("The WiFi module is getting ready to start an update.")]
638        WifiUpdateConfig = 2920,
639        /// The WiFi module is in the process of updating.
640        #[error("The WiFi module is in the process of updating.")]
641        WifiUpdateInProg = 2921,
642        /// The WiFi module has updated and will restart to apply the new changes.
643        #[error("The WiFi module has updated and will restart to apply the new changes.")]
644        WifiUpdateReboot = 2923,
645        /// The WiFi module was successfully updated.
646        #[error("The WiFi module was successfully updated.")]
647        WifiUpdateSuccess = 2924,
648        /// The WiFi module was not successfully updated.
649        #[error("The WiFi module was not successfully updated.")]
650        WifiUpdateFailed = 2925,
651        /// The stream buffer reached its capacity and auto-recovery has begun to avoid an overflow. No new samples will be saved until there is free space in the buffer.
652        #[error("The stream buffer reached its capacity and auto-recovery has begun to avoid an overflow. No new samples will be saved until there is free space in the buffer.")]
653        StreamAutoRecoverActive = 2940,
654        /// There is space available in the stream buffer for new samples again and auto-recovery has ended.
655        #[error("There is space available in the stream buffer for new samples again and auto-recovery has ended.")]
656        StreamAutoRecoverEnd = 2941,
657        /// A new scan started before the previous scan finished. Generally occurs because ScanRate > MaxSampleRate/NumChannels.  Note that MaxSampleRate is impacted by Range, ResolutionIndex, and Settling. Try adding commands right before StreamStart to set AIN_ALL_RANGE=10, STREAM_RESOLUTION_INDEX=0, and STREAM_SETTLING_US=0.
658        #[error("A new scan started before the previous scan finished. Generally occurs because ScanRate > MaxSampleRate/NumChannels.  Note that MaxSampleRate is impacted by Range, ResolutionIndex, and Settling. Try adding commands right before StreamStart to set AIN_ALL_RANGE=10, STREAM_RESOLUTION_INDEX=0, and STREAM_SETTLING_US=0.")]
659        StreamScanOverlap = 2942,
660        /// During stream auto-recovery, the variable tracking the number of skipped scans has reached an overflow condition.
661        #[error("During stream auto-recovery, the variable tracking the number of skipped scans has reached an overflow condition.")]
662        StreamAutoRecoverEndOverflow = 2943,
663        /// The specified number of stream scans have been acquired, stream will be stopped automatically.
664        #[error("The specified number of stream scans have been acquired, stream will be stopped automatically.")]
665        StreamBurstComplete = 2944,
666        /// The stream buffer reached capacity while auto-recovery was disabled. Stream has been stopped.
667        #[error("The stream buffer reached capacity while auto-recovery was disabled. Stream has been stopped.")]
668        StreamBufferFull = 2945,
669        #[error("SelfdiagMainOscFail")]
670        SelfdiagMainOscFail = 2950,
671        /// The requested file was not found.
672        #[error("The requested file was not found.")]
673        FileIoNotFound = 2960,
674        /// No SD card present or SC card could not be initialized.
675        #[error("No SD card present or SC card could not be initialized.")]
676        FileIoNoDisk = 2961,
677        /// The file name is invalid.
678        #[error("The file name is invalid.")]
679        FileIoInvalidName = 2962,
680        /// An open file is required to perform the requested operation.
681        #[error("An open file is required to perform the requested operation.")]
682        FileIoFileNotOpen = 2963,
683        /// There are too many files open.
684        #[error("There are too many files open.")]
685        FileIoTooManyOpen = 2964,
686        /// Failed to mount the SD card. Card may be bad or incompatible.
687        #[error("Failed to mount the SD card. Card may be bad or incompatible.")]
688        FileIoSdCardNotFound = 2965,
689        /// There are no more files in the current working directory.
690        #[error("There are no more files in the current working directory.")]
691        FileIoEndOfCwd = 2966,
692    }
693}