有哉 藤田 / Mbed 2 deprecated 2020_verserwriter

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
yu_yu
Date:
Fri Oct 16 14:59:23 2020 +0000
Parent:
2:8499d6246b2e
Commit message:
ver2.3;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 16 12:57:12 2020 +0000
+++ b/main.cpp	Fri Oct 16 14:59:23 2020 +0000
@@ -1,4 +1,5 @@
 #include "mbed.h"
+#include <string.h>
 #include "hanabi.h"
 
 #define BAR0 0x01
@@ -38,12 +39,10 @@
 char RGB(char , char, char);
 void TMred0_ISR();
 void swap_ary(char (*after)[2], char const before[180][2]){
-    for(int i = 0; i < 180; i++){
-        for(int j = 0; j < 2;j++){
-            after[i][j] = before[i][j];
+            memcpy(after, before, 360);
             pc.printf("test\n");
-        }
-    }
+        
+    
 }
 void print_ary(char (*after)[2]){
     for(int i = 0; i < 180; i++){
@@ -181,9 +180,7 @@
 
 }
 
-char RGB(char judge_red, char judge_green, char judge_blue){
-    char color;
-    
+char RGB(char judge_red, char judge_green, char judge_blue){    
     char flag = 1;
     
     if(judge_red && judge_green && judge_blue){