instruction.rs 450 B

123456789101112131415161718192021
  1. use steel::*;
  2. #[repr(u8)]
  3. #[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
  4. pub enum LeverInstruction {
  5. Initialize = 0,
  6. SetPowerStatus = 1,
  7. }
  8. #[repr(C)]
  9. #[derive(Clone, Copy, Debug, Pod, Zeroable)]
  10. pub struct Initialize {}
  11. #[repr(C)]
  12. #[derive(Clone, Copy, Debug, Pod, Zeroable)]
  13. pub struct SetPowerStatus {
  14. pub name: [u8; 32],
  15. }
  16. instruction!(LeverInstruction, Initialize);
  17. instruction!(LeverInstruction, SetPowerStatus);