Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
2e620d70
Commit
2e620d70
authored
9 years ago
by
Sandeep Mistry
Browse files
Options
Downloads
Patches
Plain Diff
Move digitalPinToInterrupt definition to Arduino.h if variant compliance it 1.6.5 or higher
parent
0352cc85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cores/arduino/Arduino.h
+5
-0
5 additions, 0 deletions
cores/arduino/Arduino.h
cores/arduino/WInterrupts.c
+8
-0
8 additions, 0 deletions
cores/arduino/WInterrupts.c
variants/arduino_zero/variant.h
+2
-5
2 additions, 5 deletions
variants/arduino_zero/variant.h
with
15 additions
and
5 deletions
cores/arduino/Arduino.h
+
5
−
0
View file @
2e620d70
...
...
@@ -114,6 +114,11 @@ void loop( void ) ;
#define bit(b) (1UL << (b))
#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10605)
// Interrupts
#define digitalPinToInterrupt(P) ( g_APinDescription[P].ulExtInt )
#endif
// USB Device
#include
"USB/USBDesc.h"
#include
"USB/USBCore.h"
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/WInterrupts.c
+
8
−
0
View file @
2e620d70
...
...
@@ -57,7 +57,11 @@ void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode)
uint32_t
config
;
uint32_t
pos
;
#if ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10605
EExt_Interrupts
in
=
g_APinDescription
[
pin
].
ulExtInt
;
#else
EExt_Interrupts
in
=
digitalPinToInterrupt
(
pin
);
#endif
if
(
in
==
NOT_AN_INTERRUPT
||
in
==
EXTERNAL_INT_NMI
)
return
;
...
...
@@ -116,7 +120,11 @@ void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode)
*/
void
detachInterrupt
(
uint32_t
pin
)
{
#if (ARDUINO_SAMD_VARIANT_COMPLIANCE >= 10605)
EExt_Interrupts
in
=
g_APinDescription
[
pin
].
ulExtInt
;
#else
EExt_Interrupts
in
=
digitalPinToInterrupt
(
pin
);
#endif
if
(
in
==
NOT_AN_INTERRUPT
||
in
==
EXTERNAL_INT_NMI
)
return
;
...
...
This diff is collapsed.
Click to expand it.
variants/arduino_zero/variant.h
+
2
−
5
View file @
2e620d70
...
...
@@ -19,8 +19,8 @@
#ifndef _VARIANT_ARDUINO_ZERO_
#define _VARIANT_ARDUINO_ZERO_
// The definitions here needs a SAMD core >=1.6.
3
#define ARDUINO_SAMD_VARIANT_COMPLIANCE 1060
3
// The definitions here needs a SAMD core >=1.6.
5
#define ARDUINO_SAMD_VARIANT_COMPLIANCE 1060
5
/*----------------------------------------------------------------------------
* Definitions
...
...
@@ -76,9 +76,6 @@ extern "C"
*/
// #define digitalPinToTimer(P)
// Interrupts
#define digitalPinToInterrupt(P) ( P )
// LEDs
#define PIN_LED_13 (13u)
#define PIN_LED_RXL (25u)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment