File tree Expand file tree Collapse file tree 3 files changed +20
-20
lines changed Expand file tree Collapse file tree 3 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 363
363
#define AIO7_PWM 0
364
364
#define AIO7_DDR DDRF
365
365
366
- //-- Begin not supported by Teensyduino
367
- //-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
366
+ //-- 46-47 are not supported by Teensyduino
367
+ //-- Don't use Arduino functions (pinMode, digitalWrite, etc.) on these pins
368
+ #define PIN_E2 46
369
+ #define PIN_E3 47
370
+
368
371
#define DIO46_PIN PINE2
369
372
#define DIO46_RPORT PINE
370
373
#define DIO46_WPORT PORTE
377
380
#define DIO47_PWM 0
378
381
#define DIO47_DDR DDRE
379
382
380
- #define TEENSY_E2 46
381
- #define TEENSY_E3 47
382
-
383
- //-- end not supported by Teensyduino
383
+ //--
384
384
385
385
#undef PA0
386
386
#define PA0_PIN PINA0
Original file line number Diff line number Diff line change @@ -377,16 +377,16 @@ void printPinPort(const pin_t pin) { // print port number
377
377
uint8_t x ;
378
378
SERIAL_ECHOPGM (" Port: " );
379
379
#if AVR_AT90USB1286_FAMILY
380
- x = (pin == 46 || pin == 47 ) ? 'E' : digitalPinToPort_DEBUG (pin ) + 64 ;
380
+ x = (pin == PIN_E2 || pin == PIN_E3 ) ? 'E' : 'A' + digitalPinToPort_DEBUG (pin ) - 1 ;
381
381
#else
382
- x = digitalPinToPort_DEBUG (pin ) + 64 ;
382
+ x = 'A' + digitalPinToPort_DEBUG (pin ) - 1 ;
383
383
#endif
384
384
SERIAL_CHAR (x );
385
385
386
386
#if AVR_AT90USB1286_FAMILY
387
- if (pin == 46 )
387
+ if (pin == PIN_E2 )
388
388
x = '2' ;
389
- else if (pin == 47 )
389
+ else if (pin == PIN_E3 )
390
390
x = '3' ;
391
391
else {
392
392
uint8_t temp = digitalPinToBitMask_DEBUG (pin );
Original file line number Diff line number Diff line change @@ -79,20 +79,20 @@ inline void toggle_pins() {
79
79
#endif
80
80
);
81
81
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
82
- if (pin == TEENSY_E2 ) {
83
- SET_OUTPUT (TEENSY_E2 );
82
+ if (pin == PIN_E2 ) {
83
+ SET_OUTPUT (PIN_E2 );
84
84
for (int16_t j = 0 ; j < repeat; j++) {
85
- WRITE (TEENSY_E2 , LOW); safe_delay (wait);
86
- WRITE (TEENSY_E2 , HIGH); safe_delay (wait);
87
- WRITE (TEENSY_E2 , LOW); safe_delay (wait);
85
+ WRITE (PIN_E2 , LOW); safe_delay (wait);
86
+ WRITE (PIN_E2 , HIGH); safe_delay (wait);
87
+ WRITE (PIN_E2 , LOW); safe_delay (wait);
88
88
}
89
89
}
90
- else if (pin == TEENSY_E3 ) {
91
- SET_OUTPUT (TEENSY_E3 );
90
+ else if (pin == PIN_E3 ) {
91
+ SET_OUTPUT (PIN_E3 );
92
92
for (int16_t j = 0 ; j < repeat; j++) {
93
- WRITE (TEENSY_E3 , LOW); safe_delay (wait);
94
- WRITE (TEENSY_E3 , HIGH); safe_delay (wait);
95
- WRITE (TEENSY_E3 , LOW); safe_delay (wait);
93
+ WRITE (PIN_E3 , LOW); safe_delay (wait);
94
+ WRITE (PIN_E3 , HIGH); safe_delay (wait);
95
+ WRITE (PIN_E3 , LOW); safe_delay (wait);
96
96
}
97
97
}
98
98
else
You canβt perform that action at this time.
0 commit comments