mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
this commit crashes on boot
This commit is contained in:
parent
7f7bdbff88
commit
b904a114fe
1 changed files with 15 additions and 0 deletions
|
|
@ -117,6 +117,21 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
||||||
"info" => {
|
"info" => {
|
||||||
write!(ret, "Loaded sample is {}kHz, {} channels, {} format, {} bytes", self.header.sampling_rate, self.header.channel_count, self.header.audio_format, self.raw_len_bytes).unwrap();
|
write!(ret, "Loaded sample is {}kHz, {} channels, {} format, {} bytes", self.header.sampling_rate, self.header.channel_count, self.header.audio_format, self.raw_len_bytes).unwrap();
|
||||||
}
|
}
|
||||||
|
"dump" => {
|
||||||
|
let mut temp = String::<9>::new();
|
||||||
|
for i in 0..8 {
|
||||||
|
write!(temp, "{:08x} ", unsafe{self.raw_data.add(i).read_volatile()}).unwrap();
|
||||||
|
ret.append(temp.to_str()).unwrap();
|
||||||
|
temp.clear();
|
||||||
|
}
|
||||||
|
ret.append("\n").unwrap();
|
||||||
|
ret.append("\n").unwrap();
|
||||||
|
for i in 0..8 {
|
||||||
|
write!(temp, "{:08x} ", unsafe{self.raw_data.add(i + 0x2000).read_volatile()}).unwrap();
|
||||||
|
ret.append(temp.to_str()).unwrap();
|
||||||
|
temp.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => write!(ret, "{}", helpstring).unwrap(),
|
_ => write!(ret, "{}", helpstring).unwrap(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue