mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-19 00:38:10 +00:00
Merge pull request #151 from ferrous-systems/packet-explanation
radio-puzzle: add some explanation about `packet`
This commit is contained in:
commit
dbb7ada361
|
@ -17,6 +17,7 @@ fn main() -> ! {
|
||||||
// puzzle.hex uses channel 25
|
// puzzle.hex uses channel 25
|
||||||
radio.set_channel(Channel::_25);
|
radio.set_channel(Channel::_25);
|
||||||
|
|
||||||
|
// the IEEE 802.15.4 packet that will carry our data
|
||||||
let mut packet = Packet::new();
|
let mut packet = Packet::new();
|
||||||
|
|
||||||
// first exchange a single packet with the Dongle
|
// first exchange a single packet with the Dongle
|
||||||
|
|
|
@ -23,6 +23,7 @@ fn main() -> ! {
|
||||||
/* # Build a dictionary */
|
/* # Build a dictionary */
|
||||||
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
|
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
|
||||||
|
|
||||||
|
// the IEEE 802.15.4 packet that will carry our data
|
||||||
let mut packet = Packet::new();
|
let mut packet = Packet::new();
|
||||||
for plainletter in 0..=127 {
|
for plainletter in 0..=127 {
|
||||||
packet.copy_from_slice(&[plainletter]);
|
packet.copy_from_slice(&[plainletter]);
|
||||||
|
|
|
@ -24,6 +24,7 @@ fn main() -> ! {
|
||||||
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
|
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
|
||||||
// ^^^^^^^^^^^^ NOTE larger capacity
|
// ^^^^^^^^^^^^ NOTE larger capacity
|
||||||
|
|
||||||
|
// the IEEE 802.15.4 packet that will carry our data
|
||||||
let mut packet = Packet::new();
|
let mut packet = Packet::new();
|
||||||
for plainletter in 0..=127 {
|
for plainletter in 0..=127 {
|
||||||
// ^^^^^^^ NOTE complete ASCII range
|
// ^^^^^^^ NOTE complete ASCII range
|
||||||
|
|
Loading…
Reference in a new issue