[bsp][rtduino] update arduino_main.cpp

This commit is contained in:
Meco Man 2023-03-05 20:22:24 -05:00 committed by Man, Jianting (Meco)
parent fab0e506be
commit 0429452465
11 changed files with 23 additions and 25 deletions

View File

@ -15,11 +15,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }

View File

@ -13,16 +13,12 @@
void setup(void) void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
pinMode(8, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
Serial.begin();
Serial.println("Hello Arduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
digitalWrite(8, HIGH); digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
delay(500); delay(100);
digitalWrite(8, LOW);
delay(500);
} }

View File

@ -37,6 +37,8 @@
#define F_CPU 144000000L /* CPU:144MHz */ #define F_CPU 144000000L /* CPU:144MHz */
#define LED_BUILTIN D8
/* Serial1 : PA9-TX PB0-RX */ /* Serial1 : PA9-TX PB0-RX */
#define RTDUINO_SERIAL2_DEVICE_NAME "uart1" #define RTDUINO_SERIAL2_DEVICE_NAME "uart1"

View File

@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }