fn set_flags(fpga: &XilinxSysFPGA, new_flags: u32) -> Result<String, FpgadError>Expand description
Set the programming flags in sysfs.
Writes the flags to /sys/class/fpga_manager/<device>/flags in undecorated
hexadecimal (decimal 32 -> undecorated hex 20) and verifies that the write
succeeded by reading the value back.
Also checks and logs the FPGA state after setting flags.
§Arguments
flags- The flags value to set
§Returns: Result<(), FpgadError>
Ok(())- Flags set and verified successfullyErr(FpgadError::IOWrite)- Failed to write flags fileErr(FpgadError::IORead)- Failed to read back flags or stateErr(FpgadError::Flag)- Read-back value doesn’t match written value