Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-nRF5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-nRF5
Commits
c7123de9
Commit
c7123de9
authored
Feb 24, 2017
by
Cedric Honnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow access to the 8 analog inputs (VS 6 previously).
parent
f1abf970
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
19 deletions
+22
-19
variants/nRF52DK/variant.cpp
variants/nRF52DK/variant.cpp
+4
-5
variants/nRF52DK/variant.h
variants/nRF52DK/variant.h
+18
-14
No files found.
variants/nRF52DK/variant.cpp
View file @
c7123de9
...
@@ -38,13 +38,15 @@ const uint32_t g_ADigitalPinMap[] = {
...
@@ -38,13 +38,15 @@ const uint32_t g_ADigitalPinMap[] = {
24
,
24
,
25
,
25
,
// A0 - A
5
// A0 - A
7
3
,
3
,
4
,
4
,
28
,
28
,
29
,
29
,
30
,
30
,
31
,
31
,
5
,
// AIN3 (P0.05)
2
,
// AIN0 (P0.02) / AREF
// SDA, SCL
// SDA, SCL
26
,
26
,
...
@@ -52,8 +54,5 @@ const uint32_t g_ADigitalPinMap[] = {
...
@@ -52,8 +54,5 @@ const uint32_t g_ADigitalPinMap[] = {
// RX, TX
// RX, TX
8
,
8
,
6
,
6
// AREF
2
};
};
variants/nRF52DK/variant.h
View file @
c7123de9
...
@@ -32,9 +32,9 @@ extern "C"
...
@@ -32,9 +32,9 @@ extern "C"
#endif // __cplusplus
#endif // __cplusplus
// Number of pins defined in PinDescription array
// Number of pins defined in PinDescription array
#define PINS_COUNT (2
5
u)
#define PINS_COUNT (2
6
u)
#define NUM_DIGITAL_PINS (20u)
#define NUM_DIGITAL_PINS (20u)
#define NUM_ANALOG_INPUTS (
6
u)
#define NUM_ANALOG_INPUTS (
8
u)
#define NUM_ANALOG_OUTPUTS (0u)
#define NUM_ANALOG_OUTPUTS (0u)
// LEDs
// LEDs
...
@@ -59,25 +59,29 @@ extern "C"
...
@@ -59,25 +59,29 @@ extern "C"
#define PIN_A3 (17)
#define PIN_A3 (17)
#define PIN_A4 (18)
#define PIN_A4 (18)
#define PIN_A5 (19)
#define PIN_A5 (19)
#define PIN_A6 (20)
/* AIN3 (P0.05) */
static
const
uint8_t
A0
=
PIN_A0
;
#define PIN_A7 (21)
/* AIN0 (P0.02) / AREF */
static
const
uint8_t
A1
=
PIN_A1
;
static
const
uint8_t
A2
=
PIN_A2
;
static
const
uint8_t
A0
=
PIN_A0
;
// AIN1
static
const
uint8_t
A3
=
PIN_A3
;
static
const
uint8_t
A1
=
PIN_A1
;
// AIN2
static
const
uint8_t
A4
=
PIN_A4
;
static
const
uint8_t
A2
=
PIN_A2
;
// AIN4
static
const
uint8_t
A5
=
PIN_A5
;
static
const
uint8_t
A3
=
PIN_A3
;
// AIN5
static
const
uint8_t
A4
=
PIN_A4
;
// AIN6
static
const
uint8_t
A5
=
PIN_A5
;
// AIN7
static
const
uint8_t
A6
=
PIN_A6
;
// AIN3 (P0.05)
static
const
uint8_t
A7
=
PIN_A7
;
// AIN0 (P0.02) / AREF
#define ADC_RESOLUTION 14
#define ADC_RESOLUTION 14
// Other pins
// Other pins
#define PIN_AREF (2
4
)
#define PIN_AREF (2
1
)
static
const
uint8_t
AREF
=
PIN_AREF
;
static
const
uint8_t
AREF
=
PIN_AREF
;
/*
/*
* Serial interfaces
* Serial interfaces
*/
*/
// Serial
// Serial
#define PIN_SERIAL_RX (2
2
)
#define PIN_SERIAL_RX (2
4
)
#define PIN_SERIAL_TX (2
3
)
#define PIN_SERIAL_TX (2
5
)
/*
/*
* SPI Interfaces
* SPI Interfaces
...
@@ -98,8 +102,8 @@ static const uint8_t SCK = PIN_SPI_SCK ;
...
@@ -98,8 +102,8 @@ static const uint8_t SCK = PIN_SPI_SCK ;
*/
*/
#define WIRE_INTERFACES_COUNT 1
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (2
0
u)
#define PIN_WIRE_SDA (2
2
u)
#define PIN_WIRE_SCL (2
1
u)
#define PIN_WIRE_SCL (2
3
u)
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment