Hi everyone.
I'm using nRF Connect SDK 2.6.1. I want to use Emulated RTC driver functionality.
Therefore, I configured prj.conf file as (based on This Link): CONFIG_RTC=y
After that, the only thing that I did, is (adding rtc.h to main.c): #include <zephyr/drivers/rtc.h>
C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/rtc.h:215:41: warning: 'struct rtc_get_time' declared inside parameter list will not be visible outside of this definition or declaration 215 | __syscall int rtc_get_time(const struct rtc_get_time *dev, struct rtc_time *timeptr); | ^~~~~~~~~~~~ In file included from C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/rtc.h:540: D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:47:45: warning: 'struct rtc_get_time' declared inside parameter list will not be visible outside of this definition or declaration 47 | extern int z_impl_rtc_get_time(const struct rtc_get_time * dev, struct rtc_time * timeptr); | ^~~~~~~~~~~~ D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:47:12: error: conflicting types for 'z_impl_rtc_get_time'; have 'int(const struct rtc_get_time *, struct rtc_time *)' 47 | extern int z_impl_rtc_get_time(const struct rtc_get_time * dev, struct rtc_time * timeptr); | ^~~~~~~~~~~~~~~~~~~ C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/rtc.h:217:19: note: previous definition of 'z_impl_rtc_get_time' with type 'int(const struct device *, struct rtc_time *)' 217 | static inline int z_impl_rtc_get_time(const struct device *dev, struct rtc_time *timeptr) | ^~~~~~~~~~~~~~~~~~~ D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:50:45: warning: 'struct rtc_get_time' declared inside parameter list will not be visible outside of this definition or declaration 50 | static inline int rtc_get_time(const struct rtc_get_time * dev, struct rtc_time * timeptr) | ^~~~~~~~~~~~ D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:50:19: error: conflicting types for 'rtc_get_time'; have 'int(const struct rtc_get_time *, struct rtc_time *)' 50 | static inline int rtc_get_time(const struct rtc_get_time * dev, struct rtc_time * timeptr) | ^~~~~~~~~~~~ C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/rtc.h:215:15: note: previous declaration of 'rtc_get_time' with type 'int(const struct rtc_get_time *, struct rtc_time *)' 215 | __syscall int rtc_get_time(const struct rtc_get_time *dev, struct rtc_time *timeptr); | ^~~~~~~~~~~~ D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h: In function 'rtc_get_time': D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:60:36: warning: passing argument 1 of 'z_impl_rtc_get_time' from incompatible pointer type [-Wincompatible-pointer-types] 60 | return z_impl_rtc_get_time(dev, timeptr); | ^~~ | | | const struct rtc_get_time * D:/Nordic/nRFProject/Beacon_Sensor/build/zephyr/include/generated/syscalls/rtc.h:47:60: note: expected 'const struct rtc_get_time *' but argument is of type 'const struct rtc_get_time *' 47 | extern int z_impl_rtc_get_time(const struct rtc_get_time * dev, struct rtc_time * timeptr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~