You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

182 lines
8.0 KiB

2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
2 years ago
1 year ago
2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. namespace iflytop {
  4. namespace zcr {
  5. typedef enum {
  6. #if 0
  7. virtual int32_t board_reset() = 0;
  8. #endif
  9. kboard_reset = 0x0000, //{} {}
  10. kevent_bus_reg_change_report = 0x0064, //{regindex,oldval,toval}
  11. kmodule_ping = 0x0101,
  12. kmodule_stop = 0x0102,
  13. kmodule_get_error = 0x0110,
  14. kmodule_get_detail_errorcode = 0x0111,
  15. kmodule_clear_error = 0x0112,
  16. kmodule_set_reg = 0x0120,
  17. kmodule_get_reg = 0x0121,
  18. kmodule_reset_reg = 0x0123,
  19. kmodule_get_version = 0x0130,
  20. kmodule_get_type = 0x0131,
  21. kmodule_get_status = 0x0132,
  22. // kmodule_ping = 0x0100, //
  23. // kmodule_stop = 0x0101, //
  24. // kmodule_enable = 0x0102, //
  25. // kmodule_clear_error = 0x0103, //
  26. // kmodule_active_cfg = 0x0104, //
  27. // kmodule_reset_reg = 0x0105, //
  28. // kmodule_set_reg = 0x0106, //(int32_t index,int32_t val)->()
  29. // kmodule_get_reg = 0x0107, //(int32_t index)->(int32_t val)
  30. // kmodule_get_version = 0x0150, //()->int32_t
  31. // kmodule_get_type = 0x0151, //()->int32_t
  32. // kmodule_get_status = 0x0153, //{}{int32_t}
  33. // kmodule_get_error = 0x0154, //
  34. // kmodule_get_detail_errorcode = 0x0155, //()->int32_t
  35. //
  36. kxymotor_enable = 0x0301, //
  37. kxymotor_move_by = 0x0302, //
  38. kxymotor_move_to = 0x0303, //
  39. kxymotor_move_to_zero = 0x0304, //
  40. kxymotor_read_pos = 0x0306, //
  41. kxymotor_read_inio_index_in_stm32 = 0x0307, //
  42. kxymotor_read_inio = 0x0308, //
  43. kxymotor_set_pos = 0x0309, //
  44. kxymotor_motor_move_by_direct = 0x030a, //
  45. kxymotor_read_enc_direct = 0x030b, //
  46. ka8000_optical_read_raw = 0x0609, //
  47. ka8k_opt_v2_t_start_scan = 0x0700, //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
  48. ka8k_opt_v2_f_start_scan = 0x0701, //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
  49. ka8k_opt_v2_t_open_laster = 0x070a, //(int32_t lasterGain,int32_t scanGain) for_debug
  50. ka8k_opt_v2_t_close_laster = 0x070b, //() for_debug
  51. ka8k_opt_v2_t_readVal = 0x070c, //(int32_t *val0,int32_t *val1) for_debug
  52. ka8k_opt_v2_f_open_laster = 0x070d, //(int32_t lasterGain,int32_t scanGain) for_debug
  53. ka8k_opt_v2_f_close_laster = 0x070e, //() for_debug
  54. ka8k_opt_v2_f_readVal = 0x070f, //(int32_t *val0,int32_t *val1) for_debug
  55. ka8k_opt_v2_barcode_start_scan = 0x0702, //(int32_t lasterGain,int32_t scanGain,int32_t startpos,int32_t intervalstep)
  56. kstep_motor_enable = 0x0201, //
  57. kstep_motor_read_pos = 0x020b, //
  58. kstep_motor_read_enc_pos = 0x020c, //
  59. kstep_motor_easy_rotate = 0x0211, //
  60. kstep_motor_easy_move_by = 0x0212, //
  61. kstep_motor_easy_move_to = 0x0213, //
  62. kstep_motor_easy_move_to_zero = 0x0214, //
  63. kstep_motor_easy_set_current_pos = 0x0215, //
  64. kstep_motor_easy_move_to_io = 0x0216, //
  65. kstep_motor_stop = 0x0228, //
  66. kstep_motor_active_cfg = 0x0229, //
  67. kstep_motor_read_io_state = 0x022a, //
  68. kstep_motor_easy_move_to_end_point = 0x022c, //
  69. kstep_motor_read_tmc5130_status = 0x0232, //
  70. kstep_motor_read_tmc5130_state = 0x0233, //
  71. kstep_motor_read_io_index_in_stm32 = 0x0238, //
  72. kstep_motor_set_subdevice_reg = 0x0239, //
  73. kstep_motor_get_subdevice_reg = 0x023a, //
  74. kstep_motor_easy_reciprocating_motion = 0x022d, //
  75. kstep_motor_easy_move_to_zero_point_quick = 0x022e, //
  76. kmini_servo_enable = 0x6601, //
  77. kmini_servo_read_pos = 0x6602, //
  78. kmini_servo_active_cfg = 0x6603, //
  79. kmini_servo_stop = 0x6604, //
  80. kmini_servo_set_mid_point = 0x6607, //
  81. kmini_servo_read_io_state = 0x6608, //
  82. kmini_servo_move_to = 0x6609, //
  83. kmini_servo_rotate = 0x660a, //
  84. kmini_servo_rotate_with_torque = 0x660b, //
  85. kmini_servo_set_cur_pos = 0x660c, //
  86. kextboard_read_inio = 0x6701, // para:{index}, ack:{state}
  87. kextboard_write_outio = 0x6702, // para:{index,state}, ack:{}
  88. kextboard_read_muti_inio = 0x6703, // para:{}, ack:{states}
  89. kextboard_read_inio_index_in_stm32 = 0x6704, // para:{index}, ack:{index_in_stm32}
  90. kextboard_read_outio_index_in_stm32 = 0x6705, // para:{index}, ack:{index_in_stm32}
  91. kextboard_read_outio = 0x6706, // para:{index}, ack:{state}
  92. kcode_scaner_start_scan = 0x6801, // para:{}, ack:{}
  93. kcode_scaner_stop_scan = 0x6802, // para:{}, ack:{}
  94. kcode_scaner_result_is_ready = 0x6803, // para:{}, ack:{}
  95. kcode_scaner_read_scaner_result = 0x6804, // para:{}, ack:{X}
  96. kcode_scaner_get_result_length = 0x6805, // para:{}, ack:{X}
  97. kfan_controler_set_speed = 0x6900, //
  98. ktemp_controler_start_hearting = 0x7000, //
  99. ktemp_controler_stop_hearting = 0x7001, //
  100. ktemp_controler_set_peltier_power_level = 0x7002, //
  101. ktemp_controler_set_pump_level = 0x7003, //
  102. ktemp_controler_set_fan_level = 0x7004, //
  103. ktemp_controler_enable_log = 0x7005, //
  104. ka8000_idcard_reader_read_raw = 0x7100, //
  105. ka8000_idcard_write_raw = 0x7101, //
  106. ka8000_idcard_erase = 0x7102, //
  107. ka8000_idcard_earse_unlock = 0x7103, //
  108. kevent_a8000_idcard_online = 0x71c8, //
  109. kevent_a8000_idcard_offline = 0x71c9, //
  110. kplate_code_scaner_push_card_and_scan = 0x7301, //
  111. kplate_code_scaner_stop_scan = 0x7302, //
  112. kplate_code_scaner_read_result = 0x7303, //
  113. kplate_code_scaner_read_result_point_num = 0x7304, //
  114. kplate_code_scaner_read_code = 0x7305, //
  115. kplate_code_scaner_adc_readraw = 0x7306, //
  116. kplate_code_scaner_open_laser = 0x7307, //
  117. kplate_code_scaner_close_laser = 0x7308, //
  118. /***********************************************************************************************************************
  119. * *
  120. ***********************************************************************************************************************/
  121. kpipette_zmotor_enable = 0x7400,
  122. kpipette_zmotor_move_zero = 0x7401,
  123. kpipette_zmotor_move_to_zero_point_quick = 0x7402,
  124. kpipette_zmotor_measure_distance = 0x7403,
  125. kpipette_zmotor_read_measure_distance_result = 0x7404,
  126. kpipette_zmotor_move_by = 0x7405,
  127. kpipette_zmotor_move_to = 0x7406,
  128. kliquid_operation_clear_params = 0x7450,
  129. kliquid_operation_set_gun_runparams = 0x7451,
  130. kliquid_operation_set_zmotor_runparams = 0x7452,
  131. kliquid_operation_enable_lld_record = 0x7453,
  132. kliquid_operation_fresh_params = 0x7454,
  133. kpipette_init_device = 0x7501,
  134. kpipette_put_tip = 0x7502,
  135. kpipette_pump_move_to = 0x7503,
  136. kpipette_lld = 0x7504,
  137. kpipette_aspirate = 0x7505,
  138. kpipette_distribu = 0x7506,
  139. kpipette_shake_up = 0x7507,
  140. kpipette_clear_hanging_liquid = 0x7508,
  141. kpipette_lld_is_detect_liquid = 0x7509,
  142. kpipette_get_sensor_sample_data = 0x7510,
  143. kpipette_get_sensor_sample_data_num = 0x7511,
  144. kpipette_zmotor_read_zero_point_state = 0x7512,
  145. kpipette_zmotor_read_dev_status_cache = 0x7513,
  146. } cmdid_t;
  147. typedef struct {
  148. int index;
  149. const char* fnname;
  150. } cmdinfo_t;
  151. const char* cmdid2str(int32_t code);
  152. cmdinfo_t* cmdid_get_table();
  153. int cmdid_get_table_size();
  154. } // namespace zcr
  155. } // namespace iflytop