'NRFX_TWIM1_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TWI0_INST_IDX'?

Hello, sir.

I used to work on twi0 and twi1, but now I'd want to shift both twim0 and twim1. However, I'm getting an error saying that 'NRFX TWIM1 INST IDX' is undeclared here (not in a function); did you mean 'NRFX TWI0 INST IDX'?
I checked the NRFX TWIM1 ENABLED macro in the nrfx spim.h file, and it's disabled in apply old config.h, but it's enabled in the sdk config.h file.
Why is apply old config.h being used instead of sdk config.h? What is the best way to solve this issue?
Please take a look at the sdk config.h file I've sent.

2133.sdk_config.txt

Parents

  • /** @brief Macro for creating a TWI master driver instance. */
    #define NRFX_TWIM_INSTANCE(id) \
    { \
    .p_twim = NRFX_CONCAT_2(NRF_TWIM, id), \
    .drv_inst_idx = NRFX_CONCAT_3(NRFX_TWIM, id, _INST_IDX), \ here getting the error
    }

    #ifndef __NRFX_DOXYGEN__
    enum {
    #if NRFX_CHECK(NRFX_TWIM0_ENABLED)
    NRFX_TWIM0_INST_IDX,               // disabled

    #endif
    #if NRFX_CHECK(NRFX_TWIM1_ENABLED)
    NRFX_TWIM1_INST_IDX,
    #endif
    #if NRFX_CHECK(NRFX_TWIM2_ENABLED)
    NRFX_TWIM2_INST_IDX,
    #endif
    #if NRFX_CHECK(NRFX_TWIM3_ENABLED)
    NRFX_TWIM3_INST_IDX,
    #endif
    NRFX_TWIM_ENABLED_COUNT
    };
    #endif

Reply

  • /** @brief Macro for creating a TWI master driver instance. */
    #define NRFX_TWIM_INSTANCE(id) \
    { \
    .p_twim = NRFX_CONCAT_2(NRF_TWIM, id), \
    .drv_inst_idx = NRFX_CONCAT_3(NRFX_TWIM, id, _INST_IDX), \ here getting the error
    }

    #ifndef __NRFX_DOXYGEN__
    enum {
    #if NRFX_CHECK(NRFX_TWIM0_ENABLED)
    NRFX_TWIM0_INST_IDX,               // disabled

    #endif
    #if NRFX_CHECK(NRFX_TWIM1_ENABLED)
    NRFX_TWIM1_INST_IDX,
    #endif
    #if NRFX_CHECK(NRFX_TWIM2_ENABLED)
    NRFX_TWIM2_INST_IDX,
    #endif
    #if NRFX_CHECK(NRFX_TWIM3_ENABLED)
    NRFX_TWIM3_INST_IDX,
    #endif
    NRFX_TWIM_ENABLED_COUNT
    };
    #endif

Children
No Data
Related