request lengths refactored

This commit is contained in:
Tristan Krause 2019-06-21 14:48:58 +02:00
parent 193a3254b8
commit 8b12507c3b

View file

@ -21,24 +21,24 @@ constexpr static uint8_t RQ_SET_REGISTER = 16;
constexpr static uint8_t RQ_GET_REGISTER = 17;
uint8_t const rq_len[] = {
/* RQ_DISC */ 1,
/* RQ_TEST */ 2,
/* RQ_INFO */ 1,
/* RQ_INT */ 3,
/* RQ_ST */ 1,
/* RQ_BA0 */ 2,
/* RQ_BA1 */ 2,
/* RQ_BE0 */ 1,
/* RQ_BE1 */ 1,
/* RQ_DSW */ 1,
/* RQ_AA0 */ 3,
/* RQ_AA1 */ 3,
/* RQ_ADC */ 2,
/* RQ_ADC_DAC_STROKE */ 9,
/* RQ_PWM_SET_FREQ */ 5,
/* RQ_PWM_SET_VALUE */ 2,
/* RQ_SET_REG */ 3,
/* RQ_GET_REG */ 2
1 /* RQ_DISCARD */,
1 /* RQ_TEST */ + 1 /* test byte */,
1 /* RQ_INFO */,
1 /* RQ_INFO */ + 1 /* test int high low */ + 1 /* test int high high */,
1 /* RQ_SELF_TEST */,
1 /* RQ_DIGITAL_WRITE_0 */ + 1 /* port value */,
1 /* RQ_DIGITAL_WRITE_1 */ + 1 /* port value */,
1 /* RQ_DIGITAL_READ_0 */,
1 /* RQ_DIGITAL_READ_1 */,
1 /* RQ_READ_DIP_SWITCH */,
1 /* RQ_ANALOG_WRITE_0 */ + 1 /* test int high low */ + 1 /* test int high high */,
1 /* RQ_ANALOG_WRITE_1 */ + 1 /* test int high low */ + 1 /* test int high high */,
1 /* RQ_ANALOG_READ */ + 1 /* adc channel */,
1 /* RQ_ADC_DAC_STROKE */ + 1 /* channel a */ + 1 /* channel b */ + 1 /* start low */ + 1 /* start high */ + 1 /* delta low */ + 1 /* delta high */ + 1 /* count low */ + 1 /* count high */,
1 /* RQ_PWM_SET_FREQ */ + 1 /* freq low low */ + 1 /* freq low high */ + 1 /* freq high low */ + 1 /* freq high high */,
1 /* RQ_PWM_SET_VALUE */ + 1 /* pwm value */,
1 /* RQ_SET_REGISTER */ + 1 /* register address*/ + 1 /* register value */,
1 /* RQ_GET_REGISTER */ + 1 /* register address*/,
};
#endif // REQUESTS_H