pub enum ErrorCode {
None,
UnknownCommand,
CommandDataIncorrect,
ChannelDoesNotExist,
ChannelInactive,
BadCRC,
ResetOccurred,
BadADCAcquisition,
FailReadingEEPROM,
InternalSPIError,
CommandError,
UnknownError,
}
Last Error
If an error has been generated after attempting to execute a user’s command
the value 0xFFFF is returned. To find out the details of the last error,
send the command 0x03 followed by the data byte 0x00. This will return
the code of the last error generated. The first two bytes returned represent
the Motherboard’s error code, the second two bytes represent the Daughterboard’s.
Possible last error values
UnknownCommand
CommandDataIncorrect
Supplied data incorrect when processing command
Selected channel does not exist
Selected channel is currently inactive
CRC code does not match data
There was an error with the ADC acquisition
Reading from EEPROM generated an error
Generic warning about an error on the internal SPI bus
CommandError
The command to fetch the last error failed
Catch all for future error values
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more