@@ -63,7 +63,7 @@ void setup( void )
63
63
pinPeripheral( 13, PIO_AC_CLK ) ; // Clock Gen 3*/
64
64
65
65
// **********************************************
66
- Serial .begin ( 115200 ) ; // Output to EDBG Virtual COM Port
66
+ SERIAL_PORT_MONITOR .begin ( 115200 ) ; // Output to EDBG Virtual COM Port
67
67
68
68
// Test External Interrupt
69
69
attachInterrupt ( 3 , Interrupt_Pin3, LOW ) ;
@@ -73,11 +73,11 @@ void setup( void )
73
73
attachInterrupt ( 7 , Interrupt_Pin7, CHANGE) ;
74
74
75
75
pcBuff = (char *)malloc (50 );
76
-
76
+
77
77
strcpy (pcBuff, " CIAO" );
78
- Serial .println (" ----" );
79
- Serial .println (pcBuff); // Outputs garbage instead of "CIAO"
80
- Serial .println (" ----" );
78
+ SERIAL_PORT_MONITOR .println (" ----" );
79
+ SERIAL_PORT_MONITOR .println (pcBuff); // Outputs garbage instead of "CIAO"
80
+ SERIAL_PORT_MONITOR .println (" ----" );
81
81
}
82
82
83
83
static void led_step1 ( void )
@@ -106,15 +106,15 @@ void loop( void )
106
106
led_step2 () ;
107
107
delay ( 500 ) ; // wait for a second
108
108
109
- // Test Serial output
110
- Serial .write ( ' -' ) ; // send a char
111
- Serial .write ( " test1\n " ) ; // send a string
112
- Serial .write ( " test2" ) ; // send another string
109
+ // Test SERIAL_PORT_MONITOR output
110
+ SERIAL_PORT_MONITOR .write ( ' -' ) ; // send a char
111
+ SERIAL_PORT_MONITOR .write ( " test1\n " ) ; // send a string
112
+ SERIAL_PORT_MONITOR .write ( " test2" ) ; // send another string
113
113
114
114
// Test digitalRead: connect pin 2 to either GND or 3.3V. !!!! NOT on 5V pin !!!!
115
115
pin_value=digitalRead ( 2 ) ;
116
- Serial .write ( " pin 2 value is " ) ;
117
- Serial .write ( (pin_value == LOW)?" LOW\n " :" HIGH\n " ) ;
116
+ SERIAL_PORT_MONITOR .write ( " pin 2 value is " ) ;
117
+ SERIAL_PORT_MONITOR .write ( (pin_value == LOW)?" LOW\n " :" HIGH\n " ) ;
118
118
119
119
duty_cycle+=8 ;// =(uint8_t)(millis() & 0xff) ;
120
120
analogWrite ( 13 , duty_cycle ) ;
@@ -127,46 +127,46 @@ void loop( void )
127
127
dac_value += 64 ;
128
128
analogWrite (A0, dac_value);
129
129
130
- Serial .print (" \r\n Analog pins: " );
130
+ SERIAL_PORT_MONITOR .print (" \r\n Analog pins: " );
131
131
132
132
for ( uint32_t i = A0 ; i <= A0+NUM_ANALOG_INPUTS ; i++ )
133
133
{
134
134
135
135
int a = analogRead (i);
136
- Serial .print (a, DEC);
137
- Serial .print (" " );
136
+ SERIAL_PORT_MONITOR .print (a, DEC);
137
+ SERIAL_PORT_MONITOR .print (" " );
138
138
139
139
}
140
- Serial .println ();
140
+ SERIAL_PORT_MONITOR .println ();
141
141
142
- Serial .println (" External interrupt pins:" );
142
+ SERIAL_PORT_MONITOR .println (" External interrupt pins:" );
143
143
if ( ul_Interrupt_Pin3 == 1 )
144
144
{
145
- Serial .println ( " Pin 3 triggered (LOW)" ) ;
145
+ SERIAL_PORT_MONITOR .println ( " Pin 3 triggered (LOW)" ) ;
146
146
ul_Interrupt_Pin3 = 0 ;
147
147
}
148
148
149
149
if ( ul_Interrupt_Pin4 == 1 )
150
150
{
151
- Serial .println ( " Pin 4 triggered (HIGH)" ) ;
151
+ SERIAL_PORT_MONITOR .println ( " Pin 4 triggered (HIGH)" ) ;
152
152
ul_Interrupt_Pin4 = 0 ;
153
153
}
154
154
155
155
if ( ul_Interrupt_Pin5 == 1 )
156
156
{
157
- Serial .println ( " Pin 5 triggered (FALLING)" ) ;
157
+ SERIAL_PORT_MONITOR .println ( " Pin 5 triggered (FALLING)" ) ;
158
158
ul_Interrupt_Pin5 = 0 ;
159
159
}
160
160
161
161
if ( ul_Interrupt_Pin6 == 1 )
162
162
{
163
- Serial .println ( " Pin 6 triggered (RISING)" ) ;
163
+ SERIAL_PORT_MONITOR .println ( " Pin 6 triggered (RISING)" ) ;
164
164
ul_Interrupt_Pin6 = 0 ;
165
165
}
166
166
167
167
if ( ul_Interrupt_Pin7 == 1 )
168
168
{
169
- Serial .println ( " Pin 7 triggered (CHANGE)" ) ;
169
+ SERIAL_PORT_MONITOR .println ( " Pin 7 triggered (CHANGE)" ) ;
170
170
ul_Interrupt_Pin7 = 0 ;
171
171
}
172
172
}
0 commit comments