Skip to content

Commit 90ab663

Browse files
committed
sam: moved "variant" methods into proper place
1 parent c50821b commit 90ab663

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

hardware/arduino/sam/cores/arduino/Arduino.h

-11
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ void yield(void);
5151
extern void setup( void ) ;
5252
extern void loop( void ) ;
5353

54-
// Get the bit location within the hardware port of the given virtual pin.
55-
// This comes from the pins_*.c file for the active board configuration.
56-
//
57-
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
58-
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
59-
#define digitalPinToTimer(P) ( )
60-
//#define analogInPinToBit(P) ( )
61-
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
62-
#define portInputRegister(port) ( &(port->PIO_PDSR) )
63-
//#define portModeRegister(P) ( )
64-
6554
//#define NOT_A_PIN 0 // defined in pio.h/EPioType
6655
#define NOT_A_PORT 0
6756

hardware/arduino/sam/variants/arduino_due_x/variant.h

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ extern "C"{
5959
#define NUM_DIGITAL_PINS (54u)
6060
#define NUM_ANALOG_INPUTS (12u)
6161

62+
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
63+
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
64+
#define digitalPinToTimer(P) ( )
65+
//#define analogInPinToBit(P) ( )
66+
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
67+
#define portInputRegister(port) ( &(port->PIO_PDSR) )
68+
//#define portModeRegister(P) ( )
69+
6270
// Interrupts
6371
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)
6472

0 commit comments

Comments
 (0)