Skip to content

Commit

Permalink
PrintDetails
Browse files Browse the repository at this point in the history
- Fix printing address width for pipes 0 and 1
  • Loading branch information
TMRh20 committed Dec 7, 2022
1 parent 5043641 commit 53fc035
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nrf_to_nrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ void nrf_to_nrf::setAddressWidth(uint8_t a_width){

}

/**********************************************************************************************************/

void nrf_to_nrf::printDetails(){

Expand All @@ -732,15 +733,15 @@ void nrf_to_nrf::printDetails(){
//Serial.println(addrConv32(NRF_RADIO->PREFIX0);
Serial.print("RX_ADDR_P0-1\t= 0x");
uint32_t base = addrConv32(NRF_RADIO->BASE0);
for(int i=addressWidth-1; i >-1; i--){
for(int i=addressWidth-2; i >-1; i--){
Serial.print( (base >> (i * 8)) & 0xFF,HEX);
}
uint32_t prefixes = addrConv32(NRF_RADIO->PREFIX0);
uint8_t prefix = (prefixes >> 24) & 0xFF;
Serial.print(prefix,HEX);
Serial.print(" 0x");
base = addrConv32(NRF_RADIO->BASE1);
for(int i=addressWidth-1; i >-1; i--){
for(int i=addressWidth-2; i >-1; i--){
Serial.print( (base >> (i * 8)) & 0xFF,HEX);
}
prefix = (prefixes >> 16) & 0xFF;
Expand Down

0 comments on commit 53fc035

Please sign in to comment.