project.schema.json 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "type": "object",
  4. "required": ["project_id", "profile", "device", "uart", "outputs", "motors", "temperature", "pins", "resources", "protocol", "timeouts"],
  5. "properties": {
  6. "project_id": {"type": "string", "pattern": "^[a-z0-9-]+$"},
  7. "profile": {"type": "string", "const": "prod2u-normal-multiproject-115200-v1"},
  8. "device": {
  9. "type": "object",
  10. "required": ["family", "part", "clock_hz", "clock_ball"],
  11. "properties": {
  12. "family": {"type": "string", "const": "EF2"},
  13. "part": {"type": "string", "const": "EF2L45BG256B"},
  14. "clock_hz": {"type": "integer", "const": 25000000},
  15. "clock_ball": {"type": "string", "const": "J1"}
  16. },
  17. "additionalProperties": false
  18. },
  19. "uart": {
  20. "type": "object",
  21. "required": ["baud", "data_bits", "parity", "stop_bits", "flow_control", "clks_per_bit", "inter_byte_timeout_ms"],
  22. "properties": {
  23. "baud": {"type": "integer", "const": 115200},
  24. "data_bits": {"type": "integer", "const": 8},
  25. "parity": {"type": "string", "const": "N"},
  26. "stop_bits": {"type": "integer", "const": 1},
  27. "flow_control": {"type": "string", "const": "none"},
  28. "clks_per_bit": {"type": "integer", "const": 217},
  29. "inter_byte_timeout_ms": {"type": "integer", "const": 10}
  30. },
  31. "additionalProperties": false
  32. },
  33. "outputs": {
  34. "type": "object",
  35. "required": ["ptc_count", "fan_count", "pwm_bits", "ptc_polarity", "fan_polarity", "solenoid_policy", "z_policy"],
  36. "properties": {
  37. "ptc_count": {"type": "integer", "const": 24},
  38. "fan_count": {"type": "integer", "const": 4},
  39. "pwm_bits": {"type": "integer", "const": 8},
  40. "ptc_polarity": {"type": "string", "enum": ["active_high", "active_low"]},
  41. "fan_polarity": {"type": "string", "enum": ["active_high", "active_low"]},
  42. "solenoid_policy": {"type": "string", "const": "constant_safe_zero"},
  43. "z_policy": {"type": "string", "const": "constant_zero"}
  44. },
  45. "additionalProperties": false
  46. },
  47. "motors": {
  48. "type": "object",
  49. "required": ["count", "fixed_steps", "execution", "order", "step_rate_hz", "step_half_cycles", "dir_setup_cycles", "direction_values", "direction_meaning", "limits", "mapping", "enable_n"],
  50. "properties": {
  51. "count": {"type": "integer", "const": 2},
  52. "fixed_steps": {"type": "integer", "const": 450},
  53. "execution": {"type": "string", "const": "serial"},
  54. "order": {"type": "array", "const": ["inlet", "outlet"]},
  55. "step_rate_hz": {"type": "integer", "const": 1000},
  56. "step_half_cycles": {"type": "integer", "const": 12500},
  57. "dir_setup_cycles": {"type": "integer", "const": 25000},
  58. "direction_values": {"type": "array", "const": [0, 1]},
  59. "direction_meaning": {"type": "object"},
  60. "limits": {"type": "string", "const": "none"},
  61. "mapping": {"type": "object"},
  62. "enable_n": {"type": "object"}
  63. },
  64. "additionalProperties": false
  65. },
  66. "temperature": {"type": "object"},
  67. "pins": {"type": "object"},
  68. "resources": {"type": "object"},
  69. "protocol": {"type": "object"},
  70. "timeouts": {"type": "object"}
  71. },
  72. "additionalProperties": false
  73. }