@@ -53,22 +53,17 @@ extern void loop( void ) ;
53
53
// Get the bit location within the hardware port of the given virtual pin.
54
54
// This comes from the pins_*.c file for the active board configuration.
55
55
//
56
- // These perform slightly better as macros compared to inline functions
57
- //
58
- #define digitalPinToPort ( ulPin ) ( g_APinDescription[ulPin]->pPort->PIO_PDSR )
59
- #define digitalPinToBitMask ( ulPin ) ( g_APinDescription[ulPin]->dwPin )
60
- #define digitalPinToTimer ( P ) ( )
61
- #define analogInPinToBit ( P ) ( P )
62
- #define portOutputRegister ( P ) ( )
63
- #define portInputRegister ( P ) ( )
64
- #define portModeRegister ( P ) ( )
56
+ #define digitalPinToPort (P ) ( g_APinDescription[P]->pPort )
57
+ #define digitalPinToBitMask (P ) ( g_APinDescription[P]->ulPin )
58
+ #define digitalPinToTimer (P ) ( )
59
+ //#define analogInPinToBit(P) ( )
60
+ #define portOutputRegister (port ) ( port->PIO_ODSR )
61
+ #define portInputRegister (port ) ( port->PIO_PDSR )
62
+ //#define portModeRegister(P) ( )
65
63
66
64
//#define NOT_A_PIN 0 // defined in pio.h/EPioType
67
65
#define NOT_A_PORT 0
68
66
69
- #define NOT_ON_TIMER 0
70
- #define TIMER0 1
71
-
72
67
typedef enum _EExt_Interrupts
73
68
{
74
69
EXTERNAL_INT_0 = 0 ,
@@ -122,7 +117,7 @@ typedef enum _EAnalogChannel
122
117
// Definitions for PWM channels
123
118
typedef enum _EPWMChannel
124
119
{
125
- NO_PWM = -1 ,
120
+ NOT_ON_PWM = -1 ,
126
121
PWM_CH0 = 0 ,
127
122
PWM_CH1 ,
128
123
PWM_CH2 ,
@@ -136,7 +131,7 @@ typedef enum _EPWMChannel
136
131
// Definitions for TC channels
137
132
typedef enum _ETCChannel
138
133
{
139
- NO_TC = -1 ,
134
+ NOT_ON_TIMER = -1 ,
140
135
TC0_CHA0 = 0 ,
141
136
TC0_CHB0 ,
142
137
TC0_CHA1 ,
0 commit comments