Nagano kosen robocon
Embed:
(wiki syntax)
Show/hide line numbers
Master.h
00001 #ifndef MASTER_H_ 00002 #define MASTER_H_ 00003 00004 #include <stdint.h> 00005 00006 typedef struct 00007 { 00008 union 00009 { 00010 struct 00011 { 00012 uint8_t processNum : 4; 00013 uint8_t rollerHeight : 2; 00014 bool lowerRoller : 1; 00015 bool higherRoller : 1; 00016 }; 00017 uint8_t data0; 00018 }; 00019 union 00020 { 00021 struct 00022 { 00023 bool launch : 1; 00024 bool flagJ : 1; 00025 bool flagK : 1; 00026 bool flagL : 1; 00027 bool flagM : 1; 00028 bool flagN : 1; 00029 bool flagO : 1; 00030 bool flagP : 1; 00031 }; 00032 uint8_t data1; 00033 }; 00034 } MasterSendData; 00035 00036 typedef struct 00037 { 00038 union 00039 { 00040 struct 00041 { 00042 bool ems : 1; 00043 bool startSw : 1; 00044 bool zoneIsRed : 1; 00045 bool position : 1; 00046 bool flagE : 1; 00047 bool flagF : 1; 00048 bool flagG : 1; 00049 bool flagH : 1; 00050 }; 00051 uint8_t data0; 00052 }; 00053 union 00054 { 00055 struct 00056 { 00057 bool flagI : 1; 00058 bool flagJ : 1; 00059 bool flagK : 1; 00060 bool flagL : 1; 00061 bool flagM : 1; 00062 bool flagN : 1; 00063 bool flagO : 1; 00064 bool flagP : 1; 00065 }; 00066 uint8_t data1; 00067 }; 00068 } MasterReceiveData; 00069 00070 namespace MASTER 00071 { 00072 class Master 00073 { 00074 public : 00075 static void Initialize(); 00076 static void Update(); 00077 }; 00078 } 00079 00080 extern uint8_t masterSendBuffer[]; 00081 extern uint8_t masterReceiveBuffer[]; 00082 00083 extern MasterSendData masterSend; 00084 extern MasterReceiveData masterReceive; 00085 00086 #endif
Generated on Wed Jul 13 2022 00:47:24 by
1.7.2