The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_NRF51_DK/TARGET_NORDIC/TARGET_MCU_NRF51822/objects.h
- Revision:
- 92:4fc01daae5a5
- Parent:
- 91:031413cf7a89
--- a/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_MCU_NRF51822/objects.h Wed Oct 29 11:02:04 2014 +0000 +++ b/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_MCU_NRF51822/objects.h Thu Nov 27 13:33:22 2014 +0000 @@ -25,6 +25,16 @@ extern "C" { #endif +#define I2C_SPI_PERIPHERAL_FOR_I2C 1 +#define I2C_SPI_PERIPHERAL_FOR_SPI 2 + +typedef struct { + uint8_t usage; // I2C: 1, SPI: 2 + uint8_t sda_mosi; + uint8_t scl_miso; + uint8_t sclk; +} i2c_spi_peripheral_t; + struct serial_s { NRF_UART_Type *uart; int index; @@ -33,6 +43,7 @@ struct spi_s { NRF_SPI_Type *spi; NRF_SPIS_Type *spis; + uint8_t peripheral; }; struct port_s { @@ -54,6 +65,7 @@ PinName scl; int freq; uint8_t address_set; + uint8_t peripheral; }; struct analogin_s {