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

I am trying to call SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); in nRF Mesh light (server) application, but its is giving error ../examples/light_switch/server/src/main.c:105:1: error: expected expression before '#pragma'

I want to add some code to static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff) in light switch server application.

My intention is when button 1 pressed on server board it has to read the temperature data from temperature sensor which is deployed in nRF52 DK. 

so I called SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); in static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff) to load temperature data in p_temp.

but giving the error ../examples/light_switch/server/src/main.c:105:1: error: expected expression before '#pragma'.

using nRF5 SDK for Mesh v2.2.0

-- SDK: nRF5_SDK_15.0.0_a53641a
-- Platform: nrf52832_xxAA
-- Arch: cortex-m4f
-- SoftDevice: s132_6.0.0
-- Board: pca10040

and 

build$ cmake -G Ninja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52832_xxAA .. for building.

Parents Reply Children
No Data
Related