|
4 | 4 |
|
5 | 5 | #include <ModemInterface.h> |
6 | 6 |
|
7 | | - |
8 | 7 | #if defined(ARDUINO_PORTENTA_C33) |
| 8 | + #define ON_PIN 32 // P708 (32) is the ON pin |
| 9 | + |
9 | 10 | // P602/P110/P603/P604 -> Serial1 |
10 | 11 | UART Serial1_FC(UART1_TX_PIN, UART1_RX_PIN, 61, 62); |
11 | 12 |
|
12 | 13 | #ifdef DUMP_AT_COMMANDS |
13 | 14 | StreamDebugger debugger(Serial1_FC, Serial); |
14 | | - __attribute__ ((init_priority (101))) ModemInterface modem(debugger, 32); |
| 15 | + __attribute__ ((init_priority (101))) ModemInterface modem(debugger, ON_PIN); |
15 | 16 | #else |
16 | | - __attribute__ ((init_priority (101))) ModemInterface modem(Serial1_FC, 32); |
| 17 | + __attribute__ ((init_priority (101))) ModemInterface modem(Serial1_FC, ON_PIN); |
17 | 18 | #endif |
18 | 19 |
|
19 | | -// P708 (32) is the ON pin |
20 | 20 | #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(CORE_CM4) |
21 | | -#include "pinDefinitions.h" |
22 | | - |
| 21 | + #include "pinDefinitions.h" |
| 22 | + #define ON_PIN PG_3 // PG3 is the ON pin |
23 | 23 |
|
24 | | -// P602/P110/P603/P604 -> Serial1 |
| 24 | + // P602/P110/P603/P604 -> Serial1 |
25 | 25 | #ifdef DUMP_AT_COMMANDS |
26 | 26 | StreamDebugger debugger(Serial1, Serial); |
27 | | - __attribute__ ((init_priority (101))) ModemInterface modem(debugger, PinNameToIndex(PG_3)); |
| 27 | + __attribute__ ((init_priority (101))) ModemInterface modem(debugger, PinNameToIndex(ON_PIN)); |
28 | 28 | #else |
29 | | - __attribute__ ((init_priority (101))) ModemInterface modem(Serial1, PinNameToIndex(PG_3)); |
| 29 | + __attribute__ ((init_priority (101))) ModemInterface modem(Serial1, PinNameToIndex(ON_PIN)); |
30 | 30 | #endif |
31 | 31 |
|
32 | | - |
33 | | - |
34 | | -// PG3 () is the ON pin |
35 | 32 | #endif |
0 commit comments