Updating error messages

This commit is contained in:
Ryan Summers 2020-06-11 18:09:01 +02:00
parent 58bd61afd5
commit 48bd35e1d8
2 changed files with 7 additions and 6 deletions

View File

@ -152,11 +152,12 @@ where
ad9959.interface.configure_mode(desired_mode).map_err(|_| Error::Interface)?; ad9959.interface.configure_mode(desired_mode).map_err(|_| Error::Interface)?;
// Read back the CSR to ensure it specifies the mode correctly. // Read back the CSR to ensure it specifies the mode correctly.
let mut updated_csr: [u8; 1] = [0]; // TODO: This is disabled until QSPI readback issues have been resolved.
ad9959.interface.read(Register::CSR as u8, &mut updated_csr).map_err(|_| Error::Interface)?; //let mut updated_csr: [u8; 1] = [0];
if updated_csr[0] != csr[0] { //ad9959.interface.read(Register::CSR as u8, &mut updated_csr).map_err(|_| Error::Interface)?;
return Err(Error::Check); //if updated_csr[0] != csr[0] {
} // return Err(Error::Check);
//}
// Set the clock frequency to configure the device as necessary. // Set the clock frequency to configure the device as necessary.
ad9959.configure_system_clock(clock_frequency, multiplier)?; ad9959.configure_system_clock(clock_frequency, multiplier)?;

View File

@ -123,7 +123,7 @@ macro_rules! route_request {
let value = match $getter() { let value = match $getter() {
Ok(data) => data, Ok(data) => data,
Err(_) => return server::Response::error($request.attribute, Err(_) => return server::Response::error($request.attribute,
"Failed to set attribute"), "Failed to read attribute"),
}; };
let encoded_data: String<U256> = match serde_json_core::to_string(&value) { let encoded_data: String<U256> = match serde_json_core::to_string(&value) {