diff --git a/src/bl2.rs b/src/bl2.rs index b3dcec6..0d31bcf 100644 --- a/src/bl2.rs +++ b/src/bl2.rs @@ -3,8 +3,8 @@ use std::slice; use std::time::Duration; use serialport::{ClearBuffer, SerialPort}; -static BL2_HANDSHAKE_REQ: &[u8] = "mudl".as_bytes(); -static BL2_HANDSHAKE_RESP: &[u8] = "TF-A".as_bytes(); +const BL2_HANDSHAKE_REQ: &[u8] = "mudl".as_bytes(); +const BL2_HANDSHAKE_RESP: &[u8] = "TF-A".as_bytes(); pub struct BL2 { port: Box, @@ -142,4 +142,4 @@ impl BL2 { pub fn go(&mut self) { self.echo(slice::from_ref(&4)); } -} \ No newline at end of file +} diff --git a/src/bootrom.rs b/src/bootrom.rs index 4ef9fbd..195aa09 100644 --- a/src/bootrom.rs +++ b/src/bootrom.rs @@ -3,7 +3,7 @@ use std::slice; use std::time::Duration; use serialport::{ClearBuffer, SerialPort}; -static BROM_HANDSHAKE: &[u8] = &[0xa0, 0x0a, 0x50, 0x05]; +const BROM_HANDSHAKE: &[u8] = &[0xa0, 0x0a, 0x50, 0x05]; pub struct BootROM { port: Box, } @@ -159,4 +159,4 @@ impl BootROM { panic!("jump_da64 magic status: {}", ret); } } -} \ No newline at end of file +}