mirror of
https://github.com/eddyem/stm32samples.git
synced 2025-12-06 18:55:13 +03:00
add Canon managing device KiCAD schematic & PCB
This commit is contained in:
parent
40c1030049
commit
2d8f1dacdb
75
F0:F030,F042,F072/Chiller/kicad/Chiller_control.kicad_prl
Normal file
75
F0:F030,F042,F072/Chiller/kicad/Chiller_control.kicad_prl
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 0,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": true,
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"ratsnest_display_mode": 0,
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": true,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
"filename": "Chiller_control.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
371
F0:F030,F042,F072/Chiller/kicad/Chiller_control.kicad_pro
Normal file
371
F0:F030,F042,F072/Chiller/kicad/Chiller_control.kicad_pro
Normal file
@ -0,0 +1,371 @@
|
||||
{
|
||||
"board": {
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.15,
|
||||
"copper_line_width": 0.2,
|
||||
"copper_text_italic": false,
|
||||
"copper_text_size_h": 1.5,
|
||||
"copper_text_size_v": 1.5,
|
||||
"copper_text_thickness": 0.3,
|
||||
"copper_text_upright": true,
|
||||
"courtyard_line_width": 0.05,
|
||||
"other_line_width": 0.15,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": true,
|
||||
"silk_line_width": 0.15,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.15,
|
||||
"silk_text_upright": true
|
||||
},
|
||||
"diff_pair_dimensions": [
|
||||
{
|
||||
"gap": 0.25,
|
||||
"via_gap": 0.25,
|
||||
"width": 0.2
|
||||
}
|
||||
],
|
||||
"drc_exclusions": [],
|
||||
"rule_severitieslegacy_courtyards_overlap": true,
|
||||
"rule_severitieslegacy_no_courtyard_defined": false,
|
||||
"rules": {
|
||||
"allow_blind_buried_vias": false,
|
||||
"allow_microvias": false,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.2,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_through_hole_diameter": 0.3,
|
||||
"min_track_width": 0.2,
|
||||
"min_via_diameter": 0.4,
|
||||
"solder_mask_clearance": 0.2,
|
||||
"solder_mask_min_width": 0.25,
|
||||
"solder_paste_clearance": 0.0,
|
||||
"solder_paste_margin_ratio": -0.0
|
||||
},
|
||||
"track_widths": [
|
||||
0.5,
|
||||
0.25,
|
||||
0.5,
|
||||
1.0,
|
||||
2.0
|
||||
],
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 1.2,
|
||||
"drill": 0.6
|
||||
},
|
||||
{
|
||||
"diameter": 1.2,
|
||||
"drill": 0.6
|
||||
},
|
||||
{
|
||||
"diameter": 1.5,
|
||||
"drill": 0.8
|
||||
},
|
||||
{
|
||||
"diameter": 2.5,
|
||||
"drill": 1.0
|
||||
}
|
||||
]
|
||||
},
|
||||
"layer_presets": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
"equivalence_files": []
|
||||
},
|
||||
"erc": {
|
||||
"erc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"pin_map": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"pinned_footprint_libs": [],
|
||||
"pinned_symbol_libs": []
|
||||
},
|
||||
"meta": {
|
||||
"filename": "Chiller_control.kicad_pro",
|
||||
"version": 1
|
||||
},
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
"line_style": 0,
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Default",
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.25,
|
||||
"via_diameter": 0.8,
|
||||
"via_drill": 0.4,
|
||||
"wire_width": 6.0
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"net_colors": null
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
"gencad": "",
|
||||
"idf": "",
|
||||
"netlist": "Chiller_control.net",
|
||||
"specctra_dsn": "",
|
||||
"step": "",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 60.0,
|
||||
"field_names": [],
|
||||
"intersheets_ref_own_page": false,
|
||||
"intersheets_ref_prefix": "",
|
||||
"intersheets_ref_short": false,
|
||||
"intersheets_ref_show": false,
|
||||
"intersheets_ref_suffix": "",
|
||||
"junction_size_choice": 3,
|
||||
"label_size_ratio": 0.25,
|
||||
"pin_symbol_size": 0.0,
|
||||
"text_offset_ratio": 0.08
|
||||
},
|
||||
"legacy_lib_dir": "",
|
||||
"legacy_lib_list": [],
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"net_format_name": "Pcbnew",
|
||||
"ngspice": {
|
||||
"fix_include_paths": true,
|
||||
"fix_passive_vals": false,
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"model_mode": 0,
|
||||
"workbook_filename": ""
|
||||
},
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
"sheets": [],
|
||||
"text_variables": {}
|
||||
}
|
||||
75
F0:F030,F042,F072/Socket_fans/kicad/stm32.kicad_prl
Normal file
75
F0:F030,F042,F072/Socket_fans/kicad/stm32.kicad_prl
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 0,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": true,
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"ratsnest_display_mode": 0,
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": true,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
"filename": "stm32.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
368
F0:F030,F042,F072/Socket_fans/kicad/stm32.kicad_pro
Normal file
368
F0:F030,F042,F072/Socket_fans/kicad/stm32.kicad_pro
Normal file
@ -0,0 +1,368 @@
|
||||
{
|
||||
"board": {
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.15,
|
||||
"copper_line_width": 0.2,
|
||||
"copper_text_italic": false,
|
||||
"copper_text_size_h": 1.5,
|
||||
"copper_text_size_v": 1.5,
|
||||
"copper_text_thickness": 0.3,
|
||||
"copper_text_upright": true,
|
||||
"courtyard_line_width": 0.05,
|
||||
"other_line_width": 0.15,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": true,
|
||||
"silk_line_width": 0.15,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.15,
|
||||
"silk_text_upright": true
|
||||
},
|
||||
"diff_pair_dimensions": [
|
||||
{
|
||||
"gap": 0.25,
|
||||
"via_gap": 0.25,
|
||||
"width": 0.2
|
||||
}
|
||||
],
|
||||
"drc_exclusions": [],
|
||||
"rule_severitieslegacy_courtyards_overlap": true,
|
||||
"rule_severitieslegacy_no_courtyard_defined": false,
|
||||
"rules": {
|
||||
"allow_blind_buried_vias": false,
|
||||
"allow_microvias": false,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.2,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_through_hole_diameter": 0.5,
|
||||
"min_track_width": 0.2,
|
||||
"min_via_diameter": 0.7999999999999999,
|
||||
"solder_mask_clearance": 0.2,
|
||||
"solder_mask_min_width": 0.0,
|
||||
"solder_paste_clearance": 0.0,
|
||||
"solder_paste_margin_ratio": -0.0
|
||||
},
|
||||
"track_widths": [
|
||||
0.2,
|
||||
0.2,
|
||||
0.3,
|
||||
0.5,
|
||||
1.0,
|
||||
2.0
|
||||
],
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 1.0,
|
||||
"drill": 0.6
|
||||
},
|
||||
{
|
||||
"diameter": 1.0,
|
||||
"drill": 0.6
|
||||
},
|
||||
{
|
||||
"diameter": 1.5,
|
||||
"drill": 0.8
|
||||
}
|
||||
]
|
||||
},
|
||||
"layer_presets": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
"equivalence_files": []
|
||||
},
|
||||
"erc": {
|
||||
"erc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"pin_map": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"pinned_footprint_libs": [],
|
||||
"pinned_symbol_libs": []
|
||||
},
|
||||
"meta": {
|
||||
"filename": "stm32.kicad_pro",
|
||||
"version": 1
|
||||
},
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
"line_style": 0,
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Default",
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.25,
|
||||
"via_diameter": 0.8,
|
||||
"via_drill": 0.4,
|
||||
"wire_width": 6.0
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"net_colors": null
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
"gencad": "",
|
||||
"idf": "",
|
||||
"netlist": "stm32.net",
|
||||
"specctra_dsn": "",
|
||||
"step": "",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
"intersheets_ref_own_page": false,
|
||||
"intersheets_ref_prefix": "",
|
||||
"intersheets_ref_short": false,
|
||||
"intersheets_ref_show": false,
|
||||
"intersheets_ref_suffix": "",
|
||||
"junction_size_choice": 3,
|
||||
"label_size_ratio": 0.25,
|
||||
"pin_symbol_size": 0.0,
|
||||
"text_offset_ratio": 0.08
|
||||
},
|
||||
"legacy_lib_dir": "",
|
||||
"legacy_lib_list": [],
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"net_format_name": "Pcbnew",
|
||||
"ngspice": {
|
||||
"fix_include_paths": true,
|
||||
"fix_passive_vals": false,
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"model_mode": 0,
|
||||
"workbook_filename": ""
|
||||
},
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"subpart_first_id": 49,
|
||||
"subpart_id_separator": 46
|
||||
},
|
||||
"sheets": [],
|
||||
"text_variables": {}
|
||||
}
|
||||
151
F1:F103/Canon_managing_device/Makefile
Normal file
151
F1:F103/Canon_managing_device/Makefile
Normal file
@ -0,0 +1,151 @@
|
||||
BINARY = canonusb
|
||||
BOOTPORT ?= /dev/ttyUSB0
|
||||
BOOTSPEED ?= 115200
|
||||
# MCU FAMILY
|
||||
FAMILY ?= F1
|
||||
# MCU code
|
||||
MCU ?= F103x8
|
||||
# density (stm32f10x.h, lines 70-84)
|
||||
DENSITY ?= LD
|
||||
# change this linking script depending on particular MCU model,
|
||||
LDSCRIPT ?= stm32f103x8.ld
|
||||
# debug
|
||||
#DEFS = -DEBUG
|
||||
|
||||
# autoincremental version & build date
|
||||
VERSION_FILE = version.inc
|
||||
NEXTVER := $(shell expr $$(awk '/#define BUILD_NUMBER/' $(VERSION_FILE) | tr -cd "[0-9]") + 1)
|
||||
BUILDDATE := $(shell date +%Y-%m-%d)
|
||||
|
||||
INDEPENDENT_HEADERS=
|
||||
|
||||
FP_FLAGS ?= -msoft-float -mfloat-abi=soft
|
||||
ASM_FLAGS ?= -mthumb -mcpu=cortex-m3 -mfix-cortex-m3-ldrd
|
||||
ARCH_FLAGS = $(ASM_FLAGS) $(FP_FLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Executables
|
||||
#PREFIX ?= arm-none-eabi
|
||||
# gcc from arm web site
|
||||
PREFIX ?= /opt/bin/arm-none-eabi
|
||||
TOOLCHLIB ?= /opt/arm-none-eabi/lib
|
||||
RM := rm -f
|
||||
RMDIR := rmdir
|
||||
CC := $(PREFIX)-gcc
|
||||
LD := $(PREFIX)-gcc
|
||||
AR := $(PREFIX)-ar
|
||||
AS := $(PREFIX)-as
|
||||
SIZE := $(PREFIX)-size
|
||||
OBJCOPY := $(PREFIX)-objcopy
|
||||
OBJDUMP := $(PREFIX)-objdump
|
||||
GDB := $(PREFIX)-gdb
|
||||
STFLASH := $(shell which st-flash)
|
||||
STBOOT := $(shell which stm32flash)
|
||||
DFUUTIL := $(shell which dfu-util)
|
||||
|
||||
###############################################################################
|
||||
# Source files
|
||||
OBJDIR := mk
|
||||
SRC := $(wildcard *.c)
|
||||
OBJS := $(addprefix $(OBJDIR)/, $(SRC:%.c=%.o))
|
||||
STARTUP = $(OBJDIR)/startup.o
|
||||
OBJS += $(STARTUP)
|
||||
# dependencies: we need them to recompile files if their headers-dependencies changed
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
|
||||
INC_DIR ?= ../inc
|
||||
|
||||
INCLUDE := -I$(INC_DIR)/Fx -I$(INC_DIR)/cm
|
||||
LIB_DIR := $(INC_DIR)/ld
|
||||
|
||||
###############################################################################
|
||||
# C flags
|
||||
CFLAGS += -O2 -g -D__thumb2__=1 -MD -g -gdwarf-2
|
||||
CFLAGS += -Wall -Werror -Wextra -Wshadow
|
||||
CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector -fshort-enums
|
||||
CFLAGS += $(ARCH_FLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Linker flags
|
||||
LDFLAGS += -nostartfiles -nostdlib --static -Wl,--gc-sections -Wl,--print-memory-usage
|
||||
LDFLAGS += -Wl,-Map=$(OBJDIR)/$(BINARY).map
|
||||
#LDFLAGS += --static --gc-sections --print-memory-usage
|
||||
LDFLAGS += -L$(LIB_DIR) -L$(TOOLCHLIB)
|
||||
LDFLAGS += -T$(LDSCRIPT)
|
||||
|
||||
###############################################################################
|
||||
# Used libraries
|
||||
LDLIBS += -lc -lgcc $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
|
||||
|
||||
DEFS += -DSTM32$(FAMILY) -DSTM32$(MCU) -DSTM32F10X_$(DENSITY)
|
||||
|
||||
ELF := $(OBJDIR)/$(BINARY).elf
|
||||
LIST := $(OBJDIR)/$(BINARY).list
|
||||
BIN := $(BINARY).bin
|
||||
HEX := $(BINARY).hex
|
||||
|
||||
all: bin list size
|
||||
|
||||
elf: $(ELF)
|
||||
bin: $(BIN)
|
||||
hex: $(HEX)
|
||||
list: $(LIST)
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
$(STARTUP): $(INC_DIR)/startup/vector.c
|
||||
$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -o $@ -c $<
|
||||
|
||||
$(VERSION_FILE): *.[ch]
|
||||
@echo " Generate version: $(NEXTVER) for date $(BUILDDATE)"
|
||||
@sed -i "s/#define BUILD_NUMBER.*/#define BUILD_NUMBER \"$(NEXTVER)\"/" $(VERSION_FILE)
|
||||
@sed -i "s/#define BUILD_DATE.*/#define BUILD_DATE \"$(BUILDDATE)\"/" $(VERSION_FILE)
|
||||
|
||||
$(OBJDIR)/proto.o: proto.c $(VERSION_FILE)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@echo " CC $<"
|
||||
$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -o $@ -c $<
|
||||
|
||||
$(BIN): $(ELF)
|
||||
@echo " OBJCOPY $(BIN)"
|
||||
$(OBJCOPY) -Obinary $(ELF) $(BIN)
|
||||
|
||||
$(HEX): $(ELF)
|
||||
@echo " OBJCOPY $(HEX)"
|
||||
$(OBJCOPY) -Oihex $(ELF) $(HEX)
|
||||
|
||||
$(LIST): $(ELF)
|
||||
@echo " OBJDUMP $(LIST)"
|
||||
$(OBJDUMP) -S $(ELF) > $(LIST)
|
||||
|
||||
$(ELF): $(OBJDIR) $(OBJS)
|
||||
@echo " LD $(ELF)"
|
||||
$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $(ELF)
|
||||
|
||||
size: $(ELF)
|
||||
$(SIZE) $(ELF)
|
||||
|
||||
clean:
|
||||
@echo " CLEAN"
|
||||
@rm -rf $(OBJDIR) 2>/dev/null || true
|
||||
|
||||
|
||||
flash: $(BIN)
|
||||
@echo " FLASH $(BIN)"
|
||||
$(STFLASH) write $(BIN) 0x8000000
|
||||
|
||||
boot: $(BIN)
|
||||
@echo " LOAD $(BIN) through bootloader"
|
||||
$(STBOOT) -b$(BOOTSPEED) $(BOOTPORT) -w $(BIN)
|
||||
|
||||
dfuboot: $(BIN)
|
||||
@echo " LOAD $(BIN) THROUGH DFU"
|
||||
$(DFUUTIL) -a0 -D $(BIN) -s 0x08000000
|
||||
|
||||
.PHONY: clean flash boot
|
||||
24
F1:F103/Canon_managing_device/Readme
Normal file
24
F1:F103/Canon_managing_device/Readme
Normal file
@ -0,0 +1,24 @@
|
||||
Canon lens management.
|
||||
|
||||
Protocol have a string form, each string ends with '\n'. You should wait an answer for previous command before sending next,
|
||||
or have risk to miss all the rest commands in one packet.
|
||||
|
||||
USB commands:
|
||||
|
||||
0 - move to smallest foc value (e.g. 2.5m)
|
||||
1 - move to largest foc value (e.g. infinity)
|
||||
d - open/close diaphragm by 1 step (+/-), open/close fully (o/c) (no way to know it current status)
|
||||
f - get focus state or move it to given relative position
|
||||
h - turn on hand focus management
|
||||
i - get lens information
|
||||
l - get lens model
|
||||
r - get regulators' state
|
||||
debugging commands:
|
||||
F - change SPI flags (F f val), f== l-LSBFIRST, b-BR [18MHz/2^(b+1)], p-CPOL, h-CPHA
|
||||
G - get SPI status
|
||||
I - reinit SPI
|
||||
R - software reset
|
||||
S - send data over SPI
|
||||
T - show Tms value
|
||||
|
||||
|
||||
215
F1:F103/Canon_managing_device/canon.c
Normal file
215
F1:F103/Canon_managing_device/canon.c
Normal file
@ -0,0 +1,215 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "canon.h"
|
||||
#include "hardware.h"
|
||||
#include "proto.h"
|
||||
#include "spi.h"
|
||||
#include "usb.h"
|
||||
|
||||
#define CU(a) ((const uint8_t*)a)
|
||||
|
||||
#if 0
|
||||
typedef struct{
|
||||
canon_commands cmd; // command code
|
||||
int zeros; // amount of zeros after command
|
||||
} command;
|
||||
|
||||
static command commands[] = {
|
||||
{CANON_LONGID, 11},
|
||||
{CANON_ID, 6},
|
||||
{CANON_REPDIA, 1},
|
||||
{CANON_FSTOP, 1},
|
||||
{CANON_FMIN, 1},
|
||||
{CANON_FMAX, 1},
|
||||
{CANON_POWERON, 1},
|
||||
{CANON_POWEROFF, 1},
|
||||
{CANON_POLL, 1},
|
||||
{CANON_DIAPHRAGM, 2},
|
||||
{CANON_FOCMOVE, 2},
|
||||
{CANON_FOCBYHANDS, 1},
|
||||
{CANON_GETINFO, 15},
|
||||
{CANON_GETREG, 2},
|
||||
{CANON_GETFOCLIM, 2},
|
||||
{CANON_GETDIAL, 2},
|
||||
{CANON_GETFOCM, 4},
|
||||
};
|
||||
#endif
|
||||
|
||||
// command buffer (buf[0] == last command sent)
|
||||
static uint8_t buf[SPIBUFSZ] = {0}, ready = 0;
|
||||
|
||||
static void canon_read(uint8_t cmd, uint8_t zeroz){
|
||||
if(zeroz > MAXCMDLEN - 1) return;
|
||||
++zeroz;
|
||||
*((uint32_t*)buf) = 0;
|
||||
buf[0] = cmd;
|
||||
SPI_transmit(buf, zeroz);
|
||||
}/*
|
||||
static void canon_writeu8(uint8_t cmd, uint8_t u){
|
||||
*((uint32_t*)buf) = 0;
|
||||
buf[0] = cmd; buf[1] = u;
|
||||
SPI_transmit(buf, 2);
|
||||
}*/
|
||||
static void canon_writeu16(uint8_t cmd, uint16_t u){
|
||||
*((uint32_t*)buf) = 0;
|
||||
buf[0] = cmd; buf[1] = u >> 8; buf[2] = u & 0xff;
|
||||
SPI_transmit(buf, 3);
|
||||
}
|
||||
|
||||
static void canon_poll(){
|
||||
ready = 0;
|
||||
canon_read(CANON_POLL, 0);
|
||||
}
|
||||
|
||||
// turn on power and send ack
|
||||
void canon_init(){
|
||||
ready = 0;
|
||||
canon_read(CANON_ID, 31);
|
||||
}
|
||||
|
||||
// send over USB 16-bit unsigned
|
||||
static void printu16(uint8_t *b){
|
||||
USB_send(u2str((b[1] << 8) | b[2]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief canon_proc - check incoming SPI messages
|
||||
*/
|
||||
void canon_proc(){
|
||||
uint8_t lastcmd = buf[0]; // last command sent
|
||||
uint32_t uval;
|
||||
uint8_t x;
|
||||
uint8_t *rbuf = SPI_receive(&x);
|
||||
if(!rbuf) return;
|
||||
#ifdef EBUG
|
||||
//if(lastcmd != CANON_POLL){
|
||||
USB_send("SPI receive: ");
|
||||
for(uint8_t i = 0; i < x; ++i){
|
||||
if(i) USB_send(", ");
|
||||
USB_send(u2hexstr(rbuf[i]));
|
||||
}
|
||||
USB_send("\n");
|
||||
//}
|
||||
#endif
|
||||
int need2poll = 0;
|
||||
switch (lastcmd){
|
||||
case CANON_LONGID: // something
|
||||
// need2poll = 0;
|
||||
break;
|
||||
case CANON_ID: // got ID -> turn on power
|
||||
canon_read(CANON_POWERON, 1);
|
||||
break;
|
||||
/*case CANON_POWERON:
|
||||
;
|
||||
break;*/
|
||||
case CANON_POLL:
|
||||
if(rbuf[0] == CANON_POLLANS){
|
||||
canon_read(CANON_LONGID, 0);
|
||||
ready = 1;
|
||||
#ifdef EBUG
|
||||
USB_send("Ready!\n");
|
||||
#endif
|
||||
}else need2poll = 1;
|
||||
break;
|
||||
case CANON_GETINFO:
|
||||
USB_send("Info="); for(int i = 1; i < 7; ++i){
|
||||
USB_send(u2hexstr(rbuf[i])); USB_send(" ");
|
||||
}
|
||||
USB_send("\n");
|
||||
break;
|
||||
case CANON_GETREG:
|
||||
USB_send("Reg="); USB_send(u2hexstr((rbuf[1] << 8) | rbuf[2])); USB_send("\n");
|
||||
break;
|
||||
case CANON_GETMODEL:
|
||||
USB_send("Lens="); printu16(rbuf); USB_send("\n");
|
||||
break;
|
||||
case CANON_GETDIAL:
|
||||
USB_send("Fsteps="); printu16(rbuf); USB_send("\n");
|
||||
//canon_read(CANON_GETFOCM, 4);
|
||||
break;
|
||||
case CANON_GETFOCM: // don't work @EF200
|
||||
uval = (rbuf[1] << 24) | (rbuf[2] << 16) | (rbuf[3] << 8) | rbuf[4];
|
||||
USB_send("Fval="); USB_send(u2str(uval)); USB_send("\n");
|
||||
break;
|
||||
default:
|
||||
need2poll = 1; // poll after any other command
|
||||
break;
|
||||
}
|
||||
if(need2poll) canon_poll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief canon_diaphragm - run comands
|
||||
* @param command: open/close diaphragm by 1 step (+/-), open/close fully (o/c)
|
||||
* @return 0 if success or error code (1 - not ready, 2 - bad command)
|
||||
*/
|
||||
int canon_diaphragm(char command){
|
||||
if(!ready) return 1;
|
||||
int16_t val = 0;
|
||||
switch(command){
|
||||
case '+':
|
||||
val = -1;
|
||||
break;
|
||||
case '-':
|
||||
val = 1;
|
||||
break;
|
||||
case 'o':
|
||||
case 'O':
|
||||
val = 128;
|
||||
break;
|
||||
case 'c':
|
||||
case 'C':
|
||||
val = 127;
|
||||
break;
|
||||
default:
|
||||
return 2; // unknown command
|
||||
}
|
||||
canon_writeu16(CANON_DIAPHRAGM, (uint16_t)(val << 8));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int canon_focus(int16_t val){
|
||||
if(!ready) return 1;
|
||||
if(val == 0) canon_read(CANON_GETDIAL, 2);
|
||||
else canon_writeu16(CANON_FOCMOVE, val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int canon_sendcmd(uint8_t cmd){
|
||||
if(!ready) return 1;
|
||||
canon_read(cmd, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void canon_setlastcmd(uint8_t x){
|
||||
buf[0] = x;
|
||||
}
|
||||
|
||||
// acquire 16bit value
|
||||
int canon_asku16(uint8_t cmd){
|
||||
if(!ready) return 1;
|
||||
canon_read(cmd, 2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int canon_getinfo(){
|
||||
if(!ready) return 1;
|
||||
canon_read(CANON_GETINFO, 6);
|
||||
return 0;
|
||||
}
|
||||
58
F1:F103/Canon_managing_device/canon.h
Normal file
58
F1:F103/Canon_managing_device/canon.h
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stm32f1.h>
|
||||
|
||||
// all data sent in big-endian format
|
||||
|
||||
// max length of commands
|
||||
#define MAXCMDLEN (32)
|
||||
|
||||
// answer for cmd "POLL"
|
||||
#define CANON_POLLANS (0xaa)
|
||||
|
||||
typedef enum{
|
||||
CANON_LONGID = 0x00, // long ID ???
|
||||
CANON_ID = 0x01, // lens ID and other info ???
|
||||
CANON_REPDIA = 0x02, // repeat last diaphragm change
|
||||
CANON_FSTOP = 0x04, // stop focus changing
|
||||
CANON_FMAX = 0x05, // set Foc to max
|
||||
CANON_FMIN = 0x06, // =//= min
|
||||
CANON_POWERON = 0x07, // turn on motors' power
|
||||
CANON_POWEROFF = 0x08, // turn off power
|
||||
CANON_POLL = 0x0a, // bysu poll (ans 0xaa when ready or last command code)
|
||||
CANON_DIAPHRAGM = 0x13, // open/close diaphragm by given (int8_t) value of steps
|
||||
CANON_FOCMOVE = 0x44, // move focus dial by given amount of steps (int16)
|
||||
CANON_FOCBYHANDS= 0x5e, // turn on focus move by hands (to turn off send 4,5 or 6)
|
||||
CANON_GETINFO = 0x80, // get information
|
||||
CANON_GETREG = 0x90, // get regulators' state
|
||||
CANON_GETMODEL = 0xa0, // get lens (e.g. 200 == LX200)
|
||||
CANON_GETDIAL = 0xc0, // get focus dial position in steps
|
||||
CANON_GETFOCM = 0xc2, // get focus position in meters (not for all lenses)
|
||||
} canon_commands;
|
||||
|
||||
void canon_init();
|
||||
void canon_proc();
|
||||
int canon_diaphragm(char command);
|
||||
int canon_focus(int16_t val);
|
||||
int canon_sendcmd(uint8_t cmd);
|
||||
int canon_asku16(uint8_t cmd);
|
||||
void canon_setlastcmd(uint8_t x);
|
||||
int canon_getinfo();
|
||||
BIN
F1:F103/Canon_managing_device/canonusb.bin
Executable file
BIN
F1:F103/Canon_managing_device/canonusb.bin
Executable file
Binary file not shown.
39
F1:F103/Canon_managing_device/hardware.c
Normal file
39
F1:F103/Canon_managing_device/hardware.c
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "hardware.h"
|
||||
|
||||
static inline void gpio_setup(){
|
||||
// Set APB2 clock to 72/4=18MHz
|
||||
RCC->CFGR = (RCC->CFGR & ~RCC_CFGR_PPRE2) | RCC_CFGR_PPRE2_DIV4;
|
||||
// Enable clocks to the GPIO subsystems, turn on AFIO clocking to disable SWD/JTAG
|
||||
RCC->APB2ENR = RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPCEN | RCC_APB2ENR_AFIOEN;
|
||||
AFIO->MAPR = AFIO_MAPR_SWJ_CFG_JTAGDISABLE; // for PA15 - USB pullup
|
||||
// Set led as opendrain output
|
||||
GPIOC->CRH = CRH(13, CNF_ODOUTPUT | MODE_SLOW);
|
||||
// setup SPI GPIO - alternate function PP (PA5 - SCK, PA6 - MISO, PA7 - MOSI)
|
||||
GPIOA->CRL = CRL(5, CNF_AFPP|MODE_FAST) | CRL(6, CNF_FLINPUT) | CRL(7, CNF_AFPP|MODE_FAST);
|
||||
// USB pullup (PA15) - pushpull output
|
||||
USBPU_OFF();
|
||||
GPIOA->CRH = CRH(15, CNF_PPOUTPUT | MODE_SLOW);
|
||||
}
|
||||
|
||||
void hw_setup(){
|
||||
gpio_setup();
|
||||
}
|
||||
|
||||
56
F1:F103/Canon_managing_device/hardware.h
Normal file
56
F1:F103/Canon_managing_device/hardware.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __HARDWARE_H__
|
||||
#define __HARDWARE_H__
|
||||
|
||||
#include <stm32f1.h>
|
||||
|
||||
// LED0 - PC13 (bluepill), blinking each second
|
||||
#define LED0_port GPIOC
|
||||
#define LED0_pin (1<<13)
|
||||
|
||||
#define LED_blink(x) pin_toggle(x ## _port, x ## _pin)
|
||||
#define LED_on(x) pin_clear(x ## _port, x ## _pin)
|
||||
#define LED_off(x) pin_set(x ## _port, x ## _pin)
|
||||
|
||||
#define USBPU_port GPIOA
|
||||
#define USBPU_pin (1<<15)
|
||||
#define USBPU_ON() pin_set(USBPU_port, USBPU_pin)
|
||||
#define USBPU_OFF() pin_clear(USBPU_port, USBPU_pin)
|
||||
|
||||
extern volatile uint32_t Tms;
|
||||
|
||||
void hw_setup();
|
||||
|
||||
// SPI RX/TX max len
|
||||
#define SPIBUFSZ (32)
|
||||
|
||||
#define DMA_SPI_Rx_IRQ DMA1_Channel2_IRQn
|
||||
#define SPIx SPI1
|
||||
#define SPI_APB2 RCC_APB2ENR_SPI1EN
|
||||
#define DMA_SPI DMA1
|
||||
#define DMA_SPI_AHBENR RCC_AHBENR_DMA1EN
|
||||
#define DMA_SPI_TCIF DMA_ISR_TCIF2
|
||||
#define DMA_SPI_CTCIF DMA_IFCR_CTCIF2
|
||||
#define DMA_SPI_TxChannel DMA1_Channel3
|
||||
#define DMA_SPI_RxChannel DMA1_Channel2
|
||||
#define DMA_SPI_Rx_ISR dma1_channel2_isr
|
||||
|
||||
#endif // __HARDWARE_H__
|
||||
@ -0,0 +1,94 @@
|
||||
"Source:","/home/eddy/Docs/SAO/ELECTRONICS/STM32/F1-srcs/Canon_managing_device/kicad/Canon_manage/Canon_manage.kicad_sch"
|
||||
"Date:","Чт 22 сен 2022 14:54:59"
|
||||
"Tool:","Eeschema 6.0.5"
|
||||
"Generator:","/usr/local/share/kicad/plugins/bom_csv_grouped_by_value.py"
|
||||
"Component Count:","60"
|
||||
|
||||
"Individual Components:"
|
||||
|
||||
"Item","Qty","Reference(s)","Value","LibPart","Footprint","Datasheet"
|
||||
"","","C1","12","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C2","12","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C3","1u","Device:C","Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder","~"
|
||||
"","","C4","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C5","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C6","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C7","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C8","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"","","C9","47u","Device:C_Polarized","Capacitor_Tantalum_SMD:CP_EIA-6032-28_Kemet-C_Pad2.25x2.35mm_HandSolder","~"
|
||||
"","","D1","SP0504BAHT","Power_Protection:SP0504BAHT","Package_TO_SOT_SMD:SOT-23-5","http://www.littelfuse.com/~/media/files/littelfuse/technical%20resources/documents/data%20sheets/sp05xxba.pdf"
|
||||
"","","J1","SWD","Connector:Conn_01x06_Female","Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical","~"
|
||||
"","","J2","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J3","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J4","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J5","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J6","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J7","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J8","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J9","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J10","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J11","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J12","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J13","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J14","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J15","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J16","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J17","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J18","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J19","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J20","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J21","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J22","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J23","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J24","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J25","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J26","5v","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"","","J27","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J28","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J29","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J30","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J31","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J32","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J33","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J34","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"","","J35","GND","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"","","J36","3v3","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"","","J37","USB_C_Receptacle","Connector:USB_C_Receptacle","Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12","https://www.usb.org/sites/default/files/documents/usb_type-c.zip"
|
||||
"","","R1","10k","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R2","47","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R3","47","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R4","47","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R5","47","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R6","510","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R7","22","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R8","22","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","R9","510","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"","","U1","STM32F103C6Tx","MCU_ST_STM32F1:STM32F103C6Tx","Package_QFP:LQFP-48_7x7mm_P0.5mm","http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00210843.pdf"
|
||||
"","","U2","LM1117-3.3","Regulator_Linear:LM1117-3.3","Package_TO_SOT_SMD:SOT-223-3_TabPin2","http://www.ti.com/lit/ds/symlink/lm1117.pdf"
|
||||
"","","U3","USBLC6-2SC6","Power_Protection:USBLC6-2SC6","Package_TO_SOT_SMD:SOT-23-6_Handsoldering","https://www.st.com/resource/en/datasheet/usblc6-2.pdf"
|
||||
"","","Y1","8MHz","Device:Crystal","Crystal:Crystal_HC49-U_Vertical","~"
|
||||
|
||||
|
||||
|
||||
"Collated Components:"
|
||||
|
||||
"Item","Qty","Reference(s)","Value","LibPart","Footprint","Datasheet"
|
||||
"1","2","C1, C2","12","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"2","1","C3","1u","Device:C","Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder","~"
|
||||
"3","5","C4, C5, C6, C7, C8","0.1","Device:C","Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","~"
|
||||
"4","1","C9","47u","Device:C_Polarized","Capacitor_Tantalum_SMD:CP_EIA-6032-28_Kemet-C_Pad2.25x2.35mm_HandSolder","~"
|
||||
"5","1","D1","SP0504BAHT","Power_Protection:SP0504BAHT","Package_TO_SOT_SMD:SOT-23-5","http://www.littelfuse.com/~/media/files/littelfuse/technical%20resources/documents/data%20sheets/sp05xxba.pdf"
|
||||
"6","1","J1","SWD","Connector:Conn_01x06_Female","Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical","~"
|
||||
"7","32","J2, J3, J4, J5, J6, J7, J8, J9, J10, J11, J12, J13, J14, J15, J16, J17, J18, J19, J20, J21, J22, J23, J24, J25, J27, J28, J29, J30, J31, J32, J33, J34","Conn_01x01_Male","Connector:Conn_01x01_Male","Connector_PinHeader_1.00mm:PinHeader_1x01_P1.00mm_Vertical","~"
|
||||
"8","1","J26","5v","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"9","1","J35","GND","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"10","1","J36","3v3","Connector_Generic:Conn_01x01","Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical","~"
|
||||
"11","1","J37","USB_C_Receptacle","Connector:USB_C_Receptacle","Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12","https://www.usb.org/sites/default/files/documents/usb_type-c.zip"
|
||||
"12","1","R1","10k","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"13","4","R2, R3, R4, R5","47","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"14","2","R6, R9","510","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"15","2","R7, R8","22","Device:R","Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","~"
|
||||
"16","1","U1","STM32F103C6Tx","MCU_ST_STM32F1:STM32F103C6Tx","Package_QFP:LQFP-48_7x7mm_P0.5mm","http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00210843.pdf"
|
||||
"17","1","U2","LM1117-3.3","Regulator_Linear:LM1117-3.3","Package_TO_SOT_SMD:SOT-223-3_TabPin2","http://www.ti.com/lit/ds/symlink/lm1117.pdf"
|
||||
"18","1","U3","USBLC6-2SC6","Power_Protection:USBLC6-2SC6","Package_TO_SOT_SMD:SOT-23-6_Handsoldering","https://www.st.com/resource/en/datasheet/usblc6-2.pdf"
|
||||
"19","1","Y1","8MHz","Device:Crystal","Crystal:Crystal_HC49-U_Vertical","~"
|
||||
|
Can't render this file because it has a wrong number of fields in line 7.
|
19293
F1:F103/Canon_managing_device/kicad/Canon_manage/Canon_manage.kicad_pcb
Normal file
19293
F1:F103/Canon_managing_device/kicad/Canon_manage/Canon_manage.kicad_pcb
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,75 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 31,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": false,
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"ratsnest_display_mode": 0,
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": true,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
],
|
||||
"visible_layers": "7fffeff_80000001",
|
||||
"zone_display_mode": 1
|
||||
},
|
||||
"meta": {
|
||||
"filename": "Canon_manage.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,445 @@
|
||||
{
|
||||
"board": {
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.09999999999999999,
|
||||
"copper_line_width": 0.19999999999999998,
|
||||
"copper_text_italic": false,
|
||||
"copper_text_size_h": 1.5,
|
||||
"copper_text_size_v": 1.5,
|
||||
"copper_text_thickness": 0.3,
|
||||
"copper_text_upright": false,
|
||||
"courtyard_line_width": 0.049999999999999996,
|
||||
"dimension_precision": 4,
|
||||
"dimension_units": 3,
|
||||
"dimensions": {
|
||||
"arrow_length": 1270000,
|
||||
"extension_offset": 500000,
|
||||
"keep_text_aligned": true,
|
||||
"suppress_zeroes": false,
|
||||
"text_position": 0,
|
||||
"units_format": 1
|
||||
},
|
||||
"fab_line_width": 0.09999999999999999,
|
||||
"fab_text_italic": false,
|
||||
"fab_text_size_h": 1.0,
|
||||
"fab_text_size_v": 1.0,
|
||||
"fab_text_thickness": 0.15,
|
||||
"fab_text_upright": false,
|
||||
"other_line_width": 0.15,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": false,
|
||||
"pads": {
|
||||
"drill": 0.762,
|
||||
"height": 1.524,
|
||||
"width": 1.524
|
||||
},
|
||||
"silk_line_width": 0.15,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.15,
|
||||
"silk_text_upright": false,
|
||||
"zones": {
|
||||
"45_degree_only": false,
|
||||
"min_clearance": 0.508
|
||||
}
|
||||
},
|
||||
"diff_pair_dimensions": [
|
||||
{
|
||||
"gap": 0.0,
|
||||
"via_gap": 0.0,
|
||||
"width": 0.0
|
||||
}
|
||||
],
|
||||
"drc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "error",
|
||||
"copper_edge_clearance": "error",
|
||||
"courtyards_overlap": "warning",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "error",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint_type_mismatch": "error",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
"missing_footprint": "warning",
|
||||
"net_conflict": "warning",
|
||||
"npth_inside_courtyard": "ignore",
|
||||
"padstack": "error",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_over_copper": "warning",
|
||||
"silk_overlap": "warning",
|
||||
"skew_out_of_range": "error",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "warning",
|
||||
"track_width": "error",
|
||||
"tracks_crossing": "error",
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zone_has_empty_net": "error",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
"allow_blind_buried_vias": false,
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.0,
|
||||
"min_copper_edge_clearance": 0.19999999999999998,
|
||||
"min_hole_clearance": 0.25,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.19999999999999998,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_through_hole_diameter": 0.3,
|
||||
"min_track_width": 0.19999999999999998,
|
||||
"min_via_annular_width": 0.049999999999999996,
|
||||
"min_via_diameter": 0.39999999999999997,
|
||||
"solder_mask_clearance": 0.0,
|
||||
"solder_mask_min_width": 0.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.2,
|
||||
0.25,
|
||||
0.5,
|
||||
1.0
|
||||
],
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 0.0,
|
||||
"drill": 0.0
|
||||
},
|
||||
{
|
||||
"diameter": 0.8,
|
||||
"drill": 0.5
|
||||
},
|
||||
{
|
||||
"diameter": 1.2,
|
||||
"drill": 0.8
|
||||
}
|
||||
],
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
"equivalence_files": []
|
||||
},
|
||||
"erc": {
|
||||
"erc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"pin_map": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"pinned_footprint_libs": [],
|
||||
"pinned_symbol_libs": []
|
||||
},
|
||||
"meta": {
|
||||
"filename": "Canon_manage.kicad_pro",
|
||||
"version": 1
|
||||
},
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"clearance": 0.1,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
"line_style": 0,
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Default",
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.2,
|
||||
"via_diameter": 0.8,
|
||||
"via_drill": 0.5,
|
||||
"wire_width": 6.0
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"net_colors": null
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
"gencad": "",
|
||||
"idf": "",
|
||||
"netlist": "",
|
||||
"specctra_dsn": "",
|
||||
"step": "",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
"intersheets_ref_own_page": false,
|
||||
"intersheets_ref_prefix": "",
|
||||
"intersheets_ref_short": false,
|
||||
"intersheets_ref_show": false,
|
||||
"intersheets_ref_suffix": "",
|
||||
"junction_size_choice": 3,
|
||||
"label_size_ratio": 0.375,
|
||||
"pin_symbol_size": 25.0,
|
||||
"text_offset_ratio": 0.15
|
||||
},
|
||||
"legacy_lib_dir": "",
|
||||
"legacy_lib_list": [],
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"net_format_name": "",
|
||||
"ngspice": {
|
||||
"fix_include_paths": true,
|
||||
"fix_passive_vals": false,
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"model_mode": 0,
|
||||
"workbook_filename": ""
|
||||
},
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
"sheets": [
|
||||
[
|
||||
"56438dee-19cd-4574-afb4-194a39bf2855",
|
||||
""
|
||||
]
|
||||
],
|
||||
"text_variables": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
85989
F1:F103/Canon_managing_device/kicad/Canon_manage/fp-info-cache
Normal file
85989
F1:F103/Canon_managing_device/kicad/Canon_manage/fp-info-cache
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,239 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Soldermask,Bot*%
|
||||
%TF.FilePolarity,Negative*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
G04 Aperture macros list*
|
||||
%AMRoundRect*
|
||||
0 Rectangle with rounded corners*
|
||||
0 $1 Rounding radius*
|
||||
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
|
||||
0 Add a 4 corners polygon primitive as box body*
|
||||
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
|
||||
0 Add four circle primitives for the rounded corners*
|
||||
1,1,$1+$1,$2,$3*
|
||||
1,1,$1+$1,$4,$5*
|
||||
1,1,$1+$1,$6,$7*
|
||||
1,1,$1+$1,$8,$9*
|
||||
0 Add four rect primitives between the rounded corners*
|
||||
20,1,$1+$1,$2,$3,$4,$5,0*
|
||||
20,1,$1+$1,$4,$5,$6,$7,0*
|
||||
20,1,$1+$1,$6,$7,$8,$9,0*
|
||||
20,1,$1+$1,$8,$9,$2,$3,0*%
|
||||
G04 Aperture macros list end*
|
||||
%ADD10R,0.850000X0.850000*%
|
||||
%ADD11C,3.200000*%
|
||||
%ADD12C,0.650000*%
|
||||
%ADD13O,1.000000X2.100000*%
|
||||
%ADD14O,1.000000X1.600000*%
|
||||
%ADD15R,1.700000X1.700000*%
|
||||
%ADD16O,0.850000X0.850000*%
|
||||
%ADD17RoundRect,0.237500X0.250000X0.237500X-0.250000X0.237500X-0.250000X-0.237500X0.250000X-0.237500X0*%
|
||||
%ADD18RoundRect,0.237500X0.300000X0.237500X-0.300000X0.237500X-0.300000X-0.237500X0.300000X-0.237500X0*%
|
||||
%ADD19RoundRect,0.237500X-0.300000X-0.237500X0.300000X-0.237500X0.300000X0.237500X-0.300000X0.237500X0*%
|
||||
%ADD20R,1.500000X2.000000*%
|
||||
%ADD21R,3.800000X2.000000*%
|
||||
%ADD22C,1.500000*%
|
||||
%ADD23RoundRect,0.250000X0.337500X0.475000X-0.337500X0.475000X-0.337500X-0.475000X0.337500X-0.475000X0*%
|
||||
%ADD24RoundRect,0.237500X0.237500X-0.300000X0.237500X0.300000X-0.237500X0.300000X-0.237500X-0.300000X0*%
|
||||
%ADD25RoundRect,0.237500X-0.250000X-0.237500X0.250000X-0.237500X0.250000X0.237500X-0.250000X0.237500X0*%
|
||||
%ADD26RoundRect,0.250000X-0.875000X-0.925000X0.875000X-0.925000X0.875000X0.925000X-0.875000X0.925000X0*%
|
||||
%ADD27RoundRect,0.075000X0.075000X-0.662500X0.075000X0.662500X-0.075000X0.662500X-0.075000X-0.662500X0*%
|
||||
%ADD28RoundRect,0.075000X0.662500X-0.075000X0.662500X0.075000X-0.662500X0.075000X-0.662500X-0.075000X0*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
%TO.C,J6*%
|
||||
X103980000Y-64570000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A1*%
|
||||
X125880000Y-63225000D03*
|
||||
%TD*%
|
||||
%TO.C,REF\u002A\u002A2*%
|
||||
X86050000Y-110665000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J3*%
|
||||
X111930000Y-65330000D03*
|
||||
%TD*%
|
||||
%TO.C,J4*%
|
||||
X109640000Y-64820000D03*
|
||||
%TD*%
|
||||
%TO.C,J8*%
|
||||
X99500000Y-65500000D03*
|
||||
%TD*%
|
||||
%TO.C,J9*%
|
||||
X97310000Y-66260000D03*
|
||||
%TD*%
|
||||
D12*
|
||||
%TO.C,J37*%
|
||||
X102720000Y-54070000D03*
|
||||
X108500000Y-54070000D03*
|
||||
D13*
|
||||
X101290000Y-54600000D03*
|
||||
X109930000Y-54600000D03*
|
||||
D14*
|
||||
X109930000Y-50420000D03*
|
||||
X101290000Y-50420000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A*%
|
||||
X86050000Y-63225000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J2*%
|
||||
X114040000Y-66090000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A3*%
|
||||
X125880000Y-110665000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J7*%
|
||||
X101700000Y-64910000D03*
|
||||
%TD*%
|
||||
%TO.C,J5*%
|
||||
X106270000Y-64490000D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,J35*%
|
||||
X138633200Y-89560400D03*
|
||||
%TD*%
|
||||
%TO.C,J26*%
|
||||
X127609600Y-72237600D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J1*%
|
||||
X70586600Y-85188800D03*
|
||||
D16*
|
||||
X70586600Y-86188800D03*
|
||||
X70586600Y-87188800D03*
|
||||
X70586600Y-88188800D03*
|
||||
X70586600Y-89188800D03*
|
||||
X70586600Y-90188800D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,J36*%
|
||||
X133350000Y-89560400D03*
|
||||
%TD*%
|
||||
D17*
|
||||
%TO.C,R6*%
|
||||
X100431600Y-59105800D03*
|
||||
X98606600Y-59105800D03*
|
||||
%TD*%
|
||||
D18*
|
||||
%TO.C,C5*%
|
||||
X73784800Y-81965800D03*
|
||||
X72059800Y-81965800D03*
|
||||
%TD*%
|
||||
D19*
|
||||
%TO.C,C8*%
|
||||
X75618000Y-92938600D03*
|
||||
X77343000Y-92938600D03*
|
||||
%TD*%
|
||||
D20*
|
||||
%TO.C,U2*%
|
||||
X131227800Y-72135600D03*
|
||||
X133527800Y-72135600D03*
|
||||
D21*
|
||||
X133527800Y-78435600D03*
|
||||
D20*
|
||||
X135827800Y-72135600D03*
|
||||
%TD*%
|
||||
D22*
|
||||
%TO.C,Y1*%
|
||||
X81647200Y-96600000D03*
|
||||
X76767200Y-96600000D03*
|
||||
%TD*%
|
||||
D23*
|
||||
%TO.C,C3*%
|
||||
X134518400Y-69392800D03*
|
||||
X132443400Y-69392800D03*
|
||||
%TD*%
|
||||
D24*
|
||||
%TO.C,C4*%
|
||||
X82677000Y-82522400D03*
|
||||
X82677000Y-80797400D03*
|
||||
%TD*%
|
||||
D25*
|
||||
%TO.C,R9*%
|
||||
X109096800Y-58470800D03*
|
||||
X110921800Y-58470800D03*
|
||||
%TD*%
|
||||
D19*
|
||||
%TO.C,C6*%
|
||||
X82755400Y-91160600D03*
|
||||
X84480400Y-91160600D03*
|
||||
%TD*%
|
||||
%TO.C,C7*%
|
||||
X133580800Y-81203800D03*
|
||||
X135305800Y-81203800D03*
|
||||
%TD*%
|
||||
D26*
|
||||
%TO.C,C9*%
|
||||
X133558600Y-84658200D03*
|
||||
X138658600Y-84658200D03*
|
||||
%TD*%
|
||||
D27*
|
||||
%TO.C,U1*%
|
||||
X80837500Y-90852500D03*
|
||||
X80337500Y-90852500D03*
|
||||
X79837500Y-90852500D03*
|
||||
X79337500Y-90852500D03*
|
||||
X78837500Y-90852500D03*
|
||||
X78337500Y-90852500D03*
|
||||
X77837500Y-90852500D03*
|
||||
X77337500Y-90852500D03*
|
||||
X76837500Y-90852500D03*
|
||||
X76337500Y-90852500D03*
|
||||
X75837500Y-90852500D03*
|
||||
X75337500Y-90852500D03*
|
||||
D28*
|
||||
X73925000Y-89440000D03*
|
||||
X73925000Y-88940000D03*
|
||||
X73925000Y-88440000D03*
|
||||
X73925000Y-87940000D03*
|
||||
X73925000Y-87440000D03*
|
||||
X73925000Y-86940000D03*
|
||||
X73925000Y-86440000D03*
|
||||
X73925000Y-85940000D03*
|
||||
X73925000Y-85440000D03*
|
||||
X73925000Y-84940000D03*
|
||||
X73925000Y-84440000D03*
|
||||
X73925000Y-83940000D03*
|
||||
D27*
|
||||
X75337500Y-82527500D03*
|
||||
X75837500Y-82527500D03*
|
||||
X76337500Y-82527500D03*
|
||||
X76837500Y-82527500D03*
|
||||
X77337500Y-82527500D03*
|
||||
X77837500Y-82527500D03*
|
||||
X78337500Y-82527500D03*
|
||||
X78837500Y-82527500D03*
|
||||
X79337500Y-82527500D03*
|
||||
X79837500Y-82527500D03*
|
||||
X80337500Y-82527500D03*
|
||||
X80837500Y-82527500D03*
|
||||
D28*
|
||||
X82250000Y-83940000D03*
|
||||
X82250000Y-84440000D03*
|
||||
X82250000Y-84940000D03*
|
||||
X82250000Y-85440000D03*
|
||||
X82250000Y-85940000D03*
|
||||
X82250000Y-86440000D03*
|
||||
X82250000Y-86940000D03*
|
||||
X82250000Y-87440000D03*
|
||||
X82250000Y-87940000D03*
|
||||
X82250000Y-88440000D03*
|
||||
X82250000Y-88940000D03*
|
||||
X82250000Y-89440000D03*
|
||||
%TD*%
|
||||
M02*
|
||||
@ -0,0 +1,151 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Paste,Bot*%
|
||||
%TF.FilePolarity,Positive*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
G04 Aperture macros list*
|
||||
%AMRoundRect*
|
||||
0 Rectangle with rounded corners*
|
||||
0 $1 Rounding radius*
|
||||
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
|
||||
0 Add a 4 corners polygon primitive as box body*
|
||||
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
|
||||
0 Add four circle primitives for the rounded corners*
|
||||
1,1,$1+$1,$2,$3*
|
||||
1,1,$1+$1,$4,$5*
|
||||
1,1,$1+$1,$6,$7*
|
||||
1,1,$1+$1,$8,$9*
|
||||
0 Add four rect primitives between the rounded corners*
|
||||
20,1,$1+$1,$2,$3,$4,$5,0*
|
||||
20,1,$1+$1,$4,$5,$6,$7,0*
|
||||
20,1,$1+$1,$6,$7,$8,$9,0*
|
||||
20,1,$1+$1,$8,$9,$2,$3,0*%
|
||||
G04 Aperture macros list end*
|
||||
%ADD10RoundRect,0.237500X0.250000X0.237500X-0.250000X0.237500X-0.250000X-0.237500X0.250000X-0.237500X0*%
|
||||
%ADD11RoundRect,0.237500X0.300000X0.237500X-0.300000X0.237500X-0.300000X-0.237500X0.300000X-0.237500X0*%
|
||||
%ADD12RoundRect,0.237500X-0.300000X-0.237500X0.300000X-0.237500X0.300000X0.237500X-0.300000X0.237500X0*%
|
||||
%ADD13R,1.500000X2.000000*%
|
||||
%ADD14R,3.800000X2.000000*%
|
||||
%ADD15RoundRect,0.250000X0.337500X0.475000X-0.337500X0.475000X-0.337500X-0.475000X0.337500X-0.475000X0*%
|
||||
%ADD16RoundRect,0.237500X0.237500X-0.300000X0.237500X0.300000X-0.237500X0.300000X-0.237500X-0.300000X0*%
|
||||
%ADD17RoundRect,0.237500X-0.250000X-0.237500X0.250000X-0.237500X0.250000X0.237500X-0.250000X0.237500X0*%
|
||||
%ADD18RoundRect,0.250000X-0.875000X-0.925000X0.875000X-0.925000X0.875000X0.925000X-0.875000X0.925000X0*%
|
||||
%ADD19RoundRect,0.075000X0.075000X-0.662500X0.075000X0.662500X-0.075000X0.662500X-0.075000X-0.662500X0*%
|
||||
%ADD20RoundRect,0.075000X0.662500X-0.075000X0.662500X0.075000X-0.662500X0.075000X-0.662500X-0.075000X0*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
%TO.C,R6*%
|
||||
X100431600Y-59105800D03*
|
||||
X98606600Y-59105800D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,C5*%
|
||||
X73784800Y-81965800D03*
|
||||
X72059800Y-81965800D03*
|
||||
%TD*%
|
||||
D12*
|
||||
%TO.C,C8*%
|
||||
X75618000Y-92938600D03*
|
||||
X77343000Y-92938600D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,U2*%
|
||||
X131227800Y-72135600D03*
|
||||
X133527800Y-72135600D03*
|
||||
D14*
|
||||
X133527800Y-78435600D03*
|
||||
D13*
|
||||
X135827800Y-72135600D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,C3*%
|
||||
X134518400Y-69392800D03*
|
||||
X132443400Y-69392800D03*
|
||||
%TD*%
|
||||
D16*
|
||||
%TO.C,C4*%
|
||||
X82677000Y-82522400D03*
|
||||
X82677000Y-80797400D03*
|
||||
%TD*%
|
||||
D17*
|
||||
%TO.C,R9*%
|
||||
X109096800Y-58470800D03*
|
||||
X110921800Y-58470800D03*
|
||||
%TD*%
|
||||
D12*
|
||||
%TO.C,C6*%
|
||||
X82755400Y-91160600D03*
|
||||
X84480400Y-91160600D03*
|
||||
%TD*%
|
||||
%TO.C,C7*%
|
||||
X133580800Y-81203800D03*
|
||||
X135305800Y-81203800D03*
|
||||
%TD*%
|
||||
D18*
|
||||
%TO.C,C9*%
|
||||
X133558600Y-84658200D03*
|
||||
X138658600Y-84658200D03*
|
||||
%TD*%
|
||||
D19*
|
||||
%TO.C,U1*%
|
||||
X80837500Y-90852500D03*
|
||||
X80337500Y-90852500D03*
|
||||
X79837500Y-90852500D03*
|
||||
X79337500Y-90852500D03*
|
||||
X78837500Y-90852500D03*
|
||||
X78337500Y-90852500D03*
|
||||
X77837500Y-90852500D03*
|
||||
X77337500Y-90852500D03*
|
||||
X76837500Y-90852500D03*
|
||||
X76337500Y-90852500D03*
|
||||
X75837500Y-90852500D03*
|
||||
X75337500Y-90852500D03*
|
||||
D20*
|
||||
X73925000Y-89440000D03*
|
||||
X73925000Y-88940000D03*
|
||||
X73925000Y-88440000D03*
|
||||
X73925000Y-87940000D03*
|
||||
X73925000Y-87440000D03*
|
||||
X73925000Y-86940000D03*
|
||||
X73925000Y-86440000D03*
|
||||
X73925000Y-85940000D03*
|
||||
X73925000Y-85440000D03*
|
||||
X73925000Y-84940000D03*
|
||||
X73925000Y-84440000D03*
|
||||
X73925000Y-83940000D03*
|
||||
D19*
|
||||
X75337500Y-82527500D03*
|
||||
X75837500Y-82527500D03*
|
||||
X76337500Y-82527500D03*
|
||||
X76837500Y-82527500D03*
|
||||
X77337500Y-82527500D03*
|
||||
X77837500Y-82527500D03*
|
||||
X78337500Y-82527500D03*
|
||||
X78837500Y-82527500D03*
|
||||
X79337500Y-82527500D03*
|
||||
X79837500Y-82527500D03*
|
||||
X80337500Y-82527500D03*
|
||||
X80837500Y-82527500D03*
|
||||
D20*
|
||||
X82250000Y-83940000D03*
|
||||
X82250000Y-84440000D03*
|
||||
X82250000Y-84940000D03*
|
||||
X82250000Y-85440000D03*
|
||||
X82250000Y-85940000D03*
|
||||
X82250000Y-86440000D03*
|
||||
X82250000Y-86940000D03*
|
||||
X82250000Y-87440000D03*
|
||||
X82250000Y-87940000D03*
|
||||
X82250000Y-88440000D03*
|
||||
X82250000Y-88940000D03*
|
||||
X82250000Y-89440000D03*
|
||||
%TD*%
|
||||
M02*
|
||||
@ -0,0 +1,468 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Legend,Bot*%
|
||||
%TF.FilePolarity,Positive*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.150000*%
|
||||
%ADD11C,0.120000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
%TO.C,R6*%
|
||||
X99734666Y-61005980D02*
|
||||
X100068000Y-60529790D01*
|
||||
X100306095Y-61005980D02*
|
||||
X100306095Y-60005980D01*
|
||||
X99925142Y-60005980D01*
|
||||
X99829904Y-60053600D01*
|
||||
X99782285Y-60101219D01*
|
||||
X99734666Y-60196457D01*
|
||||
X99734666Y-60339314D01*
|
||||
X99782285Y-60434552D01*
|
||||
X99829904Y-60482171D01*
|
||||
X99925142Y-60529790D01*
|
||||
X100306095Y-60529790D01*
|
||||
X98877523Y-60005980D02*
|
||||
X99068000Y-60005980D01*
|
||||
X99163238Y-60053600D01*
|
||||
X99210857Y-60101219D01*
|
||||
X99306095Y-60244076D01*
|
||||
X99353714Y-60434552D01*
|
||||
X99353714Y-60815504D01*
|
||||
X99306095Y-60910742D01*
|
||||
X99258476Y-60958361D01*
|
||||
X99163238Y-61005980D01*
|
||||
X98972761Y-61005980D01*
|
||||
X98877523Y-60958361D01*
|
||||
X98829904Y-60910742D01*
|
||||
X98782285Y-60815504D01*
|
||||
X98782285Y-60577409D01*
|
||||
X98829904Y-60482171D01*
|
||||
X98877523Y-60434552D01*
|
||||
X98972761Y-60386933D01*
|
||||
X99163238Y-60386933D01*
|
||||
X99258476Y-60434552D01*
|
||||
X99306095Y-60482171D01*
|
||||
X99353714Y-60577409D01*
|
||||
%TO.C,C5*%
|
||||
X73088966Y-80892942D02*
|
||||
X73136585Y-80940561D01*
|
||||
X73279442Y-80988180D01*
|
||||
X73374680Y-80988180D01*
|
||||
X73517538Y-80940561D01*
|
||||
X73612776Y-80845323D01*
|
||||
X73660395Y-80750085D01*
|
||||
X73708014Y-80559609D01*
|
||||
X73708014Y-80416752D01*
|
||||
X73660395Y-80226276D01*
|
||||
X73612776Y-80131038D01*
|
||||
X73517538Y-80035800D01*
|
||||
X73374680Y-79988180D01*
|
||||
X73279442Y-79988180D01*
|
||||
X73136585Y-80035800D01*
|
||||
X73088966Y-80083419D01*
|
||||
X72184204Y-79988180D02*
|
||||
X72660395Y-79988180D01*
|
||||
X72708014Y-80464371D01*
|
||||
X72660395Y-80416752D01*
|
||||
X72565157Y-80369133D01*
|
||||
X72327061Y-80369133D01*
|
||||
X72231823Y-80416752D01*
|
||||
X72184204Y-80464371D01*
|
||||
X72136585Y-80559609D01*
|
||||
X72136585Y-80797704D01*
|
||||
X72184204Y-80892942D01*
|
||||
X72231823Y-80940561D01*
|
||||
X72327061Y-80988180D01*
|
||||
X72565157Y-80988180D01*
|
||||
X72660395Y-80940561D01*
|
||||
X72708014Y-80892942D01*
|
||||
%TO.C,C8*%
|
||||
X79313066Y-93295742D02*
|
||||
X79360685Y-93343361D01*
|
||||
X79503542Y-93390980D01*
|
||||
X79598780Y-93390980D01*
|
||||
X79741638Y-93343361D01*
|
||||
X79836876Y-93248123D01*
|
||||
X79884495Y-93152885D01*
|
||||
X79932114Y-92962409D01*
|
||||
X79932114Y-92819552D01*
|
||||
X79884495Y-92629076D01*
|
||||
X79836876Y-92533838D01*
|
||||
X79741638Y-92438600D01*
|
||||
X79598780Y-92390980D01*
|
||||
X79503542Y-92390980D01*
|
||||
X79360685Y-92438600D01*
|
||||
X79313066Y-92486219D01*
|
||||
X78741638Y-92819552D02*
|
||||
X78836876Y-92771933D01*
|
||||
X78884495Y-92724314D01*
|
||||
X78932114Y-92629076D01*
|
||||
X78932114Y-92581457D01*
|
||||
X78884495Y-92486219D01*
|
||||
X78836876Y-92438600D01*
|
||||
X78741638Y-92390980D01*
|
||||
X78551161Y-92390980D01*
|
||||
X78455923Y-92438600D01*
|
||||
X78408304Y-92486219D01*
|
||||
X78360685Y-92581457D01*
|
||||
X78360685Y-92629076D01*
|
||||
X78408304Y-92724314D01*
|
||||
X78455923Y-92771933D01*
|
||||
X78551161Y-92819552D01*
|
||||
X78741638Y-92819552D01*
|
||||
X78836876Y-92867171D01*
|
||||
X78884495Y-92914790D01*
|
||||
X78932114Y-93010028D01*
|
||||
X78932114Y-93200504D01*
|
||||
X78884495Y-93295742D01*
|
||||
X78836876Y-93343361D01*
|
||||
X78741638Y-93390980D01*
|
||||
X78551161Y-93390980D01*
|
||||
X78455923Y-93343361D01*
|
||||
X78408304Y-93295742D01*
|
||||
X78360685Y-93200504D01*
|
||||
X78360685Y-93010028D01*
|
||||
X78408304Y-92914790D01*
|
||||
X78455923Y-92867171D01*
|
||||
X78551161Y-92819552D01*
|
||||
%TO.C,U2*%
|
||||
X129627504Y-75524980D02*
|
||||
X129627504Y-76334504D01*
|
||||
X129579885Y-76429742D01*
|
||||
X129532266Y-76477361D01*
|
||||
X129437028Y-76524980D01*
|
||||
X129246552Y-76524980D01*
|
||||
X129151314Y-76477361D01*
|
||||
X129103695Y-76429742D01*
|
||||
X129056076Y-76334504D01*
|
||||
X129056076Y-75524980D01*
|
||||
X128627504Y-75620219D02*
|
||||
X128579885Y-75572600D01*
|
||||
X128484647Y-75524980D01*
|
||||
X128246552Y-75524980D01*
|
||||
X128151314Y-75572600D01*
|
||||
X128103695Y-75620219D01*
|
||||
X128056076Y-75715457D01*
|
||||
X128056076Y-75810695D01*
|
||||
X128103695Y-75953552D01*
|
||||
X128675123Y-76524980D01*
|
||||
X128056076Y-76524980D01*
|
||||
%TO.C,Y1*%
|
||||
X79749590Y-100229990D02*
|
||||
X79749590Y-100706180D01*
|
||||
X80082923Y-99706180D02*
|
||||
X79749590Y-100229990D01*
|
||||
X79416257Y-99706180D01*
|
||||
X78559114Y-100706180D02*
|
||||
X79130542Y-100706180D01*
|
||||
X78844828Y-100706180D02*
|
||||
X78844828Y-99706180D01*
|
||||
X78940066Y-99849038D01*
|
||||
X79035304Y-99944276D01*
|
||||
X79130542Y-99991895D01*
|
||||
%TO.C,C3*%
|
||||
X133647566Y-68069942D02*
|
||||
X133695185Y-68117561D01*
|
||||
X133838042Y-68165180D01*
|
||||
X133933280Y-68165180D01*
|
||||
X134076138Y-68117561D01*
|
||||
X134171376Y-68022323D01*
|
||||
X134218995Y-67927085D01*
|
||||
X134266614Y-67736609D01*
|
||||
X134266614Y-67593752D01*
|
||||
X134218995Y-67403276D01*
|
||||
X134171376Y-67308038D01*
|
||||
X134076138Y-67212800D01*
|
||||
X133933280Y-67165180D01*
|
||||
X133838042Y-67165180D01*
|
||||
X133695185Y-67212800D01*
|
||||
X133647566Y-67260419D01*
|
||||
X133314233Y-67165180D02*
|
||||
X132695185Y-67165180D01*
|
||||
X133028519Y-67546133D01*
|
||||
X132885661Y-67546133D01*
|
||||
X132790423Y-67593752D01*
|
||||
X132742804Y-67641371D01*
|
||||
X132695185Y-67736609D01*
|
||||
X132695185Y-67974704D01*
|
||||
X132742804Y-68069942D01*
|
||||
X132790423Y-68117561D01*
|
||||
X132885661Y-68165180D01*
|
||||
X133171376Y-68165180D01*
|
||||
X133266614Y-68117561D01*
|
||||
X133314233Y-68069942D01*
|
||||
%TO.C,C4*%
|
||||
X84570866Y-82018142D02*
|
||||
X84618485Y-82065761D01*
|
||||
X84761342Y-82113380D01*
|
||||
X84856580Y-82113380D01*
|
||||
X84999438Y-82065761D01*
|
||||
X85094676Y-81970523D01*
|
||||
X85142295Y-81875285D01*
|
||||
X85189914Y-81684809D01*
|
||||
X85189914Y-81541952D01*
|
||||
X85142295Y-81351476D01*
|
||||
X85094676Y-81256238D01*
|
||||
X84999438Y-81161000D01*
|
||||
X84856580Y-81113380D01*
|
||||
X84761342Y-81113380D01*
|
||||
X84618485Y-81161000D01*
|
||||
X84570866Y-81208619D01*
|
||||
X83713723Y-81446714D02*
|
||||
X83713723Y-82113380D01*
|
||||
X83951819Y-81065761D02*
|
||||
X84189914Y-81780047D01*
|
||||
X83570866Y-81780047D01*
|
||||
%TO.C,R9*%
|
||||
X110174066Y-60396380D02*
|
||||
X110507400Y-59920190D01*
|
||||
X110745495Y-60396380D02*
|
||||
X110745495Y-59396380D01*
|
||||
X110364542Y-59396380D01*
|
||||
X110269304Y-59444000D01*
|
||||
X110221685Y-59491619D01*
|
||||
X110174066Y-59586857D01*
|
||||
X110174066Y-59729714D01*
|
||||
X110221685Y-59824952D01*
|
||||
X110269304Y-59872571D01*
|
||||
X110364542Y-59920190D01*
|
||||
X110745495Y-59920190D01*
|
||||
X109697876Y-60396380D02*
|
||||
X109507400Y-60396380D01*
|
||||
X109412161Y-60348761D01*
|
||||
X109364542Y-60301142D01*
|
||||
X109269304Y-60158285D01*
|
||||
X109221685Y-59967809D01*
|
||||
X109221685Y-59586857D01*
|
||||
X109269304Y-59491619D01*
|
||||
X109316923Y-59444000D01*
|
||||
X109412161Y-59396380D01*
|
||||
X109602638Y-59396380D01*
|
||||
X109697876Y-59444000D01*
|
||||
X109745495Y-59491619D01*
|
||||
X109793114Y-59586857D01*
|
||||
X109793114Y-59824952D01*
|
||||
X109745495Y-59920190D01*
|
||||
X109697876Y-59967809D01*
|
||||
X109602638Y-60015428D01*
|
||||
X109412161Y-60015428D01*
|
||||
X109316923Y-59967809D01*
|
||||
X109269304Y-59920190D01*
|
||||
X109221685Y-59824952D01*
|
||||
%TO.C,C6*%
|
||||
X83784566Y-92947742D02*
|
||||
X83832185Y-92995361D01*
|
||||
X83975042Y-93042980D01*
|
||||
X84070280Y-93042980D01*
|
||||
X84213138Y-92995361D01*
|
||||
X84308376Y-92900123D01*
|
||||
X84355995Y-92804885D01*
|
||||
X84403614Y-92614409D01*
|
||||
X84403614Y-92471552D01*
|
||||
X84355995Y-92281076D01*
|
||||
X84308376Y-92185838D01*
|
||||
X84213138Y-92090600D01*
|
||||
X84070280Y-92042980D01*
|
||||
X83975042Y-92042980D01*
|
||||
X83832185Y-92090600D01*
|
||||
X83784566Y-92138219D01*
|
||||
X82927423Y-92042980D02*
|
||||
X83117900Y-92042980D01*
|
||||
X83213138Y-92090600D01*
|
||||
X83260757Y-92138219D01*
|
||||
X83355995Y-92281076D01*
|
||||
X83403614Y-92471552D01*
|
||||
X83403614Y-92852504D01*
|
||||
X83355995Y-92947742D01*
|
||||
X83308376Y-92995361D01*
|
||||
X83213138Y-93042980D01*
|
||||
X83022661Y-93042980D01*
|
||||
X82927423Y-92995361D01*
|
||||
X82879804Y-92947742D01*
|
||||
X82832185Y-92852504D01*
|
||||
X82832185Y-92614409D01*
|
||||
X82879804Y-92519171D01*
|
||||
X82927423Y-92471552D01*
|
||||
X83022661Y-92423933D01*
|
||||
X83213138Y-92423933D01*
|
||||
X83308376Y-92471552D01*
|
||||
X83355995Y-92519171D01*
|
||||
X83403614Y-92614409D01*
|
||||
%TO.C,C7*%
|
||||
X137301266Y-81484742D02*
|
||||
X137348885Y-81532361D01*
|
||||
X137491742Y-81579980D01*
|
||||
X137586980Y-81579980D01*
|
||||
X137729838Y-81532361D01*
|
||||
X137825076Y-81437123D01*
|
||||
X137872695Y-81341885D01*
|
||||
X137920314Y-81151409D01*
|
||||
X137920314Y-81008552D01*
|
||||
X137872695Y-80818076D01*
|
||||
X137825076Y-80722838D01*
|
||||
X137729838Y-80627600D01*
|
||||
X137586980Y-80579980D01*
|
||||
X137491742Y-80579980D01*
|
||||
X137348885Y-80627600D01*
|
||||
X137301266Y-80675219D01*
|
||||
X136967933Y-80579980D02*
|
||||
X136301266Y-80579980D01*
|
||||
X136729838Y-81579980D01*
|
||||
%TO.C,C9*%
|
||||
X136107466Y-87555342D02*
|
||||
X136155085Y-87602961D01*
|
||||
X136297942Y-87650580D01*
|
||||
X136393180Y-87650580D01*
|
||||
X136536038Y-87602961D01*
|
||||
X136631276Y-87507723D01*
|
||||
X136678895Y-87412485D01*
|
||||
X136726514Y-87222009D01*
|
||||
X136726514Y-87079152D01*
|
||||
X136678895Y-86888676D01*
|
||||
X136631276Y-86793438D01*
|
||||
X136536038Y-86698200D01*
|
||||
X136393180Y-86650580D01*
|
||||
X136297942Y-86650580D01*
|
||||
X136155085Y-86698200D01*
|
||||
X136107466Y-86745819D01*
|
||||
X135631276Y-87650580D02*
|
||||
X135440800Y-87650580D01*
|
||||
X135345561Y-87602961D01*
|
||||
X135297942Y-87555342D01*
|
||||
X135202704Y-87412485D01*
|
||||
X135155085Y-87222009D01*
|
||||
X135155085Y-86841057D01*
|
||||
X135202704Y-86745819D01*
|
||||
X135250323Y-86698200D01*
|
||||
X135345561Y-86650580D01*
|
||||
X135536038Y-86650580D01*
|
||||
X135631276Y-86698200D01*
|
||||
X135678895Y-86745819D01*
|
||||
X135726514Y-86841057D01*
|
||||
X135726514Y-87079152D01*
|
||||
X135678895Y-87174390D01*
|
||||
X135631276Y-87222009D01*
|
||||
X135536038Y-87269628D01*
|
||||
X135345561Y-87269628D01*
|
||||
X135250323Y-87222009D01*
|
||||
X135202704Y-87174390D01*
|
||||
X135155085Y-87079152D01*
|
||||
%TO.C,U1*%
|
||||
X84988304Y-86142580D02*
|
||||
X84988304Y-86952104D01*
|
||||
X84940685Y-87047342D01*
|
||||
X84893066Y-87094961D01*
|
||||
X84797828Y-87142580D01*
|
||||
X84607352Y-87142580D01*
|
||||
X84512114Y-87094961D01*
|
||||
X84464495Y-87047342D01*
|
||||
X84416876Y-86952104D01*
|
||||
X84416876Y-86142580D01*
|
||||
X83416876Y-87142580D02*
|
||||
X83988304Y-87142580D01*
|
||||
X83702590Y-87142580D02*
|
||||
X83702590Y-86142580D01*
|
||||
X83797828Y-86285438D01*
|
||||
X83893066Y-86380676D01*
|
||||
X83988304Y-86428295D01*
|
||||
D11*
|
||||
%TO.C,R6*%
|
||||
X99773824Y-59628300D02*
|
||||
X99264376Y-59628300D01*
|
||||
X99773824Y-58583300D02*
|
||||
X99264376Y-58583300D01*
|
||||
%TO.C,C5*%
|
||||
X73068567Y-81455800D02*
|
||||
X72776033Y-81455800D01*
|
||||
X73068567Y-82475800D02*
|
||||
X72776033Y-82475800D01*
|
||||
%TO.C,C8*%
|
||||
X76334233Y-92428600D02*
|
||||
X76626767Y-92428600D01*
|
||||
X76334233Y-93448600D02*
|
||||
X76626767Y-93448600D01*
|
||||
%TO.C,U2*%
|
||||
X130117800Y-77195600D02*
|
||||
X131377800Y-77195600D01*
|
||||
X130117800Y-71185600D02*
|
||||
X130117800Y-77195600D01*
|
||||
X136937800Y-77195600D02*
|
||||
X135677800Y-77195600D01*
|
||||
X136937800Y-73435600D02*
|
||||
X136937800Y-77195600D01*
|
||||
%TO.C,Y1*%
|
||||
X82332200Y-99125000D02*
|
||||
X76082200Y-99125000D01*
|
||||
X82332200Y-94075000D02*
|
||||
X76082200Y-94075000D01*
|
||||
X82332200Y-99125000D02*
|
||||
G75*
|
||||
G03*
|
||||
X82332200Y-94075000I0J2525000D01*
|
||||
G01*
|
||||
X76082200Y-94075000D02*
|
||||
G75*
|
||||
G03*
|
||||
X76082200Y-99125000I0J-2525000D01*
|
||||
G01*
|
||||
%TO.C,C3*%
|
||||
X133742152Y-70127800D02*
|
||||
X133219648Y-70127800D01*
|
||||
X133742152Y-68657800D02*
|
||||
X133219648Y-68657800D01*
|
||||
%TO.C,C4*%
|
||||
X83187000Y-81806167D02*
|
||||
X83187000Y-81513633D01*
|
||||
X82167000Y-81806167D02*
|
||||
X82167000Y-81513633D01*
|
||||
%TO.C,R9*%
|
||||
X109754576Y-57948300D02*
|
||||
X110264024Y-57948300D01*
|
||||
X109754576Y-58993300D02*
|
||||
X110264024Y-58993300D01*
|
||||
%TO.C,C6*%
|
||||
X83471633Y-91670600D02*
|
||||
X83764167Y-91670600D01*
|
||||
X83471633Y-90650600D02*
|
||||
X83764167Y-90650600D01*
|
||||
%TO.C,C7*%
|
||||
X134297033Y-80693800D02*
|
||||
X134589567Y-80693800D01*
|
||||
X134297033Y-81713800D02*
|
||||
X134589567Y-81713800D01*
|
||||
%TO.C,C9*%
|
||||
X139108600Y-86368200D02*
|
||||
X132173600Y-86368200D01*
|
||||
X132173600Y-86368200D02*
|
||||
X132173600Y-82948200D01*
|
||||
X132173600Y-82948200D02*
|
||||
X139108600Y-82948200D01*
|
||||
%TO.C,U1*%
|
||||
X81697500Y-83530000D02*
|
||||
X81697500Y-83080000D01*
|
||||
X74477500Y-83080000D02*
|
||||
X74927500Y-83080000D01*
|
||||
X81697500Y-89850000D02*
|
||||
X81697500Y-90300000D01*
|
||||
X81697500Y-90300000D02*
|
||||
X81247500Y-90300000D01*
|
||||
X74477500Y-90300000D02*
|
||||
X74927500Y-90300000D01*
|
||||
X74477500Y-83530000D02*
|
||||
X74477500Y-83080000D01*
|
||||
X74477500Y-89850000D02*
|
||||
X74477500Y-90300000D01*
|
||||
X81247500Y-90300000D02*
|
||||
X81247500Y-91590000D01*
|
||||
X81697500Y-83080000D02*
|
||||
X81247500Y-83080000D01*
|
||||
%TD*%
|
||||
M02*
|
||||
@ -0,0 +1,542 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Profile,NP*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
%TA.AperFunction,Profile*%
|
||||
%ADD10C,0.200000*%
|
||||
%TD*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X142521050Y-92077600D02*
|
||||
X142858673Y-88525010D01*
|
||||
X97443930Y-50045918D02*
|
||||
X98290050Y-49369300D01*
|
||||
X137784760Y-68227770D02*
|
||||
X139391550Y-71357300D01*
|
||||
X83828850Y-57742300D02*
|
||||
X83321732Y-58672477D01*
|
||||
X83405850Y-115588340D02*
|
||||
X84082471Y-116518517D01*
|
||||
X83405848Y-115588340D02*
|
||||
X83066850Y-114488660D01*
|
||||
X127383250Y-56896200D02*
|
||||
X124423210Y-55035850D01*
|
||||
X117994650Y-52075760D02*
|
||||
X121208250Y-53429000D01*
|
||||
X135585427Y-108907575D02*
|
||||
X134655250Y-109584200D01*
|
||||
X131357550Y-64000000D02*
|
||||
X130427366Y-63660998D01*
|
||||
X127383250Y-117025640D02*
|
||||
X128227995Y-116264962D01*
|
||||
X71142630Y-74993990D02*
|
||||
X72495870Y-71780400D01*
|
||||
X124760880Y-118717870D02*
|
||||
X121631350Y-120408730D01*
|
||||
X84675008Y-117025638D02*
|
||||
X84082450Y-116518520D01*
|
||||
X127383260Y-117025640D02*
|
||||
X124760850Y-118717880D01*
|
||||
X81629550Y-110344900D02*
|
||||
X82391607Y-110936085D01*
|
||||
X69535840Y-92415160D02*
|
||||
X69198221Y-88948000D01*
|
||||
X87211950Y-67890200D02*
|
||||
X86872952Y-68313258D01*
|
||||
X140744750Y-74656400D02*
|
||||
X139391510Y-71357360D01*
|
||||
X136093848Y-108315046D02*
|
||||
X135585350Y-108907600D01*
|
||||
X134317550Y-64253500D02*
|
||||
X133133810Y-63999937D01*
|
||||
X139391550Y-71357300D02*
|
||||
X137784760Y-68227770D01*
|
||||
X96767350Y-50976100D02*
|
||||
X96599230Y-51313723D01*
|
||||
X128990050Y-114151040D02*
|
||||
X128990050Y-113304900D01*
|
||||
X81629530Y-110344855D02*
|
||||
X80699350Y-109921800D01*
|
||||
X69198221Y-85396790D02*
|
||||
X69535840Y-81844200D01*
|
||||
X130004304Y-110598419D02*
|
||||
X129411750Y-111359100D01*
|
||||
X77739330Y-109668318D02*
|
||||
X76725090Y-109161200D01*
|
||||
X70297900Y-95883700D02*
|
||||
X71312140Y-99265410D01*
|
||||
X77739320Y-109668300D02*
|
||||
X78839000Y-109921863D01*
|
||||
X100912450Y-123452824D02*
|
||||
X104463660Y-123791826D01*
|
||||
X78500000Y-64000000D02*
|
||||
X79685150Y-64000000D01*
|
||||
X124423250Y-55035800D02*
|
||||
X121208290Y-53429010D01*
|
||||
X139561050Y-102225500D02*
|
||||
X140914290Y-98927850D01*
|
||||
X87803150Y-67720700D02*
|
||||
X87211972Y-67890206D01*
|
||||
X87380150Y-106115700D02*
|
||||
X87803208Y-106201139D01*
|
||||
X124253750Y-106201100D02*
|
||||
X87803150Y-106201100D01*
|
||||
X130004350Y-110598400D02*
|
||||
X130934527Y-110091282D01*
|
||||
X105479350Y-48439100D02*
|
||||
X101842700Y-48692659D01*
|
||||
X133133850Y-64000000D02*
|
||||
X132371750Y-64000000D01*
|
||||
X81122370Y-63830522D02*
|
||||
X82052550Y-63323400D01*
|
||||
X128735161Y-115249340D02*
|
||||
X128228050Y-116264960D01*
|
||||
X114104426Y-49622829D02*
|
||||
X114950550Y-50383500D01*
|
||||
X75963032Y-65606754D02*
|
||||
X76471530Y-65014200D01*
|
||||
X83321732Y-58672477D02*
|
||||
X83828850Y-57742300D01*
|
||||
X111483410Y-123452823D02*
|
||||
X108016250Y-123791826D01*
|
||||
X125267950Y-68736300D02*
|
||||
X125267950Y-105185500D01*
|
||||
X135247726Y-64760687D02*
|
||||
X136093850Y-65606800D01*
|
||||
X83066850Y-61632500D02*
|
||||
X83066850Y-60616900D01*
|
||||
X101842700Y-48692659D02*
|
||||
X105479350Y-48439100D01*
|
||||
X142521068Y-92077540D02*
|
||||
X141844450Y-95544700D01*
|
||||
X69535840Y-81844200D02*
|
||||
X69198221Y-85396790D01*
|
||||
X83066850Y-114488660D02*
|
||||
X83066850Y-113304900D01*
|
||||
X86872950Y-68313200D02*
|
||||
X86788887Y-68736255D01*
|
||||
X135585350Y-108907600D02*
|
||||
X136093848Y-108315046D01*
|
||||
X121631350Y-120408730D02*
|
||||
X124760880Y-118717870D01*
|
||||
X89917120Y-53766630D02*
|
||||
X93216150Y-52413400D01*
|
||||
X71312140Y-99265400D02*
|
||||
X72581320Y-102564440D01*
|
||||
X69535842Y-81844260D02*
|
||||
X70128400Y-78377100D01*
|
||||
X108016250Y-123791826D02*
|
||||
X111483410Y-123452823D01*
|
||||
X134317573Y-64253582D02*
|
||||
X135247750Y-64760700D01*
|
||||
X114950632Y-50383516D02*
|
||||
X115457750Y-51313700D01*
|
||||
X83066850Y-112881900D02*
|
||||
X83066850Y-113304900D01*
|
||||
X109115950Y-48608600D02*
|
||||
X112667150Y-49030300D01*
|
||||
X84674970Y-56896200D02*
|
||||
X86872950Y-55458900D01*
|
||||
X82645171Y-62562677D02*
|
||||
X83066850Y-61632500D01*
|
||||
X125268014Y-105185545D02*
|
||||
X125183950Y-105608600D01*
|
||||
X87803150Y-67720700D02*
|
||||
X124253750Y-67720700D01*
|
||||
X128567050Y-58333500D02*
|
||||
X127974499Y-57403323D01*
|
||||
X74102670Y-68566800D02*
|
||||
X72495870Y-71780400D01*
|
||||
X124676785Y-67806121D02*
|
||||
X125099850Y-68227800D01*
|
||||
X105479300Y-48439094D02*
|
||||
X109115950Y-48608600D01*
|
||||
X139391510Y-71357360D02*
|
||||
X140744750Y-74656400D01*
|
||||
X84675050Y-117025640D02*
|
||||
X87633700Y-118885990D01*
|
||||
X78839000Y-109921800D02*
|
||||
X79685150Y-109921800D01*
|
||||
X83066850Y-113304900D02*
|
||||
X83066850Y-114488660D01*
|
||||
X115457750Y-51313700D02*
|
||||
X114950632Y-50383516D01*
|
||||
X128990050Y-113304900D02*
|
||||
X128990050Y-112289300D01*
|
||||
X99389750Y-49030300D02*
|
||||
X98290080Y-49369302D01*
|
||||
X83321750Y-58672500D02*
|
||||
X83066811Y-59856240D01*
|
||||
X72495870Y-71780400D02*
|
||||
X71142630Y-74993990D01*
|
||||
X142858650Y-85057800D02*
|
||||
X142435592Y-81506590D01*
|
||||
X124423210Y-55035850D02*
|
||||
X127383250Y-56896200D01*
|
||||
X127974450Y-57403300D02*
|
||||
X127383265Y-56896178D01*
|
||||
X142858650Y-85057800D02*
|
||||
X142858650Y-88525000D01*
|
||||
X82898668Y-111867653D02*
|
||||
X82391550Y-110936100D01*
|
||||
X140744820Y-74656390D02*
|
||||
X141759050Y-78038100D01*
|
||||
X94062250Y-121846030D02*
|
||||
X97443970Y-122861640D01*
|
||||
X132371750Y-64000000D02*
|
||||
X133133850Y-64000000D01*
|
||||
X90763180Y-120578230D02*
|
||||
X87633650Y-118885990D01*
|
||||
X128990050Y-59433100D02*
|
||||
X128566992Y-58333420D01*
|
||||
X134655150Y-109584184D02*
|
||||
X133556850Y-109921800D01*
|
||||
X128990089Y-114151040D02*
|
||||
X128735150Y-115249340D01*
|
||||
X129665297Y-62985762D02*
|
||||
X130427350Y-63661000D01*
|
||||
X128990050Y-59433100D02*
|
||||
X128990050Y-60616900D01*
|
||||
X84675050Y-56896200D02*
|
||||
X83828930Y-57742324D01*
|
||||
X83066850Y-59856200D02*
|
||||
X83066850Y-60616900D01*
|
||||
X125267950Y-105185500D02*
|
||||
X125267950Y-68736300D01*
|
||||
X130934450Y-110091300D02*
|
||||
X131864627Y-109921804D01*
|
||||
X86788950Y-105185500D02*
|
||||
X86788950Y-68736300D01*
|
||||
X87633700Y-118885990D02*
|
||||
X84675050Y-117025640D01*
|
||||
X124760872Y-106031597D02*
|
||||
X124253750Y-106201100D01*
|
||||
X74272170Y-105692650D02*
|
||||
X72581310Y-102564500D01*
|
||||
X76725090Y-109161200D02*
|
||||
X77739330Y-109668318D01*
|
||||
X130427366Y-63660998D02*
|
||||
X131357550Y-64000000D01*
|
||||
X87803208Y-106201139D02*
|
||||
X87380150Y-106115700D01*
|
||||
X136093890Y-65606770D02*
|
||||
X137784750Y-68227800D01*
|
||||
X72581320Y-102564440D02*
|
||||
X71312140Y-99265400D01*
|
||||
X132371750Y-64000000D02*
|
||||
X131357550Y-64000000D01*
|
||||
X135247750Y-64760700D02*
|
||||
X134317573Y-64253582D01*
|
||||
X83066850Y-114488660D02*
|
||||
X83405848Y-115588340D01*
|
||||
X141844427Y-95544710D02*
|
||||
X140914250Y-98927800D01*
|
||||
X128227995Y-116264962D02*
|
||||
X127383250Y-117025640D01*
|
||||
X124676750Y-67806100D02*
|
||||
X124253692Y-67720657D01*
|
||||
X129158232Y-62054144D02*
|
||||
X129665350Y-62985700D01*
|
||||
X98290080Y-49369302D02*
|
||||
X99389750Y-49030300D01*
|
||||
X108016250Y-123791826D02*
|
||||
X104463650Y-123791826D01*
|
||||
X93216160Y-52413380D02*
|
||||
X96599250Y-51313700D01*
|
||||
X121208250Y-53429000D02*
|
||||
X117994650Y-52075760D01*
|
||||
X86788887Y-68736255D02*
|
||||
X86872950Y-68313200D01*
|
||||
X89917050Y-53766600D02*
|
||||
X86872960Y-55458840D01*
|
||||
X109115950Y-48608600D02*
|
||||
X105479300Y-48439094D01*
|
||||
X86788950Y-105185500D02*
|
||||
X86958449Y-105778051D01*
|
||||
X137954250Y-105355000D02*
|
||||
X139561040Y-102225470D01*
|
||||
X137954200Y-105354960D02*
|
||||
X136093850Y-108315000D01*
|
||||
X81122450Y-63830500D02*
|
||||
X80192273Y-64084059D01*
|
||||
X114950550Y-122692140D02*
|
||||
X118333640Y-121676520D01*
|
||||
X75963030Y-65606800D02*
|
||||
X74102670Y-68566840D01*
|
||||
X83828930Y-57742324D02*
|
||||
X84675050Y-56896200D01*
|
||||
X131864627Y-109921804D02*
|
||||
X130934450Y-110091300D01*
|
||||
X128566992Y-58333420D02*
|
||||
X128990050Y-59433100D01*
|
||||
X113090210Y-49115778D02*
|
||||
X114104450Y-49622900D01*
|
||||
X79685132Y-63999937D02*
|
||||
X80192250Y-64084000D01*
|
||||
X142858650Y-88525000D02*
|
||||
X142858650Y-85057800D01*
|
||||
X90763150Y-120578230D02*
|
||||
X94062180Y-121846030D01*
|
||||
X94062180Y-121846030D02*
|
||||
X90763150Y-120578230D01*
|
||||
X132371750Y-109921800D02*
|
||||
X131864650Y-109921800D01*
|
||||
X125183950Y-105608600D02*
|
||||
X125268014Y-105185545D01*
|
||||
X78500000Y-64000000D02*
|
||||
X77401700Y-64423058D01*
|
||||
X83066850Y-113304900D02*
|
||||
X83066850Y-112881900D01*
|
||||
X83066850Y-60616900D02*
|
||||
X83066850Y-61632500D01*
|
||||
X139561040Y-102225470D02*
|
||||
X137954250Y-105355000D01*
|
||||
X80192250Y-64084000D02*
|
||||
X79685132Y-63999937D01*
|
||||
X87211972Y-67890206D02*
|
||||
X87803150Y-67720700D01*
|
||||
X80192273Y-64084059D02*
|
||||
X81122450Y-63830500D01*
|
||||
X83066850Y-60616900D02*
|
||||
X83066850Y-59856200D01*
|
||||
X74102670Y-68566840D02*
|
||||
X75963030Y-65606800D01*
|
||||
X113090250Y-49115700D02*
|
||||
X112667195Y-49030257D01*
|
||||
X70128400Y-78377100D02*
|
||||
X69535842Y-81844260D01*
|
||||
X142435592Y-81506590D02*
|
||||
X142858650Y-85057800D01*
|
||||
X124253750Y-106201100D02*
|
||||
X124760872Y-106031597D01*
|
||||
X118333650Y-121676530D02*
|
||||
X121631300Y-120408740D01*
|
||||
X83066870Y-112881840D02*
|
||||
X82898750Y-111867600D01*
|
||||
X96599250Y-51313700D02*
|
||||
X93216160Y-52413380D01*
|
||||
X128990050Y-113304900D02*
|
||||
X128990050Y-114151040D01*
|
||||
X86872950Y-55458900D02*
|
||||
X84674970Y-56896200D01*
|
||||
X82391550Y-110936100D02*
|
||||
X82898668Y-111867653D01*
|
||||
X83066850Y-61632500D02*
|
||||
X82645171Y-62562677D01*
|
||||
X82052592Y-63323378D02*
|
||||
X82645150Y-62562700D01*
|
||||
X79685150Y-109921800D02*
|
||||
X78839000Y-109921800D01*
|
||||
X86788950Y-68736300D02*
|
||||
X86788950Y-105185500D01*
|
||||
X97443970Y-122861640D02*
|
||||
X94062250Y-121846030D01*
|
||||
X124760850Y-106031600D02*
|
||||
X125183905Y-105608542D01*
|
||||
X128735150Y-115249340D02*
|
||||
X128990089Y-114151040D01*
|
||||
X99389730Y-49030323D02*
|
||||
X101842650Y-48692700D01*
|
||||
X86958450Y-105778100D02*
|
||||
X87380133Y-106115726D01*
|
||||
X129411736Y-111359123D02*
|
||||
X128990050Y-112289300D01*
|
||||
X77401700Y-64423058D02*
|
||||
X78500000Y-64000000D01*
|
||||
X82898750Y-111867600D02*
|
||||
X83066870Y-112881840D01*
|
||||
X69198221Y-88948000D02*
|
||||
X69198221Y-85396800D01*
|
||||
X77401700Y-64423000D02*
|
||||
X76471523Y-65014182D01*
|
||||
X133556850Y-109921800D02*
|
||||
X134655150Y-109584184D01*
|
||||
X87380133Y-106115726D02*
|
||||
X86958450Y-105778100D01*
|
||||
X76725087Y-109161113D02*
|
||||
X75963030Y-108315000D01*
|
||||
X96599230Y-51313723D02*
|
||||
X96767350Y-50976100D01*
|
||||
X83066811Y-59856240D02*
|
||||
X83321750Y-58672500D01*
|
||||
X71312140Y-99265410D02*
|
||||
X70297900Y-95883700D01*
|
||||
X125267950Y-68736300D02*
|
||||
X125099834Y-68227802D01*
|
||||
X127383265Y-56896178D02*
|
||||
X127974450Y-57403300D01*
|
||||
X79685150Y-64000000D02*
|
||||
X78500000Y-64000000D01*
|
||||
X72581310Y-102564500D02*
|
||||
X74272170Y-105692650D01*
|
||||
X133556850Y-109921800D02*
|
||||
X132371750Y-109921800D01*
|
||||
X82391607Y-110936085D02*
|
||||
X81629550Y-110344900D01*
|
||||
X84082471Y-116518517D02*
|
||||
X83405850Y-115588340D01*
|
||||
X71142640Y-74994000D02*
|
||||
X70128400Y-78377090D01*
|
||||
X114950550Y-50383500D02*
|
||||
X114104426Y-49622829D01*
|
||||
X70297897Y-95883730D02*
|
||||
X69535840Y-92415200D01*
|
||||
X75963030Y-108315000D02*
|
||||
X76725087Y-109161113D01*
|
||||
X130427350Y-63661000D02*
|
||||
X129665297Y-62985762D01*
|
||||
X76471523Y-65014182D02*
|
||||
X77401700Y-64423000D01*
|
||||
X101842650Y-48692700D02*
|
||||
X99389730Y-49030323D01*
|
||||
X87633650Y-118885990D02*
|
||||
X90763180Y-120578230D01*
|
||||
X142858673Y-88525010D02*
|
||||
X142521050Y-92077600D01*
|
||||
X141759050Y-78038100D02*
|
||||
X140744820Y-74656390D01*
|
||||
X141844450Y-95544700D02*
|
||||
X142521068Y-92077540D01*
|
||||
X104463660Y-123791826D02*
|
||||
X100912450Y-123452824D01*
|
||||
X76471530Y-65014200D02*
|
||||
X75963032Y-65606754D01*
|
||||
X140914290Y-98927850D02*
|
||||
X139561050Y-102225500D01*
|
||||
X128990050Y-112289300D02*
|
||||
X129411736Y-111359123D01*
|
||||
X130934527Y-110091282D02*
|
||||
X130004350Y-110598400D01*
|
||||
X79685150Y-109921800D02*
|
||||
X80699350Y-109921800D01*
|
||||
X134655250Y-109584200D02*
|
||||
X135585427Y-108907575D01*
|
||||
X111483450Y-123452824D02*
|
||||
X114950610Y-122692143D01*
|
||||
X133133810Y-63999937D02*
|
||||
X134317550Y-64253500D01*
|
||||
X128990050Y-60616900D02*
|
||||
X128990050Y-59433100D01*
|
||||
X82052550Y-63323400D02*
|
||||
X81122370Y-63830522D01*
|
||||
X115457680Y-51313747D02*
|
||||
X117994650Y-52075800D01*
|
||||
X129158150Y-62054200D02*
|
||||
X128904591Y-61124023D01*
|
||||
X112667195Y-49030257D02*
|
||||
X113090250Y-49115700D01*
|
||||
X86872952Y-68313258D02*
|
||||
X87211950Y-67890200D01*
|
||||
X96767332Y-50976077D02*
|
||||
X97443950Y-50045900D01*
|
||||
X100912480Y-123452822D02*
|
||||
X97443950Y-122861640D01*
|
||||
X69535840Y-92415200D02*
|
||||
X70297897Y-95883730D01*
|
||||
X137784750Y-68227800D02*
|
||||
X136093890Y-65606770D01*
|
||||
X124253750Y-67720700D02*
|
||||
X87803150Y-67720700D01*
|
||||
X78839000Y-109921863D02*
|
||||
X77739320Y-109668300D01*
|
||||
X129411750Y-111359100D02*
|
||||
X130004304Y-110598419D01*
|
||||
X118333640Y-121676520D02*
|
||||
X114950550Y-122692140D01*
|
||||
X93216150Y-52413400D02*
|
||||
X89917120Y-53766630D01*
|
||||
X128228050Y-116264960D02*
|
||||
X128735161Y-115249340D01*
|
||||
X80699350Y-109921800D02*
|
||||
X79685150Y-109921800D01*
|
||||
X131864650Y-109921800D02*
|
||||
X132371750Y-109921800D01*
|
||||
X70128400Y-78377090D02*
|
||||
X71142640Y-74994000D01*
|
||||
X114950610Y-122692143D02*
|
||||
X111483450Y-123452824D01*
|
||||
X128904650Y-61124000D02*
|
||||
X128990082Y-60616882D01*
|
||||
X127974499Y-57403323D02*
|
||||
X128567050Y-58333500D01*
|
||||
X69198221Y-85396800D02*
|
||||
X69198221Y-88948000D01*
|
||||
X97443950Y-50045900D02*
|
||||
X96767332Y-50976077D01*
|
||||
X131357550Y-64000000D02*
|
||||
X132371750Y-64000000D01*
|
||||
X129665350Y-62985700D02*
|
||||
X129158232Y-62054144D01*
|
||||
X124253692Y-67720657D02*
|
||||
X124676750Y-67806100D01*
|
||||
X128904591Y-61124023D02*
|
||||
X129158150Y-62054200D01*
|
||||
X80699350Y-109921800D02*
|
||||
X81629530Y-110344855D01*
|
||||
X112667150Y-49030300D02*
|
||||
X109115950Y-48608600D01*
|
||||
X128990050Y-112289300D02*
|
||||
X128990050Y-113304900D01*
|
||||
X136093850Y-108315000D02*
|
||||
X137954200Y-105354960D01*
|
||||
X141759025Y-78038070D02*
|
||||
X142435650Y-81506600D01*
|
||||
X142435650Y-81506600D02*
|
||||
X141759025Y-78038070D01*
|
||||
X74272170Y-105692600D02*
|
||||
X75963030Y-108315010D01*
|
||||
X125099834Y-68227802D02*
|
||||
X125267950Y-68736300D01*
|
||||
X125099850Y-68227800D02*
|
||||
X124676785Y-67806121D01*
|
||||
X125183905Y-105608542D02*
|
||||
X124760850Y-106031600D01*
|
||||
X121208290Y-53429010D02*
|
||||
X124423250Y-55035800D01*
|
||||
X104463650Y-123791826D02*
|
||||
X108016250Y-123791826D01*
|
||||
X87803150Y-106201100D02*
|
||||
X124253750Y-106201100D01*
|
||||
X136093850Y-65606800D02*
|
||||
X135247726Y-64760687D01*
|
||||
X121631300Y-120408740D02*
|
||||
X118333650Y-121676530D01*
|
||||
X114104450Y-49622900D02*
|
||||
X113090210Y-49115778D01*
|
||||
X75963030Y-108315010D02*
|
||||
X74272170Y-105692600D01*
|
||||
X72495870Y-71780400D02*
|
||||
X74102670Y-68566800D01*
|
||||
X98290050Y-49369300D02*
|
||||
X97443930Y-50045918D01*
|
||||
X86958449Y-105778051D02*
|
||||
X86788950Y-105185500D01*
|
||||
X140914250Y-98927800D02*
|
||||
X141844427Y-95544710D01*
|
||||
X82645150Y-62562700D02*
|
||||
X82052592Y-63323378D01*
|
||||
X84082450Y-116518520D02*
|
||||
X84675008Y-117025638D01*
|
||||
X69198221Y-88948000D02*
|
||||
X69535840Y-92415160D01*
|
||||
X132371750Y-109921800D02*
|
||||
X133556850Y-109921800D01*
|
||||
X86872960Y-55458840D02*
|
||||
X89917050Y-53766600D01*
|
||||
X117994650Y-52075800D02*
|
||||
X115457680Y-51313747D01*
|
||||
X97443950Y-122861640D02*
|
||||
X100912480Y-123452822D01*
|
||||
X124760850Y-118717880D02*
|
||||
X127383260Y-117025640D01*
|
||||
X128990082Y-60616882D02*
|
||||
X128904650Y-61124000D01*
|
||||
M02*
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,214 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Soldermask,Top*%
|
||||
%TF.FilePolarity,Negative*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
G04 Aperture macros list*
|
||||
%AMRoundRect*
|
||||
0 Rectangle with rounded corners*
|
||||
0 $1 Rounding radius*
|
||||
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
|
||||
0 Add a 4 corners polygon primitive as box body*
|
||||
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
|
||||
0 Add four circle primitives for the rounded corners*
|
||||
1,1,$1+$1,$2,$3*
|
||||
1,1,$1+$1,$4,$5*
|
||||
1,1,$1+$1,$6,$7*
|
||||
1,1,$1+$1,$8,$9*
|
||||
0 Add four rect primitives between the rounded corners*
|
||||
20,1,$1+$1,$2,$3,$4,$5,0*
|
||||
20,1,$1+$1,$4,$5,$6,$7,0*
|
||||
20,1,$1+$1,$6,$7,$8,$9,0*
|
||||
20,1,$1+$1,$8,$9,$2,$3,0*%
|
||||
G04 Aperture macros list end*
|
||||
%ADD10R,0.850000X0.850000*%
|
||||
%ADD11C,3.200000*%
|
||||
%ADD12RoundRect,0.237500X-0.237500X0.300000X-0.237500X-0.300000X0.237500X-0.300000X0.237500X0.300000X0*%
|
||||
%ADD13RoundRect,0.237500X0.250000X0.237500X-0.250000X0.237500X-0.250000X-0.237500X0.250000X-0.237500X0*%
|
||||
%ADD14RoundRect,0.150000X-0.150000X0.512500X-0.150000X-0.512500X0.150000X-0.512500X0.150000X0.512500X0*%
|
||||
%ADD15RoundRect,0.237500X0.237500X-0.250000X0.237500X0.250000X-0.237500X0.250000X-0.237500X-0.250000X0*%
|
||||
%ADD16C,0.650000*%
|
||||
%ADD17R,0.600000X1.450000*%
|
||||
%ADD18R,0.300000X1.450000*%
|
||||
%ADD19O,1.000000X2.100000*%
|
||||
%ADD20O,1.000000X1.600000*%
|
||||
%ADD21RoundRect,0.237500X0.300000X0.237500X-0.300000X0.237500X-0.300000X-0.237500X0.300000X-0.237500X0*%
|
||||
%ADD22R,0.650000X1.560000*%
|
||||
%ADD23R,1.700000X1.700000*%
|
||||
%ADD24O,0.850000X0.850000*%
|
||||
%ADD25C,1.500000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
%TO.C,J6*%
|
||||
X103980000Y-64570000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A1*%
|
||||
X125880000Y-63225000D03*
|
||||
%TD*%
|
||||
%TO.C,REF\u002A\u002A2*%
|
||||
X86050000Y-110665000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J3*%
|
||||
X111930000Y-65330000D03*
|
||||
%TD*%
|
||||
%TO.C,J4*%
|
||||
X109640000Y-64820000D03*
|
||||
%TD*%
|
||||
%TO.C,J8*%
|
||||
X99500000Y-65500000D03*
|
||||
%TD*%
|
||||
D12*
|
||||
%TO.C,C1*%
|
||||
X81661000Y-98478000D03*
|
||||
X81661000Y-100203000D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,R7*%
|
||||
X97663000Y-57150000D03*
|
||||
X95838000Y-57150000D03*
|
||||
%TD*%
|
||||
D14*
|
||||
%TO.C,D1*%
|
||||
X78547000Y-77901800D03*
|
||||
X77597000Y-77901800D03*
|
||||
X76647000Y-77901800D03*
|
||||
X76647000Y-80176800D03*
|
||||
X78547000Y-80176800D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J9*%
|
||||
X97310000Y-66260000D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,R3*%
|
||||
X79612066Y-71094600D03*
|
||||
X79612066Y-69269600D03*
|
||||
%TD*%
|
||||
D16*
|
||||
%TO.C,J37*%
|
||||
X102720000Y-54070000D03*
|
||||
X108500000Y-54070000D03*
|
||||
D17*
|
||||
X108860000Y-55515000D03*
|
||||
X108060000Y-55515000D03*
|
||||
D18*
|
||||
X106860000Y-55515000D03*
|
||||
X105860000Y-55515000D03*
|
||||
X105360000Y-55515000D03*
|
||||
X104360000Y-55515000D03*
|
||||
D17*
|
||||
X103160000Y-55515000D03*
|
||||
X102360000Y-55515000D03*
|
||||
X102360000Y-55515000D03*
|
||||
X103160000Y-55515000D03*
|
||||
D18*
|
||||
X103860000Y-55515000D03*
|
||||
X104860000Y-55515000D03*
|
||||
X106360000Y-55515000D03*
|
||||
X107360000Y-55515000D03*
|
||||
D17*
|
||||
X108060000Y-55515000D03*
|
||||
X108860000Y-55515000D03*
|
||||
D19*
|
||||
X101290000Y-54600000D03*
|
||||
X109930000Y-54600000D03*
|
||||
D20*
|
||||
X109930000Y-50420000D03*
|
||||
X101290000Y-50420000D03*
|
||||
%TD*%
|
||||
D21*
|
||||
%TO.C,C2*%
|
||||
X74902400Y-96610000D03*
|
||||
X73177400Y-96610000D03*
|
||||
%TD*%
|
||||
D22*
|
||||
%TO.C,U3*%
|
||||
X93050400Y-57142400D03*
|
||||
X92100400Y-57142400D03*
|
||||
X91150400Y-57142400D03*
|
||||
X91150400Y-59842400D03*
|
||||
X92100400Y-59842400D03*
|
||||
X93050400Y-59842400D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,R8*%
|
||||
X97661100Y-55549800D03*
|
||||
X95836100Y-55549800D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A*%
|
||||
X86050000Y-63225000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J2*%
|
||||
X114040000Y-66090000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,REF\u002A\u002A3*%
|
||||
X125880000Y-110665000D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J7*%
|
||||
X101700000Y-64910000D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,R4*%
|
||||
X81169932Y-71094600D03*
|
||||
X81169932Y-69269600D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J5*%
|
||||
X106270000Y-64490000D03*
|
||||
%TD*%
|
||||
D23*
|
||||
%TO.C,J35*%
|
||||
X138633200Y-89560400D03*
|
||||
%TD*%
|
||||
D15*
|
||||
%TO.C,R2*%
|
||||
X78054200Y-71094600D03*
|
||||
X78054200Y-69269600D03*
|
||||
%TD*%
|
||||
%TO.C,R5*%
|
||||
X82727800Y-71094600D03*
|
||||
X82727800Y-69269600D03*
|
||||
%TD*%
|
||||
D23*
|
||||
%TO.C,J26*%
|
||||
X127609600Y-72237600D03*
|
||||
%TD*%
|
||||
D10*
|
||||
%TO.C,J1*%
|
||||
X70586600Y-85188800D03*
|
||||
D24*
|
||||
X70586600Y-86188800D03*
|
||||
X70586600Y-87188800D03*
|
||||
X70586600Y-88188800D03*
|
||||
X70586600Y-89188800D03*
|
||||
X70586600Y-90188800D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,R1*%
|
||||
X80387200Y-90906600D03*
|
||||
X78562200Y-90906600D03*
|
||||
%TD*%
|
||||
D23*
|
||||
%TO.C,J36*%
|
||||
X133350000Y-89560400D03*
|
||||
%TD*%
|
||||
D25*
|
||||
%TO.C,Y1*%
|
||||
X81647200Y-96600000D03*
|
||||
X76767200Y-96600000D03*
|
||||
%TD*%
|
||||
M02*
|
||||
@ -0,0 +1,124 @@
|
||||
%TF.GenerationSoftware,KiCad,Pcbnew,6.0.5*%
|
||||
%TF.CreationDate,2022-09-23T09:05:14+03:00*%
|
||||
%TF.ProjectId,Canon_manage,43616e6f-6e5f-46d6-916e-6167652e6b69,rev?*%
|
||||
%TF.SameCoordinates,Original*%
|
||||
%TF.FileFunction,Paste,Top*%
|
||||
%TF.FilePolarity,Positive*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 6.0.5) date 2022-09-23 09:05:14*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
G04 Aperture macros list*
|
||||
%AMRoundRect*
|
||||
0 Rectangle with rounded corners*
|
||||
0 $1 Rounding radius*
|
||||
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
|
||||
0 Add a 4 corners polygon primitive as box body*
|
||||
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
|
||||
0 Add four circle primitives for the rounded corners*
|
||||
1,1,$1+$1,$2,$3*
|
||||
1,1,$1+$1,$4,$5*
|
||||
1,1,$1+$1,$6,$7*
|
||||
1,1,$1+$1,$8,$9*
|
||||
0 Add four rect primitives between the rounded corners*
|
||||
20,1,$1+$1,$2,$3,$4,$5,0*
|
||||
20,1,$1+$1,$4,$5,$6,$7,0*
|
||||
20,1,$1+$1,$6,$7,$8,$9,0*
|
||||
20,1,$1+$1,$8,$9,$2,$3,0*%
|
||||
G04 Aperture macros list end*
|
||||
%ADD10RoundRect,0.237500X-0.237500X0.300000X-0.237500X-0.300000X0.237500X-0.300000X0.237500X0.300000X0*%
|
||||
%ADD11RoundRect,0.237500X0.250000X0.237500X-0.250000X0.237500X-0.250000X-0.237500X0.250000X-0.237500X0*%
|
||||
%ADD12RoundRect,0.150000X-0.150000X0.512500X-0.150000X-0.512500X0.150000X-0.512500X0.150000X0.512500X0*%
|
||||
%ADD13RoundRect,0.237500X0.237500X-0.250000X0.237500X0.250000X-0.237500X0.250000X-0.237500X-0.250000X0*%
|
||||
%ADD14R,0.600000X1.450000*%
|
||||
%ADD15R,0.300000X1.450000*%
|
||||
%ADD16RoundRect,0.237500X0.300000X0.237500X-0.300000X0.237500X-0.300000X-0.237500X0.300000X-0.237500X0*%
|
||||
%ADD17R,0.650000X1.560000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
%TO.C,C1*%
|
||||
X81661000Y-98478000D03*
|
||||
X81661000Y-100203000D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,R7*%
|
||||
X97663000Y-57150000D03*
|
||||
X95838000Y-57150000D03*
|
||||
%TD*%
|
||||
D12*
|
||||
%TO.C,D1*%
|
||||
X78547000Y-77901800D03*
|
||||
X77597000Y-77901800D03*
|
||||
X76647000Y-77901800D03*
|
||||
X76647000Y-80176800D03*
|
||||
X78547000Y-80176800D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,R3*%
|
||||
X79612066Y-71094600D03*
|
||||
X79612066Y-69269600D03*
|
||||
%TD*%
|
||||
D14*
|
||||
%TO.C,J37*%
|
||||
X108860000Y-55515000D03*
|
||||
X108060000Y-55515000D03*
|
||||
D15*
|
||||
X106860000Y-55515000D03*
|
||||
X105860000Y-55515000D03*
|
||||
X105360000Y-55515000D03*
|
||||
X104360000Y-55515000D03*
|
||||
D14*
|
||||
X103160000Y-55515000D03*
|
||||
X102360000Y-55515000D03*
|
||||
X102360000Y-55515000D03*
|
||||
X103160000Y-55515000D03*
|
||||
D15*
|
||||
X103860000Y-55515000D03*
|
||||
X104860000Y-55515000D03*
|
||||
X106360000Y-55515000D03*
|
||||
X107360000Y-55515000D03*
|
||||
D14*
|
||||
X108060000Y-55515000D03*
|
||||
X108860000Y-55515000D03*
|
||||
%TD*%
|
||||
D16*
|
||||
%TO.C,C2*%
|
||||
X74902400Y-96610000D03*
|
||||
X73177400Y-96610000D03*
|
||||
%TD*%
|
||||
D17*
|
||||
%TO.C,U3*%
|
||||
X93050400Y-57142400D03*
|
||||
X92100400Y-57142400D03*
|
||||
X91150400Y-57142400D03*
|
||||
X91150400Y-59842400D03*
|
||||
X92100400Y-59842400D03*
|
||||
X93050400Y-59842400D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,R8*%
|
||||
X97661100Y-55549800D03*
|
||||
X95836100Y-55549800D03*
|
||||
%TD*%
|
||||
D13*
|
||||
%TO.C,R4*%
|
||||
X81169932Y-71094600D03*
|
||||
X81169932Y-69269600D03*
|
||||
%TD*%
|
||||
%TO.C,R2*%
|
||||
X78054200Y-71094600D03*
|
||||
X78054200Y-69269600D03*
|
||||
%TD*%
|
||||
%TO.C,R5*%
|
||||
X82727800Y-71094600D03*
|
||||
X82727800Y-69269600D03*
|
||||
%TD*%
|
||||
D11*
|
||||
%TO.C,R1*%
|
||||
X80387200Y-90906600D03*
|
||||
X78562200Y-90906600D03*
|
||||
%TD*%
|
||||
M02*
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,127 @@
|
||||
{
|
||||
"Header": {
|
||||
"GenerationSoftware": {
|
||||
"Vendor": "KiCad",
|
||||
"Application": "Pcbnew",
|
||||
"Version": "6.0.5"
|
||||
},
|
||||
"CreationDate": "2022-09-23T09:05:14+03:00"
|
||||
},
|
||||
"GeneralSpecs": {
|
||||
"ProjectId": {
|
||||
"Name": "Canon_manage",
|
||||
"GUID": "43616e6f-6e5f-46d6-916e-6167652e6b69",
|
||||
"Revision": "rev?"
|
||||
},
|
||||
"Size": {
|
||||
"X": 73.8605,
|
||||
"Y": 75.5527
|
||||
},
|
||||
"LayerNumber": 2,
|
||||
"BoardThickness": 1.6,
|
||||
"Finish": "None"
|
||||
},
|
||||
"DesignRules": [
|
||||
{
|
||||
"Layers": "Outer",
|
||||
"PadToPad": 0.0,
|
||||
"PadToTrack": 0.0,
|
||||
"TrackToTrack": 0.1,
|
||||
"MinLineWidth": 0.2,
|
||||
"TrackToRegion": 0.508,
|
||||
"RegionToRegion": 0.508
|
||||
}
|
||||
],
|
||||
"FilesAttributes": [
|
||||
{
|
||||
"Path": "Canon_manage-F_Cu.gbr",
|
||||
"FileFunction": "Copper,L1,Top",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-B_Cu.gbr",
|
||||
"FileFunction": "Copper,L2,Bot",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-F_Paste.gbr",
|
||||
"FileFunction": "SolderPaste,Top",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-B_Paste.gbr",
|
||||
"FileFunction": "SolderPaste,Bot",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-F_Silkscreen.gbr",
|
||||
"FileFunction": "Legend,Top",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-B_Silkscreen.gbr",
|
||||
"FileFunction": "Legend,Bot",
|
||||
"FilePolarity": "Positive"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-F_Mask.gbr",
|
||||
"FileFunction": "SolderMask,Top",
|
||||
"FilePolarity": "Negative"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-B_Mask.gbr",
|
||||
"FileFunction": "SolderMask,Bot",
|
||||
"FilePolarity": "Negative"
|
||||
},
|
||||
{
|
||||
"Path": "Canon_manage-Edge_Cuts.gbr",
|
||||
"FileFunction": "Profile",
|
||||
"FilePolarity": "Positive"
|
||||
}
|
||||
],
|
||||
"MaterialStackup": [
|
||||
{
|
||||
"Type": "Legend",
|
||||
"Name": "Top Silk Screen"
|
||||
},
|
||||
{
|
||||
"Type": "SolderPaste",
|
||||
"Name": "Top Solder Paste"
|
||||
},
|
||||
{
|
||||
"Type": "SolderMask",
|
||||
"Thickness": 0.01,
|
||||
"Name": "Top Solder Mask"
|
||||
},
|
||||
{
|
||||
"Type": "Copper",
|
||||
"Thickness": 0.035,
|
||||
"Name": "F.Cu"
|
||||
},
|
||||
{
|
||||
"Type": "Dielectric",
|
||||
"Thickness": 1.51,
|
||||
"Material": "FR4",
|
||||
"Name": "F.Cu/B.Cu",
|
||||
"Notes": "Type: dielectric layer 1 (from F.Cu to B.Cu)"
|
||||
},
|
||||
{
|
||||
"Type": "Copper",
|
||||
"Thickness": 0.035,
|
||||
"Name": "B.Cu"
|
||||
},
|
||||
{
|
||||
"Type": "SolderMask",
|
||||
"Thickness": 0.01,
|
||||
"Name": "Bottom Solder Mask"
|
||||
},
|
||||
{
|
||||
"Type": "SolderPaste",
|
||||
"Name": "Bottom Solder Paste"
|
||||
},
|
||||
{
|
||||
"Type": "Legend",
|
||||
"Name": "Bottom Silk Screen"
|
||||
}
|
||||
]
|
||||
}
|
||||
8994
F1:F103/Canon_managing_device/kicad/outliers.dxf
Normal file
8994
F1:F103/Canon_managing_device/kicad/outliers.dxf
Normal file
File diff suppressed because it is too large
Load Diff
11294
F1:F103/Canon_managing_device/kicad/silk.dxf
Normal file
11294
F1:F103/Canon_managing_device/kicad/silk.dxf
Normal file
File diff suppressed because it is too large
Load Diff
79
F1:F103/Canon_managing_device/main.c
Normal file
79
F1:F103/Canon_managing_device/main.c
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "canon.h"
|
||||
#include "hardware.h"
|
||||
#include "proto.h"
|
||||
#include "spi.h"
|
||||
#include "usb.h"
|
||||
|
||||
#define USBBUFSZ 127
|
||||
|
||||
volatile uint32_t Tms = 0;
|
||||
|
||||
void sys_tick_handler(void){
|
||||
++Tms;
|
||||
}
|
||||
|
||||
// usb getline
|
||||
char *get_USB(){
|
||||
static char tmpbuf[USBBUFSZ+1], *curptr = tmpbuf;
|
||||
static int rest = USBBUFSZ;
|
||||
uint8_t x = USB_receive(curptr);
|
||||
if(!x) return NULL;
|
||||
curptr[x] = 0;
|
||||
if(curptr[x-1] == '\n'){
|
||||
curptr = tmpbuf;
|
||||
rest = USBBUFSZ;
|
||||
return tmpbuf;
|
||||
}
|
||||
curptr += x; rest -= x;
|
||||
if(rest <= 0){ // buffer overflow
|
||||
curptr = tmpbuf;
|
||||
rest = USBBUFSZ;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void){
|
||||
sysreset();
|
||||
StartHSE();
|
||||
SysTick_Config(72000);
|
||||
hw_setup();
|
||||
USB_setup();
|
||||
spi_setup();
|
||||
canon_init();
|
||||
|
||||
uint32_t ctr = Tms, SPIctr = Tms;
|
||||
while(1){
|
||||
if(Tms - ctr > 499){
|
||||
ctr = Tms;
|
||||
LED_blink(LED0);
|
||||
}
|
||||
char *txt = NULL;
|
||||
usb_proc();
|
||||
if((txt = get_USB())){
|
||||
const char *ans = parse_cmd(txt);
|
||||
if(ans) USB_send(ans);
|
||||
}
|
||||
if(Tms != SPIctr){ // not more than once per 1ms
|
||||
SPIctr = Tms;
|
||||
canon_proc();
|
||||
}
|
||||
}
|
||||
}
|
||||
378
F1:F103/Canon_managing_device/proto.c
Normal file
378
F1:F103/Canon_managing_device/proto.c
Normal file
@ -0,0 +1,378 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "canon.h"
|
||||
#include "hardware.h"
|
||||
#include "proto.h"
|
||||
#include "spi.h"
|
||||
#include "usb.h"
|
||||
#include "version.inc"
|
||||
|
||||
char *omit_spaces(const char *buf){
|
||||
while(*buf){
|
||||
if(*buf > ' ') break;
|
||||
++buf;
|
||||
}
|
||||
return (char*)buf;
|
||||
}
|
||||
|
||||
// In case of overflow return `buf` and N==0xffffffff
|
||||
// read decimal number & return pointer to next non-number symbol
|
||||
static char *getdec(const char *buf, uint32_t *N){
|
||||
char *start = (char*)buf;
|
||||
uint32_t num = 0;
|
||||
while(*buf){
|
||||
char c = *buf;
|
||||
if(c < '0' || c > '9'){
|
||||
break;
|
||||
}
|
||||
if(num > 429496729 || (num == 429496729 && c > '5')){ // overflow
|
||||
*N = 0xffffff;
|
||||
return start;
|
||||
}
|
||||
num *= 10;
|
||||
num += c - '0';
|
||||
++buf;
|
||||
}
|
||||
*N = num;
|
||||
return (char*)buf;
|
||||
}
|
||||
// read hexadecimal number (without 0x prefix!)
|
||||
static char *gethex(const char *buf, uint32_t *N){
|
||||
char *start = (char*)buf;
|
||||
uint32_t num = 0;
|
||||
while(*buf){
|
||||
char c = *buf;
|
||||
uint8_t M = 0;
|
||||
if(c >= '0' && c <= '9'){
|
||||
M = '0';
|
||||
}else if(c >= 'A' && c <= 'F'){
|
||||
M = 'A' - 10;
|
||||
}else if(c >= 'a' && c <= 'f'){
|
||||
M = 'a' - 10;
|
||||
}
|
||||
if(M){
|
||||
if(num & 0xf0000000){ // overflow
|
||||
*N = 0xffffff;
|
||||
return start;
|
||||
}
|
||||
num <<= 4;
|
||||
num += c - M;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
++buf;
|
||||
}
|
||||
*N = num;
|
||||
return (char*)buf;
|
||||
}
|
||||
// read octal number (without 0 prefix!)
|
||||
static char *getoct(const char *buf, uint32_t *N){
|
||||
char *start = (char*)buf;
|
||||
uint32_t num = 0;
|
||||
while(*buf){
|
||||
char c = *buf;
|
||||
if(c < '0' || c > '7'){
|
||||
break;
|
||||
}
|
||||
if(num & 0xe0000000){ // overflow
|
||||
*N = 0xffffff;
|
||||
return start;
|
||||
}
|
||||
num <<= 3;
|
||||
num += c - '0';
|
||||
++buf;
|
||||
}
|
||||
*N = num;
|
||||
return (char*)buf;
|
||||
}
|
||||
// read binary number (without b prefix!)
|
||||
static char *getbin(const char *buf, uint32_t *N){
|
||||
char *start = (char*)buf;
|
||||
uint32_t num = 0;
|
||||
while(*buf){
|
||||
char c = *buf;
|
||||
if(c < '0' || c > '1'){
|
||||
break;
|
||||
}
|
||||
if(num & 0x80000000){ // overflow
|
||||
*N = 0xffffff;
|
||||
return start;
|
||||
}
|
||||
num <<= 1;
|
||||
if(c == '1') num |= 1;
|
||||
++buf;
|
||||
}
|
||||
*N = num;
|
||||
return (char*)buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief getnum - read uint32_t from string (dec, hex or bin: 127, 0x7f, 0b1111111)
|
||||
* @param buf - buffer with number and so on
|
||||
* @param N - the number read
|
||||
* @return pointer to first non-number symbol in buf
|
||||
* (if it is == buf, there's no number or if *N==0xffffffff there was overflow)
|
||||
*/
|
||||
char *getnum(const char *txt, uint32_t *N){
|
||||
char *nxt = NULL;
|
||||
char *s = omit_spaces(txt);
|
||||
if(*s == '0'){ // hex, oct or 0
|
||||
if(s[1] == 'x' || s[1] == 'X'){ // hex
|
||||
nxt = gethex(s+2, N);
|
||||
if(nxt == s+2) nxt = (char*)txt;
|
||||
}else if(s[1] > '0'-1 && s[1] < '8'){ // oct
|
||||
nxt = getoct(s+1, N);
|
||||
if(nxt == s+1) nxt = (char*)txt;
|
||||
}else{ // 0
|
||||
nxt = s+1;
|
||||
*N = 0;
|
||||
}
|
||||
}else if(*s == 'b' || *s == 'B'){
|
||||
nxt = getbin(s+1, N);
|
||||
if(nxt == s+1) nxt = (char*)txt;
|
||||
}else{
|
||||
nxt = getdec(s, N);
|
||||
if(nxt == s) nxt = (char*)txt;
|
||||
}
|
||||
return nxt;
|
||||
}
|
||||
|
||||
const char* helpmsg =
|
||||
"https://github.com/eddyem/stm32samples/tree/master/F1-nolib/USB_Canon_management build#" BUILD_NUMBER " @ " BUILD_DATE "\n"
|
||||
"0 - move to smallest foc value (e.g. 2.5m)\n"
|
||||
"1 - move to largest foc value (e.g. infinity)\n"
|
||||
"d - open/close diaphragm by 1 step (+/-), open/close fully (o/c) (no way to know it current status)\n"
|
||||
"f - get focus state or move it to given relative position\n"
|
||||
"h - turn on hand focus management\n"
|
||||
"i - get lens information\n"
|
||||
"l - get lens model\n"
|
||||
"r - get regulators' state\n"
|
||||
"\t\tdebugging commands:\n"
|
||||
"F - change SPI flags (F f val), f== l-LSBFIRST, b-BR [18MHz/2^(b+1)], p-CPOL, h-CPHA\n"
|
||||
"G - get SPI status\n"
|
||||
"I - reinit SPI\n"
|
||||
"R - software reset\n"
|
||||
"S - send data over SPI\n"
|
||||
"T - show Tms value\n"
|
||||
;
|
||||
|
||||
#define STBUFSZ 255
|
||||
static char stbuf[STBUFSZ+1], *bptr = NULL;
|
||||
static int blen = 0;
|
||||
static void initbuf(){bptr = stbuf; blen = STBUFSZ; *bptr = 0;}
|
||||
#define newline() do{if(blen){ *bptr++ = '\n'; *bptr = 0; --blen; }}while(0)
|
||||
static void add2buf(const char *s){
|
||||
while(blen && *s){
|
||||
*bptr++ = *s++;
|
||||
--blen;
|
||||
}
|
||||
*bptr = 0;
|
||||
}
|
||||
|
||||
static void errw(int e){
|
||||
if(e){
|
||||
add2buf("Error with code ");
|
||||
add2buf(u2str(e));
|
||||
if(e == 1) add2buf(" (busy or need initialization)");
|
||||
}else add2buf("OK");
|
||||
}
|
||||
|
||||
extern uint8_t usbON;
|
||||
const char *parse_cmd(const char *buf){
|
||||
//uint32_t u3;
|
||||
initbuf();
|
||||
if(buf[1] == '\n' || !buf[1]){ // one symbol commands
|
||||
switch(*buf){
|
||||
case '0':
|
||||
errw(canon_sendcmd(CANON_FMIN));
|
||||
break;
|
||||
case '1':
|
||||
errw(canon_sendcmd(CANON_FMAX));
|
||||
break;
|
||||
case 'f':
|
||||
errw(canon_focus(0));
|
||||
break;
|
||||
case 'i':
|
||||
errw(canon_getinfo());
|
||||
break;
|
||||
case 'l':
|
||||
errw(canon_asku16(CANON_GETMODEL));
|
||||
break;
|
||||
case 'r':
|
||||
errw(canon_asku16(CANON_GETREG));
|
||||
break;
|
||||
case 'F': // just watch SPI->CR1 value
|
||||
add2buf("SPI1->CR1="); add2buf(u2hexstr(SPI_CR1));
|
||||
break;
|
||||
case 'G':
|
||||
add2buf("SPI ");
|
||||
switch(SPI_status){
|
||||
case SPI_NOTREADY:
|
||||
add2buf("not ready");
|
||||
break;
|
||||
case SPI_READY:
|
||||
add2buf("ready");
|
||||
break;
|
||||
case SPI_BUSY:
|
||||
add2buf("busy");
|
||||
break;
|
||||
default:
|
||||
add2buf("unknown");
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
errw(canon_sendcmd(CANON_FOCBYHANDS));
|
||||
break;
|
||||
case 'I':
|
||||
add2buf("Reinit SPI");
|
||||
spi_setup();
|
||||
canon_init();
|
||||
break;
|
||||
case 'R':
|
||||
USB_send("Soft reset\n");
|
||||
NVIC_SystemReset();
|
||||
break;
|
||||
case 'T':
|
||||
add2buf("Tms=");
|
||||
add2buf(u2str(Tms));
|
||||
break;
|
||||
default:
|
||||
return helpmsg;
|
||||
}
|
||||
newline();
|
||||
return stbuf;
|
||||
}
|
||||
uint32_t D = 0, N = 0;
|
||||
char *nxt;
|
||||
switch(*buf){ // long messages
|
||||
case 'd':
|
||||
nxt = omit_spaces(buf+1);
|
||||
errw(canon_diaphragm(*nxt));
|
||||
break;
|
||||
case 'f': // move focus
|
||||
buf = omit_spaces(buf + 1);
|
||||
int16_t neg = 1;
|
||||
if(*buf == '-'){ ++buf; neg = -1; }
|
||||
nxt = getnum(buf, &D);
|
||||
if(nxt == buf) add2buf("Need number");
|
||||
else if(D > 0x7fff) add2buf("From -0x7fff to 0x7fff");
|
||||
else errw(canon_focus(neg * (int32_t)D));
|
||||
break;
|
||||
case 'F': // SPI flags
|
||||
nxt = omit_spaces(buf+1);
|
||||
char c = *nxt;
|
||||
if(*nxt && *nxt != '\n'){
|
||||
buf = nxt + 1;
|
||||
nxt = getnum(buf, &D);
|
||||
if(buf == nxt || D > 7) return helpmsg;
|
||||
}
|
||||
switch(c){
|
||||
case 'b':
|
||||
SPI_CR1 &= ~SPI_CR1_BR;
|
||||
SPI_CR1 |= ((uint8_t)D) << 3;
|
||||
break;
|
||||
case 'h':
|
||||
if(D) SPI_CR1 |= SPI_CR1_CPHA;
|
||||
else SPI_CR1 &= ~SPI_CR1_CPHA;
|
||||
break;
|
||||
case 'l':
|
||||
if(D) SPI_CR1 |= SPI_CR1_LSBFIRST;
|
||||
else SPI_CR1 &= ~SPI_CR1_LSBFIRST;
|
||||
break;
|
||||
case 'p':
|
||||
if(D) SPI_CR1 |= SPI_CR1_CPOL;
|
||||
else SPI_CR1 &= ~SPI_CR1_CPOL;
|
||||
break;
|
||||
default:
|
||||
return helpmsg;
|
||||
}
|
||||
add2buf("SPI_CR1="); add2buf(u2hexstr(SPI_CR1));
|
||||
break;
|
||||
case 'S': // use stbuf here to store user data
|
||||
++buf;
|
||||
do{
|
||||
nxt = getnum(buf, &D);
|
||||
if(buf == nxt) break;
|
||||
buf = nxt;
|
||||
if(D > 0xff){
|
||||
USB_send("Number should be from 0 to 0xff\n");
|
||||
return NULL;
|
||||
}
|
||||
stbuf[N++] = (uint8_t)D;
|
||||
if(N == STBUFSZ) break;
|
||||
}while(1);
|
||||
if(N == 0){
|
||||
USB_send("Enter data bytes\n");
|
||||
return NULL;
|
||||
}
|
||||
USB_send("Send: ");
|
||||
for(uint32_t i = 0; i < N; ++i){
|
||||
if(i) USB_send(", ");
|
||||
USB_send(u2hexstr(stbuf[i]));
|
||||
}
|
||||
USB_send("\n... ");
|
||||
canon_setlastcmd(stbuf[0]);
|
||||
if(N == SPI_transmit((uint8_t*)stbuf, (uint8_t)N)) USB_send("OK\n");
|
||||
else USB_send("Failed\n");
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
return buf;
|
||||
}
|
||||
newline();
|
||||
return stbuf;
|
||||
}
|
||||
|
||||
|
||||
// return string with number `val`
|
||||
char *u2str(uint32_t val){
|
||||
static char strbuf[11];
|
||||
char *bufptr = &strbuf[10];
|
||||
*bufptr = 0;
|
||||
if(!val){
|
||||
*(--bufptr) = '0';
|
||||
}else{
|
||||
while(val){
|
||||
*(--bufptr) = val % 10 + '0';
|
||||
val /= 10;
|
||||
}
|
||||
}
|
||||
return bufptr;
|
||||
}
|
||||
|
||||
char *u2hexstr(uint32_t val){
|
||||
static char strbuf[11] = "0x";
|
||||
char *sptr = strbuf + 2;
|
||||
uint8_t *ptr = (uint8_t*)&val + 3;
|
||||
int8_t i, j, z=1;
|
||||
for(i = 0; i < 4; ++i, --ptr){
|
||||
if(*ptr == 0){ // omit leading zeros
|
||||
if(i == 3) z = 0;
|
||||
if(z) continue;
|
||||
}
|
||||
else z = 0;
|
||||
for(j = 1; j > -1; --j){
|
||||
uint8_t half = (*ptr >> (4*j)) & 0x0f;
|
||||
if(half < 10) *sptr++ = half + '0';
|
||||
else *sptr++ = half - 10 + 'a';
|
||||
}
|
||||
}
|
||||
*sptr = 0;
|
||||
return strbuf;
|
||||
}
|
||||
31
F1:F103/Canon_managing_device/proto.h
Normal file
31
F1:F103/Canon_managing_device/proto.h
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef PROTO_H__
|
||||
#define PROTO_H__
|
||||
|
||||
#include <stm32f1.h>
|
||||
|
||||
const char *parse_cmd(const char *buf);
|
||||
char *omit_spaces(const char *buf);
|
||||
char *getnum(const char *buf, uint32_t *N);
|
||||
char *u2str(uint32_t val);
|
||||
char *u2hexstr(uint32_t val);
|
||||
|
||||
#endif // PROTO_H__
|
||||
77
F1:F103/Canon_managing_device/ringbuffer.c
Normal file
77
F1:F103/Canon_managing_device/ringbuffer.c
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stm32f1.h>
|
||||
|
||||
#include "ringbuffer.h"
|
||||
|
||||
// ring buffer
|
||||
static char ringbuffer[RBSIZE];
|
||||
// head - position of first data byte
|
||||
// tail - position of last data byte + 1
|
||||
// head == tail - empty! So, buffer can't store more than RBSIZE-1 bytes of data!
|
||||
static volatile int head = 0, tail = 0;
|
||||
|
||||
static int datalen(){
|
||||
if(tail >= head) return (tail - head);
|
||||
else return (RBSIZE - head + tail);
|
||||
}
|
||||
static int restlen(){
|
||||
return (RBSIZE - 1 - datalen());
|
||||
}
|
||||
|
||||
static void mcpy(char *targ, const char *src, int l){
|
||||
while(l--) *targ++ = *src++;
|
||||
}
|
||||
|
||||
TRUE_INLINE void incr(volatile int *what, int n){
|
||||
*what += n;
|
||||
if(*what >= RBSIZE) *what -= RBSIZE;
|
||||
}
|
||||
|
||||
int RB_read(char s[BLOCKSIZE]){
|
||||
int l = datalen();
|
||||
if(!l) return 0;
|
||||
if(l > BLOCKSIZE) l = BLOCKSIZE;
|
||||
int _1st = RBSIZE - head;
|
||||
if(_1st > l) _1st = l;
|
||||
if(_1st > BLOCKSIZE) _1st = BLOCKSIZE;
|
||||
mcpy(s, ringbuffer+head, _1st);
|
||||
if(_1st < BLOCKSIZE && l > _1st){
|
||||
mcpy(s+_1st, ringbuffer, l-_1st);
|
||||
incr(&head, l);
|
||||
return l;
|
||||
}
|
||||
incr(&head ,_1st);
|
||||
return _1st;
|
||||
}
|
||||
|
||||
int RB_write(const char *str, int l){
|
||||
int r = restlen();
|
||||
if(l > r) l = r;
|
||||
if(!l) return 0;
|
||||
int _1st = RBSIZE - tail;
|
||||
if(_1st > l) _1st = l;
|
||||
mcpy(ringbuffer+tail, str, _1st);
|
||||
if(_1st < l){ // add another piece from start
|
||||
mcpy(ringbuffer, str+_1st, l-_1st);
|
||||
}
|
||||
incr(&tail, l);
|
||||
return l;
|
||||
}
|
||||
|
||||
33
F1:F103/Canon_managing_device/ringbuffer.h
Normal file
33
F1:F103/Canon_managing_device/ringbuffer.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* This file is part of the canonmanage project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef RINGBUFFER_H__
|
||||
#define RINGBUFFER_H__
|
||||
|
||||
#include "usbhw.h" // for USB_TXBUFSZ
|
||||
|
||||
// ring buffer size in bytes
|
||||
#define RBSIZE (512)
|
||||
// max reading portion size
|
||||
#define BLOCKSIZE (USB_TXBUFSZ)
|
||||
|
||||
int RB_read(char s[BLOCKSIZE]);
|
||||
int RB_write(const char *str, int l);
|
||||
|
||||
#endif // RINGBUFFER_H__
|
||||
80
F1:F103/Canon_managing_device/spi.c
Normal file
80
F1:F103/Canon_managing_device/spi.c
Normal file
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* This file is part of the LED_screen project.
|
||||
* Copyright 2019 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// memcpy hangs -> use my own
|
||||
|
||||
#include "spi.h"
|
||||
#include "hardware.h"
|
||||
#ifdef EBUG
|
||||
#include "usb.h"
|
||||
#endif
|
||||
#include "proto.h"
|
||||
|
||||
/*
|
||||
static void mymemcpy(uint8_t *dest, uint8_t *src, int len){
|
||||
while(len--) *dest++ = *src++;
|
||||
}*/
|
||||
|
||||
// CR1 register default values, can be changed in 'proto.c'
|
||||
uint32_t SPI_CR1 = SPI_CR1_MSTR | SPI_CR1_BR | SPI_CR1_SSM | SPI_CR1_SSI | SPI_CR1_CPHA | SPI_CR1_CPOL;
|
||||
|
||||
spiStatus SPI_status = SPI_NOTREADY;
|
||||
static uint8_t inbuff[SPIBUFSZ], lastlen = 0;
|
||||
|
||||
void spi_setup(){
|
||||
RCC->APB2ENR |= SPI_APB2; // Enable the peripheral clock SPI1
|
||||
// master, no slave select, BR=F/16, CPOL/CPHA - polarity.
|
||||
SPIx->CR1 = SPI_CR1;
|
||||
SPI_status = SPI_READY;
|
||||
SPIx->CR1 |= SPI_CR1_SPE; // enable SPI
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SPI_transmit - transmit data over SPI DMA
|
||||
* @param buf - data to transmit
|
||||
* @param len - its length
|
||||
* @return amount of transmitted data
|
||||
*/
|
||||
uint8_t SPI_transmit(const uint8_t *buf, uint8_t len){
|
||||
if(!buf || !len) return 0; // bad data format
|
||||
if(SPI_status != SPI_READY) return 0; // spi not ready to transmit data
|
||||
for(uint8_t x = 0; x < len; ++x){
|
||||
while(!(SPI1->SR & SPI_SR_TXE));
|
||||
SPI1->DR = buf[x];
|
||||
while(!(SPI1->SR & SPI_SR_BSY));
|
||||
while(!(SPI1->SR & SPI_SR_RXNE));
|
||||
inbuff[x] = SPI1->DR;
|
||||
for(int ctr = 0; ctr < 3600; ++ctr) nop(); // ~100mks delay
|
||||
}
|
||||
lastlen = len;
|
||||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SPI_receive - get received data
|
||||
* @param len (o) - received length
|
||||
* @return received buffer
|
||||
*/
|
||||
uint8_t *SPI_receive(uint8_t *len){
|
||||
if(SPI_status != SPI_READY) return NULL;
|
||||
if(lastlen == 0) return NULL;
|
||||
if(len) *len = lastlen;
|
||||
lastlen = 0;
|
||||
return inbuff;
|
||||
}
|
||||
|
||||
39
F1:F103/Canon_managing_device/spi.h
Normal file
39
F1:F103/Canon_managing_device/spi.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of the LED_screen project.
|
||||
* Copyright 2019 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef SPI_H__
|
||||
#define SPI_H__
|
||||
|
||||
#include "stm32f1.h"
|
||||
|
||||
extern uint32_t SPI_CR1;
|
||||
|
||||
typedef enum{
|
||||
SPI_NOTREADY,
|
||||
SPI_READY,
|
||||
SPI_BUSY
|
||||
} spiStatus;
|
||||
|
||||
extern spiStatus SPI_status;
|
||||
|
||||
void spi_setup();
|
||||
uint8_t SPI_transmit(const uint8_t *buf, uint8_t len);
|
||||
uint8_t *SPI_receive(uint8_t *len);
|
||||
|
||||
#endif // SPI_H__
|
||||
116
F1:F103/Canon_managing_device/usb.c
Normal file
116
F1:F103/Canon_managing_device/usb.c
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ringbuffer.h"
|
||||
#include "usb.h"
|
||||
#include "usb_lib.h"
|
||||
|
||||
static char usbbuff[USB_TXBUFSZ]; // temporary buffer for sending data
|
||||
volatile uint8_t tx_succesfull = 1;
|
||||
static volatile uint8_t rxNE = 0;
|
||||
|
||||
void send_next(){
|
||||
//if(!tx_succesfull) return;
|
||||
static int lastdsz = 0;
|
||||
int buflen = RB_read(usbbuff);
|
||||
if(!buflen){
|
||||
if(lastdsz == 64) EP_Write(3, NULL, 0); // send ZLP after 64 bits packet when nothing more to send
|
||||
lastdsz = 0;
|
||||
return;
|
||||
}
|
||||
tx_succesfull = 0;
|
||||
EP_Write(3, (uint8_t*)usbbuff, buflen);
|
||||
lastdsz = buflen;
|
||||
}
|
||||
|
||||
// put `buf` into queue to send
|
||||
void USB_send(const char *buf){
|
||||
if(!buf || !usbON) return;
|
||||
int len = 0;
|
||||
const char *b = buf;
|
||||
while(*b++) ++len;
|
||||
if(!usbON || !len) return;
|
||||
int l = len;
|
||||
while(l){
|
||||
if(tx_succesfull) send_next();
|
||||
int a = RB_write(buf, l);
|
||||
l -= a;
|
||||
buf += a;
|
||||
}
|
||||
}
|
||||
|
||||
// interrupt IN handler (never used?)
|
||||
static void EP1_Handler(){
|
||||
uint16_t epstatus = KEEP_DTOG(USB->EPnR[1]);
|
||||
if(RX_FLAG(epstatus)) epstatus = (epstatus & ~USB_EPnR_STAT_TX) ^ USB_EPnR_STAT_RX; // set valid RX
|
||||
else epstatus = epstatus & ~(USB_EPnR_STAT_TX|USB_EPnR_STAT_RX);
|
||||
// clear CTR
|
||||
epstatus = (epstatus & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX));
|
||||
USB->EPnR[1] = epstatus;
|
||||
}
|
||||
|
||||
// data IN/OUT handlers
|
||||
static void transmit_Handler(){ // EP3IN
|
||||
tx_succesfull = 1;
|
||||
uint16_t epstatus = KEEP_DTOG_STAT(USB->EPnR[3]);
|
||||
// clear CTR keep DTOGs & STATs
|
||||
USB->EPnR[3] = (epstatus & ~(USB_EPnR_CTR_TX)); // clear TX ctr
|
||||
}
|
||||
|
||||
static void receive_Handler(){ // EP2OUT
|
||||
rxNE = 1;
|
||||
uint16_t epstatus = KEEP_DTOG_STAT(USB->EPnR[2]);
|
||||
USB->EPnR[2] = (epstatus & ~(USB_EPnR_CTR_RX)); // clear RX ctr
|
||||
}
|
||||
|
||||
void usb_proc(){
|
||||
switch(USB_Dev.USB_Status){
|
||||
case USB_STATE_CONFIGURED:
|
||||
// make new BULK endpoint
|
||||
// Buffer have 1024 bytes, but last 256 we use for CAN bus (30.2 of RM: USB main features)
|
||||
EP_Init(1, EP_TYPE_INTERRUPT, USB_EP1BUFSZ, 0, EP1_Handler); // IN1 - transmit
|
||||
EP_Init(2, EP_TYPE_BULK, 0, USB_RXBUFSZ, receive_Handler); // OUT2 - receive data
|
||||
EP_Init(3, EP_TYPE_BULK, USB_TXBUFSZ, 0, transmit_Handler); // IN3 - transmit data
|
||||
USB_Dev.USB_Status = USB_STATE_CONNECTED;
|
||||
break;
|
||||
case USB_STATE_DEFAULT:
|
||||
case USB_STATE_ADDRESSED:
|
||||
if(usbON){
|
||||
usbON = 0;
|
||||
}
|
||||
break;
|
||||
default: // USB_STATE_CONNECTED - send next data portion
|
||||
if(!usbON) return;
|
||||
if(tx_succesfull) send_next();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_receive
|
||||
* @param buf (i) - buffer[64] for received data
|
||||
* @return amount of received bytes
|
||||
*/
|
||||
uint8_t USB_receive(char *buf){
|
||||
if(!usbON || !rxNE) return 0;
|
||||
uint8_t sz = EP_Read(2, (uint16_t*)buf);
|
||||
uint16_t epstatus = KEEP_DTOG(USB->EPnR[2]);
|
||||
// keep stat_tx & set ACK rx
|
||||
USB->EPnR[2] = (epstatus & ~(USB_EPnR_STAT_TX)) ^ USB_EPnR_STAT_RX;
|
||||
rxNE = 0;
|
||||
return sz;
|
||||
}
|
||||
34
F1:F103/Canon_managing_device/usb.h
Normal file
34
F1:F103/Canon_managing_device/usb.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __USB_H__
|
||||
#define __USB_H__
|
||||
|
||||
#include "usbhw.h"
|
||||
|
||||
#define BUFFSIZE (64)
|
||||
|
||||
extern volatile uint8_t tx_succesfull;
|
||||
|
||||
void usb_proc();
|
||||
void send_next();
|
||||
void USB_send(const char *buf);
|
||||
uint8_t USB_receive(char *buf);
|
||||
|
||||
#endif // __USB_H__
|
||||
387
F1:F103/Canon_managing_device/usb_lib.c
Normal file
387
F1:F103/Canon_managing_device/usb_lib.c
Normal file
@ -0,0 +1,387 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "usb_lib.h"
|
||||
|
||||
ep_t endpoints[STM32ENDPOINTS];
|
||||
|
||||
usb_dev_t USB_Dev;
|
||||
static usb_LineCoding lineCoding = {115200, 0, 0, 8};
|
||||
config_pack_t setup_packet;
|
||||
uint8_t ep0databuf[EP0DATABUF_SIZE];
|
||||
uint8_t ep0dbuflen = 0;
|
||||
|
||||
usb_LineCoding getLineCoding(){return lineCoding;}
|
||||
|
||||
uint8_t usbON = 0; // device disconnected from terminal
|
||||
|
||||
// definition of parts common for USB_DeviceDescriptor & USB_DeviceQualifierDescriptor
|
||||
#define bcdUSB_L 0x10
|
||||
#define bcdUSB_H 0x01
|
||||
#define bDeviceClass 0
|
||||
#define bDeviceSubClass 0
|
||||
#define bDeviceProtocol 0
|
||||
#define bNumConfigurations 1
|
||||
|
||||
static const uint8_t USB_DeviceDescriptor[] = {
|
||||
18, // bLength
|
||||
0x01, // bDescriptorType - Device descriptor
|
||||
bcdUSB_L, // bcdUSB_L - 1.10
|
||||
bcdUSB_H, // bcdUSB_H
|
||||
bDeviceClass, // bDeviceClass - USB_COMM
|
||||
bDeviceSubClass, // bDeviceSubClass
|
||||
bDeviceProtocol, // bDeviceProtocol
|
||||
USB_EP0_BUFSZ, // bMaxPacketSize
|
||||
0x7b, // idVendor_L PL2303: VID=0x067b, PID=0x2303
|
||||
0x06, // idVendor_H
|
||||
0x03, // idProduct_L
|
||||
0x23, // idProduct_H
|
||||
0x00, // bcdDevice_Ver_L
|
||||
0x03, // bcdDevice_Ver_H
|
||||
0x01, // iManufacturer
|
||||
0x02, // iProduct
|
||||
0x00, // iSerialNumber
|
||||
bNumConfigurations // bNumConfigurations
|
||||
};
|
||||
|
||||
static const uint8_t USB_DeviceQualifierDescriptor[] = {
|
||||
10, //bLength
|
||||
0x06, // bDescriptorType - Device qualifier
|
||||
bcdUSB_L, // bcdUSB_L
|
||||
bcdUSB_H, // bcdUSB_H
|
||||
bDeviceClass, // bDeviceClass
|
||||
bDeviceSubClass, // bDeviceSubClass
|
||||
bDeviceProtocol, // bDeviceProtocol
|
||||
USB_EP0_BUFSZ, // bMaxPacketSize0
|
||||
bNumConfigurations, // bNumConfigurations
|
||||
0x00 // Reserved
|
||||
};
|
||||
|
||||
static const uint8_t USB_ConfigDescriptor[] = {
|
||||
/*Configuration Descriptor*/
|
||||
0x09, /* bLength: Configuration Descriptor size */
|
||||
0x02, /* bDescriptorType: Configuration */
|
||||
39, /* wTotalLength:no of returned bytes */
|
||||
0x00,
|
||||
0x01, /* bNumInterfaces: 1 interface */
|
||||
0x01, /* bConfigurationValue: Configuration value */
|
||||
0x00, /* iConfiguration: Index of string descriptor describing the configuration */
|
||||
0xa0, /* bmAttributes - Bus powered, Remote wakeup */
|
||||
0x32, /* MaxPower 100 mA */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*Interface Descriptor */
|
||||
0x09, /* bLength: Interface Descriptor size */
|
||||
0x04, /* bDescriptorType: Interface */
|
||||
0x00, /* bInterfaceNumber: Number of Interface */
|
||||
0x00, /* bAlternateSetting: Alternate setting */
|
||||
0x03, /* bNumEndpoints: 3 endpoints used */
|
||||
0xff, /* bInterfaceClass */
|
||||
0x00, /* bInterfaceSubClass */
|
||||
0x00, /* bInterfaceProtocol */
|
||||
0x00, /* iInterface: */
|
||||
///////////////////////////////////////////////////
|
||||
/*Endpoint 1 Descriptor*/
|
||||
0x07, /* bLength: Endpoint Descriptor size */
|
||||
0x05, /* bDescriptorType: Endpoint */
|
||||
0x81, /* bEndpointAddress IN1 */
|
||||
0x03, /* bmAttributes: Interrupt */
|
||||
0x0a, /* wMaxPacketSize LO: */
|
||||
0x00, /* wMaxPacketSize HI: */
|
||||
0x01, /* bInterval: */
|
||||
|
||||
/*Endpoint OUT2 Descriptor*/
|
||||
0x07, /* bLength: Endpoint Descriptor size */
|
||||
0x05, /* bDescriptorType: Endpoint */
|
||||
0x02, /* bEndpointAddress: OUT2 */
|
||||
0x02, /* bmAttributes: Bulk */
|
||||
(USB_RXBUFSZ & 0xff), /* wMaxPacketSize: 64 */
|
||||
(USB_RXBUFSZ >> 8),
|
||||
0x00, /* bInterval: ignore for Bulk transfer */
|
||||
|
||||
/*Endpoint IN3 Descriptor*/
|
||||
0x07, /* bLength: Endpoint Descriptor size */
|
||||
0x05, /* bDescriptorType: Endpoint */
|
||||
0x83, /* bEndpointAddress IN3 */
|
||||
0x02, /* bmAttributes: Bulk */
|
||||
(USB_TXBUFSZ & 0xff), /* wMaxPacketSize: 64 */
|
||||
(USB_TXBUFSZ >> 8),
|
||||
0x00, /* bInterval: ignore for Bulk transfer */
|
||||
};
|
||||
|
||||
_USB_LANG_ID_(USB_StringLangDescriptor, LANG_US);
|
||||
// these descriptors are not used in PL2303 emulator!
|
||||
_USB_STRING_(USB_StringSerialDescriptor, u"0");
|
||||
_USB_STRING_(USB_StringManufacturingDescriptor, u"Prolific Technology Inc.");
|
||||
_USB_STRING_(USB_StringProdDescriptor, u"USB-Serial Controller");
|
||||
|
||||
/*
|
||||
* default handlers
|
||||
*/
|
||||
// SET_LINE_CODING
|
||||
void WEAK linecoding_handler(usb_LineCoding __attribute__((unused)) *lc){
|
||||
}
|
||||
|
||||
// SET_CONTROL_LINE_STATE
|
||||
void WEAK clstate_handler(uint16_t __attribute__((unused)) val){
|
||||
}
|
||||
|
||||
// SEND_BREAK
|
||||
void WEAK break_handler(){
|
||||
}
|
||||
|
||||
// handler of vendor requests
|
||||
void WEAK vendor_handler(config_pack_t *packet){
|
||||
if(packet->bmRequestType & 0x80){ // read
|
||||
uint8_t c;
|
||||
switch(packet->wValue){
|
||||
case 0x8484:
|
||||
c = 2;
|
||||
break;
|
||||
case 0x0080:
|
||||
c = 1;
|
||||
break;
|
||||
case 0x8686:
|
||||
c = 0xaa;
|
||||
break;
|
||||
default:
|
||||
c = 0;
|
||||
}
|
||||
EP_WriteIRQ(0, &c, 1);
|
||||
}else{ // write ZLP
|
||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void wr0(const uint8_t *buf, uint16_t size){
|
||||
if(setup_packet.wLength < size) size = setup_packet.wLength; // shortened request
|
||||
if(size < endpoints[0].txbufsz){
|
||||
EP_WriteIRQ(0, buf, size);
|
||||
return;
|
||||
}
|
||||
while(size){
|
||||
uint16_t l = size;
|
||||
if(l > endpoints[0].txbufsz) l = endpoints[0].txbufsz;
|
||||
EP_WriteIRQ(0, buf, l);
|
||||
buf += l;
|
||||
size -= l;
|
||||
uint8_t needzlp = (l == endpoints[0].txbufsz) ? 1 : 0;
|
||||
if(size || needzlp){ // send last data buffer
|
||||
uint16_t status = KEEP_DTOG(USB->EPnR[0]);
|
||||
// keep DTOGs, clear CTR_RX,TX, set TX VALID, leave stat_Rx
|
||||
USB->EPnR[0] = (status & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX|USB_EPnR_STAT_RX))
|
||||
^ USB_EPnR_STAT_TX;
|
||||
uint32_t ctr = 1000000;
|
||||
while(--ctr && (USB->ISTR & USB_ISTR_CTR) == 0){IWDG->KR = IWDG_REFRESH;};
|
||||
if((USB->ISTR & USB_ISTR_CTR) == 0){
|
||||
return;
|
||||
}
|
||||
if(needzlp) EP_WriteIRQ(0, (uint8_t*)0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void get_descriptor(){
|
||||
switch(setup_packet.wValue){
|
||||
case DEVICE_DESCRIPTOR:
|
||||
wr0(USB_DeviceDescriptor, sizeof(USB_DeviceDescriptor));
|
||||
break;
|
||||
case CONFIGURATION_DESCRIPTOR:
|
||||
wr0(USB_ConfigDescriptor, sizeof(USB_ConfigDescriptor));
|
||||
break;
|
||||
case STRING_LANG_DESCRIPTOR:
|
||||
wr0((const uint8_t *)&USB_StringLangDescriptor, STRING_LANG_DESCRIPTOR_SIZE_BYTE);
|
||||
break;
|
||||
case STRING_MAN_DESCRIPTOR:
|
||||
wr0((const uint8_t *)&USB_StringManufacturingDescriptor, USB_StringManufacturingDescriptor.bLength);
|
||||
break;
|
||||
case STRING_PROD_DESCRIPTOR:
|
||||
wr0((const uint8_t *)&USB_StringProdDescriptor, USB_StringProdDescriptor.bLength);
|
||||
break;
|
||||
case STRING_SN_DESCRIPTOR:
|
||||
wr0((const uint8_t *)&USB_StringSerialDescriptor, USB_StringSerialDescriptor.bLength);
|
||||
break;
|
||||
case DEVICE_QUALIFIER_DESCRIPTOR:
|
||||
wr0(USB_DeviceQualifierDescriptor, USB_DeviceQualifierDescriptor[0]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t configuration = 0; // reply for GET_CONFIGURATION (==1 if configured)
|
||||
static inline void std_d2h_req(){
|
||||
uint16_t status = 0; // bus powered
|
||||
switch(setup_packet.bRequest){
|
||||
case GET_DESCRIPTOR:
|
||||
get_descriptor();
|
||||
break;
|
||||
case GET_STATUS:
|
||||
EP_WriteIRQ(0, (uint8_t *)&status, 2); // send status: Bus Powered
|
||||
break;
|
||||
case GET_CONFIGURATION:
|
||||
EP_WriteIRQ(0, &configuration, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void std_h2d_req(){
|
||||
switch(setup_packet.bRequest){
|
||||
case SET_ADDRESS:
|
||||
// new address will be assigned later - after acknowlegement or request to host
|
||||
USB_Dev.USB_Addr = setup_packet.wValue;
|
||||
break;
|
||||
case SET_CONFIGURATION:
|
||||
// Now device configured
|
||||
USB_Dev.USB_Status = USB_STATE_CONFIGURED;
|
||||
configuration = setup_packet.wValue;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
bmRequestType: 76543210
|
||||
7 direction: 0 - host->device, 1 - device->host
|
||||
65 type: 0 - standard, 1 - class, 2 - vendor
|
||||
4..0 getter: 0 - device, 1 - interface, 2 - endpoint, 3 - other
|
||||
*/
|
||||
/**
|
||||
* Endpoint0 (control) handler
|
||||
*/
|
||||
void EP0_Handler(){
|
||||
uint16_t epstatus = USB->EPnR[0]; // EP0R on input -> return this value after modifications
|
||||
uint8_t reqtype = setup_packet.bmRequestType & 0x7f;
|
||||
uint8_t dev2host = (setup_packet.bmRequestType & 0x80) ? 1 : 0;
|
||||
int rxflag = RX_FLAG(epstatus);
|
||||
if(rxflag && SETUP_FLAG(epstatus)){
|
||||
switch(reqtype){
|
||||
case STANDARD_DEVICE_REQUEST_TYPE: // standard device request
|
||||
if(dev2host){
|
||||
std_d2h_req();
|
||||
}else{
|
||||
std_h2d_req();
|
||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||
}
|
||||
break;
|
||||
case STANDARD_ENDPOINT_REQUEST_TYPE: // standard endpoint request
|
||||
if(setup_packet.bRequest == CLEAR_FEATURE){
|
||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||
}
|
||||
break;
|
||||
case VENDOR_REQUEST_TYPE:
|
||||
vendor_handler(&setup_packet);
|
||||
break;
|
||||
case CONTROL_REQUEST_TYPE:
|
||||
switch(setup_packet.bRequest){
|
||||
case GET_LINE_CODING:
|
||||
EP_WriteIRQ(0, (uint8_t*)&lineCoding, sizeof(lineCoding));
|
||||
break;
|
||||
case SET_LINE_CODING: // omit this for next stage, when data will come
|
||||
break;
|
||||
case SET_CONTROL_LINE_STATE:
|
||||
usbON = 1;
|
||||
clstate_handler(setup_packet.wValue);
|
||||
break;
|
||||
case SEND_BREAK:
|
||||
usbON = 0;
|
||||
break_handler();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(setup_packet.bRequest != GET_LINE_CODING) EP_WriteIRQ(0, (uint8_t *)0, 0); // write acknowledgement
|
||||
break;
|
||||
default:
|
||||
EP_WriteIRQ(0, (uint8_t *)0, 0);
|
||||
}
|
||||
}else if(rxflag){ // got data over EP0 or host acknowlegement
|
||||
if(endpoints[0].rx_cnt){
|
||||
if(setup_packet.bRequest == SET_LINE_CODING){
|
||||
linecoding_handler((usb_LineCoding*)ep0databuf);
|
||||
}
|
||||
}
|
||||
} else if(TX_FLAG(epstatus)){ // package transmitted
|
||||
// now we can change address after enumeration
|
||||
if ((USB->DADDR & USB_DADDR_ADD) != USB_Dev.USB_Addr){
|
||||
USB->DADDR = USB_DADDR_EF | USB_Dev.USB_Addr;
|
||||
// change state to ADRESSED
|
||||
USB_Dev.USB_Status = USB_STATE_ADDRESSED;
|
||||
}
|
||||
}
|
||||
epstatus = KEEP_DTOG(USB->EPnR[0]);
|
||||
if(rxflag) epstatus ^= USB_EPnR_STAT_TX; // start ZLP/data transmission
|
||||
else epstatus &= ~USB_EPnR_STAT_TX; // or leave unchanged
|
||||
// keep DTOGs, clear CTR_RX,TX, set RX VALID
|
||||
USB->EPnR[0] = (epstatus & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX)) ^ USB_EPnR_STAT_RX;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write data to EP buffer (called from IRQ handler)
|
||||
* @param number - EP number
|
||||
* @param *buf - array with data
|
||||
* @param size - its size
|
||||
*/
|
||||
void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size){
|
||||
if(size > endpoints[number].txbufsz) size = endpoints[number].txbufsz;
|
||||
uint16_t N2 = (size + 1) >> 1;
|
||||
// the buffer is 16-bit, so we should copy data as it would be uint16_t
|
||||
uint16_t *buf16 = (uint16_t *)buf;
|
||||
uint32_t *out = (uint32_t *)endpoints[number].tx_buf;
|
||||
for(int i = 0; i < N2; ++i, ++out){
|
||||
*out = buf16[i];
|
||||
}
|
||||
USB_BTABLE->EP[number].USB_COUNT_TX = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write data to EP buffer (called outside IRQ handler)
|
||||
* @param number - EP number
|
||||
* @param *buf - array with data
|
||||
* @param size - its size
|
||||
*/
|
||||
void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size){
|
||||
EP_WriteIRQ(number, buf, size);
|
||||
uint16_t status = KEEP_DTOG(USB->EPnR[number]);
|
||||
// keep DTOGs, clear CTR_TX & set TX VALID to start transmission
|
||||
USB->EPnR[number] = (status & ~(USB_EPnR_CTR_TX)) ^ USB_EPnR_STAT_TX;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy data from EP buffer into user buffer area
|
||||
* @param *buf - user array for data
|
||||
* @return amount of data read
|
||||
*/
|
||||
int EP_Read(uint8_t number, uint16_t *buf){
|
||||
int sz = endpoints[number].rx_cnt;
|
||||
if(!sz) return 0;
|
||||
endpoints[number].rx_cnt = 0;
|
||||
int n = (sz + 1) >> 1;
|
||||
uint32_t *in = (uint32_t *)endpoints[number].rx_buf;
|
||||
if(n){
|
||||
for(int i = 0; i < n; ++i, ++in)
|
||||
buf[i] = *(uint16_t*)in;
|
||||
}
|
||||
return sz;
|
||||
}
|
||||
|
||||
186
F1:F103/Canon_managing_device/usb_lib.h
Normal file
186
F1:F103/Canon_managing_device/usb_lib.h
Normal file
@ -0,0 +1,186 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __USB_LIB_H__
|
||||
#define __USB_LIB_H__
|
||||
|
||||
#include <wchar.h>
|
||||
#include "usbhw.h"
|
||||
|
||||
#define EP0DATABUF_SIZE (64)
|
||||
#define LASTADDR_DEFAULT (STM32ENDPOINTS * 8)
|
||||
|
||||
// bmRequestType & 0x7f
|
||||
#define STANDARD_DEVICE_REQUEST_TYPE 0
|
||||
#define STANDARD_ENDPOINT_REQUEST_TYPE 2
|
||||
#define VENDOR_REQUEST_TYPE 0x40
|
||||
#define CONTROL_REQUEST_TYPE 0x21
|
||||
// bRequest, standard; for bmRequestType == 0x80
|
||||
#define GET_STATUS 0x00
|
||||
#define GET_DESCRIPTOR 0x06
|
||||
#define GET_CONFIGURATION 0x08
|
||||
// for bmRequestType == 0
|
||||
#define CLEAR_FEATURE 0x01
|
||||
#define SET_FEATURE 0x03 // unused
|
||||
#define SET_ADDRESS 0x05
|
||||
#define SET_DESCRIPTOR 0x07 // unused
|
||||
#define SET_CONFIGURATION 0x09
|
||||
// for bmRequestType == 0x81, 1 or 0xB2
|
||||
#define GET_INTERFACE 0x0A // unused
|
||||
#define SET_INTERFACE 0x0B // unused
|
||||
#define SYNC_FRAME 0x0C // unused
|
||||
#define VENDOR_REQUEST 0x01 // unused
|
||||
|
||||
// Class-Specific Control Requests
|
||||
#define SEND_ENCAPSULATED_COMMAND 0x00 // unused
|
||||
#define GET_ENCAPSULATED_RESPONSE 0x01 // unused
|
||||
#define SET_COMM_FEATURE 0x02 // unused
|
||||
#define GET_COMM_FEATURE 0x03 // unused
|
||||
#define CLEAR_COMM_FEATURE 0x04 // unused
|
||||
#define SET_LINE_CODING 0x20
|
||||
#define GET_LINE_CODING 0x21
|
||||
#define SET_CONTROL_LINE_STATE 0x22
|
||||
#define SEND_BREAK 0x23
|
||||
|
||||
// control line states
|
||||
#define CONTROL_DTR 0x01
|
||||
#define CONTROL_RTS 0x02
|
||||
|
||||
// wValue
|
||||
#define DEVICE_DESCRIPTOR 0x100
|
||||
#define CONFIGURATION_DESCRIPTOR 0x200
|
||||
#define STRING_LANG_DESCRIPTOR 0x300
|
||||
#define STRING_MAN_DESCRIPTOR 0x301
|
||||
#define STRING_PROD_DESCRIPTOR 0x302
|
||||
#define STRING_SN_DESCRIPTOR 0x303
|
||||
#define DEVICE_QUALIFIER_DESCRIPTOR 0x600
|
||||
|
||||
#define RX_FLAG(epstat) (epstat & USB_EPnR_CTR_RX)
|
||||
#define TX_FLAG(epstat) (epstat & USB_EPnR_CTR_TX)
|
||||
#define SETUP_FLAG(epstat) (epstat & USB_EPnR_SETUP)
|
||||
|
||||
// EPnR bits manipulation
|
||||
#define KEEP_DTOG_STAT(EPnR) (EPnR & ~(USB_EPnR_STAT_RX|USB_EPnR_STAT_TX|USB_EPnR_DTOG_RX|USB_EPnR_DTOG_TX))
|
||||
#define KEEP_DTOG(EPnR) (EPnR & ~(USB_EPnR_DTOG_RX|USB_EPnR_DTOG_TX))
|
||||
|
||||
// USB state: uninitialized, addressed, ready for use
|
||||
typedef enum{
|
||||
USB_STATE_DEFAULT,
|
||||
USB_STATE_ADDRESSED,
|
||||
USB_STATE_CONFIGURED,
|
||||
USB_STATE_CONNECTED
|
||||
} USB_state;
|
||||
|
||||
// EP types
|
||||
#define EP_TYPE_BULK 0x00
|
||||
#define EP_TYPE_CONTROL 0x01
|
||||
#define EP_TYPE_ISO 0x02
|
||||
#define EP_TYPE_INTERRUPT 0x03
|
||||
|
||||
#define LANG_US (uint16_t)0x0409
|
||||
|
||||
#define _USB_STRING_(name, str) \
|
||||
static const struct name \
|
||||
{ \
|
||||
uint8_t bLength; \
|
||||
uint8_t bDescriptorType; \
|
||||
uint16_t bString[(sizeof(str) - 2) / 2]; \
|
||||
\
|
||||
} \
|
||||
name = {sizeof(name), 0x03, str}
|
||||
|
||||
#define _USB_LANG_ID_(name, lng_id) \
|
||||
\
|
||||
static const struct name \
|
||||
{ \
|
||||
uint8_t bLength; \
|
||||
uint8_t bDescriptorType; \
|
||||
uint16_t bString; \
|
||||
\
|
||||
} \
|
||||
name = {0x04, 0x03, lng_id}
|
||||
#define STRING_LANG_DESCRIPTOR_SIZE_BYTE (4)
|
||||
|
||||
// EP0 configuration packet
|
||||
typedef struct {
|
||||
uint8_t bmRequestType;
|
||||
uint8_t bRequest;
|
||||
uint16_t wValue;
|
||||
uint16_t wIndex;
|
||||
uint16_t wLength;
|
||||
} config_pack_t;
|
||||
|
||||
// endpoints state
|
||||
typedef struct{
|
||||
uint16_t *tx_buf; // transmission buffer address
|
||||
uint16_t txbufsz; // transmission buffer size
|
||||
uint16_t *rx_buf; // reception buffer address
|
||||
void (*func)(); // endpoint action function
|
||||
unsigned rx_cnt : 10; // received data counter
|
||||
} ep_t;
|
||||
|
||||
// USB status & its address
|
||||
typedef struct {
|
||||
uint8_t USB_Status;
|
||||
uint16_t USB_Addr;
|
||||
}usb_dev_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t dwDTERate;
|
||||
uint8_t bCharFormat;
|
||||
#define USB_CDC_1_STOP_BITS 0
|
||||
#define USB_CDC_1_5_STOP_BITS 1
|
||||
#define USB_CDC_2_STOP_BITS 2
|
||||
uint8_t bParityType;
|
||||
#define USB_CDC_NO_PARITY 0
|
||||
#define USB_CDC_ODD_PARITY 1
|
||||
#define USB_CDC_EVEN_PARITY 2
|
||||
#define USB_CDC_MARK_PARITY 3
|
||||
#define USB_CDC_SPACE_PARITY 4
|
||||
uint8_t bDataBits;
|
||||
} __attribute__ ((packed)) usb_LineCoding;
|
||||
|
||||
typedef struct {
|
||||
uint8_t bmRequestType;
|
||||
uint8_t bNotificationType;
|
||||
uint16_t wValue;
|
||||
uint16_t wIndex;
|
||||
uint16_t wLength;
|
||||
} __attribute__ ((packed)) usb_cdc_notification;
|
||||
|
||||
extern ep_t endpoints[];
|
||||
extern usb_dev_t USB_Dev;
|
||||
extern uint8_t usbON;
|
||||
extern config_pack_t setup_packet;
|
||||
extern uint8_t ep0databuf[];
|
||||
extern uint8_t ep0dbuflen;
|
||||
|
||||
void EP0_Handler();
|
||||
|
||||
void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size);
|
||||
void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size);
|
||||
int EP_Read(uint8_t number, uint16_t *buf);
|
||||
usb_LineCoding getLineCoding();
|
||||
|
||||
void linecoding_handler(usb_LineCoding *lc);
|
||||
void clstate_handler(uint16_t val);
|
||||
void break_handler();
|
||||
void vendor_handler(config_pack_t *packet);
|
||||
|
||||
#endif // __USB_LIB_H__
|
||||
129
F1:F103/Canon_managing_device/usbhw.c
Normal file
129
F1:F103/Canon_managing_device/usbhw.c
Normal file
@ -0,0 +1,129 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "hardware.h"
|
||||
#include "usb.h"
|
||||
#include "usbhw.h"
|
||||
#include "usb_lib.h"
|
||||
|
||||
void USB_setup(){
|
||||
NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn);
|
||||
NVIC_DisableIRQ(USB_HP_CAN1_TX_IRQn);
|
||||
USBPU_OFF();
|
||||
RCC->APB1ENR |= RCC_APB1ENR_USBEN;
|
||||
RCC->APB2ENR |= USB_RCC;
|
||||
USB->CNTR = USB_CNTR_FRES; // Force USB Reset
|
||||
for(uint32_t ctr = 0; ctr < 72000; ++ctr) nop(); // wait >1ms
|
||||
//uint32_t ctr = 0;
|
||||
USB->CNTR = 0;
|
||||
USB->BTABLE = 0;
|
||||
USB->DADDR = 0;
|
||||
USB->ISTR = 0;
|
||||
USB->CNTR = USB_CNTR_RESETM | USB_CNTR_WKUPM; // allow only wakeup & reset interrupts
|
||||
NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn);
|
||||
USBPU_ON();
|
||||
}
|
||||
|
||||
static uint16_t lastaddr = LASTADDR_DEFAULT;
|
||||
/**
|
||||
* Endpoint initialisation
|
||||
* @param number - EP num (0...7)
|
||||
* @param type - EP type (EP_TYPE_BULK, EP_TYPE_CONTROL, EP_TYPE_ISO, EP_TYPE_INTERRUPT)
|
||||
* @param txsz - transmission buffer size @ USB/CAN buffer
|
||||
* @param rxsz - reception buffer size @ USB/CAN buffer
|
||||
* @param uint16_t (*func)(ep_t *ep) - EP handler function
|
||||
* @return 0 if all OK
|
||||
*/
|
||||
int EP_Init(uint8_t number, uint8_t type, uint16_t txsz, uint16_t rxsz, void (*func)(ep_t ep)){
|
||||
if(number >= STM32ENDPOINTS) return 4; // out of configured amount
|
||||
if(txsz > USB_BTABLE_SIZE || rxsz > USB_BTABLE_SIZE) return 1; // buffer too large
|
||||
if(lastaddr + txsz + rxsz >= USB_BTABLE_SIZE) return 2; // out of btable
|
||||
USB->EPnR[number] = (type << 9) | (number & USB_EPnR_EA);
|
||||
USB->EPnR[number] ^= USB_EPnR_STAT_RX | USB_EPnR_STAT_TX_1;
|
||||
if(rxsz & 1 || rxsz > 512) return 3; // wrong rx buffer size
|
||||
uint16_t countrx = 0;
|
||||
if(rxsz < 64) countrx = rxsz / 2;
|
||||
else{
|
||||
if(rxsz & 0x1f) return 3; // should be multiple of 32
|
||||
countrx = 31 + rxsz / 32;
|
||||
}
|
||||
USB_BTABLE->EP[number].USB_ADDR_TX = lastaddr;
|
||||
endpoints[number].tx_buf = (uint16_t *)(USB_BTABLE_BASE + lastaddr*2);
|
||||
endpoints[number].txbufsz = txsz;
|
||||
lastaddr += txsz;
|
||||
USB_BTABLE->EP[number].USB_COUNT_TX = 0;
|
||||
USB_BTABLE->EP[number].USB_ADDR_RX = lastaddr;
|
||||
endpoints[number].rx_buf = (uint16_t *)(USB_BTABLE_BASE + lastaddr*2);
|
||||
lastaddr += rxsz;
|
||||
USB_BTABLE->EP[number].USB_COUNT_RX = countrx << 10;
|
||||
endpoints[number].func = func;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// standard IRQ handler
|
||||
void usb_lp_can_rx0_isr(){
|
||||
if(USB->ISTR & USB_ISTR_RESET){
|
||||
usbON = 0;
|
||||
// Reinit registers
|
||||
USB->CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM | USB_CNTR_SUSPM | USB_CNTR_WKUPM;
|
||||
USB->ISTR = 0;
|
||||
// Endpoint 0 - CONTROL
|
||||
// ON USB LS size of EP0 may be 8 bytes, but on FS it should be 64 bytes!
|
||||
lastaddr = LASTADDR_DEFAULT;
|
||||
// clear address, leave only enable bit
|
||||
USB->DADDR = USB_DADDR_EF;
|
||||
USB_Dev.USB_Status = USB_STATE_DEFAULT;
|
||||
USB->ISTR = ~USB_ISTR_RESET;
|
||||
if(EP_Init(0, EP_TYPE_CONTROL, USB_EP0_BUFSZ, USB_EP0_BUFSZ, EP0_Handler)){
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(USB->ISTR & USB_ISTR_CTR){
|
||||
// EP number
|
||||
uint8_t n = USB->ISTR & USB_ISTR_EPID;
|
||||
// copy status register
|
||||
uint16_t epstatus = USB->EPnR[n];
|
||||
// copy received bytes amount
|
||||
endpoints[n].rx_cnt = USB_BTABLE->EP[n].USB_COUNT_RX & 0x3FF; // low 10 bits is counter
|
||||
// check direction
|
||||
if(USB->ISTR & USB_ISTR_DIR){ // OUT interrupt - receive data, CTR_RX==1 (if CTR_TX == 1 - two pending transactions: receive following by transmit)
|
||||
if(n == 0){ // control endpoint
|
||||
if(epstatus & USB_EPnR_SETUP){ // setup packet -> copy data to conf_pack
|
||||
EP_Read(0, (uint16_t*)&setup_packet);
|
||||
ep0dbuflen = 0;
|
||||
// interrupt handler will be called later
|
||||
}else if(epstatus & USB_EPnR_CTR_RX){ // data packet -> push received data to ep0databuf
|
||||
ep0dbuflen = endpoints[0].rx_cnt;
|
||||
EP_Read(0, (uint16_t*)&ep0databuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
// call EP handler
|
||||
if(endpoints[n].func) endpoints[n].func(endpoints[n]);
|
||||
}
|
||||
if(USB->ISTR & USB_ISTR_SUSP){ // suspend -> still no connection, may sleep
|
||||
usbON = 0;
|
||||
USB->CNTR |= USB_CNTR_FSUSP | USB_CNTR_LP_MODE;
|
||||
USB->ISTR = ~USB_ISTR_SUSP;
|
||||
}
|
||||
if(USB->ISTR & USB_ISTR_WKUP){ // wakeup
|
||||
USB->CNTR &= ~(USB_CNTR_FSUSP | USB_CNTR_LP_MODE); // clear suspend flags
|
||||
USB->ISTR = ~USB_ISTR_WKUP;
|
||||
}
|
||||
}
|
||||
|
||||
105
F1:F103/Canon_managing_device/usbhw.h
Normal file
105
F1:F103/Canon_managing_device/usbhw.h
Normal file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* This file is part of the MLX90640 project.
|
||||
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef USBHW_H__
|
||||
#define USBHW_H__
|
||||
|
||||
#include <stm32f1.h>
|
||||
|
||||
#define USB_RCC RCC_APB2ENR_IOPAEN
|
||||
|
||||
// max endpoints number
|
||||
#define STM32ENDPOINTS 8
|
||||
/**
|
||||
* Buffers size definition
|
||||
**/
|
||||
#define USB_BTABLE_SIZE 512
|
||||
// first 64 bytes of USB_BTABLE are registers!
|
||||
//#define USB_EP0_BASEADDR 64
|
||||
// for USB FS EP0 buffers are from 8 to 64 bytes long (64 for PL2303)
|
||||
#define USB_EP0_BUFSZ 64
|
||||
// USB transmit buffer size (64 for PL2303)
|
||||
#define USB_TXBUFSZ 64
|
||||
// USB receive buffer size (64 for PL2303)
|
||||
#define USB_RXBUFSZ 64
|
||||
// EP1 - interrupt - buffer size
|
||||
#define USB_EP1BUFSZ 8
|
||||
|
||||
#define USB_BTABLE_BASE 0x40006000
|
||||
#define USB_BASE ((uint32_t)0x40005C00)
|
||||
#define USB ((USB_TypeDef *) USB_BASE)
|
||||
|
||||
#ifdef USB_BTABLE
|
||||
#undef USB_BTABLE
|
||||
#endif
|
||||
#define USB_BTABLE ((USB_BtableDef *)(USB_BTABLE_BASE))
|
||||
#define USB_ISTR_EPID 0x0000000F
|
||||
#define USB_FNR_LSOF_0 0x00000800
|
||||
#define USB_FNR_lSOF_1 0x00001000
|
||||
#define USB_LPMCSR_BESL_0 0x00000010
|
||||
#define USB_LPMCSR_BESL_1 0x00000020
|
||||
#define USB_LPMCSR_BESL_2 0x00000040
|
||||
#define USB_LPMCSR_BESL_3 0x00000080
|
||||
#define USB_EPnR_CTR_RX 0x00008000
|
||||
#define USB_EPnR_DTOG_RX 0x00004000
|
||||
#define USB_EPnR_STAT_RX 0x00003000
|
||||
#define USB_EPnR_STAT_RX_0 0x00001000
|
||||
#define USB_EPnR_STAT_RX_1 0x00002000
|
||||
#define USB_EPnR_SETUP 0x00000800
|
||||
#define USB_EPnR_EP_TYPE 0x00000600
|
||||
#define USB_EPnR_EP_TYPE_0 0x00000200
|
||||
#define USB_EPnR_EP_TYPE_1 0x00000400
|
||||
#define USB_EPnR_EP_KIND 0x00000100
|
||||
#define USB_EPnR_CTR_TX 0x00000080
|
||||
#define USB_EPnR_DTOG_TX 0x00000040
|
||||
#define USB_EPnR_STAT_TX 0x00000030
|
||||
#define USB_EPnR_STAT_TX_0 0x00000010
|
||||
#define USB_EPnR_STAT_TX_1 0x00000020
|
||||
#define USB_EPnR_EA 0x0000000F
|
||||
#define USB_COUNTn_RX_BLSIZE 0x00008000
|
||||
#define USB_COUNTn_NUM_BLOCK 0x00007C00
|
||||
#define USB_COUNTn_RX 0x0000003F
|
||||
|
||||
#define USB_TypeDef USB_TypeDef_custom
|
||||
|
||||
typedef struct {
|
||||
__IO uint32_t EPnR[STM32ENDPOINTS];
|
||||
__IO uint32_t RESERVED[STM32ENDPOINTS];
|
||||
__IO uint32_t CNTR;
|
||||
__IO uint32_t ISTR;
|
||||
__IO uint32_t FNR;
|
||||
__IO uint32_t DADDR;
|
||||
__IO uint32_t BTABLE;
|
||||
} USB_TypeDef;
|
||||
|
||||
typedef struct{
|
||||
__IO uint32_t USB_ADDR_TX;
|
||||
__IO uint32_t USB_COUNT_TX;
|
||||
__IO uint32_t USB_ADDR_RX;
|
||||
__IO uint32_t USB_COUNT_RX;
|
||||
} USB_EPDATA_TypeDef;
|
||||
|
||||
typedef struct{
|
||||
__IO USB_EPDATA_TypeDef EP[STM32ENDPOINTS];
|
||||
} USB_BtableDef;
|
||||
|
||||
void USB_setup();
|
||||
int EP_Init(uint8_t number, uint8_t type, uint16_t txsz, uint16_t rxsz, void (*func)());
|
||||
|
||||
#endif // USBHW_H__
|
||||
2
F1:F103/Canon_managing_device/version.inc
Normal file
2
F1:F103/Canon_managing_device/version.inc
Normal file
@ -0,0 +1,2 @@
|
||||
#define BUILD_NUMBER "50"
|
||||
#define BUILD_DATE "2022-09-10"
|
||||
75
testboard/F0_F1_F3-LQFP48_testboard/stm32.kicad_prl
Normal file
75
testboard/F0_F1_F3-LQFP48_testboard/stm32.kicad_prl
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 0,
|
||||
"active_layer_preset": "All Layers",
|
||||
"auto_track_width": true,
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"ratsnest_display_mode": 0,
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": true,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
"filename": "stm32.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
435
testboard/F0_F1_F3-LQFP48_testboard/stm32.kicad_pro
Normal file
435
testboard/F0_F1_F3-LQFP48_testboard/stm32.kicad_pro
Normal file
@ -0,0 +1,435 @@
|
||||
{
|
||||
"board": {
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.09999999999999999,
|
||||
"copper_line_width": 0.19999999999999998,
|
||||
"copper_text_italic": false,
|
||||
"copper_text_size_h": 1.5,
|
||||
"copper_text_size_v": 1.5,
|
||||
"copper_text_thickness": 0.3,
|
||||
"copper_text_upright": false,
|
||||
"courtyard_line_width": 0.049999999999999996,
|
||||
"dimension_precision": 4,
|
||||
"dimension_units": 3,
|
||||
"dimensions": {
|
||||
"arrow_length": 1270000,
|
||||
"extension_offset": 500000,
|
||||
"keep_text_aligned": true,
|
||||
"suppress_zeroes": false,
|
||||
"text_position": 0,
|
||||
"units_format": 1
|
||||
},
|
||||
"fab_line_width": 0.09999999999999999,
|
||||
"fab_text_italic": false,
|
||||
"fab_text_size_h": 1.0,
|
||||
"fab_text_size_v": 1.0,
|
||||
"fab_text_thickness": 0.15,
|
||||
"fab_text_upright": false,
|
||||
"other_line_width": 0.09999999999999999,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": false,
|
||||
"pads": {
|
||||
"drill": 0.762,
|
||||
"height": 1.524,
|
||||
"width": 1.524
|
||||
},
|
||||
"silk_line_width": 0.15,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.15,
|
||||
"silk_text_upright": false,
|
||||
"zones": {
|
||||
"45_degree_only": false,
|
||||
"min_clearance": 0.508
|
||||
}
|
||||
},
|
||||
"diff_pair_dimensions": [],
|
||||
"drc_exclusions": [],
|
||||
"meta": {
|
||||
"filename": "board_design_settings.json",
|
||||
"version": 2
|
||||
},
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "error",
|
||||
"copper_edge_clearance": "error",
|
||||
"courtyards_overlap": "error",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "error",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint_type_mismatch": "error",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
"missing_footprint": "warning",
|
||||
"net_conflict": "warning",
|
||||
"npth_inside_courtyard": "ignore",
|
||||
"padstack": "error",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_over_copper": "warning",
|
||||
"silk_overlap": "warning",
|
||||
"skew_out_of_range": "error",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "warning",
|
||||
"track_width": "error",
|
||||
"tracks_crossing": "error",
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zone_has_empty_net": "error",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rule_severitieslegacy_courtyards_overlap": true,
|
||||
"rule_severitieslegacy_no_courtyard_defined": false,
|
||||
"rules": {
|
||||
"allow_blind_buried_vias": false,
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.0,
|
||||
"min_copper_edge_clearance": 0.049999999999999996,
|
||||
"min_hole_clearance": 0.25,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.19999999999999998,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_through_hole_diameter": 0.6,
|
||||
"min_track_width": 0.19999999999999998,
|
||||
"min_via_annular_width": 0.049999999999999996,
|
||||
"min_via_diameter": 1.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.25,
|
||||
0.5,
|
||||
1.0,
|
||||
2.0
|
||||
],
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 0.0,
|
||||
"drill": 0.0
|
||||
},
|
||||
{
|
||||
"diameter": 1.5,
|
||||
"drill": 0.6
|
||||
},
|
||||
{
|
||||
"diameter": 2.0,
|
||||
"drill": 0.8
|
||||
}
|
||||
],
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
"equivalence_files": []
|
||||
},
|
||||
"erc": {
|
||||
"erc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"pin_map": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"pinned_footprint_libs": [],
|
||||
"pinned_symbol_libs": []
|
||||
},
|
||||
"meta": {
|
||||
"filename": "stm32.kicad_pro",
|
||||
"version": 1
|
||||
},
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
"line_style": 0,
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Default",
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.25,
|
||||
"via_diameter": 2.0,
|
||||
"via_drill": 0.6,
|
||||
"wire_width": 6.0
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"net_colors": null
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
"gencad": "",
|
||||
"idf": "",
|
||||
"netlist": "stm32.net",
|
||||
"specctra_dsn": "",
|
||||
"step": "",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
"intersheets_ref_own_page": false,
|
||||
"intersheets_ref_prefix": "",
|
||||
"intersheets_ref_short": false,
|
||||
"intersheets_ref_show": false,
|
||||
"intersheets_ref_suffix": "",
|
||||
"junction_size_choice": 3,
|
||||
"label_size_ratio": 0.25,
|
||||
"pin_symbol_size": 0.0,
|
||||
"text_offset_ratio": 0.08
|
||||
},
|
||||
"legacy_lib_dir": "",
|
||||
"legacy_lib_list": [],
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"net_format_name": "Pcbnew",
|
||||
"ngspice": {
|
||||
"fix_include_paths": true,
|
||||
"fix_passive_vals": false,
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"model_mode": 0,
|
||||
"workbook_filename": ""
|
||||
},
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
"sheets": [],
|
||||
"text_variables": {}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user