[−][src]Trait radio_sx128x::base::Hal
Comms implementation can be generic over SPI or UART connections
Required methods
fn reset(&mut self) -> Result<(), Error<CommsError, PinError>>
Reset the device
fn get_busy(&mut self) -> Result<PinState, Error<CommsError, PinError>>
Wait on radio device busy
fn delay_ms(&mut self, ms: u32)
Delay for the specified time
fn write_cmd(
&mut self,
command: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
command: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write the specified command and data
fn read_cmd(
&mut self,
command: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
command: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read the specified command and data
fn write_regs(
&mut self,
reg: u16,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
reg: u16,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write to the specified register
fn read_regs(
&mut self,
reg: u16,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
reg: u16,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read from the specified register
fn write_buff(
&mut self,
offset: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
offset: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write to the specified buffer
fn read_buff(
&mut self,
offset: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
&mut self,
offset: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read from the specified buffer
Provided methods
fn wait_busy(&mut self) -> Result<(), Error<CommsError, PinError>>
Wait on radio device busy
fn read_reg(&mut self, reg: u8) -> Result<u8, Error<CommsError, PinError>>
Read a single u8 value from the specified register
fn write_reg(
&mut self,
reg: u8,
value: u8
) -> Result<(), Error<CommsError, PinError>>
&mut self,
reg: u8,
value: u8
) -> Result<(), Error<CommsError, PinError>>
Write a single u8 value to the specified register
fn update_reg(
&mut self,
reg: u8,
mask: u8,
value: u8
) -> Result<u8, Error<CommsError, PinError>>
&mut self,
reg: u8,
mask: u8,
value: u8
) -> Result<u8, Error<CommsError, PinError>>
Update the specified register with the provided value & mask
Implementors
impl<T, CommsError, PinError> Hal<CommsError, PinError> for T where
T: Transactional<Error = WrapError<CommsError, PinError>>,
T: Reset<Error = WrapError<CommsError, PinError>>,
T: Busy<Error = WrapError<CommsError, PinError>>,
T: DelayMs<u32>,
[src]
T: Transactional<Error = WrapError<CommsError, PinError>>,
T: Reset<Error = WrapError<CommsError, PinError>>,
T: Busy<Error = WrapError<CommsError, PinError>>,
T: DelayMs<u32>,
fn reset(&mut self) -> Result<(), Error<CommsError, PinError>>
[src]
Reset the radio
fn get_busy(&mut self) -> Result<PinState, Error<CommsError, PinError>>
[src]
fn delay_ms(&mut self, ms: u32)
[src]
Delay for the specified time
fn write_cmd(
&mut self,
command: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
command: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write the specified command and data
fn read_cmd<'a>(
&mut self,
command: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
command: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read the specified command and data
fn write_regs(
&mut self,
reg: u16,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
reg: u16,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write to the specified register
fn read_regs<'a>(
&mut self,
reg: u16,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
reg: u16,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read from the specified register
fn write_buff(
&mut self,
offset: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
offset: u8,
data: &[u8]
) -> Result<(), Error<CommsError, PinError>>
Write to the specified buffer
fn read_buff<'a>(
&mut self,
offset: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
[src]
&mut self,
offset: u8,
data: &mut [u8]
) -> Result<(), Error<CommsError, PinError>>
Read from the specified buffer