Skip to content

Commit

Permalink
hil: radio: remove buffers from initialize
Browse files Browse the repository at this point in the history
These buffers should be passed to the object directly as not all users
are likely to want the same buffers (and this is in fact true today).
  • Loading branch information
bradjc committed May 16, 2024
1 parent 58e61c0 commit d878404
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions kernel/src/hil/radio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ impl<'a, T: RadioConfig<'a> + RadioData<'a>> Radio<'a> for T {}

/// Configure the 802.15.4 radio.
pub trait RadioConfig<'a> {
/// buf must be at least MAX_BUF_SIZE in length, and
/// reg_read and reg_write must be 2 bytes.
fn initialize(
&self,
spi_buf: &'static mut [u8],
reg_write: &'static mut [u8],
reg_read: &'static mut [u8],
) -> Result<(), ErrorCode>;
fn initialize(&self) -> Result<(), ErrorCode>;
fn reset(&self) -> Result<(), ErrorCode>;
fn start(&self) -> Result<(), ErrorCode>;
fn stop(&self) -> Result<(), ErrorCode>;
Expand Down

0 comments on commit d878404

Please sign in to comment.