mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
sam: moved "variant" methods into proper place
This commit is contained in:
parent
c50821ba10
commit
90ab663146
@ -51,17 +51,6 @@ void yield(void);
|
|||||||
extern void setup( void ) ;
|
extern void setup( void ) ;
|
||||||
extern void loop( void ) ;
|
extern void loop( void ) ;
|
||||||
|
|
||||||
// Get the bit location within the hardware port of the given virtual pin.
|
|
||||||
// This comes from the pins_*.c file for the active board configuration.
|
|
||||||
//
|
|
||||||
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
|
|
||||||
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
|
|
||||||
#define digitalPinToTimer(P) ( )
|
|
||||||
//#define analogInPinToBit(P) ( )
|
|
||||||
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
|
|
||||||
#define portInputRegister(port) ( &(port->PIO_PDSR) )
|
|
||||||
//#define portModeRegister(P) ( )
|
|
||||||
|
|
||||||
//#define NOT_A_PIN 0 // defined in pio.h/EPioType
|
//#define NOT_A_PIN 0 // defined in pio.h/EPioType
|
||||||
#define NOT_A_PORT 0
|
#define NOT_A_PORT 0
|
||||||
|
|
||||||
|
@ -59,6 +59,14 @@ extern "C"{
|
|||||||
#define NUM_DIGITAL_PINS (54u)
|
#define NUM_DIGITAL_PINS (54u)
|
||||||
#define NUM_ANALOG_INPUTS (12u)
|
#define NUM_ANALOG_INPUTS (12u)
|
||||||
|
|
||||||
|
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
|
||||||
|
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
|
||||||
|
#define digitalPinToTimer(P) ( )
|
||||||
|
//#define analogInPinToBit(P) ( )
|
||||||
|
#define portOutputRegister(port) ( &(port->PIO_ODSR) )
|
||||||
|
#define portInputRegister(port) ( &(port->PIO_PDSR) )
|
||||||
|
//#define portModeRegister(P) ( )
|
||||||
|
|
||||||
// Interrupts
|
// Interrupts
|
||||||
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)
|
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user