sam: moved "variant" methods into proper place

This commit is contained in:
Cristian Maglie 2013-12-31 20:57:14 +01:00
parent c50821ba10
commit 90ab663146
2 changed files with 8 additions and 11 deletions

View File

@ -51,17 +51,6 @@ void yield(void);
extern void setup( 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_PORT 0

View File

@ -59,6 +59,14 @@ extern "C"{
#define NUM_DIGITAL_PINS (54u)
#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
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)