for_gamma
GammaPool.h
- Committer:
- Komazawa_sun
- Date:
- 2017-08-18
- Revision:
- 2:dbb9a7fe426b
- Parent:
- 0:519ec302e9b8
- Child:
- 3:8487ffc7b69c
File content as of revision 2:dbb9a7fe426b:
#ifndef GAMMAPOOL_H #define GAMMAPOOL_H #include "I2CTransporter.h" class GammaPool{ public: GammaPool(); void up_load(); void reset(); union i2c_jusinkun_data //from jushinkun_datas { char all_data[10]; struct { unsigned char start_byte:8; signed int rx :8; signed int ry :8; signed int lx :8; unsigned int r_sw1 :1; unsigned int r_sw2 :1; unsigned int r_sw3 :1; unsigned int r_sw4 :1; unsigned int r_s_sw1 :1; unsigned int r_s_sw2 :1; unsigned int l_sw1 :1; unsigned int l_sw2 :1; unsigned int l_sw3 :1; unsigned int l_sw4 :1; unsigned int l_s_sw1 :1; unsigned int l_s_sw2 :1; unsigned int mode1 :1; unsigned int mode2 :1; signed int r_srd :8; signed int l_srd :8; unsigned int no_data :2; unsigned char checksum:8; unsigned char stop_byte :8; }; }; i2c_jusinkun_data ctrl; union i2c_johanshin_data { char all_data[4]; struct { struct { signed int pwm :8; int fire1 :1; int fire2 :1; }r; struct { signed int pwm :8; int fire1 :1; int fire2 :1; }l; struct { signed int pwm :8; int fire :1; //int fire2 :1; }k; int sao_call1 :1; int sao_call2 :1; int no_data :1; }; }; //apper_body i2c_johanshin_data a; union i2c_johanshin_return { char all_data[1]; struct limit { unsigned int max_limit :1; unsigned int min_limit :1; }; limit r; limit l; limit k; }; //apper_body_return i2c_johanshin_return ar; int data_index[23]; }; #endif