for_gamma
GammaPool.h@2:dbb9a7fe426b, 2017-08-18 (annotated)
- Committer:
- Komazawa_sun
- Date:
- Fri Aug 18 07:35:25 2017 +0000
- Revision:
- 2:dbb9a7fe426b
- Parent:
- 0:519ec302e9b8
- Child:
- 3:8487ffc7b69c
gamma_data_pool
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Komazawa_sun | 0:519ec302e9b8 | 1 | #ifndef GAMMAPOOL_H |
Komazawa_sun | 0:519ec302e9b8 | 2 | #define GAMMAPOOL_H |
Komazawa_sun | 0:519ec302e9b8 | 3 | |
Komazawa_sun | 0:519ec302e9b8 | 4 | #include "I2CTransporter.h" |
Komazawa_sun | 0:519ec302e9b8 | 5 | |
Komazawa_sun | 0:519ec302e9b8 | 6 | class GammaPool{ |
Komazawa_sun | 0:519ec302e9b8 | 7 | public: |
Komazawa_sun | 0:519ec302e9b8 | 8 | GammaPool(); |
Komazawa_sun | 0:519ec302e9b8 | 9 | void up_load(); |
Komazawa_sun | 0:519ec302e9b8 | 10 | void reset(); |
Komazawa_sun | 0:519ec302e9b8 | 11 | |
Komazawa_sun | 0:519ec302e9b8 | 12 | union i2c_jusinkun_data //from jushinkun_datas |
Komazawa_sun | 0:519ec302e9b8 | 13 | { |
Komazawa_sun | 0:519ec302e9b8 | 14 | char all_data[10]; |
Komazawa_sun | 0:519ec302e9b8 | 15 | struct |
Komazawa_sun | 0:519ec302e9b8 | 16 | { |
Komazawa_sun | 0:519ec302e9b8 | 17 | unsigned char start_byte:8; |
Komazawa_sun | 0:519ec302e9b8 | 18 | signed int rx :8; |
Komazawa_sun | 0:519ec302e9b8 | 19 | signed int ry :8; |
Komazawa_sun | 0:519ec302e9b8 | 20 | signed int lx :8; |
Komazawa_sun | 0:519ec302e9b8 | 21 | unsigned int r_sw1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 22 | unsigned int r_sw2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 23 | unsigned int r_sw3 :1; |
Komazawa_sun | 0:519ec302e9b8 | 24 | unsigned int r_sw4 :1; |
Komazawa_sun | 0:519ec302e9b8 | 25 | unsigned int r_s_sw1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 26 | unsigned int r_s_sw2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 27 | unsigned int l_sw1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 28 | unsigned int l_sw2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 29 | unsigned int l_sw3 :1; |
Komazawa_sun | 0:519ec302e9b8 | 30 | unsigned int l_sw4 :1; |
Komazawa_sun | 0:519ec302e9b8 | 31 | unsigned int l_s_sw1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 32 | unsigned int l_s_sw2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 33 | unsigned int mode1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 34 | unsigned int mode2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 35 | signed int r_srd :8; |
Komazawa_sun | 0:519ec302e9b8 | 36 | signed int l_srd :8; |
Komazawa_sun | 0:519ec302e9b8 | 37 | unsigned int no_data :2; |
Komazawa_sun | 0:519ec302e9b8 | 38 | unsigned char checksum:8; |
Komazawa_sun | 0:519ec302e9b8 | 39 | unsigned char stop_byte :8; |
Komazawa_sun | 0:519ec302e9b8 | 40 | }; |
Komazawa_sun | 0:519ec302e9b8 | 41 | }; |
Komazawa_sun | 0:519ec302e9b8 | 42 | |
Komazawa_sun | 0:519ec302e9b8 | 43 | i2c_jusinkun_data ctrl; |
Komazawa_sun | 0:519ec302e9b8 | 44 | |
Komazawa_sun | 0:519ec302e9b8 | 45 | |
Komazawa_sun | 0:519ec302e9b8 | 46 | union i2c_johanshin_data |
Komazawa_sun | 0:519ec302e9b8 | 47 | { |
Komazawa_sun | 0:519ec302e9b8 | 48 | char all_data[4]; |
Komazawa_sun | 0:519ec302e9b8 | 49 | struct |
Komazawa_sun | 0:519ec302e9b8 | 50 | { |
Komazawa_sun | 0:519ec302e9b8 | 51 | struct |
Komazawa_sun | 0:519ec302e9b8 | 52 | { |
Komazawa_sun | 0:519ec302e9b8 | 53 | signed int pwm :8; |
Komazawa_sun | 0:519ec302e9b8 | 54 | int fire1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 55 | int fire2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 56 | }r; |
Komazawa_sun | 0:519ec302e9b8 | 57 | |
Komazawa_sun | 0:519ec302e9b8 | 58 | struct |
Komazawa_sun | 0:519ec302e9b8 | 59 | { |
Komazawa_sun | 0:519ec302e9b8 | 60 | signed int pwm :8; |
Komazawa_sun | 0:519ec302e9b8 | 61 | int fire1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 62 | int fire2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 63 | }l; |
Komazawa_sun | 0:519ec302e9b8 | 64 | |
Komazawa_sun | 0:519ec302e9b8 | 65 | struct |
Komazawa_sun | 0:519ec302e9b8 | 66 | { |
Komazawa_sun | 0:519ec302e9b8 | 67 | signed int pwm :8; |
Komazawa_sun | 0:519ec302e9b8 | 68 | int fire :1; |
Komazawa_sun | 0:519ec302e9b8 | 69 | //int fire2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 70 | }k; |
Komazawa_sun | 0:519ec302e9b8 | 71 | |
Komazawa_sun | 0:519ec302e9b8 | 72 | int sao_call1 :1; |
Komazawa_sun | 0:519ec302e9b8 | 73 | int sao_call2 :1; |
Komazawa_sun | 0:519ec302e9b8 | 74 | int no_data :1; |
Komazawa_sun | 0:519ec302e9b8 | 75 | }; |
Komazawa_sun | 0:519ec302e9b8 | 76 | }; //apper_body |
Komazawa_sun | 0:519ec302e9b8 | 77 | i2c_johanshin_data a; |
Komazawa_sun | 0:519ec302e9b8 | 78 | |
Komazawa_sun | 0:519ec302e9b8 | 79 | union i2c_johanshin_return |
Komazawa_sun | 0:519ec302e9b8 | 80 | { |
Komazawa_sun | 0:519ec302e9b8 | 81 | char all_data[1]; |
Komazawa_sun | 0:519ec302e9b8 | 82 | struct limit |
Komazawa_sun | 0:519ec302e9b8 | 83 | { |
Komazawa_sun | 0:519ec302e9b8 | 84 | unsigned int max_limit :1; |
Komazawa_sun | 0:519ec302e9b8 | 85 | unsigned int min_limit :1; |
Komazawa_sun | 0:519ec302e9b8 | 86 | }; |
Komazawa_sun | 0:519ec302e9b8 | 87 | limit r; |
Komazawa_sun | 0:519ec302e9b8 | 88 | limit l; |
Komazawa_sun | 0:519ec302e9b8 | 89 | limit k; |
Komazawa_sun | 0:519ec302e9b8 | 90 | }; //apper_body_return |
Komazawa_sun | 0:519ec302e9b8 | 91 | i2c_johanshin_return ar; |
Komazawa_sun | 0:519ec302e9b8 | 92 | |
Komazawa_sun | 0:519ec302e9b8 | 93 | int data_index[23]; |
Komazawa_sun | 0:519ec302e9b8 | 94 | }; |
Komazawa_sun | 0:519ec302e9b8 | 95 | |
Komazawa_sun | 0:519ec302e9b8 | 96 | |
Komazawa_sun | 0:519ec302e9b8 | 97 | #endif |