mirror of
https://github.com/FizzyApple12/Waccon.git
synced 2026-09-22 15:04:32 +03:00
A few changes that needed to be pushed, the power switching circuitry has been removed temporarily to allow for manual power switching. I also baked the FT232HQ connection to the LED bus and changed the Via sizes to match the drilling specs required by most PCB fab services.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
#include "hardware/i2c.h"
|
||||
#include "waccaserial.h"
|
||||
|
||||
#ifdef OPT_PRESETPANELS // for autocompile
|
||||
/*#ifdef OPT_PRESETPANELS // for autocompile
|
||||
#if OPT_SINGLE_TOUCH
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x10
|
||||
@@ -19,21 +19,34 @@
|
||||
#define TOUCH_PANEL_4_ADDR 0x14
|
||||
#define TOUCH_PANEL_5_ADDR 0x15
|
||||
#endif
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
#define TOUCH_I2C_PORT i2c1
|
||||
#define TOUCH_I2C_SDA 2
|
||||
#define TOUCH_I2C_SCL 3
|
||||
#ifndef OPT_PRESETPANELS
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x10 //0x11
|
||||
#define TOUCH_PANEL_2_ADDR 0x10 //0x12
|
||||
#define TOUCH_PANEL_3_ADDR 0x10 //0x13
|
||||
#define TOUCH_PANEL_4_ADDR 0x10 //0x14
|
||||
#define TOUCH_PANEL_5_ADDR 0x10 //0x15
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x10 //0x11
|
||||
#define TOUCH_PANEL_2_ADDR 0x10 //0x12
|
||||
#define TOUCH_PANEL_3_ADDR 0x10 //0x13
|
||||
#define TOUCH_PANEL_4_ADDR 0x10 //0x14
|
||||
#define TOUCH_PANEL_5_ADDR 0x10 //0x15
|
||||
#endif
|
||||
#define TOUCH_I2C_FREQ 100000
|
||||
|
||||
#define TOUCH_PANEL_0_LEFT_LED 5
|
||||
#define TOUCH_PANEL_0_RIGHT_LED 4
|
||||
#define TOUCH_PANEL_1_LEFT_LED 7
|
||||
#define TOUCH_PANEL_1_RIGHT_LED 6
|
||||
#define TOUCH_PANEL_2_LEFT_LED 9
|
||||
#define TOUCH_PANEL_2_RIGHT_LED 8
|
||||
#define TOUCH_PANEL_3_LEFT_LED 11
|
||||
#define TOUCH_PANEL_3_RIGHT_LED 10
|
||||
#define TOUCH_PANEL_4_LEFT_LED 13
|
||||
#define TOUCH_PANEL_4_RIGHT_LED 12
|
||||
#define TOUCH_PANEL_5_LEFT_LED 15
|
||||
#define TOUCH_PANEL_5_RIGHT_LED 14
|
||||
|
||||
uint32_t touchPanel0Data = 0;
|
||||
uint32_t touchPanel1Data = 0;
|
||||
uint32_t touchPanel2Data = 0;
|
||||
@@ -64,12 +77,43 @@ void setupTouchPanels() {
|
||||
gpio_pull_up(TOUCH_I2C_SDA);
|
||||
gpio_pull_up(TOUCH_I2C_SCL);
|
||||
|
||||
gpio_init(TOUCH_PANEL_0_LEFT_LED); gpio_set_dir(TOUCH_PANEL_0_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_0_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_0_RIGHT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_1_LEFT_LED); gpio_set_dir(TOUCH_PANEL_1_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_1_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_1_RIGHT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_2_LEFT_LED); gpio_set_dir(TOUCH_PANEL_2_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_2_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_2_RIGHT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_3_LEFT_LED); gpio_set_dir(TOUCH_PANEL_3_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_3_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_3_RIGHT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_4_LEFT_LED); gpio_set_dir(TOUCH_PANEL_4_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_4_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_4_RIGHT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_5_LEFT_LED); gpio_set_dir(TOUCH_PANEL_5_LEFT_LED, GPIO_OUT);
|
||||
gpio_init(TOUCH_PANEL_5_RIGHT_LED); gpio_set_dir(TOUCH_PANEL_5_RIGHT_LED, GPIO_OUT);
|
||||
|
||||
gpio_put(TOUCH_PANEL_0_LEFT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_1_LEFT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_2_LEFT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_3_LEFT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_4_LEFT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_5_LEFT_LED, true);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_0_ADDR, touchPanel0Data);
|
||||
gpio_put(TOUCH_PANEL_0_LEFT_LED, false);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_1_ADDR, touchPanel1Data);
|
||||
gpio_put(TOUCH_PANEL_1_LEFT_LED, false);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_2_ADDR, touchPanel2Data);
|
||||
gpio_put(TOUCH_PANEL_2_LEFT_LED, false);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_3_ADDR, touchPanel3Data);
|
||||
gpio_put(TOUCH_PANEL_3_LEFT_LED, false);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_4_ADDR, touchPanel4Data);
|
||||
gpio_put(TOUCH_PANEL_4_LEFT_LED, false);
|
||||
|
||||
PingWaccaPanel(TOUCH_PANEL_5_ADDR, touchPanel5Data);
|
||||
gpio_put(TOUCH_PANEL_5_LEFT_LED, false);
|
||||
|
||||
ws_setTouchData(touchPanel0Data, touchPanel1Data, touchPanel2Data, touchPanel3Data, touchPanel4Data, touchPanel5Data);
|
||||
}
|
||||
@@ -79,24 +123,43 @@ int main() {
|
||||
|
||||
setupTouchPanels();
|
||||
|
||||
gpio_put(TOUCH_PANEL_0_RIGHT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_1_RIGHT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_2_RIGHT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_3_RIGHT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_4_RIGHT_LED, true);
|
||||
gpio_put(TOUCH_PANEL_5_RIGHT_LED, true);
|
||||
|
||||
while(1) { // note: getting a touch packet might take a bit, use this rolling update to speed up input throughput to the game
|
||||
gpio_put(TOUCH_PANEL_0_LEFT_LED, true);
|
||||
touchPanel0Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_0_ADDR);
|
||||
ws_setTouch0Data(touchPanel0Data);
|
||||
gpio_put(TOUCH_PANEL_0_LEFT_LED, false);
|
||||
|
||||
gpio_put(TOUCH_PANEL_1_LEFT_LED, true);
|
||||
touchPanel1Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_1_ADDR);
|
||||
ws_setTouch1Data(touchPanel1Data);
|
||||
gpio_put(TOUCH_PANEL_1_LEFT_LED, false);
|
||||
|
||||
gpio_put(TOUCH_PANEL_2_LEFT_LED, true);
|
||||
touchPanel2Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_2_ADDR);
|
||||
ws_setTouch2Data(touchPanel2Data);
|
||||
gpio_put(TOUCH_PANEL_2_LEFT_LED, false);
|
||||
|
||||
gpio_put(TOUCH_PANEL_3_LEFT_LED, true);
|
||||
touchPanel3Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_3_ADDR);
|
||||
ws_setTouch3Data(touchPanel3Data);
|
||||
gpio_put(TOUCH_PANEL_3_LEFT_LED, false);
|
||||
|
||||
gpio_put(TOUCH_PANEL_4_LEFT_LED, true);
|
||||
touchPanel4Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_4_ADDR);
|
||||
ws_setTouch4Data(touchPanel4Data);
|
||||
gpio_put(TOUCH_PANEL_4_LEFT_LED, false);
|
||||
|
||||
gpio_put(TOUCH_PANEL_5_LEFT_LED, true);
|
||||
touchPanel5Data = getTouchPacket(TOUCH_I2C_PORT, TOUCH_PANEL_5_ADDR);
|
||||
ws_setTouch5Data(touchPanel5Data);
|
||||
gpio_put(TOUCH_PANEL_5_LEFT_LED, false);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -32,6 +32,10 @@ bool runningMulticore = false;
|
||||
#endif
|
||||
|
||||
void ws_start() {
|
||||
gpio_init(TOUCH_PANEL_POWER_MOSFET);
|
||||
gpio_set_dir(TOUCH_PANEL_POWER_MOSFET, GPIO_OUT);
|
||||
gpio_put(TOUCH_PANEL_POWER_MOSFET, StartUp);
|
||||
|
||||
setup();
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
@@ -230,6 +234,8 @@ void ws_sendResp(char importantNextReadData) {
|
||||
break;
|
||||
}
|
||||
sendRemaining();
|
||||
|
||||
gpio_put(TOUCH_PANEL_POWER_MOSFET, StartUp);
|
||||
}
|
||||
|
||||
void ws_getTouchPack() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
//#define DEBUG_MODE // uncomment for debug messages (note: this will slow things down!)
|
||||
|
||||
//#define RIGHT //uncomment to enable righty flip on interface and sync board data swap
|
||||
#define RIGHT //uncomment to enable righty flip on interface and sync board data swap
|
||||
|
||||
#if OPT_RIGHT // used for automatic compilation
|
||||
#ifndef RIGHT
|
||||
@@ -15,6 +15,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define TOUCH_PANEL_POWER_MOSFET 16
|
||||
|
||||
#define CMD_GET_SYNC_BOARD_VER 0xa0
|
||||
#define CMD_NEXT_READ 0x72
|
||||
#define CMD_GET_UNIT_BOARD_VER 0xa8
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 37,
|
||||
"active_layer_preset": "All Layers",
|
||||
"active_layer": 31,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": false,
|
||||
"hidden_netclasses": [],
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"images": 0.6,
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
@@ -36,6 +38,7 @@
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"board": {
|
||||
"3dviewports": [],
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.09999999999999999,
|
||||
@@ -62,20 +63,26 @@
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "ignore",
|
||||
"connection_width": "warning",
|
||||
"copper_edge_clearance": "error",
|
||||
"copper_sliver": "warning",
|
||||
"courtyards_overlap": "error",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "ignore",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint": "error",
|
||||
"footprint_type_mismatch": "error",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
"isolated_copper": "warning",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"lib_footprint_issues": "warning",
|
||||
"lib_footprint_mismatch": "warning",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
@@ -85,9 +92,14 @@
|
||||
"padstack": "error",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_edge_clearance": "warning",
|
||||
"silk_over_copper": "ignore",
|
||||
"silk_overlap": "ignore",
|
||||
"skew_out_of_range": "error",
|
||||
"solder_mask_bridge": "error",
|
||||
"starved_thermal": "error",
|
||||
"text_height": "warning",
|
||||
"text_thickness": "warning",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "warning",
|
||||
@@ -96,7 +108,6 @@
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zone_has_empty_net": "error",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
@@ -104,20 +115,65 @@
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.0,
|
||||
"min_connection": 0.0,
|
||||
"min_copper_edge_clearance": 0.01,
|
||||
"min_hole_clearance": 0.25,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.19999999999999998,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_resolved_spokes": 2,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_text_height": 0.7999999999999999,
|
||||
"min_text_thickness": 0.08,
|
||||
"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,
|
||||
"solder_mask_to_copper_clearance": 0.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"teardrop_options": [
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 5,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_onpadsmd": true,
|
||||
"td_onroundshapesonly": false,
|
||||
"td_ontrackend": false,
|
||||
"td_onviapad": true
|
||||
}
|
||||
],
|
||||
"teardrop_parameters": [
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_round_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_rect_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_track_end",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
}
|
||||
],
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.2,
|
||||
@@ -138,6 +194,10 @@
|
||||
"diameter": 0.4,
|
||||
"drill": 0.2
|
||||
},
|
||||
{
|
||||
"diameter": 0.6,
|
||||
"drill": 0.3
|
||||
},
|
||||
{
|
||||
"diameter": 1.0,
|
||||
"drill": 0.5
|
||||
@@ -154,7 +214,8 @@
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": []
|
||||
"layer_presets": [],
|
||||
"viewports": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
@@ -338,18 +399,23 @@
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"conflicting_netclasses": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"endpoint_off_grid": "warning",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"missing_bidi_pin": "warning",
|
||||
"missing_input_pin": "warning",
|
||||
"missing_power_pin": "error",
|
||||
"missing_unit": "warning",
|
||||
"multiple_net_names": "ignore",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
@@ -359,6 +425,7 @@
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "ignore",
|
||||
"similar_labels": "warning",
|
||||
"simulation_model_issue": "ignore",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
@@ -376,7 +443,7 @@
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -390,10 +457,10 @@
|
||||
"track_width": 0.5,
|
||||
"via_diameter": 1.0,
|
||||
"via_drill": 0.5,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
},
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -402,19 +469,20 @@
|
||||
"microvia_diameter": 2.0,
|
||||
"microvia_drill": 1.0,
|
||||
"name": "High Power",
|
||||
"nets": [],
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 2.0,
|
||||
"via_diameter": 2.0,
|
||||
"via_drill": 1.0,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
"version": 3
|
||||
},
|
||||
"net_colors": null
|
||||
"net_colors": null,
|
||||
"netclass_assignments": null,
|
||||
"netclass_patterns": []
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
@@ -430,6 +498,8 @@
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"dashed_lines_dash_length_ratio": 12.0,
|
||||
"dashed_lines_gap_length_ratio": 3.0,
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
@@ -461,7 +531,11 @@
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_current_sheet_as_root": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"spice_model_current_sheet_as_root": true,
|
||||
"spice_save_all_currents": false,
|
||||
"spice_save_all_voltages": false,
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,5 +25,5 @@ target_link_libraries(wacca_touch_panel
|
||||
# create map/bin/hex/uf2 file in addition to ELF.
|
||||
pico_add_extra_outputs(wacca_touch_panel)
|
||||
|
||||
pico_enable_stdio_usb(wacca_touch_panel 1)
|
||||
pico_enable_stdio_usb(wacca_touch_panel 0)
|
||||
pico_enable_stdio_uart(wacca_touch_panel 0)
|
||||
@@ -83,12 +83,16 @@ void i2cSlaveI2CIRQHandler() {
|
||||
printf("Master requested packet, sending [%u %u %u %u]...\n", (uint8_t) (dataToSend), (uint8_t) (dataToSend >> 8), (uint8_t) (dataToSend >> 16), (uint8_t) (dataToSend >> 24));
|
||||
#endif
|
||||
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, true);
|
||||
|
||||
txByte(MOTHERBOARD_I2C_PORT, (uint8_t) (dataToSend));
|
||||
txByte(MOTHERBOARD_I2C_PORT, (uint8_t) (dataToSend >> 8));
|
||||
txByte(MOTHERBOARD_I2C_PORT, (uint8_t) (dataToSend >> 16));
|
||||
txByte(MOTHERBOARD_I2C_PORT, (uint8_t) (dataToSend >> 24));
|
||||
|
||||
MOTHERBOARD_I2C_PORT->hw->clr_rd_req;
|
||||
|
||||
gpio_put(PICO_DEFAULT_LED_PIN, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +112,10 @@ void setupTouch() {
|
||||
|
||||
mpr121_init(TOUCH_I2C_PORT, OUTER_MPR121_ADDR, &outerSensor);
|
||||
mpr121_set_thresholds(MPR121_TOUCH_THRESHOLD, MPR121_RELEASE_THRESHOLD, &outerSensor);
|
||||
|
||||
|
||||
gpio_init(PICO_DEFAULT_LED_PIN);
|
||||
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
|
||||
}
|
||||
|
||||
void setupMotherboard() {
|
||||
@@ -137,7 +145,7 @@ void setupMotherboard() {
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
stdio_init_all();
|
||||
//stdio_init_all();
|
||||
printf("Wacca Touch Panel v0.1\n");
|
||||
|
||||
printf("Setting up Touch...");
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
"active_layer": 0,
|
||||
"active_layer_preset": "All Layers",
|
||||
"auto_track_width": false,
|
||||
"hidden_netclasses": [],
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"images": 0.6,
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"board": {
|
||||
"3dviewports": [],
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.09999999999999999,
|
||||
@@ -62,20 +63,26 @@
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "ignore",
|
||||
"connection_width": "warning",
|
||||
"copper_edge_clearance": "error",
|
||||
"copper_sliver": "warning",
|
||||
"courtyards_overlap": "error",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "ignore",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint": "error",
|
||||
"footprint_type_mismatch": "error",
|
||||
"hole_clearance": "ignore",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
"isolated_copper": "warning",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"lib_footprint_issues": "warning",
|
||||
"lib_footprint_mismatch": "warning",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
@@ -85,9 +92,14 @@
|
||||
"padstack": "error",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_edge_clearance": "warning",
|
||||
"silk_over_copper": "ignore",
|
||||
"silk_overlap": "ignore",
|
||||
"skew_out_of_range": "error",
|
||||
"solder_mask_bridge": "error",
|
||||
"starved_thermal": "error",
|
||||
"text_height": "warning",
|
||||
"text_thickness": "warning",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "warning",
|
||||
@@ -96,7 +108,6 @@
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zone_has_empty_net": "error",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
@@ -104,20 +115,65 @@
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.0,
|
||||
"min_connection": 0.0,
|
||||
"min_copper_edge_clearance": 0.01,
|
||||
"min_hole_clearance": 0.25,
|
||||
"min_hole_to_hole": 0.25,
|
||||
"min_microvia_diameter": 0.19999999999999998,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_resolved_spokes": 2,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_text_height": 0.7999999999999999,
|
||||
"min_text_thickness": 0.08,
|
||||
"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,
|
||||
"solder_mask_to_copper_clearance": 0.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"teardrop_options": [
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 5,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_onpadsmd": true,
|
||||
"td_onroundshapesonly": false,
|
||||
"td_ontrackend": false,
|
||||
"td_onviapad": true
|
||||
}
|
||||
],
|
||||
"teardrop_parameters": [
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_round_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_rect_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_track_end",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
}
|
||||
],
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.2,
|
||||
@@ -154,7 +210,8 @@
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": []
|
||||
"layer_presets": [],
|
||||
"viewports": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
@@ -376,7 +433,7 @@
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -390,10 +447,10 @@
|
||||
"track_width": 0.5,
|
||||
"via_diameter": 1.0,
|
||||
"via_drill": 0.5,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
},
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -402,19 +459,20 @@
|
||||
"microvia_diameter": 2.0,
|
||||
"microvia_drill": 1.0,
|
||||
"name": "High Power",
|
||||
"nets": [],
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 2.0,
|
||||
"via_diameter": 2.0,
|
||||
"via_drill": 1.0,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
"version": 3
|
||||
},
|
||||
"net_colors": null
|
||||
"net_colors": null,
|
||||
"netclass_assignments": null,
|
||||
"netclass_patterns": []
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
|
||||
Reference in New Issue
Block a user