how to change pipe

Questions for programming 8051 microcontrollers in C or assembly using SDCC

how to change pipe

Postby joselalupa » Tue Aug 25, 2015 6:18 pm

i am in the process of reading everything to try to understand and adapt the example code to my need, one of the things i need to do is change channel and pipe. in rf i've seen RF_RX_ADDR_P0 0x0A and RF_TX_ADDR 0x10.
i would like to know if those are the parameters to change in order to assign different pipe to rx and tx??
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: how to change pipe

Postby brennen » Wed Aug 26, 2015 12:46 pm

The rf_set_rx_addr() function takes the pipe number as an argument, and that's how you'd set your pipe address. When you receive a packet, you can call rf_get_pipe_num_shifted_from_status_val() to see which pipe it was received on. Note that you must do this *before* you call rf_read_rx_payload().
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: how to change pipe

Postby joselalupa » Thu Aug 27, 2015 1:30 am

what about tx? how do i assaign a pipe for transmitting?
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: how to change pipe

Postby brennen » Thu Aug 27, 2015 12:53 pm

There is no concept of pipes for TX mode. You just set the TX address to the RX address of the pipe on the receiver(s) you're sending data to.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm


Return to 8051 Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron