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

sdcard\app_sdcard.c(254): error: #20: identifier "nrf_spi_frequency_t" is undefined

Hi

I use a nrf52810 to implement a datalogger. I try to log sensor data to a SDCard. The firmware works fine to communicate with the sensor, but after I tried to insert the SPI Instance the compile has an error. (This part of the firmware worked very well on an nrf52832). At the moment I can't compile my firmware because of the error:

..\..\..\..\nRF5_SDK_15.2.0_9412b96\components\libraries\sdcard\app_sdcard.c(254): error: #20: identifier "nrf_spi_frequency_t" is undefined
(nrf_spi_frequency_t) APP_SDCARD_FREQ_DATA);
..\..\..\..\nRF5_SDK_15.2.0_9412b96\components\libraries\sdcard\app_sdcard.c(254): error: #18: expected a ")"
(nrf_spi_frequency_t)

I inserted all .h and .c files in my project. 

The file is linked to but the compiler has some problems to find the file in the app_sdcard.c library from nordic...

In the picture you can see my inserted driver files:

FIle app_sdcard.c (Line 244):

/**
 * @brief Function for switching the SPI clock to high speed mode.
 */
__STATIC_INLINE void sdc_spi_hispeed(void)
{
#ifdef SPI_PRESENT
    nrf_spi_frequency_set(m_spi.u.spi.p_reg,
                          (nrf_spi_frequency_t) APP_SDCARD_FREQ_DATA);
#else
    nrf_spim_frequency_set(m_spi.u.spim.p_reg,
                           (nrf_spi_frequency_t) APP_SDCARD_FREQ_DATA);
#endif
}

In the attachment I added my sdk_config.h!

sdk_config.h

Thank you very much!!!

Parents Reply Children
Related