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

C++ BLE example

SDK : 15.0

Softdevice : 6.0

DK : NRF52_DK

Hi everyone,

Does anyone have a BLE example with C ++ ? (a beacon example or anything else)
I would like to have the Makefile and the application code.

Thanks,
regards
Parents
  • Hi,

    All the SDK libraries are written in plain old C, but there are nothing preventing you from writing your application in C++. I do not have an example at hand though, but hopefully someone on the forum has something that they can share.

    I want to add though that just making an example compile with a C++ compiler should be easy, but if you want C++ look and feel (object oriented etc) of everything then you have to make a lot of wrappers around existing libraries and drivers. This may not be worth the effort, and from my experience it tends to increase complexity rather than reduce it (which should be the end goal in any case).

Reply
  • Hi,

    All the SDK libraries are written in plain old C, but there are nothing preventing you from writing your application in C++. I do not have an example at hand though, but hopefully someone on the forum has something that they can share.

    I want to add though that just making an example compile with a C++ compiler should be easy, but if you want C++ look and feel (object oriented etc) of everything then you have to make a lot of wrappers around existing libraries and drivers. This may not be worth the effort, and from my experience it tends to increase complexity rather than reduce it (which should be the end goal in any case).

Children
No Data
Related