[stm32] remove 'count' variable in main()

This commit is contained in:
Meco Man 2021-03-28 19:36:32 +08:00
parent 1ba020f3c8
commit 390c635267
61 changed files with 71 additions and 136 deletions

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,12 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED2 pin mode to output */ /* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -19,13 +19,12 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED4_PIN, PIN_HIGH); rt_pin_write(LED4_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED3_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED3_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED3_PIN, PIN_HIGH); rt_pin_write(LED3_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -23,11 +23,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -15,14 +15,12 @@
int main(void) int main(void)
{ {
int count = 1;
HC574_SetPin(LED1,0); HC574_SetPin(LED1,0);
HC574_SetPin(LED2,0); HC574_SetPin(LED2,0);
HC574_SetPin(LED3,0); HC574_SetPin(LED3,0);
HC574_SetPin(LED4,0); HC574_SetPin(LED4,0);
while (count++) while (1)
{ {
HC574_SetPin(LED1,1); HC574_SetPin(LED1,1);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED2 pin mode to output */ /* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED1 pin mode to output */ /* set LED1 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED2 pin mode to output */ /* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LD4 pin mode to output */ /* set LD4 pin mode to output */
rt_pin_mode(LD4_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LD4_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LD4_PIN, PIN_HIGH); rt_pin_write(LD4_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,13 +17,11 @@
int main(void) int main(void)
{ {
int count = 1;
rt_kprintf("---Welcome use BearPi---\n"); rt_kprintf("---Welcome use BearPi---\n");
/* set LED pin mode to output */ /* set LED pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED2 pin mode to output */ /* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED2 pin mode to output */ /* set LED2 pin mode to output */
rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED2_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED2_PIN, PIN_HIGH); rt_pin_write(LED2_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -23,11 +23,9 @@
int main(void) int main(void)
{ {
int count = 1;
rt_pin_mode(LED_RUN_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED_RUN_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED_RUN_PIN, PIN_HIGH); rt_pin_write(LED_RUN_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -18,11 +18,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED0_PIN, PIN_HIGH); rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LD7 pin mode to output */ /* set LD7 pin mode to output */
rt_pin_mode(LED7_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED7_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED7_PIN, PIN_HIGH); rt_pin_write(LED7_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LD8 pin mode to output */ /* set LD8 pin mode to output */
rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED4_PIN, PIN_HIGH); rt_pin_write(LED4_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -17,11 +17,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED0 pin mode to output */ /* set LED0 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED1_PIN, PIN_HIGH); rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);

View File

@ -19,11 +19,10 @@
int main(void) int main(void)
{ {
int count = 1;
/* set LED_BLUE pin mode to output */ /* set LED_BLUE pin mode to output */
rt_pin_mode(LED_BLUE_PIN, PIN_MODE_OUTPUT); rt_pin_mode(LED_BLUE_PIN, PIN_MODE_OUTPUT);
while (count++) while (1)
{ {
rt_pin_write(LED_BLUE_PIN, PIN_HIGH); rt_pin_write(LED_BLUE_PIN, PIN_HIGH);
rt_thread_mdelay(500); rt_thread_mdelay(500);