Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:fda302b6edd8, committed 2020-10-16
- 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){