nRF24LE1 - Problems with Address

Questions for programming 8051 microcontrollers in C or assembly using SDCC

nRF24LE1 - Problems with Address

Postby filypeans » Mon Apr 07, 2014 12:59 pm

Hello everyone, I'm currently working with nRF24LE1 and I want to communicate two transceivers using an other address unlike the default address. Although I'm having problems with that.

Those transceivers, in default parameters, works with address as E7E7E7E7E7. I changed addres of the receiver, but now I want to setup TX address width.

Looking at SDK documentation, I saw this function:

hal_nrf_set_address_width(hal_nrf_address_width_t address_width)

The definition of hal_nrf_address_width_t is:

Definition at line 163 of file hal_nrf_reg.h.

} hal_nrf_address_t;

But, when I tried to setup it on my source code:

hal_nrf_set_address_width(HAL_NRF_TX 3)

envia.c(58): warning C259: 'parameter 1': different enumeration types
envia.c(58): error C141: syntax error near '3'

How can I fix it?
Posts: 2
Joined: Mon Apr 07, 2014 12:45 pm

Re: nRF24LE1 - Problems with Address

Postby brennen » Mon Apr 07, 2014 1:52 pm

I'm not as familiar with Nordic's SDK, but you're looking at the definition for the wrong enumeration. This is the one you're looking for (which is just below the one you mentioned in your message):
Code: Select all
/** An enum describing the radio's address width.
typedef enum {
    HAL_NRF_AW_3BYTES = 3,      /**< Set address width to 3 bytes */
    HAL_NRF_AW_4BYTES,          /**< Set address width to 4 bytes */
    HAL_NRF_AW_5BYTES           /**< Set address width to 5 bytes */
} hal_nrf_address_width_t;
Site Admin
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24LE1 - Problems with Address

Postby filypeans » Tue Apr 08, 2014 2:09 pm

Thanks Brennen
Posts: 2
Joined: Mon Apr 07, 2014 12:45 pm

Return to 8051 Programming

Who is online

Users browsing this forum: No registered users and 1 guest