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
a4c68659
Commit
a4c68659
authored
Apr 01, 2016
by
Sandeep Mistry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct SS, move out some common variant values to Arduino.h
parent
71e9f7a3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
cores/nRF5/Arduino.h
cores/nRF5/Arduino.h
+20
-0
variants/nRF52DK/variant.h
variants/nRF52DK/variant.h
+1
-21
No files found.
cores/nRF5/Arduino.h
View file @
a4c68659
...
...
@@ -92,4 +92,24 @@ void loop( void ) ;
#define bit(b) (1UL << (b))
#define digitalPinToPort(P) ( &(NRF_GPIO]) )
#define digitalPinToBitMask(P) ( 1 << g_ADigitalPinMap[P] )
//#define analogInPinToBit(P) ( )
#define portOutputRegister(port) ( &(port->OUTSET) )
#define portInputRegister(port) ( &(port->IN) )
#define portModeRegister(port) ( &(port->DIRSET) )
#define digitalPinHasPWM(P) ( true )
/*
* digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
* architecture. If you need to check if a pin supports PWM you must
* use digitalPinHasPWM(..).
*
* https://github.com/arduino/Arduino/issues/1833
*/
// #define digitalPinToTimer(P)
// Interrupts
#define digitalPinToInterrupt(P) ( P )
#endif // Arduino_h
variants/nRF52DK/variant.h
View file @
a4c68659
...
...
@@ -40,26 +40,6 @@ extern "C"
#define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (0u)
#define digitalPinToPort(P) ( &(NRF_GPIO]) )
#define digitalPinToBitMask(P) ( 1 << g_ADigitalPinMap[P] )
//#define analogInPinToBit(P) ( )
#define portOutputRegister(port) ( &(port->OUTSET) )
#define portInputRegister(port) ( &(port->IN) )
#define portModeRegister(port) ( &(port->DIRSET) )
#define digitalPinHasPWM(P) ( true )
/*
* digitalPinToTimer(..) is AVR-specific and is not defined for nRF52
* architecture. If you need to check if a pin supports PWM you must
* use digitalPinHasPWM(..).
*
* https://github.com/arduino/Arduino/issues/1833
*/
// #define digitalPinToTimer(P)
// Interrupts
#define digitalPinToInterrupt(P) ( P )
// LEDs
#define PIN_LED1 (6)
#define PIN_LED2 (7)
...
...
@@ -111,7 +91,7 @@ static const uint8_t AREF = PIN_AREF;
#define PIN_SPI_MOSI (11)
#define PIN_SPI_SCK (13)
static
const
uint8_t
SS
=
1
1
;
static
const
uint8_t
SS
=
1
0
;
static
const
uint8_t
MOSI
=
PIN_SPI_MOSI
;
static
const
uint8_t
MISO
=
PIN_SPI_MISO
;
static
const
uint8_t
SCK
=
PIN_SPI_SCK
;
...
...
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