In a previous commit, the content of twi_master.h did not allow the invocation
of the c functions specified by the file from a cpp context. This commit wraps
the contents of the header file with the appropriate ifdefs.
Rather than indefinitely adding platforms to a #define list that use
the internal RC oscillator instead of an external crystal, let platforms
define this and the 'core code' can be platform agnostic.
Note, that this also allows people to use this symbol in libraries.
There's one notable example in the BLE_API that can now be refactored to
the same method, hopefully saving someone some unpleasant debugging
when their platform doesn't work because of a missing platform dependent
define in the high level API.
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
This commit adds the ability for a compile flag to be set from targets.py
which changes the soft device to s110.
The compile flag is: MCU_NRF51_16K_S110. In order to avoid duplication
of the startup file, for the 16K parts we introduce an S110 or S130
scatter file. This means all 16K platforms must define
MCU_NRF51_16K
and ONE of
MCU_NRF51_16K_S110 or MCU_NRF51_16K_S130
Based on an earlier commit by Mihail but modified to avoid copy/paste
of the startup code for S110/S130
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
This adds the BBC micro:bit platform, based on NRF51822
Initially, add the platform to use whatever version of softdevice is the
default for the NRF51822-based platforms.
Originally written by James, modified for new target inheritance by
Jonathan Austin:
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
This commit is based on Nordic's fix for an abnormality in some releases
of the nrf51822 silicon.
Without this fix, the I2C bus locks up and doesn't reset properly. The
fix resets the TWI master on powerup.
For more information see
https://www.nordicsemi.com/eng/nordic/download_resource/24634/6/47696154
Nordic Product Anomaly ID 56.
Unlike other Nordic platforms, the wallbot doesn't use numbered I2C
ports. This makes it difficult to refer to a platforms's I2C pins from
common code.
This fix leaves the original wallbot definitions, but adds the more
'standard' ones too.
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>