Skip to content

Commit adf4801

Browse files
Examples: Complete the I2C Target + Controller example.
1 parent f5524c6 commit adf4801

File tree

4 files changed

+310
-193
lines changed

4 files changed

+310
-193
lines changed

TARGET_NRF52_MICROBIT_V2/PinNames.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,13 @@ typedef enum {
270270
#endif
271271

272272
#if defined(TARGET_NRF52_MICROBIT_V2_IF_833)
273-
// TODO: Include the internal I2C pins
273+
// Internal I2C
274+
I2C_SDA0 = P0_28,
275+
I2C_SCL0 = P0_29,
274276
#elif defined(TARGET_NRF52_MICROBIT_V2_IF_820)
275-
// TODO: Include the internal I2C pins
277+
// Internal I2C
278+
I2C_SDA0 = P0_30,
279+
I2C_SCL0 = P0_28,
276280
#else
277281
// Internal I2C
278282
I2C_SDA0 = P0_16,

custom_targets.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,25 @@
1111
"I2CSLAVE"
1212
],
1313
"macros_add": [
14+
"NRF52833_XXAA",
15+
"TARGET_NRF52833",
1416
"TARGET_MCU_NRF52833",
15-
"NRFX_RNG_ENABLED=1",
1617
"NRFX_TWIS_ENABLED=1",
18+
"NRFX_RNG_ENABLED=1",
1719
"RNG_ENABLED=1",
18-
"NRF_QUEUE_ENABLED=1"
20+
"NRF_QUEUE_ENABLED=1",
21+
"NRF52_PAN_20"
1922
],
2023
"features_remove": [
2124
"CRYPTOCELL310"
2225
],
26+
"device_has_remove": [
27+
"QSPI",
28+
"I2C_ASYNCH"
29+
],
30+
"components_remove": [
31+
"QSPIF"
32+
],
2333
"macros_remove": [
2434
"MBEDTLS_CONFIG_HW_SUPPORT"
2535
]
@@ -37,20 +47,6 @@
3747
"inherits": ["MCU_NRF52833"],
3848
"macros_add": [
3949
"WSF_MAX_HANDLERS=10",
40-
"NRF52_PAN_12",
41-
"NRF52_PAN_15",
42-
"NRF52_PAN_20",
43-
"NRF52_PAN_30",
44-
"NRF52_PAN_31",
45-
"NRF52_PAN_36",
46-
"NRF52_PAN_51",
47-
"NRF52_PAN_53",
48-
"NRF52_PAN_54",
49-
"NRF52_PAN_55",
50-
"NRF52_PAN_58",
51-
"NRF52_PAN_62",
52-
"NRF52_PAN_63",
53-
"NRF52_PAN_64",
5450
"CONFIG_NFCT_PINS_AS_GPIOS",
5551
"MICROBIT_TARGET"
5652
],
@@ -76,8 +72,14 @@
7672
},
7773
"NRF52_MICROBIT_V2_IF_820": {
7874
"inherits": ["NRF52_MICROBIT_V2"],
79-
"core": "Cortex-M4",
75+
"device_has_remove": [
76+
"ANALOGIN",
77+
"PWMOUT"
78+
],
8079
"extra_labels_remove": [
80+
"CORDIO",
81+
"CORDIO_LL",
82+
"NORDIC_CORDIO"
8183
],
8284
"macros_add": [
8385
"MICROBIT_IF"

examples/i2c_target.cpp

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)