Using the RTC1 module for the LK tick (instead of arm systick)
Use the nrf_hal library for peripheral manipulation instead of
direct register access. Fixed race condition in current_time_hires
which would result in non monotonic readings.
Tested with clock_tests on:
nrf52-pca10040-test (nrf52832)
nrf52-pca10056-test (nrf52840)
Since the i2c driver is optional (not required for platform) the
i2c_init should be done during target initialization. The flags
used to include the i2c driver should be in either target or project
files so it makes sense that the i2c_init should also be called from
target files.
When the nrf52xxx platform was changed to use the Nordic nrfx
libraries the pca10040 target was broken due to differences in
how the platform handled initialization.
Using Nordic's nrfx driver for the clock control peripheral since
it address a handful of errata and abstracts some differences
in the nrf52 family of parts.
Platform gpio driver now uses the nrfx library for gpio manipulation.
This allows utilization of second gpio bank present on some parts
and handling of errata.
Use twim(i2c) driver from nrfx library. See comments and patterns in
target/nrf-pca10056 for info on how to properly utilize driver as it
requires some GLOBAL_DEFINES and gpio defines.
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.
See scripts/codestyle