From 33d78292c60a13c23dc51b0d88a427c74d57f565 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 5 Dec 2022 01:44:28 +0100 Subject: [PATCH] better example --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a1c3331..229741d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,8 +39,11 @@ //! //! ```rust //! use spacepackets::SpHeader; -//! let sp_header = SpHeader::tc_unseg(0x42, 12, 0).expect("Error creating SP header"); +//! let sp_header = SpHeader::tc_unseg(0x42, 12, 0).expect("Error creating CCSDS TC header"); //! println!("{:?}", sp_header); +//! let mut ccsds_buf: [u8; 32] = [0; 32]; +//! sp_header.write_to_be_bytes(&mut ccsds_buf).expect("Writing CCSDS TC header failed"); +//! println!("{:x?}", &ccsds_buf[0..6]); //! ``` #![no_std] #![cfg_attr(doc_cfg, feature(doc_cfg))]