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.
gamma_ctrl.h
00001 #ifndef GAMMA_CTRL_H_ 00002 #define GAMMA_CTRL_H_ 00003 00004 #include "ctrl_serial.h" 00005 00006 class gamma_ctrl : public ctrl_serial 00007 { 00008 public: 00009 gamma_ctrl(int baudrate_g); 00010 void get_data(); 00011 00012 union gamma_packet 00013 { 00014 char all_data[GAMMA_DATA_SIZE]; 00015 struct 00016 { 00017 unsigned char start_byte:8; 00018 signed int rx :8; 00019 signed int ry :8; 00020 signed int lx :8; 00021 unsigned int r_sw1 :1; 00022 unsigned int r_sw2 :1; 00023 unsigned int r_sw3 :1; 00024 unsigned int r_sw4 :1; 00025 unsigned int r_s_sw1 :1; 00026 unsigned int r_s_sw2 :1; 00027 unsigned int l_sw1 :1; 00028 unsigned int l_sw2 :1; 00029 unsigned int l_sw3 :1; 00030 unsigned int l_sw4 :1; 00031 unsigned int l_s_sw1 :1; 00032 unsigned int l_s_sw2 :1; 00033 unsigned int mode1 :1; 00034 unsigned int mode2 :1; 00035 unsigned int r_srd :2; 00036 unsigned int l_srd :2; 00037 unsigned int no_data :6; 00038 unsigned char phecksum:8; 00039 unsigned char stop_byte :8; 00040 }data; 00041 }; 00042 00043 gamma_packet pack; 00044 00045 }; 00046 00047 #endif
Generated on Thu Jul 21 2022 16:36:07 by
 1.7.2
 1.7.2