This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

no member named POWER in 'NRF_TWI_Type {aka struct <anonymous>}'

Hello,

I am attempting to implement the TWI drivers from the SDK for a nrf52832 chip for a pca10040 board. I am using the twi_hw_master files to drive my TWI and insofar I have been unable to implement it because I am having the following issue when building:

twi_hw_master.c:53:21: error: 'NRF_TWI_Type {aka struct <anonymous>}' has no member named 'POWER'

That particular Struct is defined in the nrf52.h file. As far as I can tell this is entirely true and there actually is no member called POWER in NRF_TWI_Type, only in :

typedef struct {
  __IO uint32_t  POWER;                             /*!< Description cluster[0]: RAM0 power control register                   */
  __O  uint32_t  POWERSET;                          /*!< Description cluster[0]: RAM0 power control set register               */
  __O  uint32_t  POWERCLR;                          /*!< Description cluster[0]: RAM0 power control clear register             */
  __I  uint32_t  RESERVED0;
} POWER_RAM_Type;

Also, I am getting the following popup when I try to open declaration:

image description

(the path covered in red is exactly the same in both instances)

Is it possible I am including the file nrf52.h twice?

Can anyone lend a hand?
Thanks in advance!

Related