I could use some clarity on the legacy drivers/files, nrf,driving example applications inside SDK 16. Is it just too much work to clean up the examples with current drivers? Are all the legacy files just hooked into the current drivers/files, nrfx, thorugh many many many defines to keep current. I am just fuzy on the structure of the nrf and nrfx drivers, when to use what?
Most of the old legacy files were split into an nrfx and a legacy layer in order to make it easier to integrate the low-level part (nrfx) in other software platforms. In some cases, using nrfx directly is not a good idea due to this, and therefore we generally advise developers to use the nrf_drv_* files/functions instead of the nrfx_* versions. The term "legacy" gives the wrong idea really. It's better to think of it like this: nrfx is a platform-independent low-level driver package, while the legacy files are an integration layer for integrating it into the nRF5 SDK.
So, there are no plans as of now to remove either layer, as they fulfill different tasks really, and the "legacy" layer is not outdated, but rather simpler.
Thank you, but could you give me an example of the ease of integration of which you speak in regards to the low-level part?
You can check out our nrfx driver migration guide to see how you can migrate any project to start using only the nrfx drivers and their benefits. You should also check out the nrfx_config.h file located in <sdkdir>/modules/nrfx/templates/<board> which is a clean nrfx configuration header to use in nrfx projects. It is the nrfx drivers that are being used as a baseline in the SDK, and the legacy layer is used to translate the old API to the new one. The legacy layer is used for backward compatibility.
This goes against what is said in post https://devzone.nordicsemi.com/f/nordic-q-a/55484/shoud-we-use-nrfx-driver-or-nrf-legacy-driver . That post indicates that NRFx are prefer, and your reply indicates that use of nrfx directly is ill advised and should use the nrf_drv, but in a lot of cases they just translate to nrfx through a glue layer.
Thank you for noticing! I stand corrected, it is the nrfx drivers that are used by default in our SDK examples, and they use the nrf_drv drivers as wrappers in the old_config and are there for backward compatibility. I have updated my prior answer to reflect this as well.