pub fn open_writing_pipe(
        &mut self,
        mut addr: &[u8],
    ) -> Result<(), TransferError<SPIErr, PinErr>> {
        if addr.len() > Self::MAX_ADDR_WIDTH {
            addr = &addr[0..Self::MAX_ADDR_WIDTH];
        }
        // We need to open Reading Pipe 0 with the same address name
        // because ACK messages will be recieved on this channel
        self.write_register(Register::RX_ADDR_P0, addr)?;
        // Open writing pipe
        self.write_register(Register::TX_ADDR, addr)?;

        Ok(())
    }
/// Opens a writing pipe for writing data to an address.
/// # Examples
/// ```rust
/// // Open writing pipe for address "Node1"
/// chip.open_writing_pipe(b"Node1")?;
/// ```
/// # Warnings
/// Must be called before writing data.
Opens a writing pipe for writing data to an address.
Opens a writing pipe for writing data to an address .
pub fn open_writing_pipe(
        &mut self,
        mut addr: &[u8],
    ) -> Result<(), TransferError<SPIErr, PinErr>> {
        if addr.len() > Self::MAX_ADDR_WIDTH {
            addr = &addr[0..Self::MAX_ADDR_WIDTH];
        }
        // We need to open Reading Pipe 0 with the same address name
        // because ACK messages will be recieved on this channel
        self.write_register(Register::RX_ADDR_P0, addr)?;
        // Open writing pipe
        self.write_register(Register::TX_ADDR, addr)?;
        Ok(())
    }
pub fn open_writing_pipe ( & mut self , mut addr : & [ u8 ] , ) -> Result < ( ) , TransferError < SPIErr , PinErr > > { if addr . len ( ) > Self :: MAX_ADDR_WIDTH { addr = & addr [ 0 .. Self :: MAX_ADDR_WIDTH ] ; } // We need to open Reading Pipe 0 with the same address name // because ACK messages will be recieved on this channel self . write_register ( Register :: RX_ADDR_P0 , addr ) ? ; // Open writing pipe self . write_register ( Register :: TX_ADDR , addr ) ? ; Ok ( ( ) ) }
Opens a writing pipe for writing data to an address.
Opens a writing pipe for writing data to an address .
&mut self
addr
&[u8]
&mut self
addr
&[u8]
examples
```rust
Open writing pipe for address "Node1"
chip.open_writing_pipe(b"Node1")?;
```
` ` ` rust Open writing pipe for address " Node1 " chip . open_writing_pipe ( b " Node1 " ) ? ; ` ` `
warnings
Must be called before writing data.
Must be called before writing data .