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

"integration/nrfx/legacy" directory in SDK 15.0

I am porting software built with SDK 14.2 to SDK 15.0

It looks like some files have been moved from "components/drivers_nrf" to "integration/nrfx/legacy". The first one I've encountered is nrf_drv_clock.c but I see that there are others. 

Have these files/apis/whatever been deprecated? Are there "new" ways to do the things provided in these legacy files? I notice that (for example) many of the examples still use these "legacy" functions...

Any insights would be helpful. 

Parents Reply Children
  • Unfortunately your code seems to be written in C++. Since I am working on a commercial product, using a toy language doesn't work for me.

    The SDK code, once you're familiar with how it works with its many defines, is easy to use and most importantly written in C. My only problem was that they changed the SDK from 14.2 to 15.0 and my existing code didn't work properly - once I figured what they had done it was easy enough to adapt. 

    Your drivers would get more attention if they were written in C rather than C++

  • Well, sorry to disappoint you but the drivers are both C and C++.  You can use either one.  Secondly C doesn't get more attention than C++.  Which language do you think Arduino & mBed are written ? Well, it's C++.  Thirdly language does not matter.  How you implement it does.

  • Sorry. Your link only seemed to point me at .cpp files and I guess I didn't look carefully enough to see drivers in C.

    I've been doing embedded work since 1988 and haven't ever seen anyone successfully use C++. Lots of people do "application" code on C++ and then interface to device drivers written in C. 

    Anyway .. arguing about programming languages is like arguing about religion or politics and I don't discuss either. Slight smile

  • Ah, an old lad like me.  Not many of us here.  Now you've seen one successful C++.  I started implementing Object design in since 1996.  It was in an SCSI to IDE RAID system.  It wasn't easy to do the switch.  I started learning C++ around 1988 but never able to really use it until that day.  As I said language is not the important.  You can do object in C too.  It is just a little more difficult.  Object programming is not wrapping all functions in a class.  It is a way of thinking.  C or C++ the same, C++ is not slower nor C is faster.  How you write the code that makes the difference.  As you can see Arduino and mBed use C++ but they are not object oriented design.  They just use C++ as language. 

Related