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.

157 lines
7.3 KiB

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