asdgas
Dependencies: mbed Eigen FastPWM
SPI_EEP_ENC/SPI_EEP_ENC.h@48:889798ff9329, 2020-01-29 (annotated)
- Committer:
- Lightvalve
- Date:
- Wed Jan 29 13:50:24 2020 +0000
- Revision:
- 48:889798ff9329
- Parent:
- 46:2694daea349b
- Child:
- 49:e7bcfc244d40
200129
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GiJeongKim | 0:51c43836c1d7 | 1 | #ifndef _SPI_EEP_ENC_H_ |
GiJeongKim | 0:51c43836c1d7 | 2 | #define _SPI_EEP_ENC_H_ |
GiJeongKim | 0:51c43836c1d7 | 3 | |
GiJeongKim | 0:51c43836c1d7 | 4 | #include "mbed.h" |
GiJeongKim | 0:51c43836c1d7 | 5 | |
GiJeongKim | 0:51c43836c1d7 | 6 | |
Lightvalve | 16:903b5a4433b4 | 7 | //void spi_eeprom_ready(void); |
Lightvalve | 16:903b5a4433b4 | 8 | //void spi_eeprom_write(unsigned short add, unsigned int data); |
Lightvalve | 16:903b5a4433b4 | 9 | //unsigned int spi_eeprom_read(unsigned short add); |
GiJeongKim | 0:51c43836c1d7 | 10 | |
GiJeongKim | 0:51c43836c1d7 | 11 | void spi_enc_set_clear(void); |
GiJeongKim | 0:51c43836c1d7 | 12 | void spi_enc_set_init(void); |
GiJeongKim | 0:51c43836c1d7 | 13 | int spi_enc_read(void); |
GiJeongKim | 0:51c43836c1d7 | 14 | |
Lightvalve | 11:82d8768d7351 | 15 | void SPI_VREF_DAC_WRITE_CHANNEL(unsigned int channel, unsigned int mode, unsigned int value); |
Lightvalve | 30:8d561f16383b | 16 | void SPI_VREF_DAC_WRITE(float VA, float VB, float VC, float VD); |
Lightvalve | 11:82d8768d7351 | 17 | void SPI_VREF_DAC_SET_ZERO(void); |
Lightvalve | 11:82d8768d7351 | 18 | |
Lightvalve | 11:82d8768d7351 | 19 | /******************************************************************************* |
Lightvalve | 11:82d8768d7351 | 20 | * ROM DATA ADDRESS ID |
Lightvalve | 11:82d8768d7351 | 21 | ******************************************************************************/ |
Lightvalve | 11:82d8768d7351 | 22 | |
Lightvalve | 11:82d8768d7351 | 23 | #define RID_BNO 0 |
Lightvalve | 11:82d8768d7351 | 24 | #define RID_OPERATING_MODE 1 |
Lightvalve | 11:82d8768d7351 | 25 | #define RID_CAN_FREQ 2 |
Lightvalve | 11:82d8768d7351 | 26 | #define RID_JOINT_ENC_DIR 3 |
Lightvalve | 11:82d8768d7351 | 27 | #define RID_VALVE_DIR 4 |
Lightvalve | 11:82d8768d7351 | 28 | #define RID_VALVE_ENC_DIR 5 |
Lightvalve | 11:82d8768d7351 | 29 | #define RID_VOLATGE_SUPPLY 6 |
Lightvalve | 11:82d8768d7351 | 30 | #define RID_VOLTAGE_VALVE 7 |
Lightvalve | 11:82d8768d7351 | 31 | |
Lightvalve | 11:82d8768d7351 | 32 | #define RID_P_GAIN_VALVE_POSITION 8 |
Lightvalve | 11:82d8768d7351 | 33 | #define RID_I_GAIN_VALVE_POSITION 9 |
Lightvalve | 11:82d8768d7351 | 34 | #define RID_D_GAIN_VALVE_POSITION 10 |
Lightvalve | 11:82d8768d7351 | 35 | |
Lightvalve | 11:82d8768d7351 | 36 | #define RID_P_GAIN_JOINT_POSITION 11 |
Lightvalve | 11:82d8768d7351 | 37 | #define RID_I_GAIN_JOINT_POSITION 12 |
Lightvalve | 11:82d8768d7351 | 38 | #define RID_D_GAIN_JOINT_POSITION 13 |
Lightvalve | 11:82d8768d7351 | 39 | |
Lightvalve | 11:82d8768d7351 | 40 | #define RID_P_GAIN_JOINT_TORQUE 14 |
Lightvalve | 11:82d8768d7351 | 41 | #define RID_I_GAIN_JOINT_TORQUE 15 |
Lightvalve | 11:82d8768d7351 | 42 | #define RID_D_GAIN_JOINT_TORQUE 16 |
Lightvalve | 11:82d8768d7351 | 43 | |
Lightvalve | 11:82d8768d7351 | 44 | #define RID_VALVE_DEADZONE_PLUS 17 |
Lightvalve | 11:82d8768d7351 | 45 | #define RID_VALVE_DEADZONE_MINUS 18 |
Lightvalve | 11:82d8768d7351 | 46 | |
Lightvalve | 11:82d8768d7351 | 47 | #define RID_VELOCITY_COMP_GAIN 19 |
Lightvalve | 11:82d8768d7351 | 48 | #define RID_COMPLIANCE_GAIN 20 |
Lightvalve | 11:82d8768d7351 | 49 | |
Lightvalve | 11:82d8768d7351 | 50 | #define RID_VALVE_CNETER 21 |
Lightvalve | 11:82d8768d7351 | 51 | |
Lightvalve | 11:82d8768d7351 | 52 | #define RID_VALVE_FF 22 |
Lightvalve | 11:82d8768d7351 | 53 | |
Lightvalve | 11:82d8768d7351 | 54 | #define RID_BULK_MODULUS 23 |
Lightvalve | 11:82d8768d7351 | 55 | |
Lightvalve | 11:82d8768d7351 | 56 | #define RID_CHAMBER_VOLUME_A 24 |
Lightvalve | 11:82d8768d7351 | 57 | #define RID_CHAMBER_VOLUME_B 25 |
Lightvalve | 11:82d8768d7351 | 58 | |
Lightvalve | 11:82d8768d7351 | 59 | #define RID_PISTON_AREA_A 26 |
Lightvalve | 11:82d8768d7351 | 60 | #define RID_PISTON_AREA_B 27 |
Lightvalve | 11:82d8768d7351 | 61 | |
Lightvalve | 11:82d8768d7351 | 62 | #define RID_PRES_SUPPLY 28 |
Lightvalve | 11:82d8768d7351 | 63 | #define RID_PRES_RETURN 29 |
Lightvalve | 11:82d8768d7351 | 64 | |
Lightvalve | 11:82d8768d7351 | 65 | #define RID_ENC_LIMIT_PLUS 30 |
Lightvalve | 11:82d8768d7351 | 66 | #define RID_ENC_LIMIT_MINUS 31 |
Lightvalve | 11:82d8768d7351 | 67 | |
Lightvalve | 11:82d8768d7351 | 68 | #define RID_STROKE 32 |
Lightvalve | 11:82d8768d7351 | 69 | |
Lightvalve | 11:82d8768d7351 | 70 | #define RID_VALVE_LIMIT_PLUS 34 |
Lightvalve | 11:82d8768d7351 | 71 | #define RID_VALVE_LIMIT_MINUS 35 |
Lightvalve | 11:82d8768d7351 | 72 | |
Lightvalve | 11:82d8768d7351 | 73 | #define RID_ENC_PULSE_PER_POSITION 36 |
Lightvalve | 11:82d8768d7351 | 74 | #define RID_TORQUE_SENSOR_PULSE_PER_TORQUE 37 |
Lightvalve | 11:82d8768d7351 | 75 | #define RID_PRES_SENSOR_A_PULSE_PER_BAR 38 |
Lightvalve | 11:82d8768d7351 | 76 | #define RID_PRES_SENSOR_B_PULSE_PER_BAR 39 |
Lightvalve | 11:82d8768d7351 | 77 | |
Lightvalve | 11:82d8768d7351 | 78 | #define RID_FRICTION 40 |
Lightvalve | 11:82d8768d7351 | 79 | #define RID_HOMEPOS_OFFSET 41 |
Lightvalve | 11:82d8768d7351 | 80 | #define RID_HOMEPOS_VALVE_OPENING 42 |
Lightvalve | 11:82d8768d7351 | 81 | |
Lightvalve | 11:82d8768d7351 | 82 | #define RID_TORQUE_SENSOR_VREF 45 |
Lightvalve | 11:82d8768d7351 | 83 | |
Lightvalve | 11:82d8768d7351 | 84 | #define RID_PRES_A_SENSOR_VREF 50 |
Lightvalve | 11:82d8768d7351 | 85 | #define RID_PRES_B_SENSOR_VREF 51 |
Lightvalve | 11:82d8768d7351 | 86 | |
Lightvalve | 18:b8adf1582ea3 | 87 | #define RID_VALVE_MAX_POS 52 |
Lightvalve | 18:b8adf1582ea3 | 88 | #define RID_VALVE_MIN_POS 53 |
Lightvalve | 18:b8adf1582ea3 | 89 | |
Lightvalve | 18:b8adf1582ea3 | 90 | #define RID_VALVE_POS_NUM 54 |
Lightvalve | 18:b8adf1582ea3 | 91 | #define RID_DDV_CENTER 55 |
Lightvalve | 32:4b8c0fedaf2c | 92 | #define RID_VALVE_CENTER_OFFSET 56 |
Lightvalve | 16:903b5a4433b4 | 93 | |
Lightvalve | 11:82d8768d7351 | 94 | #define RID_VALVE_GAIN_PLUS_1 60 |
Lightvalve | 11:82d8768d7351 | 95 | #define RID_VALVE_GAIN_MINUS_1 61 |
Lightvalve | 11:82d8768d7351 | 96 | #define RID_VALVE_GAIN_PLUS_2 62 |
Lightvalve | 11:82d8768d7351 | 97 | #define RID_VALVE_GAIN_MINUS_2 63 |
Lightvalve | 11:82d8768d7351 | 98 | #define RID_VALVE_GAIN_PLUS_3 64 |
Lightvalve | 11:82d8768d7351 | 99 | #define RID_VALVE_GAIN_MINUS_3 65 |
Lightvalve | 11:82d8768d7351 | 100 | #define RID_VALVE_GAIN_PLUS_4 66 |
Lightvalve | 11:82d8768d7351 | 101 | #define RID_VALVE_GAIN_MINUS_4 67 |
Lightvalve | 11:82d8768d7351 | 102 | #define RID_VALVE_GAIN_PLUS_5 68 |
Lightvalve | 11:82d8768d7351 | 103 | #define RID_VALVE_GAIN_MINUS_5 69 |
Lightvalve | 11:82d8768d7351 | 104 | |
Lightvalve | 11:82d8768d7351 | 105 | #define RID_VALVE_POS_VS_PWM_0 70 |
Lightvalve | 11:82d8768d7351 | 106 | #define RID_VALVE_POS_VS_PWM_1 71 |
Lightvalve | 11:82d8768d7351 | 107 | #define RID_VALVE_POS_VS_PWM_2 72 |
Lightvalve | 11:82d8768d7351 | 108 | #define RID_VALVE_POS_VS_PWM_3 73 |
Lightvalve | 11:82d8768d7351 | 109 | #define RID_VALVE_POS_VS_PWM_4 74 |
Lightvalve | 11:82d8768d7351 | 110 | #define RID_VALVE_POS_VS_PWM_5 75 |
Lightvalve | 11:82d8768d7351 | 111 | #define RID_VALVE_POS_VS_PWM_6 76 |
Lightvalve | 11:82d8768d7351 | 112 | #define RID_VALVE_POS_VS_PWM_7 77 |
Lightvalve | 11:82d8768d7351 | 113 | #define RID_VALVE_POS_VS_PWM_8 78 |
Lightvalve | 11:82d8768d7351 | 114 | #define RID_VALVE_POS_VS_PWM_9 79 |
Lightvalve | 11:82d8768d7351 | 115 | #define RID_VALVE_POS_VS_PWM_10 80 |
Lightvalve | 11:82d8768d7351 | 116 | #define RID_VALVE_POS_VS_PWM_11 81 |
Lightvalve | 11:82d8768d7351 | 117 | #define RID_VALVE_POS_VS_PWM_12 82 |
Lightvalve | 11:82d8768d7351 | 118 | #define RID_VALVE_POS_VS_PWM_13 83 |
Lightvalve | 11:82d8768d7351 | 119 | #define RID_VALVE_POS_VS_PWM_14 84 |
Lightvalve | 11:82d8768d7351 | 120 | #define RID_VALVE_POS_VS_PWM_15 85 |
Lightvalve | 11:82d8768d7351 | 121 | #define RID_VALVE_POS_VS_PWM_16 86 |
Lightvalve | 18:b8adf1582ea3 | 122 | #define RID_VALVE_POS_VS_PWM_17 87 |
Lightvalve | 18:b8adf1582ea3 | 123 | #define RID_VALVE_POS_VS_PWM_18 88 |
Lightvalve | 18:b8adf1582ea3 | 124 | #define RID_VALVE_POS_VS_PWM_19 89 |
Lightvalve | 18:b8adf1582ea3 | 125 | #define RID_VALVE_POS_VS_PWM_20 90 |
Lightvalve | 18:b8adf1582ea3 | 126 | #define RID_VALVE_POS_VS_PWM_21 91 |
Lightvalve | 18:b8adf1582ea3 | 127 | #define RID_VALVE_POS_VS_PWM_22 92 |
Lightvalve | 18:b8adf1582ea3 | 128 | #define RID_VALVE_POS_VS_PWM_23 93 |
Lightvalve | 18:b8adf1582ea3 | 129 | #define RID_VALVE_POS_VS_PWM_24 94 |
Lightvalve | 11:82d8768d7351 | 130 | |
Lightvalve | 11:82d8768d7351 | 131 | #define RID_IS_FIRST 99 |
Lightvalve | 11:82d8768d7351 | 132 | |
Lightvalve | 11:82d8768d7351 | 133 | |
Lightvalve | 11:82d8768d7351 | 134 | #define RID_VALVE_POS_VS_FLOWRATE_0 100 |
Lightvalve | 11:82d8768d7351 | 135 | #define RID_VALVE_POS_VS_FLOWRATE_1 101 |
Lightvalve | 11:82d8768d7351 | 136 | #define RID_VALVE_POS_VS_FLOWRATE_2 102 |
Lightvalve | 11:82d8768d7351 | 137 | #define RID_VALVE_POS_VS_FLOWRATE_3 103 |
Lightvalve | 11:82d8768d7351 | 138 | #define RID_VALVE_POS_VS_FLOWRATE_4 104 |
Lightvalve | 11:82d8768d7351 | 139 | #define RID_VALVE_POS_VS_FLOWRATE_5 105 |
Lightvalve | 11:82d8768d7351 | 140 | #define RID_VALVE_POS_VS_FLOWRATE_6 106 |
Lightvalve | 11:82d8768d7351 | 141 | #define RID_VALVE_POS_VS_FLOWRATE_7 107 |
Lightvalve | 11:82d8768d7351 | 142 | #define RID_VALVE_POS_VS_FLOWRATE_8 108 |
Lightvalve | 11:82d8768d7351 | 143 | #define RID_VALVE_POS_VS_FLOWRATE_9 109 |
Lightvalve | 11:82d8768d7351 | 144 | #define RID_VALVE_POS_VS_FLOWRATE_10 110 |
Lightvalve | 11:82d8768d7351 | 145 | #define RID_VALVE_POS_VS_FLOWRATE_11 111 |
Lightvalve | 11:82d8768d7351 | 146 | #define RID_VALVE_POS_VS_FLOWRATE_12 112 |
Lightvalve | 11:82d8768d7351 | 147 | #define RID_VALVE_POS_VS_FLOWRATE_13 113 |
Lightvalve | 11:82d8768d7351 | 148 | #define RID_VALVE_POS_VS_FLOWRATE_14 114 |
Lightvalve | 11:82d8768d7351 | 149 | #define RID_VALVE_POS_VS_FLOWRATE_15 115 |
Lightvalve | 11:82d8768d7351 | 150 | #define RID_VALVE_POS_VS_FLOWRATE_16 116 |
Lightvalve | 11:82d8768d7351 | 151 | #define RID_VALVE_POS_VS_FLOWRATE_17 117 |
Lightvalve | 11:82d8768d7351 | 152 | #define RID_VALVE_POS_VS_FLOWRATE_18 118 |
Lightvalve | 11:82d8768d7351 | 153 | #define RID_VALVE_POS_VS_FLOWRATE_19 119 |
Lightvalve | 11:82d8768d7351 | 154 | #define RID_VALVE_POS_VS_FLOWRATE_20 120 |
Lightvalve | 11:82d8768d7351 | 155 | |
Lightvalve | 11:82d8768d7351 | 156 | #define RID_VALVE_POS_VS_FLOWRATE_0_1 200 |
Lightvalve | 11:82d8768d7351 | 157 | #define RID_VALVE_POS_VS_FLOWRATE_1_1 201 |
Lightvalve | 11:82d8768d7351 | 158 | #define RID_VALVE_POS_VS_FLOWRATE_2_1 202 |
Lightvalve | 11:82d8768d7351 | 159 | #define RID_VALVE_POS_VS_FLOWRATE_3_1 203 |
Lightvalve | 11:82d8768d7351 | 160 | #define RID_VALVE_POS_VS_FLOWRATE_4_1 204 |
Lightvalve | 11:82d8768d7351 | 161 | #define RID_VALVE_POS_VS_FLOWRATE_5_1 205 |
Lightvalve | 11:82d8768d7351 | 162 | #define RID_VALVE_POS_VS_FLOWRATE_6_1 206 |
Lightvalve | 11:82d8768d7351 | 163 | #define RID_VALVE_POS_VS_FLOWRATE_7_1 207 |
Lightvalve | 11:82d8768d7351 | 164 | #define RID_VALVE_POS_VS_FLOWRATE_8_1 208 |
Lightvalve | 11:82d8768d7351 | 165 | #define RID_VALVE_POS_VS_FLOWRATE_9_1 209 |
Lightvalve | 11:82d8768d7351 | 166 | #define RID_VALVE_POS_VS_FLOWRATE_10_1 210 |
Lightvalve | 11:82d8768d7351 | 167 | #define RID_VALVE_POS_VS_FLOWRATE_11_1 211 |
Lightvalve | 11:82d8768d7351 | 168 | #define RID_VALVE_POS_VS_FLOWRATE_12_1 212 |
Lightvalve | 11:82d8768d7351 | 169 | #define RID_VALVE_POS_VS_FLOWRATE_13_1 213 |
Lightvalve | 11:82d8768d7351 | 170 | #define RID_VALVE_POS_VS_FLOWRATE_14_1 214 |
Lightvalve | 11:82d8768d7351 | 171 | #define RID_VALVE_POS_VS_FLOWRATE_15_1 215 |
Lightvalve | 11:82d8768d7351 | 172 | #define RID_VALVE_POS_VS_FLOWRATE_16_1 216 |
Lightvalve | 11:82d8768d7351 | 173 | #define RID_VALVE_POS_VS_FLOWRATE_17_1 217 |
Lightvalve | 11:82d8768d7351 | 174 | #define RID_VALVE_POS_VS_FLOWRATE_18_1 218 |
Lightvalve | 11:82d8768d7351 | 175 | #define RID_VALVE_POS_VS_FLOWRATE_19_1 219 |
Lightvalve | 11:82d8768d7351 | 176 | #define RID_VALVE_POS_VS_FLOWRATE_20_1 220 |
Lightvalve | 11:82d8768d7351 | 177 | |
Lightvalve | 48:889798ff9329 | 178 | #define RID_K_SPRING 57 |
Lightvalve | 48:889798ff9329 | 179 | #define RID_D_DAMPER 58 |
Lightvalve | 46:2694daea349b | 180 | |
GiJeongKim | 0:51c43836c1d7 | 181 | #endif //_SPI_H_ |