├── docs ├── photo.jpg └── ACCEPTANCE_TEST.md ├── MCU_RaspberryPi_and_Boards.dcm ├── firmware ├── third_party │ └── pico_i2c_slave │ │ ├── .gitignore │ │ ├── example_mem │ │ ├── CMakeLists.txt │ │ └── example_mem.c │ │ ├── i2c_slave │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ ├── i2c_fifo.h │ │ │ └── i2c_slave.h │ │ └── i2c_slave.c │ │ ├── CMakeLists.txt │ │ ├── example_mem_wire │ │ ├── CMakeLists.txt │ │ ├── example_mem_wire.cpp │ │ ├── Wire.cpp │ │ └── Wire.h │ │ ├── LICENSES │ │ └── MIT.txt │ │ ├── README.md │ │ ├── pico_sdk_import.cmake │ │ └── .clang-format ├── edid.h ├── CMakeLists.txt ├── edid.c ├── pico_sdk_import.cmake └── LICENSE ├── sym-lib-table ├── CHANGELOG ├── td-io.pretty ├── CUI_RCJ-01X.kicad_mod ├── B08P-VL.kicad_mod ├── JST_SH_B4B-NH-A_1x04_P2.50mm_Vertical.kicad_mod ├── PTV112-4420A-A503.kicad_mod ├── PJRAN2X1U01AUX.kicad_mod ├── DF1BZ-34DP-2.5DS.kicad_mod ├── DF1BZ-34DP-2.5DSA.kicad_mod ├── JAMMA.kicad_mod ├── DSUB-15-HD_Female_Horizontal_P2.29x2.5mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm.kicad_mod ├── Vishay_PowerPAK_MLP44-24L.kicad_mod ├── RJE-20.kicad_mod ├── HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_tpa3138_ThermalVias.kicad_mod ├── AOS_QFN-23-2EP_4x4mm_P0.5mm.kicad_mod └── RPi_Pico_SMD.kicad_mod ├── td-io.dcm ├── MCU_RaspberryPi_and_Boards.pretty ├── Crystal_SMD_HC49-US.kicad_mod ├── RP2040-QFN-56.kicad_mod └── RPi_Pico_SMD_TH.kicad_mod ├── README.md ├── MCU_RaspberryPi_and_Boards.lib ├── td-io.kicad_pro └── LICENSE /docs/photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdaede/td-io/HEAD/docs/photo.jpg -------------------------------------------------------------------------------- /MCU_RaspberryPi_and_Boards.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | build 4 | *.bat 5 | -------------------------------------------------------------------------------- /firmware/edid.h: -------------------------------------------------------------------------------- 1 | #ifndef EDID_H_ 2 | #define EDID_H_ 3 | 4 | #include "i2c_fifo.h" 5 | #include "i2c_slave.h" 6 | 7 | void edid_init(void); 8 | 9 | static void edid_handler(i2c_inst_t *i2c, i2c_slave_event_t event); 10 | 11 | #endif // EDID_H_ 12 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(example_mem example_mem.c) 2 | 3 | pico_enable_stdio_uart(example_mem 1) 4 | pico_enable_stdio_usb(example_mem 1) 5 | 6 | pico_add_extra_outputs(example_mem) 7 | 8 | target_compile_options(example_mem PRIVATE -Wall) 9 | 10 | target_link_libraries(example_mem i2c_slave pico_stdlib) 11 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/i2c_slave/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(i2c_slave INTERFACE) 2 | 3 | target_include_directories(i2c_slave 4 | INTERFACE 5 | ./include) 6 | 7 | target_sources(i2c_slave 8 | INTERFACE 9 | i2c_slave.c 10 | ) 11 | 12 | target_link_libraries(i2c_slave 13 | INTERFACE 14 | hardware_i2c 15 | hardware_irq 16 | ) 17 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | include(pico_sdk_import.cmake) 4 | 5 | project(i2c_examples C CXX ASM) 6 | 7 | set(CMAKE_C_STANDARD 11) 8 | set(CMAKE_CXX_STANDARD 17) 9 | 10 | pico_sdk_init() 11 | 12 | add_subdirectory(i2c_slave) 13 | add_subdirectory(example_mem) 14 | add_subdirectory(example_mem_wire) 15 | -------------------------------------------------------------------------------- /sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (lib (name "td-io")(type "KiCad")(uri "${KIPRJMOD}/td-io.kicad_sym")(options "")(descr "")) 3 | (lib (name "MCU_RaspberryPi_and_Boards")(type "Legacy")(uri "${KIPRJMOD}/MCU_RaspberryPi_and_Boards.lib")(options "")(descr "")) 4 | (lib (name "td-aoz2261")(type "KiCad")(uri "/home/thomas/sandbox/td-aoz2261/td-aoz2261.kicad_sym")(options "")(descr "")) 5 | ) 6 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem_wire/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(example_mem_wire Wire.cpp example_mem_wire.cpp) 2 | 3 | pico_enable_stdio_uart(example_mem_wire 1) 4 | pico_enable_stdio_usb(example_mem_wire 1) 5 | 6 | pico_add_extra_outputs(example_mem_wire) 7 | 8 | target_compile_options(example_mem_wire PRIVATE -Wall) 9 | 10 | target_link_libraries(example_mem_wire i2c_slave pico_stdlib) 11 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 1.3 2 | --- 3 | Removed discrete EDID eeprom 4 | Moved volume pot & fixed footprint 5 | Added compatibility with TPA3137D2 amp 6 | Removed logic power efuse 7 | Added discrete TVS and efuse protection to coil drivers and JVS sense pin 8 | Swapped 3.3V PSU to AOZ2262-11 based circuit 9 | Changed button pullups to +5V 10 | 11 | 1.2 12 | --- 13 | Changed negative voltage supply to MAX1720 14 | Fixed RCA jack footprint 15 | Added EDID emulation option 16 | Fixed ADA4861 disable pin 17 | Fixed PLIMIT pin on audio amp 18 | 19 | 1.1 20 | --- 21 | Added DC restore circuit 22 | Fixed audio amp filter wiring 23 | Added +5V efuse 24 | Reduced 3.3V feedback network impedance 25 | Dropped 2.5V sense enable GPIO 26 | 27 | 28 | 1.0 29 | --- 30 | 31 | First revision 32 | -------------------------------------------------------------------------------- /firmware/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | # initialize the SDK based on PICO_SDK_PATH 4 | # note: this must happen before project() 5 | include(pico_sdk_import.cmake) 6 | 7 | project(td-io) 8 | 9 | # initialize the Raspberry Pi Pico SDK 10 | pico_sdk_init() 11 | 12 | add_subdirectory(third_party/pico_i2c_slave/i2c_slave) 13 | 14 | # rest of your project 15 | 16 | add_executable(td-io 17 | td-io.c edid.c 18 | ) 19 | 20 | # Pull in our pico_stdlib which aggregates commonly used features 21 | target_link_libraries(td-io pico_stdlib hardware_adc i2c_slave) 22 | 23 | # enable usb output, disable uart output 24 | pico_enable_stdio_usb(td-io 1) 25 | pico_enable_stdio_uart(td-io 0) 26 | 27 | # create map/bin/hex/uf2 file etc. 28 | pico_add_extra_outputs(td-io) 29 | -------------------------------------------------------------------------------- /td-io.pretty/CUI_RCJ-01X.kicad_mod: -------------------------------------------------------------------------------- 1 | (module CUI_RCJ-01X (layer F.Cu) (tedit 601BD22E) 2 | (fp_text reference REF** (at 0.5 3.5) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value CUI_RCJ-01X (at 0 -0.5) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -7.5 2.5) (end -7.5 -6.5) (layer F.SilkS) (width 0.12)) 9 | (fp_line (start -7.5 2.5) (end 7.5 2.5) (layer F.SilkS) (width 0.12)) 10 | (fp_line (start 7.5 2.5) (end 7.5 -6.5) (layer F.SilkS) (width 0.12)) 11 | (pad 1 thru_hole circle (at 0 0) (size 3 3) (drill 1.7) (layers *.Cu *.Mask)) 12 | (pad 2 thru_hole circle (at 5 0) (size 4 4) (drill 2.6) (layers *.Cu *.Mask)) 13 | (pad 2 thru_hole circle (at -5 0) (size 4 4) (drill 2.6) (layers *.Cu *.Mask)) 14 | (pad 2 thru_hole circle (at 0 -4.5) (size 4 4) (drill 2.6) (layers *.Cu *.Mask)) 15 | ) 16 | -------------------------------------------------------------------------------- /docs/ACCEPTANCE_TEST.md: -------------------------------------------------------------------------------- 1 | # Programming 2 | 3 | Plug the micro-USB port on the edge of td-io into a computer. It will appear as a USB flash drive. Drag and drop the firmware U2F file onto the flash drive. When programming is complete, the drive will disconnect automatically. 4 | 5 | Once programmed, the white button must be held when plugging in the USB cable to re-enter programming mode. 6 | 7 | # Basic test 8 | 9 | 1. Power the board via a JAMMA supergun. 10 | 11 | 2. Measure the pins on the JVS power connector and make sure the +3.3V line measures between 3.27V and 3.39V. 12 | 13 | 3. Ensure the volume pot turns smoothly and is not loose. 14 | 15 | 4. Set the switch default positions to 2 coin chutes and mono sound. 16 | 17 | # Functionality test 18 | 19 | 5. Attach a JVS host to the JVS connectors. Ensure that the green LED illuminates once the host initializes JVS. 20 | 21 | 6. Attach a sound source to the RCA connectors. Ensure that the sound is audible via either the JAMMA connector or via the stereo header. 22 | 23 | 7. Attach a video source to the VGA connector. Ensure that video appears via the supergun. 24 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Valentin Milea 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /td-io.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP AD813 4 | D Single Supply, Low Power, Triple Video Amplifier, DIP-14/SOIC-14 5 | K triple opamp 6 | F https://www.analog.com/media/en/technical-documentation/data-sheets/AD813.pdf 7 | $ENDCMP 8 | # 9 | $CMP ADA4891-3 10 | D Low Cost CMOS, High Speed, Rail-to-Rail Amplifier (Triple), SOIC-14/TSSOP-14 11 | K triple opamp video rail-to-rail 12 | F https://www.analog.com/media/en/technical-documentation/data-sheets/ADA4891-1_4891-2_4891-3_4891-4.PDF 13 | $ENDCMP 14 | # 15 | $CMP LM2664M4 16 | D Switched Capacitor Voltage Converter, Doubles or Splits Input Supply Voltage (2.5 V to 5.5 V or 1.8 V to 11 V), 40 mA, SOT-23-6 17 | K switched capacitor voltage converter doubler splitter 18 | F https://www.ti.com/lit/ds/symlink/lm2665.pdf 19 | $ENDCMP 20 | # 21 | $CMP MAX1720EUT 22 | D Switched Capacitor Voltage Converter, Doubles or Splits Input Supply Voltage (2.5 V to 5.5 V or 1.8 V to 11 V), 40 mA, SOT-23-6 23 | K switched capacitor voltage converter doubler splitter 24 | F https://datasheets.maximintegrated.com/en/ds/MAX1719-MAX1721.pdf 25 | $ENDCMP 26 | # 27 | $CMP TPS259631 28 | D 5V/12V eFuse Protection Switch (VSON-10) 29 | K efuse protection switch 30 | F http://www.ti.com/lit/ds/symlink/tps25925.pdf 31 | $ENDCMP 32 | # 33 | #End Doc Library 34 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/i2c_slave/include/i2c_fifo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef _I2C_FIFO_H_ 8 | #define _I2C_FIFO_H_ 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /** \file i2c_fifo.h 17 | * 18 | * \brief I2C non-blocking r/w. 19 | */ 20 | 21 | /** 22 | * \brief Pop a byte from I2C Rx FIFO. 23 | * 24 | * This function is non-blocking and assumes the Rx FIFO isn't empty. 25 | * 26 | * \param i2c I2C instance. 27 | * \return uint8_t Byte value. 28 | */ 29 | static inline uint8_t i2c_read_byte(i2c_inst_t *i2c) { 30 | i2c_hw_t *hw = i2c_get_hw(i2c); 31 | assert(hw->status & I2C_IC_STATUS_RFNE_BITS); // Rx FIFO must not be empty 32 | return (uint8_t)hw->data_cmd; 33 | } 34 | 35 | /** 36 | * \brief Push a byte into I2C Tx FIFO. 37 | * 38 | * This function is non-blocking and assumes the Tx FIFO isn't full. 39 | * 40 | * \param i2c I2C instance. 41 | * \param value Byte value. 42 | */ 43 | static inline void i2c_write_byte(i2c_inst_t *i2c, uint8_t value) { 44 | i2c_hw_t *hw = i2c_get_hw(i2c); 45 | assert(hw->status & I2C_IC_STATUS_TFNF_BITS); // Tx FIFO must not be full 46 | hw->data_cmd = value; 47 | } 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif // _I2C_FIFO_H_ 54 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/README.md: -------------------------------------------------------------------------------- 1 | # I2C slave library for the Raspberry Pi Pico 2 | 3 | The Raspberry Pi Pico C/C++ SDK has all you need to write an I2C master, but is curiously lacking when it comes to I2C in slave mode. This library fills that gap to easily turn the Pico into an I2C slave. 4 | 5 | ## Examples 6 | 7 | An example program is included where the slave acts as a 256 byte external memory. See `example_mem`. 8 | 9 | For those who prefer the Wire API commonly used with Arduino, there is a second version on top of a Wire wrapper. See `example_mem_wire`. 10 | 11 | To keep it simple, both master and slave run on the same board. Just add jumpers between the two I2C instances: GP4 to GP6 (SDA), and GP5 to GP7 (SCL). 12 | 13 | ### Setup 14 | 15 | Follow the instructions in [Getting started with Raspberry Pi Pico](https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf) to setup your build environment. Then: 16 | 17 | - `git clone https://github.com/vmilea/pico_i2c_slave` 18 | - `cd pico_i2c_slave` 19 | - `mkdir build`, `cd build`, `cmake ../`, `make` 20 | - copy `example_mem/example_mem.uf2` to Raspberry Pico 21 | - open a serial connection and check output 22 | 23 | ## Links 24 | 25 | - [Pico as I2C slave](https://www.raspberrypi.org/forums/viewtopic.php?t=304074) - basic setup using raw registers 26 | - [DroneBot Workshop](https://dronebotworkshop.com/i2c-part-2-build-i2c-sensor/) - building an I2C sensor 27 | 28 | ## Authors 29 | 30 | Valentin Milea 31 | -------------------------------------------------------------------------------- /firmware/edid.c: -------------------------------------------------------------------------------- 1 | #include "edid.h" 2 | #include "pico/stdlib.h" 3 | #include "i2c_slave.h" 4 | #include "i2c_fifo.h" 5 | 6 | #define PIN_SDA 4 7 | #define PIN_SCL 5 8 | 9 | static const uint8_t edid_value[128] = 10 | "\x00\xff\xff\xff\xff\xff\xff\x00\x31\xd8\x00\x00\x00\x00\x00\x00" 11 | "\x05\x21\x01\x03\x6d\x10\x0c\x78\xea\x5e\xc0\xa4\x59\x4a\x98\x25" 12 | "\x20\x50\x54\x00\x00\x00\x31\x40\x01\x01\x01\x01\x01\x01\x01\x01" 13 | "\x01\x01\x01\x01\x01\x01\x8c\x0a\x80\xda\x20\xe0\x2d\x10\x18\x60" 14 | "\xa4\x00\xa6\x7d\x00\x00\x00\x18\x00\x00\x00\xff\x00\x74\x64\x2d" 15 | "\x69\x6f\x20\x20\x20\x0a\x20\x20\x20\x20\x00\x00\x00\xfd\x00\x3b" 16 | "\x3d\x1e\x20\x03\x00\x0a\x20\x20\x20\x20\x20\x20\x00\x00\x00\xfc" 17 | "\x00\x74\x64\x2d\x69\x6f\x0a\x20\x20\x20\x20\x20\x20\x20\x00\xf6"; 18 | 19 | static int16_t edid_address = 0; 20 | 21 | static void edid_handler(i2c_inst_t *i2c, i2c_slave_event_t event) { 22 | switch (event) { 23 | case I2C_SLAVE_RECEIVE: 24 | edid_address = i2c_read_byte(i2c) & 0x7F; 25 | break; 26 | case I2C_SLAVE_REQUEST: 27 | i2c_write_byte(i2c, edid_value[edid_address]); 28 | edid_address++; 29 | if (edid_address > 127) edid_address = 0; 30 | break; 31 | default: 32 | break; 33 | } 34 | } 35 | 36 | void edid_init(void) { 37 | gpio_init(PIN_SDA); 38 | gpio_init(PIN_SCL); 39 | gpio_pull_up(PIN_SDA); 40 | gpio_pull_up(PIN_SCL); 41 | gpio_set_function(PIN_SDA, GPIO_FUNC_I2C); 42 | gpio_set_function(PIN_SCL, GPIO_FUNC_I2C); 43 | 44 | i2c_init(i2c0, 100000); 45 | i2c_slave_init(i2c0, 0x50, &edid_handler); 46 | } 47 | -------------------------------------------------------------------------------- /td-io.pretty/B08P-VL.kicad_mod: -------------------------------------------------------------------------------- 1 | (module B08P-VL (layer F.Cu) (tedit 6017B8BE) 2 | (fp_text reference REF** (at -12.8 0 90) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value B08P-VL (at 0 0) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -11.55 -6.39) (end 11.55 -6.39) (layer F.CrtYd) (width 0.05)) 9 | (fp_line (start 11.55 -6.39) (end 11.55 6.39) (layer F.CrtYd) (width 0.05)) 10 | (fp_line (start 11.55 6.39) (end -11.55 6.39) (layer F.CrtYd) (width 0.05)) 11 | (fp_line (start -11.55 6.39) (end -11.55 -6.39) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start -12 -7) (end -2 -7) (layer F.SilkS) (width 0.12)) 13 | (fp_line (start -2 -7) (end -2 -8) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start -2 -8) (end 2 -8) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 2 -8) (end 2 -7) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 2 -7) (end 12 -7) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 12 -7) (end 12 7) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 12 7) (end -12 7) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start -12 7) (end -12 -7) (layer F.SilkS) (width 0.12)) 20 | (pad 1 thru_hole circle (at -9.3 -4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 21 | (pad 5 thru_hole circle (at -9.3 4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 22 | (pad 2 thru_hole circle (at -3.1 -4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 23 | (pad 6 thru_hole circle (at -3.1 4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 24 | (pad 3 thru_hole circle (at 3.1 -4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 25 | (pad 7 thru_hole circle (at 3.1 4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 26 | (pad 4 thru_hole circle (at 9.3 -4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 27 | (pad 8 thru_hole circle (at 9.3 4.139999) (size 4 4) (drill 2.1) (layers *.Cu *.Mask)) 28 | ) 29 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/i2c_slave/include/i2c_slave.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef _I2C_SLAVE_H_ 8 | #define _I2C_SLAVE_H_ 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /** \file i2c_slave.h 17 | * 18 | * \brief I2C slave setup. 19 | */ 20 | 21 | /** 22 | * \brief I2C slave event types. 23 | */ 24 | typedef enum i2c_slave_event_t 25 | { 26 | I2C_SLAVE_RECEIVE = 0, /**< Data from master is available for reading. Slave must read from Rx FIFO. */ 27 | I2C_SLAVE_REQUEST = 1, /**< Master is requesting data. Slave must write into Tx FIFO. */ 28 | I2C_SLAVE_FINISH = 2, /**< Master has sent a Stop or Restart signal. Slave may prepare for the next transfer. */ 29 | } i2c_slave_event_t; 30 | 31 | /** 32 | * \brief I2C slave event handler 33 | * 34 | * The event handler will run from the I2C ISR, so it should return quickly (under 25 us at 400 kb/s). 35 | * Avoid blocking inside the handler and split large data transfers across multiple calls for best results. 36 | * When sending data to master, up to `i2c_get_write_available()` bytes can be written without blocking. 37 | * When receiving data from master, up to `i2c_get_read_available()` bytes can be read without blocking. 38 | * 39 | * \param i2c Slave I2C instance. 40 | * \param event Event type. 41 | */ 42 | typedef void (*i2c_slave_handler_t)(i2c_inst_t *i2c, i2c_slave_event_t event); 43 | 44 | /** 45 | * \brief Configure I2C instance for slave mode. 46 | * 47 | * \param i2c I2C instance. 48 | * \param address 7-bit slave address. 49 | * \param handler Called on events from I2C master. It will run from the I2C ISR, on the CPU core 50 | * where the slave was initialized. 51 | */ 52 | void i2c_slave_init(i2c_inst_t *i2c, uint8_t address, i2c_slave_handler_t handler); 53 | 54 | /** 55 | * \brief Restore I2C instance to master mode. 56 | * 57 | * \param i2c I2C instance. 58 | */ 59 | void i2c_slave_deinit(i2c_inst_t *i2c); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif // _I2C_SLAVE_H_ 66 | -------------------------------------------------------------------------------- /td-io.pretty/JST_SH_B4B-NH-A_1x04_P2.50mm_Vertical.kicad_mod: -------------------------------------------------------------------------------- 1 | (module JST_SH_B4B-NH-A_1x04_P2.50mm_Vertical (layer F.Cu) (tedit 6060333B) 2 | (descr "JST EH series connector, B4B-EH-A (http://www.jst-mfg.com/product/pdf/eng/eEH.pdf), generated with kicad-footprint-generator") 3 | (tags "connector JST EH vertical") 4 | (fp_text reference REF** (at 3.75 -2.8) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value JST_SH_B4B-NH-A_1x04_P2.50mm_Vertical (at 3.75 3.4) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -1.51 -0.14) (end -1.51 2.36) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start -1.51 2.36) (end 0.99 2.36) (layer F.SilkS) (width 0.12)) 12 | (fp_line (start -1.51 -0.14) (end -1.51 2.36) (layer F.Fab) (width 0.1)) 13 | (fp_line (start -1.51 2.36) (end 0.99 2.36) (layer F.Fab) (width 0.1)) 14 | (fp_text user %R (at 3.75 1.5) (layer F.Fab) 15 | (effects (font (size 1 1) (thickness 0.15))) 16 | ) 17 | (fp_line (start -1.25 -3.5) (end 8.75 -3.5) (layer F.CrtYd) (width 0.12)) 18 | (fp_line (start -1.25 -3.5) (end -1.25 3) (layer F.CrtYd) (width 0.12)) 19 | (fp_line (start -1.25 3) (end 8.75 3) (layer F.CrtYd) (width 0.12)) 20 | (fp_line (start 8.75 3) (end 8.75 -3.5) (layer F.CrtYd) (width 0.12)) 21 | (fp_line (start -1.25 -3.5) (end 8.75 -3.5) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 8.75 -3.5) (end 8.75 2.1) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 8.75 2.1) (end -1.25 2.1) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start -1.25 -3.5) (end -1.25 2.1) (layer F.SilkS) (width 0.12)) 25 | (pad 1 thru_hole roundrect (at 0 0) (size 1.7 1.95) (drill 0.95) (layers *.Cu *.Mask) (roundrect_rratio 0.147059)) 26 | (pad 2 thru_hole oval (at 2.5 0) (size 1.7 1.95) (drill 0.95) (layers *.Cu *.Mask)) 27 | (pad 3 thru_hole oval (at 5 0) (size 1.7 1.95) (drill 0.95) (layers *.Cu *.Mask)) 28 | (pad 4 thru_hole oval (at 7.5 0) (size 1.7 1.95) (drill 0.95) (layers *.Cu *.Mask)) 29 | (model ${KISYS3DMOD}/Connector_JST.3dshapes/JST_EH_B4B-EH-A_1x04_P2.50mm_Vertical.wrl 30 | (at (xyz 0 0 0)) 31 | (scale (xyz 1 1 1)) 32 | (rotate (xyz 0 0 0)) 33 | ) 34 | ) 35 | -------------------------------------------------------------------------------- /MCU_RaspberryPi_and_Boards.pretty/Crystal_SMD_HC49-US.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Crystal_SMD_HC49-US (layer F.Cu) (tedit 5F0C7995) 2 | (descr "SMD Crystal HC-49-SD http://cdn-reichelt.de/documents/datenblatt/B400/xxx-HC49-SMD.pdf, 11.4x4.7mm^2 package") 3 | (tags "SMD SMT crystal") 4 | (attr smd) 5 | (fp_text reference Y1 (at 0 -3.55) (layer F.SilkS) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value ABLS-12.000MHZ-B4-T (at 0 3.55) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_line (start -6.7 1.3) (end -6.7 2.55) (layer F.SilkS) (width 0.12)) 12 | (fp_text user %R (at 0 0) (layer F.Fab) 13 | (effects (font (size 1 1) (thickness 0.15))) 14 | ) 15 | (fp_line (start -5.7 -2.35) (end -5.7 2.35) (layer F.Fab) (width 0.1)) 16 | (fp_line (start -5.7 2.35) (end 5.7 2.35) (layer F.Fab) (width 0.1)) 17 | (fp_line (start 5.7 2.35) (end 5.7 -2.35) (layer F.Fab) (width 0.1)) 18 | (fp_line (start 5.7 -2.35) (end -5.7 -2.35) (layer F.Fab) (width 0.1)) 19 | (fp_line (start -3.015 -2.115) (end 3.015 -2.115) (layer F.Fab) (width 0.1)) 20 | (fp_line (start -3.015 2.115) (end 3.015 2.115) (layer F.Fab) (width 0.1)) 21 | (fp_line (start 5.9 -2.55) (end -6.7 -2.55) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start -6.7 -2.55) (end -6.7 -1.3) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start -6.7 2.55) (end 5.9 2.55) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start -6.8 -2.6) (end -6.8 2.6) (layer F.CrtYd) (width 0.05)) 25 | (fp_line (start -6.8 2.6) (end 6.8 2.6) (layer F.CrtYd) (width 0.05)) 26 | (fp_line (start 6.8 2.6) (end 6.8 -2.6) (layer F.CrtYd) (width 0.05)) 27 | (fp_line (start 6.8 -2.6) (end -6.8 -2.6) (layer F.CrtYd) (width 0.05)) 28 | (fp_arc (start -3.015 0) (end -3.015 -2.115) (angle -180) (layer F.Fab) (width 0.1)) 29 | (fp_arc (start 3.015 0) (end 3.015 -2.115) (angle 180) (layer F.Fab) (width 0.1)) 30 | (pad 1 smd rect (at -4.5 0) (size 5.6 2.1) (layers F.Cu F.Paste F.Mask)) 31 | (pad 2 smd rect (at 4.5 0) (size 5.6 2.1) (layers F.Cu F.Paste F.Mask)) 32 | (model ${KISYS3DMOD}/Crystal.3dshapes/Crystal_SMD_HC49-SD.wrl 33 | (at (xyz 0 0 0)) 34 | (scale (xyz 1 1 1)) 35 | (rotate (xyz 0 0 0)) 36 | ) 37 | ) 38 | -------------------------------------------------------------------------------- /td-io.pretty/PTV112-4420A-A503.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "PTV112-4420A-A503" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 622994E1) 4 | (attr through_hole) 5 | (fp_text reference "REF**" (at 0 -6) (layer "F.SilkS") 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | (tstamp 93655b03-f8dd-4d86-8b52-d114a68e12ca) 8 | ) 9 | (fp_text value "PTV112-4420A-A503" (at 0 -0.5) (layer "F.Fab") 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | (tstamp 1373502f-321b-4531-9a45-47bac790b796) 12 | ) 13 | (fp_line (start 6 -5) (end 6 -3) (layer "F.SilkS") (width 0.12) (tstamp 3474b0e6-49ff-4965-a9d1-9fa1956e444d)) 14 | (fp_line (start -6 -5) (end -6 -3) (layer "F.SilkS") (width 0.12) (tstamp 41eff1e0-3088-4793-ad5a-9ebd744cb08c)) 15 | (fp_line (start 6 3) (end 6 10) (layer "F.SilkS") (width 0.12) (tstamp 44a21485-091a-4abf-95d5-2114f3b91670)) 16 | (fp_line (start -6 -5) (end 6 -5) (layer "F.SilkS") (width 0.12) (tstamp be16654e-6cb3-4641-802d-28534f3096b3)) 17 | (fp_line (start -6 10) (end -6 3) (layer "F.SilkS") (width 0.12) (tstamp dfc4d111-a656-4de8-b479-7c79d5b873ed)) 18 | (fp_circle (center 0 0) (end 2 2) (layer "F.SilkS") (width 0.12) (fill none) (tstamp bc2dc161-254e-4440-9a60-bd6edf76b97b)) 19 | (pad "0" thru_hole circle (at -5.8 0) (size 3.5 3.5) (drill 2.3) (layers *.Cu *.Mask) (tstamp 5e05c43c-ff90-48af-b06e-aeb65439e252)) 20 | (pad "0" thru_hole circle (at 5.8 0) (size 3.5 3.5) (drill 2.3) (layers *.Cu *.Mask) (tstamp b221a280-3176-4551-9d97-1a4d3c259fac)) 21 | (pad "1" thru_hole circle (at -1 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp 4de871dd-d6e1-4ca8-a9fb-8eabfa880408)) 22 | (pad "2" thru_hole circle (at 1 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp f896ae72-8554-4742-b046-b3763f5f3768)) 23 | (pad "3" thru_hole circle (at 3 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp 15862f82-2edb-451c-bb3b-7fae1371453e)) 24 | (pad "4" thru_hole circle (at -3 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp 70ddc5d1-04f0-4b60-b823-c004906a5f4c)) 25 | (pad "5" thru_hole circle (at -5 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp e81115b7-7afa-4a4b-ab0f-fbaa8d73c387)) 26 | (pad "6" thru_hole circle (at 5 11) (size 1.5 1.5) (drill 1) (layers *.Cu *.Mask) (tstamp d1da6b96-9c33-482b-8567-40d1009e0a19)) 27 | ) 28 | -------------------------------------------------------------------------------- /firmware/pico_sdk_import.cmake: -------------------------------------------------------------------------------- 1 | # This is a copy of /external/pico_sdk_import.cmake 2 | 3 | # This can be dropped into an external project to help locate this SDK 4 | # It should be include()ed prior to project() 5 | 6 | if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH)) 7 | set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) 8 | message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')") 9 | endif () 10 | 11 | if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT)) 12 | set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT}) 13 | message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')") 14 | endif () 15 | 16 | if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH)) 17 | set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH}) 18 | message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')") 19 | endif () 20 | 21 | set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK") 22 | set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable") 23 | set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK") 24 | 25 | if (NOT PICO_SDK_PATH) 26 | if (PICO_SDK_FETCH_FROM_GIT) 27 | include(FetchContent) 28 | set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) 29 | if (PICO_SDK_FETCH_FROM_GIT_PATH) 30 | get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") 31 | endif () 32 | FetchContent_Declare( 33 | pico_sdk 34 | GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk 35 | GIT_TAG master 36 | ) 37 | if (NOT pico_sdk) 38 | message("Downloading Raspberry Pi Pico SDK") 39 | FetchContent_Populate(pico_sdk) 40 | set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) 41 | endif () 42 | set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) 43 | else () 44 | message(FATAL_ERROR 45 | "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git." 46 | ) 47 | endif () 48 | endif () 49 | 50 | get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") 51 | if (NOT EXISTS ${PICO_SDK_PATH}) 52 | message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found") 53 | endif () 54 | 55 | set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake) 56 | if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE}) 57 | message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK") 58 | endif () 59 | 60 | set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE) 61 | 62 | include(${PICO_SDK_INIT_CMAKE_FILE}) 63 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/pico_sdk_import.cmake: -------------------------------------------------------------------------------- 1 | # This is a copy of /external/pico_sdk_import.cmake 2 | 3 | # This can be dropped into an external project to help locate this SDK 4 | # It should be include()ed prior to project() 5 | 6 | if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH)) 7 | set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) 8 | message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')") 9 | endif () 10 | 11 | if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT)) 12 | set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT}) 13 | message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')") 14 | endif () 15 | 16 | if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH)) 17 | set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH}) 18 | message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')") 19 | endif () 20 | 21 | set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK") 22 | set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable") 23 | set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK") 24 | 25 | if (NOT PICO_SDK_PATH) 26 | if (PICO_SDK_FETCH_FROM_GIT) 27 | include(FetchContent) 28 | set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) 29 | if (PICO_SDK_FETCH_FROM_GIT_PATH) 30 | get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") 31 | endif () 32 | FetchContent_Declare( 33 | pico_sdk 34 | GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk 35 | GIT_TAG master 36 | ) 37 | if (NOT pico_sdk) 38 | message("Downloading Raspberry Pi Pico SDK") 39 | FetchContent_Populate(pico_sdk) 40 | set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) 41 | endif () 42 | set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) 43 | else () 44 | message(FATAL_ERROR 45 | "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git." 46 | ) 47 | endif () 48 | endif () 49 | 50 | get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") 51 | if (NOT EXISTS ${PICO_SDK_PATH}) 52 | message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found") 53 | endif () 54 | 55 | set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake) 56 | if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE}) 57 | message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK") 58 | endif () 59 | 60 | set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE) 61 | 62 | include(${PICO_SDK_INIT_CMAKE_FILE}) 63 | -------------------------------------------------------------------------------- /td-io.pretty/PJRAN2X1U01AUX.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "PJRAN2X1U01AUX" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 62298E2F) 4 | (attr through_hole) 5 | (fp_text reference "REF**" (at 8 -7) (layer "F.SilkS") 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | (tstamp d9545c96-5c49-4c6f-9495-aafafdd3c43f) 8 | ) 9 | (fp_text value "PJRAN2X1U01AUX" (at 0 -0.5) (layer "F.Fab") 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | (tstamp 70cc8635-c3b0-4d29-8ae8-d203e87140c7) 12 | ) 13 | (fp_line (start -5 3) (end -5 -6) (layer "F.SilkS") (width 0.12) (tstamp 0cdf8da4-f931-4c97-84e2-c00933a3d283)) 14 | (fp_line (start -5 -6) (end 20 -6) (layer "F.SilkS") (width 0.12) (tstamp 28756484-e35f-44c2-b791-6452c5cfd2da)) 15 | (fp_line (start 20 -6) (end 20 3) (layer "F.SilkS") (width 0.12) (tstamp a2f73635-db12-4bdd-b965-eb4da647a5e6)) 16 | (fp_line (start 10.8 13.5) (end 10.8 4) (layer "Dwgs.User") (width 0.12) (tstamp 2026e155-19ec-411b-899a-69c20d5e34f7)) 17 | (fp_line (start -4.2 13.5) (end 4.2 13.5) (layer "Dwgs.User") (width 0.12) (tstamp da3b9df7-807e-4f43-9e59-c5b8cbf4bb01)) 18 | (fp_line (start 19.2 13.5) (end 19.2 4) (layer "Dwgs.User") (width 0.12) (tstamp e8b5b41c-9472-48e5-8d03-e4ebd65734c9)) 19 | (fp_line (start 4.2 13.5) (end 4.2 4) (layer "Dwgs.User") (width 0.12) (tstamp e9ef8a46-e2bb-4160-9583-cf9906a8f945)) 20 | (fp_line (start 10.8 13.5) (end 19.2 13.5) (layer "Dwgs.User") (width 0.12) (tstamp fbcdabed-f5d4-4307-bf9d-70e4bfac41ab)) 21 | (fp_line (start -4.2 13.5) (end -4.2 4) (layer "Dwgs.User") (width 0.12) (tstamp fea18883-ed59-4e04-8bd1-6f76f8a258a1)) 22 | (fp_line (start 20 -6) (end -5 -6) (layer "F.CrtYd") (width 0.12) (tstamp 1a070b41-d521-46db-9255-53b50a69b353)) 23 | (fp_line (start -5 4) (end -5 -6) (layer "F.CrtYd") (width 0.12) (tstamp 307a8018-bfa6-4aad-8100-546cbaf7f1f7)) 24 | (fp_line (start 20 4) (end 20 -6) (layer "F.CrtYd") (width 0.12) (tstamp ec562cd0-a45c-4400-9353-f0b7abad1a7f)) 25 | (fp_line (start -5 4) (end 20 4) (layer "F.CrtYd") (width 0.12) (tstamp efbfbccc-4e8e-42f7-9b4a-9529187729b5)) 26 | (pad "1" thru_hole roundrect (at -3.75 -3.7) (size 2.3 3.4) (drill oval 1 2.5) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp 974c5d10-eea1-451d-a75c-169b88f01dad)) 27 | (pad "2" thru_hole roundrect (at 11.25 -3.7) (size 2.3 3.4) (drill oval 1 2.5) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp 9241f456-30b0-4836-a489-536bcfaaf796)) 28 | (pad "3" thru_hole roundrect (at 15 0) (size 3.4 2.3) (drill oval 2.5 1.3) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp 448c4c02-a77c-4a50-9749-d2095d79736f)) 29 | (pad "3" thru_hole roundrect (at 0 0) (size 3.4 2.3) (drill oval 2.5 1.3) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp ad49e140-9557-404b-b157-d15b4ae6d82a)) 30 | (pad "4" thru_hole roundrect (at 3.75 -3.7) (size 2.3 3.4) (drill oval 1 2.5) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp c68c2efe-2b46-4486-a89b-5723c4e8c132)) 31 | (pad "5" thru_hole roundrect (at 18.75 -3.7) (size 2.3 3.4) (drill oval 1 2.5) (layers *.Cu *.Mask) (roundrect_rratio 0.25) (tstamp bf319a74-1da0-47fe-8f1d-337cbf62c7f7)) 32 | ) 33 | -------------------------------------------------------------------------------- /td-io.pretty/DF1BZ-34DP-2.5DS.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DF1BZ-34DP-2.5DS (layer F.Cu) (tedit 602B5AA2) 2 | (fp_text reference REF** (at -24.4 0 90) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value DF1BZ-34DP-2.5DS (at 0 0) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -22.5 1.3) (end -22.5 -10.8) (layer F.SilkS) (width 0.12)) 9 | (fp_line (start 22.5 -10.8) (end 22.5 1.3) (layer F.SilkS) (width 0.12)) 10 | (fp_line (start -22.5 -10.8) (end 22.5 -10.8) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start -21.15 2.4) (end -21.15 -2.4) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start 21.15 2.4) (end -21.15 2.4) (layer F.CrtYd) (width 0.05)) 13 | (fp_line (start 21.15 -2.4) (end 21.15 2.4) (layer F.CrtYd) (width 0.05)) 14 | (fp_line (start -21.15 -2.4) (end 21.15 -2.4) (layer F.CrtYd) (width 0.05)) 15 | (pad 34 thru_hole circle (at -20 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 16 | (pad 33 thru_hole circle (at -20 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 17 | (pad 32 thru_hole circle (at -17.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 18 | (pad 31 thru_hole circle (at -17.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 19 | (pad 30 thru_hole circle (at -15 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 20 | (pad 29 thru_hole circle (at -15 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 21 | (pad 28 thru_hole circle (at -12.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 22 | (pad 27 thru_hole circle (at -12.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 23 | (pad 26 thru_hole circle (at -10 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 24 | (pad 25 thru_hole circle (at -10 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 25 | (pad 24 thru_hole circle (at -7.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 26 | (pad 23 thru_hole circle (at -7.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 27 | (pad 22 thru_hole circle (at -5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 28 | (pad 21 thru_hole circle (at -5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 29 | (pad 20 thru_hole circle (at -2.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 30 | (pad 19 thru_hole circle (at -2.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 31 | (pad 18 thru_hole circle (at 0 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 32 | (pad 17 thru_hole circle (at 0 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 33 | (pad 16 thru_hole circle (at 2.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 34 | (pad 15 thru_hole circle (at 2.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 35 | (pad 14 thru_hole circle (at 5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 36 | (pad 13 thru_hole circle (at 5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 37 | (pad 12 thru_hole circle (at 7.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 38 | (pad 11 thru_hole circle (at 7.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 39 | (pad 10 thru_hole circle (at 10 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 40 | (pad 9 thru_hole circle (at 10 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 41 | (pad 8 thru_hole circle (at 12.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 42 | (pad 7 thru_hole circle (at 12.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 43 | (pad 6 thru_hole circle (at 15 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 44 | (pad 5 thru_hole circle (at 15 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 45 | (pad 4 thru_hole circle (at 17.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 46 | (pad 3 thru_hole circle (at 17.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 47 | (pad 2 thru_hole circle (at 20 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 48 | (pad 1 thru_hole circle (at 20 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 49 | ) 50 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/i2c_slave/i2c_slave.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | typedef struct i2c_slave_t 11 | { 12 | i2c_inst_t *i2c; 13 | i2c_slave_handler_t handler; 14 | bool transfer_in_progress; 15 | } i2c_slave_t; 16 | 17 | static i2c_slave_t i2c_slaves[2]; 18 | 19 | static inline void finish_transfer(i2c_slave_t *slave) { 20 | if (slave->transfer_in_progress) { 21 | slave->handler(slave->i2c, I2C_SLAVE_FINISH); 22 | slave->transfer_in_progress = false; 23 | } 24 | } 25 | 26 | // Improved version of the IRQ handler above, reduces the error rate 27 | #pragma GCC push_options 28 | #pragma GCC optimize ("O0") 29 | static void __not_in_flash_func(i2c_slave_irq_handler)(i2c_slave_t *slave) { 30 | i2c_inst_t *i2c = slave->i2c; 31 | i2c_hw_t *hw = i2c_get_hw(i2c); 32 | 33 | uint32_t intr_stat = hw->intr_stat; 34 | if (intr_stat == 0) { 35 | return; 36 | } 37 | if (intr_stat & I2C_IC_INTR_STAT_R_RX_FULL_BITS) { 38 | slave->transfer_in_progress = true; 39 | slave->handler(i2c, I2C_SLAVE_RECEIVE); 40 | } 41 | if (intr_stat & I2C_IC_INTR_STAT_R_RD_REQ_BITS) { 42 | hw->clr_rd_req; 43 | slave->transfer_in_progress = true; 44 | slave->handler(i2c, I2C_SLAVE_REQUEST); 45 | } 46 | if (intr_stat & I2C_IC_INTR_STAT_R_TX_ABRT_BITS) { 47 | hw->clr_tx_abrt; 48 | finish_transfer(slave); 49 | } 50 | if (intr_stat & I2C_IC_INTR_STAT_R_START_DET_BITS) { 51 | hw->clr_start_det; 52 | finish_transfer(slave); 53 | } 54 | if (intr_stat & I2C_IC_INTR_STAT_R_STOP_DET_BITS) { 55 | hw->clr_stop_det; 56 | finish_transfer(slave); 57 | } 58 | } 59 | #pragma GCC pop_option 60 | 61 | static void __not_in_flash_func(i2c0_slave_irq_handler)() { 62 | i2c_slave_irq_handler(&i2c_slaves[0]); 63 | } 64 | 65 | static void __not_in_flash_func(i2c1_slave_irq_handler)() { 66 | i2c_slave_irq_handler(&i2c_slaves[1]); 67 | } 68 | 69 | void i2c_slave_init(i2c_inst_t *i2c, uint8_t address, i2c_slave_handler_t handler) { 70 | assert(i2c == i2c0 || i2c == i2c1); 71 | assert(handler != NULL); 72 | 73 | uint i2c_index = i2c_hw_index(i2c); 74 | i2c_slave_t *slave = &i2c_slaves[i2c_index]; 75 | slave->i2c = i2c; 76 | slave->handler = handler; 77 | 78 | // Note: The I2C slave does clock stretching implicitly after a RD_REQ, while the Tx FIFO is empty. 79 | // There is also an option to enable clock stretching while the Rx FIFO is full, but we leave it 80 | // disabled since the Rx FIFO should never fill up (unless slave->handler() is way too slow). 81 | i2c_set_slave_mode(i2c, true, address); 82 | 83 | i2c_hw_t *hw = i2c_get_hw(i2c); 84 | // unmask necessary interrupts 85 | hw->intr_mask = I2C_IC_INTR_MASK_M_RX_FULL_BITS | I2C_IC_INTR_MASK_M_RD_REQ_BITS | I2C_IC_RAW_INTR_STAT_TX_ABRT_BITS | I2C_IC_INTR_MASK_M_STOP_DET_BITS | I2C_IC_INTR_MASK_M_START_DET_BITS; 86 | 87 | // enable clock stretching for when RX FIFI is full -> give more time to ISR 88 | hw->con = hw->con | I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_VALUE_ENABLED; 89 | 90 | // enable interrupt for current core 91 | uint num = I2C0_IRQ + i2c_index; 92 | irq_set_exclusive_handler(num, i2c_index == 0 ? i2c0_slave_irq_handler : i2c1_slave_irq_handler); 93 | irq_set_enabled(num, true); 94 | } 95 | 96 | void i2c_slave_deinit(i2c_inst_t *i2c) { 97 | assert(i2c == i2c0 || i2c == i2c1); 98 | 99 | uint i2c_index = i2c_hw_index(i2c); 100 | i2c_slave_t *slave = &i2c_slaves[i2c_index]; 101 | assert(slave->i2c == i2c); // should be called after i2c_slave_init() 102 | 103 | slave->i2c = NULL; 104 | slave->handler = NULL; 105 | slave->transfer_in_progress = false; 106 | 107 | uint num = I2C0_IRQ + i2c_index; 108 | irq_set_enabled(num, false); 109 | irq_remove_handler(num, i2c_index == 0 ? i2c0_slave_irq_handler : i2c1_slave_irq_handler); 110 | 111 | i2c_hw_t *hw = i2c_get_hw(i2c); 112 | hw->intr_mask = I2C_IC_INTR_MASK_RESET; 113 | 114 | i2c_set_slave_mode(i2c, false, 0); 115 | } 116 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: LLVM 3 | --- 4 | Language: Cpp 5 | AccessModifierOffset: -4 6 | AlignAfterOpenBracket: DontAlign 7 | AlignConsecutiveAssignments: false 8 | AlignConsecutiveBitFields: true 9 | AlignConsecutiveDeclarations: false 10 | AlignConsecutiveMacros: true 11 | AlignEscapedNewlines: Left 12 | AlignOperands: DontAlign 13 | AlignTrailingComments: false 14 | AllowAllArgumentsOnNextLine: false 15 | AllowAllConstructorInitializersOnNextLine: false 16 | AllowAllParametersOfDeclarationOnNextLine: false 17 | AllowShortEnumsOnASingleLine: false 18 | AllowShortBlocksOnASingleLine: Empty 19 | AllowShortCaseLabelsOnASingleLine: false 20 | AllowShortFunctionsOnASingleLine: None 21 | AllowShortIfStatementsOnASingleLine: Never 22 | AllowShortLambdasOnASingleLine: Inline 23 | AllowShortLoopsOnASingleLine: false 24 | AlwaysBreakAfterReturnType: None 25 | AlwaysBreakBeforeMultilineStrings: false 26 | AlwaysBreakTemplateDeclarations: No 27 | BinPackArguments: true 28 | BinPackParameters: true 29 | BraceWrapping: 30 | AfterCaseLabel: false 31 | AfterClass: true 32 | AfterControlStatement: Never 33 | AfterEnum: true 34 | AfterFunction: false 35 | AfterNamespace: false 36 | AfterStruct: true 37 | AfterUnion: true 38 | AfterExternBlock: false 39 | BeforeCatch: false 40 | BeforeElse: false 41 | BeforeLambdaBody: false 42 | BeforeWhile: false 43 | IndentBraces: false 44 | SplitEmptyFunction: true 45 | SplitEmptyRecord: true 46 | SplitEmptyNamespace: true 47 | BreakBeforeBinaryOperators: None 48 | BreakBeforeBraces: Custom 49 | BreakBeforeTernaryOperators: true 50 | BreakConstructorInitializers: BeforeComma 51 | BreakInheritanceList: BeforeComma 52 | BreakStringLiterals: false 53 | ColumnLimit: 0 54 | CommentPragmas: '^ IWYU pragma:' 55 | CompactNamespaces: false 56 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 57 | ConstructorInitializerIndentWidth: 4 58 | ContinuationIndentWidth: 4 59 | Cpp11BracedListStyle: true 60 | DeriveLineEnding: true 61 | DerivePointerAlignment: false 62 | DisableFormat: false 63 | ExperimentalAutoDetectBinPacking: false 64 | FixNamespaceComments: true 65 | ForEachMacros: 66 | - foreach 67 | - Q_FOREACH 68 | - BOOST_FOREACH 69 | IncludeBlocks: Preserve 70 | IncludeCategories: 71 | - Regex: '^"(llvm|llvm-c|clang|clang-c)/' 72 | Priority: 2 73 | SortPriority: 0 74 | - Regex: '^(<|"(gtest|gmock|isl|json)/)' 75 | Priority: 3 76 | SortPriority: 0 77 | - Regex: '.*' 78 | Priority: 1 79 | SortPriority: 0 80 | IncludeIsMainRegex: '(Test)?$' 81 | IncludeIsMainSourceRegex: '' 82 | IndentCaseLabels: false 83 | IndentCaseBlocks: false 84 | IndentExternBlock: NoIndent 85 | IndentGotoLabels: true 86 | IndentPPDirectives: None 87 | IndentWidth: 4 88 | IndentWrappedFunctionNames: false 89 | InsertTrailingCommas: None 90 | KeepEmptyLinesAtTheStartOfBlocks: true 91 | MacroBlockBegin: '' 92 | MacroBlockEnd: '' 93 | MaxEmptyLinesToKeep: 1 94 | NamespaceIndentation: None 95 | PenaltyBreakAssignment: 2 96 | PenaltyBreakBeforeFirstCallParameter: 19 97 | PenaltyBreakComment: 300 98 | PenaltyBreakFirstLessLess: 120 99 | PenaltyBreakString: 1000 100 | PenaltyBreakTemplateDeclaration: 10 101 | PenaltyExcessCharacter: 1000000 102 | PenaltyReturnTypeOnItsOwnLine: 60 103 | PointerAlignment: Right 104 | ReflowComments: false 105 | SortIncludes: false 106 | SortUsingDeclarations: false 107 | SpaceAfterCStyleCast: false 108 | SpaceAfterLogicalNot: false 109 | SpaceAfterTemplateKeyword: true 110 | SpaceBeforeAssignmentOperators: true 111 | SpaceBeforeCpp11BracedList: false 112 | SpaceBeforeCtorInitializerColon: true 113 | SpaceBeforeInheritanceColon: true 114 | SpaceBeforeParens: ControlStatements 115 | SpaceBeforeRangeBasedForLoopColon: true 116 | SpaceInEmptyBlock: false 117 | SpaceInEmptyParentheses: false 118 | SpacesBeforeTrailingComments: 1 119 | SpacesInAngles: false 120 | SpacesInConditionalStatement: false 121 | SpacesInContainerLiterals: true 122 | SpacesInCStyleCastParentheses: false 123 | SpacesInParentheses: false 124 | SpacesInSquareBrackets: false 125 | SpaceBeforeSquareBrackets: false 126 | Standard: Latest 127 | StatementMacros: 128 | - Q_UNUSED 129 | - QT_REQUIRE_VERSION 130 | TabWidth: 4 131 | UseCRLF: false 132 | UseTab: Never 133 | WhitespaceSensitiveMacros: 134 | - BOOST_PP_STRINGIZE 135 | ... 136 | -------------------------------------------------------------------------------- /td-io.pretty/DF1BZ-34DP-2.5DSA.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DF1BZ-34DP-2.5DSA (layer F.Cu) (tedit 6017B74D) 2 | (fp_text reference REF** (at -24.4 0 90) (layer F.SilkS) 3 | (effects (font (size 1 1) (thickness 0.15))) 4 | ) 5 | (fp_text value DF1BZ-34DP-2.5DSA (at 0 0) (layer F.Fab) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_line (start -21.15 -2.4) (end 21.15 -2.4) (layer F.CrtYd) (width 0.05)) 9 | (fp_line (start 21.15 -2.4) (end 21.15 2.4) (layer F.CrtYd) (width 0.05)) 10 | (fp_line (start 21.15 2.4) (end -21.15 2.4) (layer F.CrtYd) (width 0.05)) 11 | (fp_line (start -21.15 2.4) (end -21.15 -2.4) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start -23.5 -5) (end 23.5 -5) (layer F.SilkS) (width 0.12)) 13 | (fp_line (start 23.5 -5) (end 23.5 5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 23.5 5) (end -23.5 5) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start -23.5 5) (end -23.5 -5) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start -20 5) (end -20 4.5) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start -20 4.5) (end -16.5 4.5) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start -16.5 4.5) (end -16.5 5) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 20 5) (end 20 4.5) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 20 4.5) (end 16.5 4.5) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 16.5 4.5) (end 16.5 5) (layer F.SilkS) (width 0.12)) 22 | (pad 34 thru_hole circle (at -20 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 23 | (pad 33 thru_hole circle (at -20 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 24 | (pad 32 thru_hole circle (at -17.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 25 | (pad 31 thru_hole circle (at -17.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 26 | (pad 30 thru_hole circle (at -15 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 27 | (pad 29 thru_hole circle (at -15 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 28 | (pad 28 thru_hole circle (at -12.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 29 | (pad 27 thru_hole circle (at -12.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 30 | (pad 26 thru_hole circle (at -10 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 31 | (pad 25 thru_hole circle (at -10 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 32 | (pad 24 thru_hole circle (at -7.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 33 | (pad 23 thru_hole circle (at -7.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 34 | (pad 22 thru_hole circle (at -5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 35 | (pad 21 thru_hole circle (at -5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 36 | (pad 20 thru_hole circle (at -2.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 37 | (pad 19 thru_hole circle (at -2.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 38 | (pad 18 thru_hole circle (at 0 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 39 | (pad 17 thru_hole circle (at 0 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 40 | (pad 16 thru_hole circle (at 2.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 41 | (pad 15 thru_hole circle (at 2.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 42 | (pad 14 thru_hole circle (at 5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 43 | (pad 13 thru_hole circle (at 5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 44 | (pad 12 thru_hole circle (at 7.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 45 | (pad 11 thru_hole circle (at 7.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 46 | (pad 10 thru_hole circle (at 10 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 47 | (pad 9 thru_hole circle (at 10 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 48 | (pad 8 thru_hole circle (at 12.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 49 | (pad 7 thru_hole circle (at 12.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 50 | (pad 6 thru_hole circle (at 15 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 51 | (pad 5 thru_hole circle (at 15 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 52 | (pad 4 thru_hole circle (at 17.5 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 53 | (pad 3 thru_hole circle (at 17.5 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 54 | (pad 2 thru_hole circle (at 20 -1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 55 | (pad 1 thru_hole circle (at 20 1.25) (size 1.8 1.8) (drill 1.1) (layers *.Cu *.Mask)) 56 | ) 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![td-io](/docs/photo.jpg) 2 | 3 | td-io is a JVS I/O board designed to adapt older JAMMA-compatible cabinets to the newer JVS standard, used by modern arcade hardware such as the Naomi and exA. It features a number of independent systems to translate signals, drive cabinet hardware, and power JVS games. 4 | 5 | # Features at a glance 6 | 7 | * Chainable JVS I/O implementing a 2L12B panel and coin inputs 8 | * JVS to JAMMA video converter compatible with all monitors 9 | * Mono/stereo audio amplifier for driving JAMMA speakers 10 | * JVS power connector providing 3.3V via an on-board converter 11 | * High reliability, low heat generation and all solid state caps 12 | * Upgradeable firmware 13 | 14 | # Comparison with other JVS I/O options 15 | 16 | | | TD-IO | Capcom I/O | Sega 838 | Exa I/O | 17 | | ------------- | ------- | ------------ | ---------- | ------- | 18 | | Lag (frames) | 0 | 1 | 0 | 0 | 19 | | Chaining | ✔ | ❌ | ✔ | ✔ | 20 | | Video | ✔ | ✔ | ✔ | ❌ | 21 | | Audio amp | ✔ | ✔ | ❌ | ❌ | 22 | | 3.3V power | ✔ | ✔ | ❌ | ❌ | 23 | | Amplified stereo | ✔ | ❌ | ❌ | ❌ | 24 | 25 | # JVS inputs 26 | 27 | The JVS I/O bus connects to the board via USB-style A and B connectors. Daisy chaining is supported. The I/O presents two players, each with a single joystick/lever and six buttons. Joystick and button 1-4 inputs are mapped to the JAMMA edge connector, and buttons 4-6 are mapped to a CPS2-style kick harness connector. Buttons are polled synchronously, ensuring microsecond-level latency. 28 | 29 | Service, test, and tilt buttons are also supported. JAMMA's single service button is mapped to JVS player 1's service button. 30 | 31 | The board also presents one or two coin slots, toggleable by a DIP switch. The board also features two coin meter drivers and two coin lockout drivers. Coins are locked out when the respective coin count is set to its max value (16383). 32 | 33 | # Video 34 | 35 | The board maps JVS-level video (0.7Vp-p, AC or DC coupled) to JAMMA levels (0-3V, DC coupled). This is achieved via a DC restore step using the sync signal, followed by a fixed amplification. The DC coupled output allows maximum compatibility with monitors such as the Nanao MS8 and capture devices such as the Splitfire which require it. 36 | 37 | In addition, a sync combiner combines negative H/V sync to negative composite sync. 38 | 39 | No rate conversion is performed - the monitor must support the same scan rates as the JVS game. 40 | 41 | An EDID EEPROM is also attached to the VGA port, to identify as a 31kHz monitor. 42 | 43 | # Audio 44 | 45 | TD-IO provides a class-D audio amplifier, which can drive both mono and stereo speakers in JAMMA cabinets. For mono cabinets, audio is simply provided via the JAMMA edge. For stereo support, the cabinet's speakers should be connected to the JST NH header provided on the I/O. The pinout of this header is directly compatible with the Egret 2, and adapters can be easily made for other cabinets, such as the Aero. 46 | 47 | The stereo/mono switch selects whether to mixdown the L/R channels to mono. It should be set to mono when using a mono cabinet via the JAMMA edge, and stereo when using a cabinet with the stereo header. 48 | 49 | The stereo support is not directly compatible with nonstandard Neo Geo style stereo over JAMMA, with a common ground. For these cabinets, either use the TD-IO in mono mode, or rewire the cabinet to connect directly to the stereo header. The left/right negative speaker outputs should not be tied together. 50 | 51 | ## Aero City stereo adapter 52 | 53 | | JST NH H4P-SHF-AA | Molex MLX 50-84-2042 | 54 | | --- | --- | 55 | | 1 | 2 | 56 | | 2 | 3 | 57 | | 3 | 1 | 58 | | 4 | 4 | 59 | 60 | # Power 61 | 62 | An 8-pin JVS power connector forwards 12V and 5V from the cabinet to the JVS board. In addition, an on-board power supply generates 3.3V at up to 7A from the cabinet's 5V rail for systems that require it, such as Naomi. 63 | 64 | The cabinet's 5V power supply must still be adequate to power the 3.3V converter. 65 | 66 | The IO's electronics are protected from overvoltage and overcurrent by an automatically resetting protector. 67 | 68 | # Firmware Updates 69 | 70 | The board features an on-board RP2040 microcontroller, whose firmware can be updated over USB for feature enhancements or compatibility fixes. 71 | 72 | To update the firmware, turn off power to the cabinet (if attached). Then, attach a USB cable to the micro USB connector. Hold down the white button on the RP2040 while plugging the USB connector into a PC. The TD-IO will then appear as a flash drive. Copy the firmware file (ending in .uf2) onto the drive. The TD-IO will then disconnect and be ready for use. 73 | 74 | # Analog Input 75 | 76 | The board features an unpopulated expansion header exposing 3 3.3V level analog inputs, designed for potentiometers for analog joystick or racing games. This feature is experimental and not yet implemented in the firmware. 77 | 78 | # Where to buy 79 | 80 | The board is not currently for sale, as testing is not yet complete. 81 | 82 | # License 83 | 84 | CERN-OHL-W 85 | -------------------------------------------------------------------------------- /MCU_RaspberryPi_and_Boards.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # Pico 5 | # 6 | DEF Pico U 0 40 Y Y 1 F N 7 | F0 "U" -550 1100 50 H V C CNN 8 | F1 "Pico" 0 750 50 H V C CNN 9 | F2 "RPi_Pico:RPi_Pico_SMD_TH" 0 0 50 V I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | DRAW 12 | T 0 0 850 50 0 0 0 "Raspberry Pi" Normal 0 C C 13 | S -600 1050 600 -1050 0 1 0 f 14 | X GPIO0 1 -700 950 100 R 50 50 1 1 B 15 | X GPIO7 10 -700 50 100 R 50 50 1 1 B 16 | X GPIO8 11 -700 -50 100 R 50 50 1 1 B 17 | X GPIO9 12 -700 -150 100 R 50 50 1 1 B 18 | X GND 13 -700 -250 100 R 50 50 1 1 W 19 | X GPIO10 14 -700 -350 100 R 50 50 1 1 B 20 | X GPIO11 15 -700 -450 100 R 50 50 1 1 B 21 | X GPIO12 16 -700 -550 100 R 50 50 1 1 B 22 | X GPIO13 17 -700 -650 100 R 50 50 1 1 B 23 | X GND 18 -700 -750 100 R 50 50 1 1 W 24 | X GPIO14 19 -700 -850 100 R 50 50 1 1 B 25 | X GPIO1 2 -700 850 100 R 50 50 1 1 B 26 | X GPIO15 20 -700 -950 100 R 50 50 1 1 B 27 | X GPIO16 21 700 -950 100 L 50 50 1 1 B 28 | X GPIO17 22 700 -850 100 L 50 50 1 1 B 29 | X GND 23 700 -750 100 L 50 50 1 1 W 30 | X GPIO18 24 700 -650 100 L 50 50 1 1 B 31 | X GPIO19 25 700 -550 100 L 50 50 1 1 B 32 | X GPIO20 26 700 -450 100 L 50 50 1 1 B 33 | X GPIO21 27 700 -350 100 L 50 50 1 1 B 34 | X GND 28 700 -250 100 L 50 50 1 1 W 35 | X GPIO22 29 700 -150 100 L 50 50 1 1 B 36 | X GND 3 -700 750 100 R 50 50 1 1 W 37 | X RUN 30 700 -50 100 L 50 50 1 1 I 38 | X GPIO26_ADC0 31 700 50 100 L 50 50 1 1 B 39 | X GPIO27_ADC1 32 700 150 100 L 50 50 1 1 B 40 | X AGND 33 700 250 100 L 50 50 1 1 W 41 | X GPIO28_ADC2 34 700 350 100 L 50 50 1 1 B 42 | X ADC_VREF 35 700 450 100 L 50 50 1 1 U 43 | X 3V3 36 700 550 100 L 50 50 1 1 w 44 | X 3V3_EN 37 700 650 100 L 50 50 1 1 I 45 | X GND 38 700 750 100 L 50 50 1 1 W 46 | X VSYS 39 700 850 100 L 50 50 1 1 W 47 | X GPIO2 4 -700 650 100 R 50 50 1 1 B 48 | X VBUS 40 700 950 100 L 50 50 1 1 U 49 | X SWCLK 41 -100 -1150 100 U 50 50 1 1 I 50 | X GND 42 0 -1150 100 U 50 50 1 1 W 51 | X SWDIO 43 100 -1150 100 U 50 50 1 1 B 52 | X GPIO3 5 -700 550 100 R 50 50 1 1 B 53 | X GPIO4 6 -700 450 100 R 50 50 1 1 B 54 | X GPIO5 7 -700 350 100 R 50 50 1 1 B 55 | X GND 8 -700 250 100 R 50 50 1 1 W 56 | X GPIO6 9 -700 150 100 R 50 50 1 1 B 57 | ENDDRAW 58 | ENDDEF 59 | # 60 | # RP2040 61 | # 62 | DEF RP2040 U 0 40 Y Y 1 F N 63 | F0 "U" -1150 1950 50 H V C CNN 64 | F1 "RP2040" 950 -1950 50 H V C CNN 65 | F2 "RP2040_minimal:RP2040-QFN-56" -750 0 50 H I C CNN 66 | F3 "" -750 0 50 H I C CNN 67 | DRAW 68 | T 0 0 200 100 0 0 0 "Raspberry Pi" Normal 0 C C 69 | T 0 0 0 100 0 0 0 RP2040 Normal 0 C C 70 | S 1150 1900 -1150 -1900 0 1 10 f 71 | X IOVDD 1 350 2000 100 D 50 50 1 1 W 72 | X IOVDD 10 250 2000 100 D 50 50 1 1 W 73 | X GPIO8 11 1250 500 100 L 50 50 1 1 B 74 | X GPIO9 12 1250 400 100 L 50 50 1 1 B 75 | X GPIO10 13 1250 300 100 L 50 50 1 1 B 76 | X GPIO11 14 1250 200 100 L 50 50 1 1 B 77 | X GPIO12 15 1250 100 100 L 50 50 1 1 B 78 | X GPIO13 16 1250 0 100 L 50 50 1 1 B 79 | X GPIO14 17 1250 -100 100 L 50 50 1 1 B 80 | X GPIO15 18 1250 -200 100 L 50 50 1 1 B 81 | X TESTEN 19 -500 -2000 100 U 50 50 1 1 P 82 | X GPIO0 2 1250 1300 100 L 50 50 1 1 B 83 | X XIN 20 -1250 -100 100 R 50 50 1 1 I 84 | X XOUT 21 -1250 -300 100 R 50 50 1 1 P 85 | X IOVDD 22 150 2000 100 D 50 50 1 1 W 86 | X DVDD 23 -700 2000 100 D 50 50 1 1 W 87 | X SWCLK 24 -1250 -1250 100 R 50 50 1 1 O 88 | X SWD 25 -1250 -1350 100 R 50 50 1 1 B 89 | X RUN 26 -1250 -800 100 R 50 50 1 1 I 90 | X GPIO16 27 1250 -300 100 L 50 50 1 1 B 91 | X GPIO17 28 1250 -400 100 L 50 50 1 1 B 92 | X GPIO18 29 1250 -500 100 L 50 50 1 1 B 93 | X GPIO1 3 1250 1200 100 L 50 50 1 1 B 94 | X GPIO19 30 1250 -600 100 L 50 50 1 1 B 95 | X GPIO20 31 1250 -700 100 L 50 50 1 1 B 96 | X GPIO21 32 1250 -800 100 L 50 50 1 1 B 97 | X IOVDD 33 50 2000 100 D 50 50 1 1 W 98 | X GPIO22 34 1250 -900 100 L 50 50 1 1 B 99 | X GPIO23 35 1250 -1000 100 L 50 50 1 1 B 100 | X GPIO24 36 1250 -1100 100 L 50 50 1 1 B 101 | X GPIO25 37 1250 -1200 100 L 50 50 1 1 B 102 | X GPIO26_ADC0 38 1250 -1400 100 L 50 50 1 1 B 103 | X GPIO27_ADC1 39 1250 -1500 100 L 50 50 1 1 B 104 | X GPIO2 4 1250 1100 100 L 50 50 1 1 B 105 | X GPIO28_ADC2 40 1250 -1600 100 L 50 50 1 1 B 106 | X GPIO29_ADC3 41 1250 -1700 100 L 50 50 1 1 B 107 | X IOVDD 42 -50 2000 100 D 50 50 1 1 W 108 | X ADC_AVDD 43 650 2000 100 D 50 50 1 1 W 109 | X VREG_IN 44 -350 2000 100 D 50 50 1 1 W 110 | X VREG_VOUT 45 -500 2000 100 D 50 50 1 1 w 111 | X USB_DM 46 1250 1600 100 L 50 50 1 1 B 112 | X USB_DP 47 1250 1700 100 L 50 50 1 1 B 113 | X USB_VDD 48 500 2000 100 D 50 50 1 1 W 114 | X IOVDD 49 -150 2000 100 D 50 50 1 1 W 115 | X GPIO3 5 1250 1000 100 L 50 50 1 1 B 116 | X DVDD 50 -800 2000 100 D 50 50 1 1 W 117 | X QSPI_SD3 51 -1250 800 100 R 50 50 1 1 B 118 | X QSPI_SCLK 52 -1250 650 100 R 50 50 1 1 O 119 | X QSPI_SD0 53 -1250 1100 100 R 50 50 1 1 B 120 | X QSPI_SD2 54 -1250 900 100 R 50 50 1 1 B 121 | X QSPI_SD1 55 -1250 1000 100 R 50 50 1 1 B 122 | X QSPI_SS 56 -1250 1250 100 R 50 50 1 1 B 123 | X GND 57 0 -2000 100 U 50 50 1 1 W 124 | X GPIO4 6 1250 900 100 L 50 50 1 1 B 125 | X GPIO5 7 1250 800 100 L 50 50 1 1 B 126 | X GPIO6 8 1250 700 100 L 50 50 1 1 B 127 | X GPIO7 9 1250 600 100 L 50 50 1 1 B 128 | ENDDRAW 129 | ENDDEF 130 | # 131 | #End Library 132 | -------------------------------------------------------------------------------- /td-io.pretty/JAMMA.kicad_mod: -------------------------------------------------------------------------------- 1 | (module JAMMA (layer F.Cu) (tedit 602B5521) 2 | (attr smd) 3 | (fp_text reference REF** (at -15.24 -8.31) (layer B.SilkS) 4 | (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) 5 | ) 6 | (fp_text value JAMMA (at 0 -11) (layer F.Fab) 7 | (effects (font (size 1 1) (thickness 0.15))) 8 | ) 9 | (fp_line (start -57 -9) (end -57 0) (layer Dwgs.User) (width 0.12)) 10 | (fp_line (start 57 0) (end 57 -9) (layer Dwgs.User) (width 0.12)) 11 | (fp_line (start -31.25 0) (end -31.25 -9) (layer Dwgs.User) (width 0.12)) 12 | (fp_line (start -31.25 -9) (end -28.25 -9) (layer Dwgs.User) (width 0.12)) 13 | (fp_line (start -28.25 -9) (end -28.25 0) (layer Dwgs.User) (width 0.12)) 14 | (fp_line (start -56 1) (end -32.25 1) (layer Dwgs.User) (width 0.12)) 15 | (fp_line (start -27.25 1) (end 56.25 1) (layer Dwgs.User) (width 0.12)) 16 | (fp_line (start 57 0) (end 56.25 1) (layer Dwgs.User) (width 0.12)) 17 | (fp_line (start -57 0) (end -56 1) (layer Dwgs.User) (width 0.12)) 18 | (fp_poly (pts (xy 57 1) (xy -57 1) (xy -57 -9) (xy 57 -9)) (layer F.Mask) (width 0.1)) 19 | (fp_poly (pts (xy 57 1) (xy -57 1) (xy -57 -9) (xy 57 -9)) (layer B.Mask) (width 0.1)) 20 | (fp_line (start -28.25 0) (end -27.25 1) (layer Dwgs.User) (width 0.12)) 21 | (fp_line (start -31.25 0) (end -32.25 1) (layer Dwgs.User) (width 0.12)) 22 | (pad 1 smd rect (at -53.46 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 23 | (pad 2 smd rect (at -49.5 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 24 | (pad 3 smd rect (at -45.54 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 25 | (pad 4 smd rect (at -41.58 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 26 | (pad 5 smd rect (at -37.62 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 27 | (pad 6 smd rect (at -33.66 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 28 | (pad 8 smd rect (at -25.74 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 29 | (pad 9 smd rect (at -21.78 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 30 | (pad 10 smd rect (at -17.82 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 31 | (pad 11 smd rect (at -13.86 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 32 | (pad 12 smd rect (at -9.9 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 33 | (pad 13 smd rect (at -5.94 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 34 | (pad 14 smd rect (at -1.98 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 35 | (pad 15 smd rect (at 1.98 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 36 | (pad 16 smd rect (at 5.94 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 37 | (pad 17 smd rect (at 9.9 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 38 | (pad 18 smd rect (at 13.86 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 39 | (pad 19 smd rect (at 17.82 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 40 | (pad 20 smd rect (at 21.78 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 41 | (pad 21 smd rect (at 25.74 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 42 | (pad 22 smd rect (at 29.7 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 43 | (pad 23 smd rect (at 33.66 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 44 | (pad 24 smd rect (at 37.62 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 45 | (pad 25 smd rect (at 41.58 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 46 | (pad 26 smd rect (at 45.54 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 47 | (pad 27 smd rect (at 49.5 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 48 | (pad 28 smd rect (at 53.46 -4.5) (size 2.5 9) (layers F.Cu F.Mask)) 49 | (pad C smd rect (at -45.54 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 50 | (pad a smd rect (at 33.66 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 51 | (pad A smd rect (at -53.46 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 52 | (pad M smd rect (at -13.86 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 53 | (pad Z smd rect (at 29.7 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 54 | (pad B smd rect (at -49.5 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 55 | (pad J smd rect (at -25.74 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 56 | (pad b smd rect (at 37.62 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 57 | (pad f smd rect (at 53.46 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 58 | (pad W smd rect (at 17.82 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 59 | (pad T smd rect (at 5.94 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 60 | (pad E smd rect (at -37.62 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 61 | (pad X smd rect (at 21.78 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 62 | (pad P smd rect (at -5.94 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 63 | (pad Y smd rect (at 25.74 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 64 | (pad N smd rect (at -9.9 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 65 | (pad V smd rect (at 13.86 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 66 | (pad K smd rect (at -21.78 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 67 | (pad d smd rect (at 45.54 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 68 | (pad e smd rect (at 49.5 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 69 | (pad S smd rect (at 1.98 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 70 | (pad R smd rect (at -1.98 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 71 | (pad U smd rect (at 9.9 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 72 | (pad c smd rect (at 41.58 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 73 | (pad L smd rect (at -17.82 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 74 | (pad F smd rect (at -33.66 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 75 | (pad D smd rect (at -41.58 -4.5) (size 2.5 9) (layers B.Cu B.Mask)) 76 | ) 77 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem_wire/example_mem_wire.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "Wire.h" 8 | #include 9 | #include 10 | #include 11 | 12 | static const uint I2C_SLAVE_ADDRESS = 0x17; 13 | static const uint I2C_BAUDRATE = 100000; // 100 kHz 14 | 15 | // For this example, we run both the master and slave from the same board. 16 | // You'll need to wire pin GP4 to GP6 (SDA), and pin GP5 to GP7 (SCL). 17 | static const uint I2C_SLAVE_SDA_PIN = PICO_DEFAULT_I2C_SDA_PIN; // 4 18 | static const uint I2C_SLAVE_SCL_PIN = PICO_DEFAULT_I2C_SCL_PIN; // 5 19 | static const uint I2C_MASTER_SDA_PIN = 6; 20 | static const uint I2C_MASTER_SCL_PIN = 7; 21 | 22 | // The slave implements a 256 byte memory. To write a series of bytes, the master first 23 | // writes the memory address, followed by the data. The address is automatically incremented 24 | // for each byte transferred, looping back to 0 upon reaching the end. Reading is done 25 | // sequentially from the current memory address. 26 | static struct 27 | { 28 | uint8_t mem[256]; 29 | uint8_t mem_address; 30 | } context; 31 | 32 | static void slave_on_receive(int count) { 33 | // writes always start with the memory address 34 | hard_assert(Wire.available()); 35 | context.mem_address = (uint8_t)Wire.read(); 36 | 37 | while (Wire.available()) { 38 | // save into memory 39 | context.mem[context.mem_address++] = (uint8_t)Wire.read(); 40 | } 41 | } 42 | 43 | static void slave_on_request() { 44 | // load from memory 45 | uint8_t value = context.mem[context.mem_address++]; 46 | Wire.write(value); 47 | } 48 | 49 | static void setup_slave() { 50 | gpio_init(I2C_SLAVE_SDA_PIN); 51 | gpio_set_function(I2C_SLAVE_SDA_PIN, GPIO_FUNC_I2C); 52 | gpio_pull_up(I2C_SLAVE_SDA_PIN); 53 | 54 | gpio_init(I2C_SLAVE_SCL_PIN); 55 | gpio_set_function(I2C_SLAVE_SCL_PIN, GPIO_FUNC_I2C); 56 | gpio_pull_up(I2C_SLAVE_SCL_PIN); 57 | 58 | i2c_init(i2c0, I2C_BAUDRATE); 59 | 60 | // setup Wire for slave mode 61 | Wire.onReceive(slave_on_receive); 62 | Wire.onRequest(slave_on_request); 63 | // in this implementation, the user is responsible for initializing the I2C instance and GPIO 64 | // pins before calling Wire::begin() 65 | Wire.begin(I2C_SLAVE_ADDRESS); 66 | } 67 | 68 | static void run_master() { 69 | gpio_init(I2C_MASTER_SDA_PIN); 70 | gpio_set_function(I2C_MASTER_SDA_PIN, GPIO_FUNC_I2C); 71 | // pull-ups are already active on slave side, this is just a fail-safe in case the wiring is faulty 72 | gpio_pull_up(I2C_MASTER_SDA_PIN); 73 | 74 | gpio_init(I2C_MASTER_SCL_PIN); 75 | gpio_set_function(I2C_MASTER_SCL_PIN, GPIO_FUNC_I2C); 76 | gpio_pull_up(I2C_MASTER_SCL_PIN); 77 | 78 | i2c_init(i2c1, I2C_BAUDRATE); 79 | 80 | // setup Wire for master mode on i2c1 81 | Wire1.begin(); 82 | 83 | for (uint8_t mem_address = 0;; mem_address = (mem_address + 32) % 256) { 84 | char msg[32]; 85 | snprintf(msg, sizeof(msg), "Hello, I2C slave! - 0x%02X", mem_address); 86 | uint8_t msg_len = strlen(msg); 87 | 88 | // write message at mem_address 89 | printf("Write at 0x%02X: '%s'\n", mem_address, msg); 90 | Wire1.beginTransmission(I2C_SLAVE_ADDRESS); 91 | Wire1.write(mem_address); 92 | Wire1.write((const uint8_t *)msg, msg_len); 93 | uint8_t result = Wire1.endTransmission(true /* sendStop */); 94 | if (result != 0) { 95 | puts("Couldn't write to slave, please check your wiring!"); 96 | return; 97 | } 98 | 99 | // seek to mem_address 100 | Wire1.beginTransmission(I2C_SLAVE_ADDRESS); 101 | Wire1.write(mem_address); 102 | result = Wire1.endTransmission(false /* sendStop */); 103 | hard_assert(result == 0); 104 | uint8_t buf[32]; 105 | // partial read 106 | uint8_t split = 5; 107 | uint8_t count = Wire1.requestFrom(I2C_SLAVE_ADDRESS, split, false /* sendStop */); 108 | hard_assert(count == split); 109 | for (size_t i = 0; i < count; i++) { 110 | buf[i] = Wire1.read(); 111 | } 112 | buf[count] = '\0'; 113 | printf("Read at 0x%02X: '%s'\n", mem_address, buf); 114 | hard_assert(memcmp(buf, msg, split) == 0); 115 | // read the remaining bytes, continuing from last address 116 | count = Wire1.requestFrom(I2C_SLAVE_ADDRESS, msg_len - split, true /* sendStop */); 117 | hard_assert(count == (size_t)(msg_len - split)); 118 | for (size_t i = 0; i < count; i++) { 119 | buf[i] = Wire1.read(); 120 | } 121 | buf[count] = '\0'; 122 | printf("Read at 0x%02X: '%s'\n", mem_address + split, buf); 123 | hard_assert(memcmp(buf, msg + split, msg_len - split) == 0); 124 | 125 | puts(""); 126 | sleep_ms(2000); 127 | } 128 | } 129 | 130 | int main() { 131 | stdio_init_all(); 132 | puts("\nI2C slave example with Wire API"); 133 | 134 | setup_slave(); 135 | run_master(); 136 | } 137 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem/example_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | static const uint I2C_SLAVE_ADDRESS = 0x17; 14 | static const uint I2C_BAUDRATE = 100000; // 100 kHz 15 | 16 | // For this example, we run both the master and slave from the same board. 17 | // You'll need to wire pin GP4 to GP6 (SDA), and pin GP5 to GP7 (SCL). 18 | static const uint I2C_SLAVE_SDA_PIN = PICO_DEFAULT_I2C_SDA_PIN; // 4 19 | static const uint I2C_SLAVE_SCL_PIN = PICO_DEFAULT_I2C_SCL_PIN; // 5 20 | static const uint I2C_MASTER_SDA_PIN = 6; 21 | static const uint I2C_MASTER_SCL_PIN = 7; 22 | 23 | // The slave implements a 256 byte memory. To write a series of bytes, the master first 24 | // writes the memory address, followed by the data. The address is automatically incremented 25 | // for each byte transferred, looping back to 0 upon reaching the end. Reading is done 26 | // sequentially from the current memory address. 27 | static struct 28 | { 29 | uint8_t mem[256]; 30 | uint8_t mem_address; 31 | bool mem_address_written; 32 | } context; 33 | 34 | // Our handler is called from the I2C ISR, so it must complete quickly. Blocking calls / 35 | // printing to stdio may interfere with interrupt handling. 36 | static void i2c_slave_handler(i2c_inst_t *i2c, i2c_slave_event_t event) { 37 | switch (event) { 38 | case I2C_SLAVE_RECEIVE: // master has written some data 39 | if (!context.mem_address_written) { 40 | // writes always start with the memory address 41 | context.mem_address = i2c_read_byte(i2c); 42 | context.mem_address_written = true; 43 | } else { 44 | // save into memory 45 | context.mem[context.mem_address] = i2c_read_byte(i2c); 46 | context.mem_address++; 47 | } 48 | break; 49 | case I2C_SLAVE_REQUEST: // master is requesting data 50 | // load from memory 51 | i2c_write_byte(i2c, context.mem[context.mem_address]); 52 | context.mem_address++; 53 | break; 54 | case I2C_SLAVE_FINISH: // master has signalled Stop / Restart 55 | context.mem_address_written = false; 56 | break; 57 | default: 58 | break; 59 | } 60 | } 61 | 62 | static void setup_slave() { 63 | gpio_init(I2C_SLAVE_SDA_PIN); 64 | gpio_set_function(I2C_SLAVE_SDA_PIN, GPIO_FUNC_I2C); 65 | gpio_pull_up(I2C_SLAVE_SDA_PIN); 66 | 67 | gpio_init(I2C_SLAVE_SCL_PIN); 68 | gpio_set_function(I2C_SLAVE_SCL_PIN, GPIO_FUNC_I2C); 69 | gpio_pull_up(I2C_SLAVE_SCL_PIN); 70 | 71 | i2c_init(i2c0, I2C_BAUDRATE); 72 | // configure I2C0 for slave mode 73 | i2c_slave_init(i2c0, I2C_SLAVE_ADDRESS, &i2c_slave_handler); 74 | } 75 | 76 | static void run_master() { 77 | gpio_init(I2C_MASTER_SDA_PIN); 78 | gpio_set_function(I2C_MASTER_SDA_PIN, GPIO_FUNC_I2C); 79 | // pull-ups are already active on slave side, this is just a fail-safe in case the wiring is faulty 80 | gpio_pull_up(I2C_MASTER_SDA_PIN); 81 | 82 | gpio_init(I2C_MASTER_SCL_PIN); 83 | gpio_set_function(I2C_MASTER_SCL_PIN, GPIO_FUNC_I2C); 84 | gpio_pull_up(I2C_MASTER_SCL_PIN); 85 | 86 | i2c_init(i2c1, I2C_BAUDRATE); 87 | 88 | for (uint8_t mem_address = 0;; mem_address = (mem_address + 32) % 256) { 89 | char msg[32]; 90 | snprintf(msg, sizeof(msg), "Hello, I2C slave! - 0x%02X", mem_address); 91 | uint8_t msg_len = strlen(msg); 92 | 93 | uint8_t buf[32]; 94 | buf[0] = mem_address; 95 | memcpy(buf + 1, msg, msg_len); 96 | // write message at mem_address 97 | printf("Write at 0x%02X: '%s'\n", mem_address, msg); 98 | int count = i2c_write_blocking(i2c1, I2C_SLAVE_ADDRESS, buf, 1 + msg_len, false); 99 | if (count < 0) { 100 | puts("Couldn't write to slave, please check your wiring!"); 101 | return; 102 | } 103 | hard_assert(count == 1 + msg_len); 104 | 105 | // seek to mem_address 106 | count = i2c_write_blocking(i2c1, I2C_SLAVE_ADDRESS, buf, 1, true); 107 | hard_assert(count == 1); 108 | // partial read 109 | uint8_t split = 5; 110 | count = i2c_read_blocking(i2c1, I2C_SLAVE_ADDRESS, buf, split, true); 111 | hard_assert(count == split); 112 | buf[count] = '\0'; 113 | printf("Read at 0x%02X: '%s'\n", mem_address, buf); 114 | hard_assert(memcmp(buf, msg, split) == 0); 115 | // read the remaining bytes, continuing from last address 116 | count = i2c_read_blocking(i2c1, I2C_SLAVE_ADDRESS, buf, msg_len - split, false); 117 | hard_assert(count == msg_len - split); 118 | buf[count] = '\0'; 119 | printf("Read at 0x%02X: '%s'\n", mem_address + split, buf); 120 | hard_assert(memcmp(buf, msg + split, msg_len - split) == 0); 121 | 122 | puts(""); 123 | sleep_ms(2000); 124 | } 125 | } 126 | 127 | int main() { 128 | stdio_init_all(); 129 | puts("\nI2C slave example"); 130 | 131 | setup_slave(); 132 | run_master(); 133 | } 134 | -------------------------------------------------------------------------------- /td-io.pretty/DSUB-15-HD_Female_Horizontal_P2.29x2.5mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DSUB-15-HD_Female_Horizontal_P2.29x2.5mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm (layer F.Cu) (tedit 602B7146) 2 | (descr "15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf") 3 | (tags "15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 25mm mounting-hole-offset 25mm") 4 | (fp_text reference REF** (at -4.318 -4.318) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value DSUB-15-HD_Female_Horizontal_P2.29x2.5mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm (at -4.315 20.21) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 11.65 -3.937) (end -20.25 -3.937) (layer F.CrtYd) (width 0.05)) 11 | (fp_line (start 11.65 19.25) (end 11.65 -3.937) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start -20.25 19.25) (end 11.65 19.25) (layer F.CrtYd) (width 0.05)) 13 | (fp_line (start -20.25 -3.937) (end -20.25 19.25) (layer F.CrtYd) (width 0.05)) 14 | (fp_line (start 11.176 -3.429) (end 11.17 12.25) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start -19.8 -3.429) (end 11.176 -3.429) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start -19.8 12.25) (end -19.8 -3.429) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 9.785 12.31) (end 9.785 1.42) (layer F.Fab) (width 0.1)) 18 | (fp_line (start 6.585 12.31) (end 6.585 1.42) (layer F.Fab) (width 0.1)) 19 | (fp_line (start -15.215 12.31) (end -15.215 1.42) (layer F.Fab) (width 0.1)) 20 | (fp_line (start -18.415 12.31) (end -18.415 1.42) (layer F.Fab) (width 0.1)) 21 | (fp_line (start 10.685 12.71) (end 5.685 12.71) (layer F.Fab) (width 0.1)) 22 | (fp_line (start 10.685 17.71) (end 10.685 12.71) (layer F.Fab) (width 0.1)) 23 | (fp_line (start 5.685 17.71) (end 10.685 17.71) (layer F.Fab) (width 0.1)) 24 | (fp_line (start 5.685 12.71) (end 5.685 17.71) (layer F.Fab) (width 0.1)) 25 | (fp_line (start -14.315 12.71) (end -19.315 12.71) (layer F.Fab) (width 0.1)) 26 | (fp_line (start -14.315 17.71) (end -14.315 12.71) (layer F.Fab) (width 0.1)) 27 | (fp_line (start -19.315 17.71) (end -14.315 17.71) (layer F.Fab) (width 0.1)) 28 | (fp_line (start -19.315 12.71) (end -19.315 17.71) (layer F.Fab) (width 0.1)) 29 | (fp_line (start 3.835 12.71) (end -12.465 12.71) (layer F.Fab) (width 0.1)) 30 | (fp_line (start 3.835 18.71) (end 3.835 12.71) (layer F.Fab) (width 0.1)) 31 | (fp_line (start -12.465 18.71) (end 3.835 18.71) (layer F.Fab) (width 0.1)) 32 | (fp_line (start -12.465 12.71) (end -12.465 18.71) (layer F.Fab) (width 0.1)) 33 | (fp_line (start 11.11 12.31) (end -19.74 12.31) (layer F.Fab) (width 0.1)) 34 | (fp_line (start 11.11 12.71) (end 11.11 12.31) (layer F.Fab) (width 0.1)) 35 | (fp_line (start -19.74 12.71) (end 11.11 12.71) (layer F.Fab) (width 0.1)) 36 | (fp_line (start -19.74 12.31) (end -19.74 12.71) (layer F.Fab) (width 0.1)) 37 | (fp_line (start 11.11 -3.429) (end -19.74 -3.429) (layer F.Fab) (width 0.1)) 38 | (fp_line (start 11.11 12.31) (end 11.11 -3.429) (layer F.Fab) (width 0.1)) 39 | (fp_line (start -19.74 12.31) (end 11.11 12.31) (layer F.Fab) (width 0.1)) 40 | (fp_line (start -19.74 -3.429) (end -19.74 12.31) (layer F.Fab) (width 0.1)) 41 | (fp_arc (start -16.815 0.15) (end -18.415 0.15) (angle 180) (layer F.Fab) (width 0.1)) 42 | (fp_arc (start 8.185 0.15) (end 6.585 0.15) (angle 180) (layer F.Fab) (width 0.1)) 43 | (fp_text user %R (at -4.315 15.71) (layer F.Fab) 44 | (effects (font (size 1 1) (thickness 0.15))) 45 | ) 46 | (pad 1 thru_hole rect (at 0 -1.016) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 47 | (pad 2 thru_hole circle (at -2.286 -1.143) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 48 | (pad 3 thru_hole circle (at -4.572 -1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 49 | (pad 4 thru_hole circle (at -6.87 -1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 50 | (pad 5 thru_hole circle (at -9.16 -1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 51 | (pad 6 thru_hole circle (at 1.145 1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 52 | (pad 7 thru_hole circle (at -1.145 1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 53 | (pad 8 thru_hole circle (at -3.435 1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 54 | (pad 9 thru_hole circle (at -5.715 1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 55 | (pad 10 thru_hole circle (at -8.015 1.27) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 56 | (pad 11 thru_hole circle (at 0 3.833) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 57 | (pad 12 thru_hole circle (at -2.29 3.833) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 58 | (pad 13 thru_hole circle (at -4.58 3.833) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 59 | (pad 14 thru_hole circle (at -6.87 3.833) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 60 | (pad 15 thru_hole circle (at -9.16 3.833) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask)) 61 | (pad 0 thru_hole circle (at -16.815 1.27) (size 4 4) (drill 3.2) (layers *.Cu *.Mask)) 62 | (pad 0 thru_hole circle (at 8.185 1.27) (size 4 4) (drill 3.2) (layers *.Cu *.Mask)) 63 | (model ${KISYS3DMOD}/Connector_Dsub.3dshapes/DSUB-15-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm.wrl 64 | (at (xyz 0 0 0)) 65 | (scale (xyz 1 1 1)) 66 | (rotate (xyz 0 0 0)) 67 | ) 68 | ) 69 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem_wire/Wire.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "Wire.h" 8 | #include 9 | 10 | TwoWire Wire; 11 | TwoWire Wire1; 12 | 13 | // 14 | // TwoWire 15 | // 16 | 17 | TwoWire::TwoWire() = default; 18 | 19 | i2c_inst_t *TwoWire::i2c() const { 20 | assert(this == &Wire || this == &Wire1); 21 | 22 | return this == &Wire ? i2c0 : i2c1; 23 | } 24 | 25 | void TwoWire::begin() { 26 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 27 | 28 | if (mode_ != Unassigned) { 29 | i2c_slave_deinit(i2c()); 30 | } 31 | mode_ = Master; 32 | bufLen_ = 0; 33 | bufPos_ = 0; 34 | } 35 | 36 | void TwoWire::begin(uint8_t selfAddress) { 37 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 38 | 39 | if (mode_ != Unassigned) { 40 | i2c_slave_deinit(i2c()); 41 | } 42 | mode_ = Slave; 43 | bufLen_ = 0; 44 | bufPos_ = 0; 45 | i2c_slave_init(i2c(), selfAddress, &handleEvent); 46 | } 47 | 48 | void TwoWire::beginTransmission(uint8_t address) { 49 | assert(mode_ == Master); // not allowed for slave 50 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 51 | assert(address != NO_ADDRESS); 52 | 53 | txAddress_ = address; 54 | bufLen_ = 0; 55 | bufPos_ = 0; 56 | } 57 | 58 | uint8_t TwoWire::endTransmission(bool sendStop) { 59 | assert(mode_ == Master); // not allowed for slave 60 | assert(txAddress_ != NO_ADDRESS); // must follow beginTransmission() 61 | assert(bufPos_ == 0); 62 | 63 | int result = i2c_write_blocking(i2c(), txAddress_, buf_, bufLen_, !sendStop); 64 | txAddress_ = NO_ADDRESS; 65 | bufLen_ = 0; 66 | if (result < 0) { 67 | return 4; // other error 68 | } else if (result < bufLen_) { 69 | return 3; // data transfer interrupted after NACK 70 | } else { 71 | return 0; // success; 72 | } 73 | } 74 | 75 | uint8_t TwoWire::requestFrom(uint8_t address, size_t count, bool sendStop) { 76 | assert(mode_ == Master); // not allowed for slave 77 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 78 | 79 | count = MIN(count, WIRE_BUFFER_LENGTH); 80 | int result = i2c_read_blocking(i2c(), address, buf_, count, !sendStop); 81 | if (result < 0) { 82 | result = 0; 83 | } 84 | bufLen_ = (uint8_t)result; 85 | bufPos_ = 0; 86 | return (uint8_t)result; 87 | } 88 | 89 | size_t TwoWire::write(uint8_t value) { 90 | assert(mode_ != Unassigned); // begin not called 91 | 92 | if (mode_ == Master) { 93 | assert(txAddress_ != NO_ADDRESS); // allowed between begin...end transmission 94 | if (bufLen_ == WIRE_BUFFER_LENGTH) { 95 | return 0; // buffer is full 96 | } 97 | buf_[bufLen_++] = value; 98 | } else { 99 | auto i2c = this->i2c(); 100 | auto hw = i2c_get_hw(i2c); 101 | while ((hw->status & I2C_IC_STATUS_TFNF_BITS) == 0) { 102 | tight_loop_contents(); // wait until Tx FIFO is no longer full 103 | } 104 | i2c_write_byte(i2c, value); 105 | } 106 | return 1; 107 | } 108 | 109 | size_t TwoWire::write(const uint8_t *data, size_t size) { 110 | assert(mode_ != Unassigned); // missing begin 111 | 112 | if (mode_ == Master) { 113 | assert(txAddress_ != NO_ADDRESS); // allowed between begin...end transmission 114 | size = MIN(size, WIRE_BUFFER_LENGTH - (size_t)bufLen_); 115 | for (size_t i = 0; i < size; i++) { 116 | buf_[bufLen_++] = data[i]; 117 | } 118 | } else { 119 | auto i2c = this->i2c(); 120 | auto hw = i2c_get_hw(i2c); 121 | for (size_t i = 0; i < size; i++) { 122 | while ((hw->status & I2C_IC_STATUS_TFNF_BITS) == 0) { 123 | tight_loop_contents(); // wait until Tx FIFO is no longer full 124 | } 125 | i2c_write_byte(i2c, data[i]); 126 | } 127 | } 128 | return size; 129 | } 130 | 131 | void TwoWire::onReceive(WireReceiveHandler handler) { 132 | receiveHandler_ = handler; 133 | } 134 | 135 | void TwoWire::onRequest(WireRequestHandler handler) { 136 | requestHandler_ = handler; 137 | } 138 | 139 | // 140 | // private members 141 | // 142 | 143 | void __not_in_flash_func(TwoWire::handleEvent)(i2c_inst_t *i2c, i2c_slave_event_t event) { 144 | auto &wire = (i2c_hw_index(i2c) == 0 ? Wire : Wire1); 145 | assert(wire.mode_ == TwoWire::Slave); 146 | assert(wire.bufPos_ == 0); 147 | 148 | switch (event) { 149 | case I2C_SLAVE_RECEIVE: 150 | for (size_t n = i2c_get_read_available(i2c); n > 0; n--) { 151 | uint8_t value = i2c_read_byte(i2c); 152 | if (wire.bufLen_ < WIRE_BUFFER_LENGTH) { 153 | wire.buf_[wire.bufLen_++] = value; 154 | } else { 155 | // we can't respond with NACK when the buffer is full on DW_apb_i2c, 156 | // so the excess data is simply discarded 157 | } 158 | } 159 | break; 160 | case I2C_SLAVE_REQUEST: 161 | assert(wire.bufLen_ == 0); 162 | assert(wire.bufPos_ == 0); 163 | if (wire.requestHandler_ != nullptr) { 164 | wire.requestHandler_(); 165 | } 166 | break; 167 | case I2C_SLAVE_FINISH: 168 | if (0 < wire.bufLen_) { 169 | if (wire.receiveHandler_ != nullptr) { 170 | wire.receiveHandler_(wire.bufLen_); 171 | } 172 | wire.bufLen_ = 0; 173 | wire.bufPos_ = 0; 174 | } 175 | assert(wire.bufPos_ == 0); 176 | break; 177 | default: 178 | break; 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /td-io.pretty/Vishay_PowerPAK_MLP44-24L.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "Vishay_PowerPAK_MLP44-24L" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 0) 4 | (attr smd) 5 | (fp_text reference "REF**" (at 0 -3.4 unlocked) (layer "F.SilkS") 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | (tstamp c4f57582-4080-45a6-a9b5-4be5dc62757b) 8 | ) 9 | (fp_text value "Vishay_PowerPAK_MLP44-24L" (at 0.045 3.625 unlocked) (layer "F.Fab") 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | (tstamp f0072e3b-764d-4f62-befa-15d6bbdb13ce) 12 | ) 13 | (fp_line (start 1.775 -2.125) (end 2.12 -2.125) (layer "F.SilkS") (width 0.12) (tstamp 0258c08a-be92-4edf-93b5-134521353f54)) 14 | (fp_line (start 2.12 2.125) (end 2.12 1.65) (layer "F.SilkS") (width 0.12) (tstamp 08b975fd-792f-4845-bd45-aa94a9715019)) 15 | (fp_line (start -2.1375 2.125) (end -2.1375 1.65) (layer "F.SilkS") (width 0.12) (tstamp 13853726-09ca-40f2-87c3-a8956bc4af4f)) 16 | (fp_line (start -1.8 2.125) (end -2.1375 2.125) (layer "F.SilkS") (width 0.12) (tstamp 30a2eafc-94ad-42f6-a273-320ae0170f00)) 17 | (fp_line (start 2.12 -2.125) (end 2.12 -1.65) (layer "F.SilkS") (width 0.12) (tstamp 959548e4-215a-42fe-85b9-49abc835c8f6)) 18 | (fp_line (start -1.775 -2.125) (end -2.1625 -2.125) (layer "F.SilkS") (width 0.12) (tstamp b65a6a12-0d08-40f3-8ed6-a5edbc348e2e)) 19 | (fp_line (start 1.645 2.125) (end 2.12 2.125) (layer "F.SilkS") (width 0.12) (tstamp d1c96f7d-e91d-431f-ac4e-25d37441b0c2)) 20 | (fp_rect (start -2 -2) (end 2 2) (layer "Dwgs.User") (width 0.01) (fill none) (tstamp 67dd1d71-2fd5-454b-b66d-8bf245fffe1f)) 21 | (fp_rect (start -2.5 -2.5) (end 2.5 2.5) (layer "F.CrtYd") (width 0.12) (fill none) (tstamp 6f608cd3-f53a-40f2-a369-38a6dae4322e)) 22 | (pad "1" smd rect (at -1.9375 -0.825 270) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 6bdd9c3c-efac-4a57-bb07-e6683205632f)) 23 | (pad "2" smd rect (at -1.9375 -0.375 270) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp eb99ee24-a3c5-4771-885a-b57f683a81bf)) 24 | (pad "3" smd rect (at -1.9375 0.525 270) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp fd724dea-5ddf-4dc5-b197-1222f863928b)) 25 | (pad "4" smd rect (at -1.9375 0.975 270) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 47b7fa05-79cf-4553-b55a-b508ddfa70b6)) 26 | (pad "5" smd rect (at -1.475 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 63ca9e0d-a75e-46da-904b-483a5ea040d0)) 27 | (pad "5" smd rect (at -0.45 1.7125) (size 2.35 0.275) (layers "F.Cu" "F.Mask") 28 | (solder_paste_margin -0.25) (tstamp 97c285fd-8323-4270-8825-22d29170abf0)) 29 | (pad "6" smd rect (at -1.025 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp eb0f64ec-086d-404a-8d10-8cdc064dd95c)) 30 | (pad "7" smd rect (at -0.575 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp f0c1cf97-5213-4ff7-91e7-c14dd4cb4024)) 31 | (pad "8" smd rect (at 0.125 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp a730d9f1-4d83-4dcc-ba50-2565132a7c7c)) 32 | (pad "9" smd rect (at 0.575 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 17f6e4b1-f741-42f9-8ed9-6f1502385d96)) 33 | (pad "10" smd rect (at 1.025 1.9375 180) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 7eeef101-2e2f-4d42-8199-398d3debdf3a)) 34 | (pad "11" smd rect (at 1.9375 1.425 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 93dfc21f-0329-45de-8023-66c36e70f4ab)) 35 | (pad "12" smd rect (at 1.9375 0.975 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 74a9825e-2496-4ee4-be7e-f330ba87976b)) 36 | (pad "13" smd rect (at 1.9375 0.525 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 136e9043-9d9b-4add-a5a0-c96121d24080)) 37 | (pad "14" smd rect (at 1.9375 0.075 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 39cbdfe8-4219-489a-b4b0-f7bedc4a85bf)) 38 | (pad "15" smd rect (at 1.9375 -0.375 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 57012bd4-7a89-4c9a-9d58-64dfe4df17cc)) 39 | (pad "16" smd rect (at 1.9375 -0.825 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp a91e522a-17a8-4f9b-a0e3-f4ee5d8c32d9)) 40 | (pad "17" smd rect (at 1.9375 -1.275 90) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 7d8cd1b5-f705-49aa-9f3f-48448af87fb2)) 41 | (pad "18" smd rect (at 1.475 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 866dc468-d99d-41c0-9910-848a99f6fbd7)) 42 | (pad "19" smd rect (at 1.025 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 4c1ba172-4f35-4009-8d7e-0828fa740a34)) 43 | (pad "20" smd rect (at 0.575 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 2895ff56-09b0-46dd-86ee-edf0fd324071)) 44 | (pad "21" smd rect (at 0.125 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp e98ce279-a0ab-4dbd-b5f4-222b121fdd94)) 45 | (pad "22" smd rect (at -0.575 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp d3ef78ce-773c-4241-8dda-5d93241ca604)) 46 | (pad "23" smd rect (at -1.025 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 976a6cb8-eccc-4a3f-897b-8a4695cb224f)) 47 | (pad "24" smd rect (at -1.475 -1.9375) (size 0.3 0.725) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 92780cda-ec1c-4999-83e3-268cade2a316)) 48 | (pad "25" smd rect (at 0.4875 -0.75) (size 1.575 1.05) (layers "F.Cu" "F.Paste" "F.Mask") 49 | (solder_paste_margin -0.25) (tstamp 7b6e123f-2ca8-4dd5-a8b2-190dad2a441d)) 50 | (pad "26" smd rect (at -1.175 -0.75) (size 1.15 1.05) (layers "F.Cu" "F.Paste" "F.Mask") 51 | (solder_paste_margin -0.25) (tstamp f95ccdc9-0b3f-4e01-951a-2e822c448cd0)) 52 | (pad "27" smd custom (at -0.6625 0.675) (size 2.175 1.2) (layers "F.Cu" "F.Paste" "F.Mask") 53 | (solder_paste_margin -0.25) 54 | (options (clearance outline) (anchor rect)) 55 | (primitives 56 | (gr_poly (pts 57 | (xy 1.7375 -0.145) 58 | (xy 1.0875 -0.145) 59 | (xy 1.0875 0.6) 60 | (xy -1.0875 0.6) 61 | (xy -1.0875 -0.6) 62 | (xy 1.7375 -0.6) 63 | ) (width 0) (fill yes)) 64 | (gr_rect (start 1.0875 -0.6) (end 1.7375 -0.145) (width 0) (fill yes)) 65 | ) (tstamp 3445a491-b638-454d-9c2c-20ae481cc70f)) 66 | (pad "28" smd rect (at 0.985 0.99) (size 0.58 0.38) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 4e9c65ee-82f1-4318-a1c8-de0c1cf776cc)) 67 | (model "${KICAD6_3DMODEL_DIR}/Package_DFN_QFN.3dshapes/WQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm.step" 68 | (offset (xyz 0 0 0)) 69 | (scale (xyz 1 1 1)) 70 | (rotate (xyz 0 0 0)) 71 | ) 72 | ) 73 | -------------------------------------------------------------------------------- /td-io.pretty/RJE-20.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RJE-20 (layer F.Cu) (tedit 60602D67) 2 | (descr "VQFN, 20 Pin (http://ww1.microchip.com/downloads/en/DeviceDoc/doc8246.pdf#page=264), generated with kicad-footprint-generator ipc_noLead_generator.py") 3 | (tags "VQFN NoLead") 4 | (attr smd) 5 | (fp_text reference REF** (at 0 -2.82) (layer F.SilkS) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value RJE-20 (at 0 2.82) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_line (start 2.12 -2.12) (end -2.12 -2.12) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start 2.12 2.12) (end 2.12 -2.12) (layer F.CrtYd) (width 0.05)) 13 | (fp_line (start -2.12 2.12) (end 2.12 2.12) (layer F.CrtYd) (width 0.05)) 14 | (fp_line (start -2.12 -2.12) (end -2.12 2.12) (layer F.CrtYd) (width 0.05)) 15 | (fp_line (start -1.5 -0.75) (end -0.75 -1.5) (layer F.Fab) (width 0.1)) 16 | (fp_line (start -1.5 1.5) (end -1.5 -0.75) (layer F.Fab) (width 0.1)) 17 | (fp_line (start 1.5 1.5) (end -1.5 1.5) (layer F.Fab) (width 0.1)) 18 | (fp_line (start 1.5 -1.5) (end 1.5 1.5) (layer F.Fab) (width 0.1)) 19 | (fp_line (start -0.75 -1.5) (end 1.5 -1.5) (layer F.Fab) (width 0.1)) 20 | (fp_line (start -1.285 -1.61) (end -1.61 -1.61) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 1.61 1.61) (end 1.61 1.285) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 1.285 1.61) (end 1.61 1.61) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start -1.61 1.61) (end -1.61 1.285) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start -1.285 1.61) (end -1.61 1.61) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 1.61 -1.61) (end 1.61 -1.285) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 1.285 -1.61) (end 1.61 -1.61) (layer F.SilkS) (width 0.12)) 27 | (fp_text user %R (at 0 0) (layer F.Fab) 28 | (effects (font (size 0.75 0.75) (thickness 0.11))) 29 | ) 30 | (pad 1 smd custom (at -1.45 -0.9) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 31 | (options (clearance outline) (anchor circle)) 32 | (primitives 33 | (gr_poly (pts 34 | (xy -0.375 -0.075) (xy 0.254289 -0.075) (xy 0.375 0.045711) (xy 0.375 0.075) (xy -0.375 0.075) 35 | ) (width 0.1)) 36 | )) 37 | (pad 2 smd roundrect (at -1.45 -0.45) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 38 | (pad 3 smd roundrect (at -1.45 0) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 39 | (pad 4 smd roundrect (at -1.45 0.45) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 40 | (pad 5 smd custom (at -1.45 0.9) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 41 | (options (clearance outline) (anchor circle)) 42 | (primitives 43 | (gr_poly (pts 44 | (xy -0.375 -0.075) (xy 0.375 -0.075) (xy 0.375 -0.045711) (xy 0.254289 0.075) (xy -0.375 0.075) 45 | ) (width 0.1)) 46 | )) 47 | (pad 6 smd custom (at -0.9 1.45) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 48 | (options (clearance outline) (anchor circle)) 49 | (primitives 50 | (gr_poly (pts 51 | (xy -0.075 -0.254289) (xy 0.045711 -0.375) (xy 0.075 -0.375) (xy 0.075 0.375) (xy -0.075 0.375) 52 | ) (width 0.1)) 53 | )) 54 | (pad 7 smd roundrect (at -0.45 1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 55 | (pad 8 smd roundrect (at 0 1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 56 | (pad 9 smd roundrect (at 0.45 1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 57 | (pad 10 smd custom (at 0.9 1.45) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 58 | (options (clearance outline) (anchor circle)) 59 | (primitives 60 | (gr_poly (pts 61 | (xy -0.075 -0.375) (xy -0.045711 -0.375) (xy 0.075 -0.254289) (xy 0.075 0.375) (xy -0.075 0.375) 62 | ) (width 0.1)) 63 | )) 64 | (pad 11 smd custom (at 1.45 0.9) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 65 | (options (clearance outline) (anchor circle)) 66 | (primitives 67 | (gr_poly (pts 68 | (xy -0.375 -0.075) (xy 0.375 -0.075) (xy 0.375 0.075) (xy -0.254289 0.075) (xy -0.375 -0.045711) 69 | ) (width 0.1)) 70 | )) 71 | (pad 12 smd roundrect (at 1.45 0.45) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 72 | (pad 13 smd roundrect (at 1.45 0) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 73 | (pad 14 smd roundrect (at 1.45 -0.45) (size 0.85 0.25) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 74 | (pad 15 smd custom (at 1.45 -0.9) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 75 | (options (clearance outline) (anchor circle)) 76 | (primitives 77 | (gr_poly (pts 78 | (xy -0.375 0.045711) (xy -0.254289 -0.075) (xy 0.375 -0.075) (xy 0.375 0.075) (xy -0.375 0.075) 79 | ) (width 0.1)) 80 | )) 81 | (pad 16 smd custom (at 0.9 -1.45) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 82 | (options (clearance outline) (anchor circle)) 83 | (primitives 84 | (gr_poly (pts 85 | (xy -0.075 -0.375) (xy 0.075 -0.375) (xy 0.075 0.254289) (xy -0.045711 0.375) (xy -0.075 0.375) 86 | ) (width 0.1)) 87 | )) 88 | (pad 17 smd roundrect (at 0.45 -1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 89 | (pad 18 smd roundrect (at 0 -1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 90 | (pad 19 smd roundrect (at -0.45 -1.45) (size 0.25 0.85) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 91 | (pad 20 smd custom (at -0.9 -1.45) (size 0.143934 0.143934) (layers F.Cu F.Paste F.Mask) 92 | (options (clearance outline) (anchor circle)) 93 | (primitives 94 | (gr_poly (pts 95 | (xy -0.075 -0.375) (xy 0.075 -0.375) (xy 0.075 0.375) (xy 0.045711 0.375) (xy -0.075 0.254289) 96 | ) (width 0.1)) 97 | )) 98 | (pad 21 smd rect (at 0.123 0) (size 0.926 0.975) (layers F.Cu F.Mask)) 99 | (pad 21 thru_hole circle (at -0.525 -0.525) (size 0.5 0.5) (drill 0.2) (layers *.Cu)) 100 | (pad 21 thru_hole circle (at 0.525 -0.525) (size 0.5 0.5) (drill 0.2) (layers *.Cu)) 101 | (pad 21 thru_hole circle (at -0.525 0.525) (size 0.5 0.5) (drill 0.2) (layers *.Cu)) 102 | (pad 21 thru_hole circle (at 0.525 0.525) (size 0.5 0.5) (drill 0.2) (layers *.Cu)) 103 | (pad 21 smd rect (at 0 0) (size 1.55 1.55) (layers B.Cu)) 104 | (pad "" smd roundrect (at 0.123 0) (size 0.67 0.67) (layers F.Paste) (roundrect_rratio 0.25)) 105 | (model ${KISYS3DMOD}/Package_DFN_QFN.3dshapes/VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mm.wrl 106 | (at (xyz 0 0 0)) 107 | (scale (xyz 1 1 1)) 108 | (rotate (xyz 0 0 0)) 109 | ) 110 | ) 111 | -------------------------------------------------------------------------------- /firmware/third_party/pico_i2c_slave/example_mem_wire/Wire.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Valentin Milea 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef _WIRE_H_ 8 | #define _WIRE_H_ 9 | 10 | #include 11 | 12 | /** \file Wire.h 13 | * 14 | * \brief Wire API wrapper for I2C. 15 | */ 16 | 17 | #ifndef WIRE_BUFFER_LENGTH 18 | #define WIRE_BUFFER_LENGTH 32 19 | #endif 20 | 21 | /** 22 | * \brief Called in slave mode after receiving data from master. 23 | * 24 | * The received data is buffered internally, and the handler is called once the transfer has 25 | * completed (after the master sends a Stop or Start signal). 26 | * 27 | * The maximum transfer size is determined by WIRE_BUFFER_LENGTH. Because of how the I2C 28 | * hardware operates on RP2040, there is no way to NACK once the buffer is full, so excess 29 | * data is simply discarded. 30 | * 31 | * \param count The number of bytes available for reading. 32 | */ 33 | using WireReceiveHandler = void (*)(int count); 34 | 35 | /** 36 | * \brief Called in slave mode when the master is requesting data. 37 | */ 38 | using WireRequestHandler = void (*)(); 39 | 40 | /** 41 | * \brief Wire API wrapper. 42 | */ 43 | class TwoWire final 44 | { 45 | public: 46 | /** 47 | * \brief Don't call, use the global Wire and Wire1 instances instead. 48 | */ 49 | TwoWire(); 50 | 51 | /** 52 | * \brief Get the associated I2C instance (i2c0 or i2c1). 53 | */ 54 | i2c_inst_t *i2c() const; 55 | 56 | /** 57 | * \brief Initialize in master mode. 58 | * 59 | * Note: The Wire library typically initializes predefined I2C pins and enables internal 60 | * pull-up resistors here. In this implementation, the user is responsible for setting 61 | * up the I2C instance and GPIO pins in advance. 62 | */ 63 | void begin(); 64 | 65 | /** 66 | * \brief Initialize in slave mode. 67 | * 68 | * Note: The Wire library typically initializes predefined I2C pins and enables internal 69 | * pull-up resistors here. In this implementation, the user is responsible for setting 70 | * up the I2C instance and GPIO pins in advance. 71 | * 72 | * \param selfAddress Slave address. 73 | */ 74 | void begin(uint8_t selfAddress); 75 | 76 | /** 77 | * \brief Begin writing to a slave. 78 | * 79 | * Available in master mode. 80 | * 81 | * The maximum transfer size is determined by WIRE_BUFFER_LENGTH. Excess data will be ignored. 82 | * 83 | * \param address Slave address. 84 | */ 85 | void beginTransmission(uint8_t address); 86 | 87 | /** 88 | * \brief Finish writing to the slave. 89 | * 90 | * Available in master mode. 91 | * 92 | * Flushes the write buffer and blocks until completion. 93 | * 94 | * \param sendStop Whether to send Stop signal at the end. 95 | * \return 0 on success. 96 | * 3 if transfer was interrupted by the slave via NACK. 97 | * 4 on other error. 98 | */ 99 | uint8_t endTransmission(bool sendStop = true); 100 | 101 | /** 102 | * \brief Read data from a slave. 103 | * 104 | * Available in master mode. 105 | * 106 | * \param address Slave address. 107 | * \param count Amount of data to read. 108 | * \param sendStop Whether to send Stop signal at the end. 109 | * \return 0 on error. 110 | * `count` on success. 111 | */ 112 | uint8_t requestFrom(uint8_t address, size_t count, bool sendStop); 113 | 114 | /** 115 | * \brief Get the amount of data in the read buffer. 116 | */ 117 | size_t available() const; 118 | 119 | /** 120 | * \brief Get the next byte from the read buffer without removing it. 121 | * 122 | * \return the buffer value, or -1 if the read buffer is empty. 123 | */ 124 | int peek() const; 125 | 126 | /** 127 | * \brief Get the next byte from the read buffer. 128 | * 129 | * \return the buffer value, or -1 if the read buffer is empty. 130 | */ 131 | int read(); 132 | 133 | /** 134 | * \brief Write a single byte. 135 | * 136 | * \param value Byte value. 137 | * \return 1 on success. 138 | * 0 if the buffer is full (when transmitting in master mode). 139 | */ 140 | size_t write(uint8_t value); 141 | 142 | /** 143 | * \brief Write data. 144 | * 145 | * \param data Data pointer. 146 | * \param size Data size. 147 | * \return The amount of data written. May be less than len if the buffer fills up (when 148 | * transmitting in master mode). 149 | */ 150 | size_t write(const uint8_t *data, size_t size); 151 | 152 | /** 153 | * \brief Set the receive handler for slave mode. 154 | * 155 | * \param handler Receive handler. 156 | */ 157 | void onReceive(WireReceiveHandler handler); 158 | 159 | /** 160 | * \brief Set the request handler for slave mode. 161 | * 162 | * \param handler Request handler. 163 | */ 164 | void onRequest(WireRequestHandler handler); 165 | 166 | private: 167 | static constexpr uint8_t NO_ADDRESS = 255; 168 | 169 | enum Mode : uint8_t 170 | { 171 | Unassigned, 172 | Master, 173 | Slave, 174 | }; 175 | 176 | TwoWire(const TwoWire &other) = delete; // not copyable 177 | 178 | TwoWire &operator=(const TwoWire &other) = delete; // not copyable 179 | 180 | static void handleEvent(i2c_inst_t *i2c, i2c_slave_event_t event); 181 | 182 | WireReceiveHandler receiveHandler_ = nullptr; 183 | WireRequestHandler requestHandler_ = nullptr; 184 | Mode mode_ = Unassigned; 185 | uint8_t txAddress_ = 255; 186 | uint8_t buf_[WIRE_BUFFER_LENGTH]; 187 | uint8_t bufLen_ = 0; 188 | uint8_t bufPos_ = 0; 189 | }; 190 | 191 | /** 192 | * \brief Wire instance for i2c0 193 | */ 194 | extern TwoWire Wire; 195 | 196 | /** 197 | * \brief Wire instance for i2c1 198 | */ 199 | extern TwoWire Wire1; 200 | 201 | // 202 | // inline members 203 | // 204 | 205 | inline size_t TwoWire::available() const { 206 | assert(mode_ != Unassigned); // missing begin 207 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 208 | 209 | return bufLen_ - bufPos_; 210 | } 211 | 212 | inline int TwoWire::peek() const { 213 | assert(mode_ != Unassigned); // missing begin 214 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 215 | 216 | return bufPos_ < bufLen_ ? (int)buf_[bufPos_] : -1; 217 | } 218 | 219 | inline int TwoWire::read() { 220 | assert(mode_ != Unassigned); // missing begin 221 | assert(txAddress_ == NO_ADDRESS); // not allowed during transmission 222 | 223 | return bufPos_ < bufLen_ ? (int)buf_[bufPos_++] : -1; 224 | } 225 | 226 | #endif 227 | -------------------------------------------------------------------------------- /td-io.pretty/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_tpa3138_ThermalVias.kicad_mod: -------------------------------------------------------------------------------- 1 | (module HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_tpa3138_ThermalVias (layer F.Cu) (tedit 60602BDB) 2 | (descr "HTSSOP, 28 Pin (https://pdfserv.maximintegrated.com/package_dwgs/21-0108.PDF), generated with kicad-footprint-generator ipc_gullwing_generator.py") 3 | (tags "HTSSOP SO") 4 | (zone_connect 2) 5 | (attr smd) 6 | (fp_text reference U1 (at 0 -5.8 -180) (layer F.SilkS) 7 | (effects (font (size 1 1) (thickness 0.15))) 8 | ) 9 | (fp_text value TPA3138D2 (at 0 5.8 -180) (layer F.Fab) 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | ) 12 | (fp_text user %R (at 0 0 -180) (layer F.Fab) 13 | (effects (font (size 1 1) (thickness 0.15))) 14 | ) 15 | (fp_line (start 3.85 -5.1) (end -3.85 -5.1) (layer F.CrtYd) (width 0.05)) 16 | (fp_line (start 3.85 5.1) (end 3.85 -5.1) (layer F.CrtYd) (width 0.05)) 17 | (fp_line (start -3.85 5.1) (end 3.85 5.1) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start -3.85 -5.1) (end -3.85 5.1) (layer F.CrtYd) (width 0.05)) 19 | (fp_line (start -2.2 -3.85) (end -1.2 -4.85) (layer F.Fab) (width 0.1)) 20 | (fp_line (start -2.2 4.85) (end -2.2 -3.85) (layer F.Fab) (width 0.1)) 21 | (fp_line (start 2.2 4.85) (end -2.2 4.85) (layer F.Fab) (width 0.1)) 22 | (fp_line (start 2.2 -4.85) (end 2.2 4.85) (layer F.Fab) (width 0.1)) 23 | (fp_line (start -1.2 -4.85) (end 2.2 -4.85) (layer F.Fab) (width 0.1)) 24 | (fp_line (start -2.31 -4.685) (end -3.6 -4.685) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start -2.31 -4.96) (end -2.31 -4.685) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 0 -4.96) (end -2.31 -4.96) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 2.31 -4.96) (end 2.31 -4.685) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 0 -4.96) (end 2.31 -4.96) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start -2.31 4.96) (end -2.31 4.685) (layer F.SilkS) (width 0.12)) 30 | (fp_line (start 0 4.96) (end -2.31 4.96) (layer F.SilkS) (width 0.12)) 31 | (fp_line (start 2.31 4.96) (end 2.31 4.685) (layer F.SilkS) (width 0.12)) 32 | (fp_line (start 0 4.96) (end 2.31 4.96) (layer F.SilkS) (width 0.12)) 33 | (pad 1 smd roundrect (at -2.8625 -4.225) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 34 | (zone_connect 2)) 35 | (pad 2 smd roundrect (at -2.8625 -3.575) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 36 | (zone_connect 2)) 37 | (pad 3 smd roundrect (at -2.8625 -2.925) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 38 | (zone_connect 2)) 39 | (pad 4 smd roundrect (at -2.8625 -2.275) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 40 | (zone_connect 2)) 41 | (pad 5 smd roundrect (at -2.8625 -1.625) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 42 | (zone_connect 2)) 43 | (pad 6 smd roundrect (at -2.8625 -0.975) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 44 | (zone_connect 2)) 45 | (pad 7 smd roundrect (at -2.8625 -0.325) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 46 | (zone_connect 2)) 47 | (pad 8 smd roundrect (at -2.8625 0.325) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 48 | (zone_connect 2)) 49 | (pad 9 smd roundrect (at -2.8625 0.975) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 50 | (zone_connect 2)) 51 | (pad 10 smd roundrect (at -2.8625 1.625) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 52 | (zone_connect 2)) 53 | (pad 11 smd roundrect (at -2.8625 2.275) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 54 | (zone_connect 2)) 55 | (pad 12 smd roundrect (at -2.8625 2.925) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 56 | (zone_connect 2)) 57 | (pad 13 smd roundrect (at -2.8625 3.575) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 58 | (zone_connect 2)) 59 | (pad 14 smd roundrect (at -2.8625 4.225) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 60 | (zone_connect 2)) 61 | (pad 15 smd roundrect (at 2.8625 4.225) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 62 | (zone_connect 2)) 63 | (pad 16 smd roundrect (at 2.8625 3.575) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 64 | (zone_connect 2)) 65 | (pad 17 smd roundrect (at 2.8625 2.925) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 66 | (zone_connect 2)) 67 | (pad 18 smd roundrect (at 2.8625 2.275) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 68 | (zone_connect 2)) 69 | (pad 19 smd roundrect (at 2.8625 1.625) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 70 | (zone_connect 2)) 71 | (pad 20 smd roundrect (at 2.8625 0.975) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 72 | (zone_connect 2)) 73 | (pad 21 smd roundrect (at 2.8625 0.325) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 74 | (zone_connect 2)) 75 | (pad 22 smd roundrect (at 2.8625 -0.325) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 76 | (zone_connect 2)) 77 | (pad 23 smd roundrect (at 2.8625 -0.975) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 78 | (zone_connect 2)) 79 | (pad 24 smd roundrect (at 2.8625 -1.625) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 80 | (zone_connect 2)) 81 | (pad 25 smd roundrect (at 2.8625 -2.275) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 82 | (zone_connect 2)) 83 | (pad 26 smd roundrect (at 2.8625 -2.925) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 84 | (zone_connect 2)) 85 | (pad 27 smd roundrect (at 2.8625 -3.575) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 86 | (zone_connect 2)) 87 | (pad 28 smd roundrect (at 2.8625 -4.225) (size 1.475 0.4) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25) 88 | (zone_connect 2)) 89 | (pad 29 smd rect (at 0 0) (size 2.34 3.04) (layers F.Cu F.Mask) 90 | (zone_connect 2)) 91 | (pad 29 thru_hole circle (at -0.875 -2.4) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 92 | (zone_connect 2)) 93 | (pad 29 thru_hole circle (at 0.875 -2.4) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 94 | (zone_connect 2)) 95 | (pad 29 thru_hole circle (at -0.875 -0.8) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 96 | (zone_connect 2)) 97 | (pad 29 thru_hole circle (at 0.875 -0.8) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 98 | (zone_connect 2)) 99 | (pad 29 thru_hole circle (at -0.875 0.8) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 100 | (zone_connect 2)) 101 | (pad 29 thru_hole circle (at 0.875 0.8) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 102 | (zone_connect 2)) 103 | (pad 29 thru_hole circle (at -0.875 2.4) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 104 | (zone_connect 2)) 105 | (pad 29 thru_hole circle (at 0.875 2.4) (size 0.6 0.6) (drill 0.3) (layers *.Cu) 106 | (zone_connect 2)) 107 | (pad 29 smd rect (at 0 0) (size 2.85 5.4) (layers B.Cu) 108 | (zone_connect 2)) 109 | (pad "" smd roundrect (at 0 0) (size 2.3 1.45) (layers F.Paste) (roundrect_rratio 0.1724137931034483) 110 | (zone_connect 2)) 111 | (model ${KISYS3DMOD}/Package_SO.3dshapes/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm.wrl 112 | (at (xyz 0 0 0)) 113 | (scale (xyz 1 1 1)) 114 | (rotate (xyz 0 0 0)) 115 | ) 116 | (model ${KISYS3DMOD}/Package_SO.3dshapes/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm.step 117 | (at (xyz 0 0 0)) 118 | (scale (xyz 1 1 1)) 119 | (rotate (xyz 0 0 0)) 120 | ) 121 | ) 122 | -------------------------------------------------------------------------------- /td-io.pretty/AOS_QFN-23-2EP_4x4mm_P0.5mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (footprint "AOS_QFN-23-2EP_4x4mm_P0.5mm" (version 20211014) (generator pcbnew) 2 | (layer "F.Cu") 3 | (tedit 622B0774) 4 | (attr smd) 5 | (fp_text reference "REF**" (at 0 -3.3) (layer "F.SilkS") 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | (tstamp 80308ea8-7152-4634-99bf-492db3c9f37a) 8 | ) 9 | (fp_text value "AOS_QFN-23-2EP_4x4mm_P0.5mm" (at 0 3.3) (layer "F.Fab") 10 | (effects (font (size 1 1) (thickness 0.15))) 11 | (tstamp 028825a5-a5a1-4471-a5f1-08090406bcd8) 12 | ) 13 | (fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") 14 | (effects (font (size 1 1) (thickness 0.15))) 15 | (tstamp 34bc4df9-50ad-433a-a204-50b962ec67ce) 16 | ) 17 | (fp_line (start 2.11 2.11) (end 2.11 1.635) (layer "F.SilkS") (width 0.12) (tstamp 32f708e0-df94-44e7-a6ae-cda54a0cd338)) 18 | (fp_line (start 1.635 -2.11) (end 2.11 -2.11) (layer "F.SilkS") (width 0.12) (tstamp 5a9cc8dc-b899-4016-9873-a99ec930a962)) 19 | (fp_line (start 1.635 2.11) (end 2.11 2.11) (layer "F.SilkS") (width 0.12) (tstamp 64ab901b-ea46-43a5-9f7f-64cceeb0129b)) 20 | (fp_line (start 2.11 -2.11) (end 2.11 -1.635) (layer "F.SilkS") (width 0.12) (tstamp 8b6d23e1-36db-42f1-8a08-9f4ec1369434)) 21 | (fp_line (start -2.11 2.11) (end -2.11 1.635) (layer "F.SilkS") (width 0.12) (tstamp 8d461b4d-62dc-488b-8977-3c95555f9343)) 22 | (fp_line (start -1.635 -2.11) (end -2.11 -2.11) (layer "F.SilkS") (width 0.12) (tstamp db03190e-bc4a-40e3-ac97-45f05ba708cb)) 23 | (fp_line (start -1.635 2.11) (end -2.11 2.11) (layer "F.SilkS") (width 0.12) (tstamp f85d4ea0-e9e5-4e74-b9b9-4ca2bb2e7cd7)) 24 | (fp_line (start 2.6 -2.6) (end -2.6 -2.6) (layer "F.CrtYd") (width 0.05) (tstamp 22a8e1bc-22fb-4e62-add4-2ae0c07ce05c)) 25 | (fp_line (start -2.6 2.6) (end 2.6 2.6) (layer "F.CrtYd") (width 0.05) (tstamp 675cfbd2-e790-4842-b368-f626e1795786)) 26 | (fp_line (start -2.6 -2.6) (end -2.6 2.6) (layer "F.CrtYd") (width 0.05) (tstamp c6c09f1d-8526-474d-84d1-9ef4e9ca3baa)) 27 | (fp_line (start 2.6 2.6) (end 2.6 -2.6) (layer "F.CrtYd") (width 0.05) (tstamp f3749464-3429-4e5d-8e9e-7776a190bf7c)) 28 | (fp_line (start -2 2) (end -2 -1) (layer "F.Fab") (width 0.1) (tstamp 1173c720-e467-4755-8b29-61c1af00679b)) 29 | (fp_line (start 2 2) (end -2 2) (layer "F.Fab") (width 0.1) (tstamp 5683492a-389e-4ac4-9c32-25f197b682fd)) 30 | (fp_line (start -1 -2) (end 2 -2) (layer "F.Fab") (width 0.1) (tstamp cd8ed60e-d385-4272-94f7-c73fbc71c4e7)) 31 | (fp_line (start 2 -2) (end 2 2) (layer "F.Fab") (width 0.1) (tstamp d1b90760-3603-4cfd-ab0e-dd699ddbbb82)) 32 | (fp_line (start -2 -1) (end -1 -2) (layer "F.Fab") (width 0.1) (tstamp d239e1a3-08c8-45e2-9959-7e4e5303b2cf)) 33 | (pad "" smd roundrect (at 0.9 -0.7) (size 0.525 1.05) (layers "F.Paste") (roundrect_rratio 0.238095) (tstamp 1787153b-aa75-4d9d-ba83-d6b350b998a0)) 34 | (pad "" smd roundrect (at -0.75 0.65) (size 0.875 1.075) (layers "F.Paste") (roundrect_rratio 0.238095) (tstamp 5c43dd51-b673-40c0-86bf-6d45aa01dce3)) 35 | (pad "" smd roundrect (at 0.9 0.65) (size 0.525 1.025) (layers "F.Paste") (roundrect_rratio 0.238095) (tstamp 6174394f-bb9b-4752-bb81-4ff9404b9295)) 36 | (pad "" smd roundrect (at -0.75 -0.65) (size 0.875 1.075) (layers "F.Paste") (roundrect_rratio 0.238095) (tstamp fd0058ab-f81f-45ed-b645-df2b0d3bfce5)) 37 | (pad "1" smd roundrect (at -1.9375 -1.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp d0e758c8-d140-4a8a-8239-760094b94ecd)) 38 | (pad "2" smd roundrect (at -1.9375 -0.75) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp b7986f62-ea7a-4dc5-91cd-26acb8e0379b)) 39 | (pad "3" smd roundrect (at -1.9375 -0.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 530e1c0a-bb5b-44a7-b162-4c6f9e290093)) 40 | (pad "4" smd roundrect (at -1.9375 0.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 4c37a42c-e30e-4fbe-8a58-4d959e1e3766)) 41 | (pad "5" smd roundrect (at -1.9375 0.75) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp cdb8e730-b927-443e-bb30-3662dd4e56b2)) 42 | (pad "6" smd roundrect (at -1.9375 1.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp b988d6e1-acde-48d5-aaac-780083f0a33d)) 43 | (pad "7" smd roundrect (at -0.75 0.2) (size 1.2 3.1) (layers "F.Cu" "F.Mask") (roundrect_rratio 0) 44 | (chamfer_ratio 0.2) (chamfer top_left) (tstamp 9620f79f-8766-4e5b-8c5f-3701fb2e966b)) 45 | (pad "7" smd roundrect (at -1.25 1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp dfcf21ae-fd3c-40b2-9ae0-524856d8c6da)) 46 | (pad "8" smd roundrect (at -0.75 1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 17d647d2-36cd-405f-a8c1-4a4bb5cb57ac)) 47 | (pad "9" smd roundrect (at -0.25 1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp c49cdd63-d196-49a7-b408-7af3848e936c)) 48 | (pad "10" smd roundrect (at 0.75 1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 1427beee-3bac-4761-90c7-1d211b9ad51c)) 49 | (pad "10" smd rect (at 0.9 0.2) (size 0.85 3.1) (layers "F.Cu" "F.Mask") (tstamp 3cad4871-f357-423c-bb38-142f118d87a8)) 50 | (pad "10" thru_hole circle (at 0.9 1) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 5f57be48-0fee-4ddd-81c0-d2e1100f8d46)) 51 | (pad "10" thru_hole circle (at 0.9 -1) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 60083865-7df5-4f11-95cf-47f1d283d1fe)) 52 | (pad "10" thru_hole circle (at 0.9 0) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 869badf5-5ed6-4776-bb00-e7b5e886b7ad)) 53 | (pad "11" smd roundrect (at 1.25 1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 4c492959-c00a-430a-b92b-afb6f355a82a)) 54 | (pad "12" smd roundrect (at 1.9375 1.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 2bc709a0-58c7-4027-bd09-68d5e2408c67)) 55 | (pad "13" smd roundrect (at 1.9375 0.75) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 46f17238-8a86-42fa-a9fd-be51f506f7e6)) 56 | (pad "14" smd roundrect (at 1.9375 0.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 74af2938-5aa5-43d4-bb52-2d07b4b7e88e)) 57 | (pad "15" smd roundrect (at 1.9375 -0.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 773a22ae-c653-4f8d-930e-4149eabde637)) 58 | (pad "16" smd roundrect (at 1.9375 -0.75) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 9ae7e107-47c3-4f43-acc6-d14899796c06)) 59 | (pad "17" smd roundrect (at 1.9375 -1.25) (size 0.825 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 7844fa1c-c2e9-46d4-aee9-55128915096f)) 60 | (pad "18" smd roundrect (at 1.25 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 1a6cbd94-89ce-40b4-bf57-ce02cce2f2a0)) 61 | (pad "19" smd roundrect (at 0.75 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 73b3efd7-d2be-46cf-b06c-e91017a9877c)) 62 | (pad "20" smd roundrect (at 0.25 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 81c8ed7b-6f74-439b-b839-9329368f223c)) 63 | (pad "21" thru_hole circle (at -0.7 -1) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 7596a7df-ac08-4337-b173-60dd0cc09746)) 64 | (pad "21" thru_hole circle (at -0.7 1) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 89f79b53-1384-4cc4-804f-838f08d1c524)) 65 | (pad "21" thru_hole circle (at -0.7 0) (size 0.5 0.5) (drill 0.2) (layers *.Cu) (tstamp 92c3c92c-5163-4c3c-8f58-1de714bcab5f)) 66 | (pad "21" smd roundrect (at -0.25 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp f573056c-87a1-403e-987f-f1dc1f10bd0b)) 67 | (pad "22" smd roundrect (at -0.75 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 9bd5da3d-c098-4eab-8cd9-1231287cb8b3)) 68 | (pad "23" smd roundrect (at -1.25 -1.9375) (size 0.25 0.825) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp 8c875065-be0e-41c1-a837-74699c7ba035)) 69 | (model "${KICAD6_3DMODEL_DIR}/Package_DFN_QFN.3dshapes/QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm.wrl" 70 | (offset (xyz 0 0 0)) 71 | (scale (xyz 1 1 1)) 72 | (rotate (xyz 0 0 0)) 73 | ) 74 | ) 75 | -------------------------------------------------------------------------------- /MCU_RaspberryPi_and_Boards.pretty/RP2040-QFN-56.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RP2040-QFN-56 (layer F.Cu) (tedit 5EF32B43) 2 | (descr "QFN, 56 Pin (http://www.cypress.com/file/416486/download#page=40), generated with kicad-footprint-generator ipc_dfn_qfn_generator.py") 3 | (tags "QFN DFN_QFN") 4 | (attr smd) 5 | (fp_text reference REF** (at 0 -4.82) (layer F.SilkS) 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value Pico2040-QFN-56 (at 0 4.82) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_text user %R (at 0 0) (layer F.Fab) 12 | (effects (font (size 1 1) (thickness 0.15))) 13 | ) 14 | (fp_line (start 4.12 -4.12) (end -4.12 -4.12) (layer F.CrtYd) (width 0.05)) 15 | (fp_line (start 4.12 4.12) (end 4.12 -4.12) (layer F.CrtYd) (width 0.05)) 16 | (fp_line (start -4.12 4.12) (end 4.12 4.12) (layer F.CrtYd) (width 0.05)) 17 | (fp_line (start -4.12 -4.12) (end -4.12 4.12) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start -3.5 -2.5) (end -2.5 -3.5) (layer F.Fab) (width 0.1)) 19 | (fp_line (start -3.5 3.5) (end -3.5 -2.5) (layer F.Fab) (width 0.1)) 20 | (fp_line (start 3.5 3.5) (end -3.5 3.5) (layer F.Fab) (width 0.1)) 21 | (fp_line (start 3.5 -3.5) (end 3.5 3.5) (layer F.Fab) (width 0.1)) 22 | (fp_line (start -2.5 -3.5) (end 3.5 -3.5) (layer F.Fab) (width 0.1)) 23 | (fp_line (start -2.96 -3.61) (end -3.61 -3.61) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 3.61 3.61) (end 3.61 2.96) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 2.96 3.61) (end 3.61 3.61) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start -3.61 3.61) (end -3.61 2.96) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start -2.96 3.61) (end -3.61 3.61) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 3.61 -3.61) (end 3.61 -2.96) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start 2.96 -3.61) (end 3.61 -3.61) (layer F.SilkS) (width 0.12)) 30 | (pad 56 smd roundrect (at -2.6 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 31 | (pad 55 smd roundrect (at -2.2 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 32 | (pad 54 smd roundrect (at -1.8 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 33 | (pad 53 smd roundrect (at -1.4 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 34 | (pad 52 smd roundrect (at -1 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 35 | (pad 51 smd roundrect (at -0.6 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 36 | (pad 50 smd roundrect (at -0.2 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 37 | (pad 49 smd roundrect (at 0.2 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 38 | (pad 48 smd roundrect (at 0.6 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 39 | (pad 47 smd roundrect (at 1 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 40 | (pad 46 smd roundrect (at 1.4 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 41 | (pad 45 smd roundrect (at 1.8 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 42 | (pad 44 smd roundrect (at 2.2 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 43 | (pad 43 smd roundrect (at 2.6 -3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 44 | (pad 42 smd roundrect (at 3.4375 -2.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 45 | (pad 41 smd roundrect (at 3.4375 -2.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 46 | (pad 40 smd roundrect (at 3.4375 -1.8) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 47 | (pad 39 smd roundrect (at 3.4375 -1.4) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 48 | (pad 38 smd roundrect (at 3.4375 -1) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 49 | (pad 37 smd roundrect (at 3.4375 -0.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 50 | (pad 36 smd roundrect (at 3.4375 -0.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 51 | (pad 35 smd roundrect (at 3.4375 0.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 52 | (pad 34 smd roundrect (at 3.4375 0.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 53 | (pad 33 smd roundrect (at 3.4375 1) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 54 | (pad 32 smd roundrect (at 3.4375 1.4) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 55 | (pad 31 smd roundrect (at 3.4375 1.8) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 56 | (pad 30 smd roundrect (at 3.4375 2.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 57 | (pad 29 smd roundrect (at 3.4375 2.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 58 | (pad 28 smd roundrect (at 2.6 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 59 | (pad 27 smd roundrect (at 2.2 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 60 | (pad 26 smd roundrect (at 1.8 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 61 | (pad 25 smd roundrect (at 1.4 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 62 | (pad 24 smd roundrect (at 1 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 63 | (pad 23 smd roundrect (at 0.6 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 64 | (pad 22 smd roundrect (at 0.2 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 65 | (pad 21 smd roundrect (at -0.2 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 66 | (pad 20 smd roundrect (at -0.6 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 67 | (pad 19 smd roundrect (at -1 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 68 | (pad 18 smd roundrect (at -1.4 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 69 | (pad 17 smd roundrect (at -1.8 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 70 | (pad 16 smd roundrect (at -2.2 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 71 | (pad 15 smd roundrect (at -2.6 3.4375) (size 0.2 0.875) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 72 | (pad 14 smd roundrect (at -3.4375 2.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 73 | (pad 13 smd roundrect (at -3.4375 2.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 74 | (pad 12 smd roundrect (at -3.4375 1.8) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 75 | (pad 11 smd roundrect (at -3.4375 1.4) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 76 | (pad 10 smd roundrect (at -3.4375 1) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 77 | (pad 9 smd roundrect (at -3.4375 0.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 78 | (pad 8 smd roundrect (at -3.4375 0.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 79 | (pad 7 smd roundrect (at -3.4375 -0.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 80 | (pad 6 smd roundrect (at -3.4375 -0.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 81 | (pad 5 smd roundrect (at -3.4375 -1) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 82 | (pad 4 smd roundrect (at -3.4375 -1.4) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 83 | (pad 3 smd roundrect (at -3.4375 -1.8) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 84 | (pad 2 smd roundrect (at -3.4375 -2.2) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 85 | (pad 1 smd roundrect (at -3.4375 -2.6) (size 0.875 0.2) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25)) 86 | (pad "" smd roundrect (at 0.6375 0.6375) (size 1.084435 1.084435) (layers F.Paste) (roundrect_rratio 0.230535)) 87 | (pad "" smd roundrect (at 0.6375 -0.6375) (size 1.084435 1.084435) (layers F.Paste) (roundrect_rratio 0.230535)) 88 | (pad "" smd roundrect (at -0.6375 0.6375) (size 1.084435 1.084435) (layers F.Paste) (roundrect_rratio 0.230535)) 89 | (pad "" smd roundrect (at -0.6375 -0.6375) (size 1.084435 1.084435) (layers F.Paste) (roundrect_rratio 0.230535)) 90 | (pad 57 thru_hole circle (at 1.275 1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 91 | (pad 57 thru_hole circle (at 0 1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 92 | (pad 57 thru_hole circle (at -1.275 1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 93 | (pad 57 thru_hole circle (at 1.275 0) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 94 | (pad 57 thru_hole circle (at 0 0) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 95 | (pad 57 thru_hole circle (at -1.275 0) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 96 | (pad 57 thru_hole circle (at 1.275 -1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 97 | (pad 57 thru_hole circle (at 0 -1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 98 | (pad 57 thru_hole circle (at -1.275 -1.275) (size 0.6 0.6) (drill 0.35) (layers *.Cu)) 99 | (pad 57 smd roundrect (at 0 0) (size 3.2 3.2) (layers F.Cu F.Mask) (roundrect_rratio 0.045)) 100 | (model ${KISYS3DMOD}/Package_DFN_QFN.3dshapes/QFN-56-1EP_7x7mm_P0.4mm_EP5.6x5.6mm.wrl 101 | (at (xyz 0 0 0)) 102 | (scale (xyz 1 1 1)) 103 | (rotate (xyz 0 0 0)) 104 | ) 105 | ) 106 | -------------------------------------------------------------------------------- /firmware/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /td-io.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "3dviewports": [], 4 | "design_settings": { 5 | "defaults": { 6 | "board_outline_line_width": 0.049999999999999996, 7 | "copper_line_width": 0.19999999999999998, 8 | "copper_text_italic": false, 9 | "copper_text_size_h": 1.5, 10 | "copper_text_size_v": 1.5, 11 | "copper_text_thickness": 0.3, 12 | "copper_text_upright": false, 13 | "courtyard_line_width": 0.049999999999999996, 14 | "dimension_precision": 4, 15 | "dimension_units": 3, 16 | "dimensions": { 17 | "arrow_length": 1270000, 18 | "extension_offset": 500000, 19 | "keep_text_aligned": true, 20 | "suppress_zeroes": false, 21 | "text_position": 0, 22 | "units_format": 1 23 | }, 24 | "fab_line_width": 0.09999999999999999, 25 | "fab_text_italic": false, 26 | "fab_text_size_h": 1.0, 27 | "fab_text_size_v": 1.0, 28 | "fab_text_thickness": 0.15, 29 | "fab_text_upright": false, 30 | "other_line_width": 0.09999999999999999, 31 | "other_text_italic": false, 32 | "other_text_size_h": 1.0, 33 | "other_text_size_v": 1.0, 34 | "other_text_thickness": 0.15, 35 | "other_text_upright": false, 36 | "pads": { 37 | "drill": 0.2, 38 | "height": 0.5, 39 | "width": 0.5 40 | }, 41 | "silk_line_width": 0.12, 42 | "silk_text_italic": false, 43 | "silk_text_size_h": 1.0, 44 | "silk_text_size_v": 1.0, 45 | "silk_text_thickness": 0.15, 46 | "silk_text_upright": false, 47 | "zones": { 48 | "45_degree_only": false, 49 | "min_clearance": 0.09999999999999999 50 | } 51 | }, 52 | "diff_pair_dimensions": [ 53 | { 54 | "gap": 0.0, 55 | "via_gap": 0.0, 56 | "width": 0.0 57 | } 58 | ], 59 | "drc_exclusions": [ 60 | "silk_over_copper|222190000|82000000|00000000-0000-0000-0000-0000601ebfa1|3462b9f4-454f-4130-a81c-8d9bd92491e0", 61 | "silk_over_copper|222190000|82000000|00000000-0000-0000-0000-0000601ebfa1|49a73562-fc7a-44a1-8562-76326a6322ae", 62 | "silk_over_copper|236810000|82000000|00000000-0000-0000-0000-0000601ebfa1|59ff2921-a262-47d7-869b-983d85fdef03", 63 | "silk_over_copper|236810000|82000000|00000000-0000-0000-0000-0000601ebfa1|8b358336-50d0-43f5-8b1a-fc37b4133ed8", 64 | "silk_over_copper|236810000|82000000|00000000-0000-0000-0000-0000601ebfa1|d6afcdd0-9a00-412d-a992-1606a606e367", 65 | "silk_over_copper|236810000|82000000|00000000-0000-0000-0000-0000601ebfa1|e1911f83-4ef9-4bee-b675-1e4780547b8e", 66 | "silk_overlap|228722284|102774223|165520a7-667d-4a52-a8bf-39e9e3ebb803|cc5fafd3-0e29-4244-8726-cfea46d15bee", 67 | "silk_overlap|228722284|102774223|8332abe0-513c-4c6f-9236-05683cae4596|6b6fd764-d949-4699-8423-22321ed8ba1e" 68 | ], 69 | "meta": { 70 | "filename": "board_design_settings.json", 71 | "version": 2 72 | }, 73 | "rule_severities": { 74 | "annular_width": "error", 75 | "clearance": "error", 76 | "connection_width": "warning", 77 | "copper_edge_clearance": "error", 78 | "copper_sliver": "warning", 79 | "courtyards_overlap": "error", 80 | "diff_pair_gap_out_of_range": "error", 81 | "diff_pair_uncoupled_length_too_long": "error", 82 | "drill_out_of_range": "error", 83 | "duplicate_footprints": "warning", 84 | "extra_footprint": "warning", 85 | "footprint": "error", 86 | "footprint_type_mismatch": "error", 87 | "hole_clearance": "error", 88 | "hole_near_hole": "error", 89 | "invalid_outline": "error", 90 | "isolated_copper": "warning", 91 | "item_on_disabled_layer": "error", 92 | "items_not_allowed": "error", 93 | "length_out_of_range": "error", 94 | "lib_footprint_issues": "warning", 95 | "lib_footprint_mismatch": "warning", 96 | "malformed_courtyard": "error", 97 | "microvia_drill_out_of_range": "error", 98 | "missing_courtyard": "ignore", 99 | "missing_footprint": "warning", 100 | "net_conflict": "warning", 101 | "npth_inside_courtyard": "ignore", 102 | "padstack": "error", 103 | "pth_inside_courtyard": "ignore", 104 | "shorting_items": "error", 105 | "silk_edge_clearance": "warning", 106 | "silk_over_copper": "warning", 107 | "silk_overlap": "warning", 108 | "skew_out_of_range": "error", 109 | "solder_mask_bridge": "error", 110 | "starved_thermal": "error", 111 | "text_height": "warning", 112 | "text_thickness": "warning", 113 | "through_hole_pad_without_hole": "error", 114 | "too_many_vias": "error", 115 | "track_dangling": "warning", 116 | "track_width": "error", 117 | "tracks_crossing": "error", 118 | "unconnected_items": "error", 119 | "unresolved_variable": "error", 120 | "via_dangling": "warning", 121 | "zones_intersect": "error" 122 | }, 123 | "rule_severitieslegacy_courtyards_overlap": true, 124 | "rule_severitieslegacy_no_courtyard_defined": false, 125 | "rules": { 126 | "allow_blind_buried_vias": false, 127 | "allow_microvias": false, 128 | "max_error": 0.005, 129 | "min_clearance": 0.16, 130 | "min_connection": 0.0, 131 | "min_copper_edge_clearance": 0.024999999999999998, 132 | "min_hole_clearance": 0.25, 133 | "min_hole_to_hole": 0.25, 134 | "min_microvia_diameter": 0.19999999999999998, 135 | "min_microvia_drill": 0.09999999999999999, 136 | "min_resolved_spokes": 2, 137 | "min_silk_clearance": 0.0, 138 | "min_text_height": 0.7999999999999999, 139 | "min_text_thickness": 0.08, 140 | "min_through_hole_diameter": 0.19999999999999998, 141 | "min_track_width": 0.19999999999999998, 142 | "min_via_annular_width": 0.049999999999999996, 143 | "min_via_diameter": 0.39999999999999997, 144 | "solder_mask_to_copper_clearance": 0.0, 145 | "use_height_for_length_calcs": true 146 | }, 147 | "teardrop_options": [ 148 | { 149 | "td_allow_use_two_tracks": true, 150 | "td_curve_segcount": 5, 151 | "td_on_pad_in_zone": false, 152 | "td_onpadsmd": true, 153 | "td_onroundshapesonly": false, 154 | "td_ontrackend": false, 155 | "td_onviapad": true 156 | } 157 | ], 158 | "teardrop_parameters": [ 159 | { 160 | "td_curve_segcount": 0, 161 | "td_height_ratio": 1.0, 162 | "td_length_ratio": 0.5, 163 | "td_maxheight": 2.0, 164 | "td_maxlen": 1.0, 165 | "td_target_name": "td_round_shape", 166 | "td_width_to_size_filter_ratio": 0.9 167 | }, 168 | { 169 | "td_curve_segcount": 0, 170 | "td_height_ratio": 1.0, 171 | "td_length_ratio": 0.5, 172 | "td_maxheight": 2.0, 173 | "td_maxlen": 1.0, 174 | "td_target_name": "td_rect_shape", 175 | "td_width_to_size_filter_ratio": 0.9 176 | }, 177 | { 178 | "td_curve_segcount": 0, 179 | "td_height_ratio": 1.0, 180 | "td_length_ratio": 0.5, 181 | "td_maxheight": 2.0, 182 | "td_maxlen": 1.0, 183 | "td_target_name": "td_track_end", 184 | "td_width_to_size_filter_ratio": 0.9 185 | } 186 | ], 187 | "track_widths": [ 188 | 0.0, 189 | 0.4, 190 | 1.0, 191 | 2.5, 192 | 4.0 193 | ], 194 | "via_dimensions": [ 195 | { 196 | "diameter": 0.0, 197 | "drill": 0.0 198 | }, 199 | { 200 | "diameter": 1.2, 201 | "drill": 0.6 202 | } 203 | ], 204 | "zones_allow_external_fillets": false, 205 | "zones_use_no_outline": true 206 | }, 207 | "layer_presets": [], 208 | "viewports": [] 209 | }, 210 | "boards": [], 211 | "cvpcb": { 212 | "equivalence_files": [] 213 | }, 214 | "erc": { 215 | "erc_exclusions": [], 216 | "meta": { 217 | "version": 0 218 | }, 219 | "pin_map": [ 220 | [ 221 | 0, 222 | 0, 223 | 0, 224 | 0, 225 | 0, 226 | 0, 227 | 1, 228 | 0, 229 | 0, 230 | 0, 231 | 0, 232 | 2 233 | ], 234 | [ 235 | 0, 236 | 2, 237 | 0, 238 | 1, 239 | 0, 240 | 0, 241 | 1, 242 | 0, 243 | 2, 244 | 2, 245 | 2, 246 | 2 247 | ], 248 | [ 249 | 0, 250 | 0, 251 | 0, 252 | 0, 253 | 0, 254 | 0, 255 | 1, 256 | 0, 257 | 1, 258 | 0, 259 | 1, 260 | 2 261 | ], 262 | [ 263 | 0, 264 | 1, 265 | 0, 266 | 0, 267 | 0, 268 | 0, 269 | 1, 270 | 1, 271 | 2, 272 | 1, 273 | 1, 274 | 2 275 | ], 276 | [ 277 | 0, 278 | 0, 279 | 0, 280 | 0, 281 | 0, 282 | 0, 283 | 1, 284 | 0, 285 | 0, 286 | 0, 287 | 0, 288 | 2 289 | ], 290 | [ 291 | 0, 292 | 0, 293 | 0, 294 | 0, 295 | 0, 296 | 0, 297 | 0, 298 | 0, 299 | 0, 300 | 0, 301 | 0, 302 | 2 303 | ], 304 | [ 305 | 1, 306 | 1, 307 | 1, 308 | 1, 309 | 1, 310 | 0, 311 | 1, 312 | 1, 313 | 1, 314 | 1, 315 | 1, 316 | 2 317 | ], 318 | [ 319 | 0, 320 | 0, 321 | 0, 322 | 1, 323 | 0, 324 | 0, 325 | 1, 326 | 0, 327 | 0, 328 | 0, 329 | 0, 330 | 2 331 | ], 332 | [ 333 | 0, 334 | 2, 335 | 1, 336 | 2, 337 | 0, 338 | 0, 339 | 1, 340 | 0, 341 | 2, 342 | 2, 343 | 2, 344 | 2 345 | ], 346 | [ 347 | 0, 348 | 2, 349 | 0, 350 | 1, 351 | 0, 352 | 0, 353 | 1, 354 | 0, 355 | 2, 356 | 0, 357 | 0, 358 | 2 359 | ], 360 | [ 361 | 0, 362 | 2, 363 | 1, 364 | 1, 365 | 0, 366 | 0, 367 | 1, 368 | 0, 369 | 2, 370 | 0, 371 | 0, 372 | 2 373 | ], 374 | [ 375 | 2, 376 | 2, 377 | 2, 378 | 2, 379 | 2, 380 | 2, 381 | 2, 382 | 2, 383 | 2, 384 | 2, 385 | 2, 386 | 2 387 | ] 388 | ], 389 | "rule_severities": { 390 | "bus_definition_conflict": "error", 391 | "bus_entry_needed": "error", 392 | "bus_to_bus_conflict": "error", 393 | "bus_to_net_conflict": "error", 394 | "conflicting_netclasses": "error", 395 | "different_unit_footprint": "error", 396 | "different_unit_net": "error", 397 | "duplicate_reference": "error", 398 | "duplicate_sheet_names": "error", 399 | "endpoint_off_grid": "warning", 400 | "extra_units": "error", 401 | "global_label_dangling": "warning", 402 | "hier_label_mismatch": "error", 403 | "label_dangling": "error", 404 | "lib_symbol_issues": "warning", 405 | "missing_bidi_pin": "warning", 406 | "missing_input_pin": "warning", 407 | "missing_power_pin": "error", 408 | "missing_unit": "warning", 409 | "multiple_net_names": "warning", 410 | "net_not_bus_member": "warning", 411 | "no_connect_connected": "warning", 412 | "no_connect_dangling": "warning", 413 | "pin_not_connected": "error", 414 | "pin_not_driven": "error", 415 | "pin_to_pin": "warning", 416 | "power_pin_not_driven": "error", 417 | "similar_labels": "warning", 418 | "simulation_model_issue": "error", 419 | "unannotated": "error", 420 | "unit_value_mismatch": "error", 421 | "unresolved_variable": "error", 422 | "wire_dangling": "error" 423 | } 424 | }, 425 | "libraries": { 426 | "pinned_footprint_libs": [], 427 | "pinned_symbol_libs": [] 428 | }, 429 | "meta": { 430 | "filename": "td-io.kicad_pro", 431 | "version": 1 432 | }, 433 | "net_settings": { 434 | "classes": [ 435 | { 436 | "bus_width": 12, 437 | "clearance": 0.2, 438 | "diff_pair_gap": 0.25, 439 | "diff_pair_via_gap": 0.25, 440 | "diff_pair_width": 0.2, 441 | "line_style": 0, 442 | "microvia_diameter": 0.3, 443 | "microvia_drill": 0.1, 444 | "name": "Default", 445 | "pcb_color": "rgba(0, 0, 0, 0.000)", 446 | "schematic_color": "rgba(0, 0, 0, 0.000)", 447 | "track_width": 0.25, 448 | "via_diameter": 0.8, 449 | "via_drill": 0.4, 450 | "wire_width": 6 451 | } 452 | ], 453 | "meta": { 454 | "version": 3 455 | }, 456 | "net_colors": null, 457 | "netclass_assignments": null, 458 | "netclass_patterns": [] 459 | }, 460 | "pcbnew": { 461 | "last_paths": { 462 | "gencad": "", 463 | "idf": "", 464 | "netlist": "", 465 | "specctra_dsn": "", 466 | "step": "", 467 | "vrml": "" 468 | }, 469 | "page_layout_descr_file": "" 470 | }, 471 | "schematic": { 472 | "annotate_start_num": 0, 473 | "drawing": { 474 | "dashed_lines_dash_length_ratio": 12.0, 475 | "dashed_lines_gap_length_ratio": 3.0, 476 | "default_line_thickness": 6.0, 477 | "default_text_size": 50.0, 478 | "field_names": [], 479 | "intersheets_ref_own_page": false, 480 | "intersheets_ref_prefix": "", 481 | "intersheets_ref_short": false, 482 | "intersheets_ref_show": false, 483 | "intersheets_ref_suffix": "", 484 | "junction_size_choice": 3, 485 | "label_size_ratio": 0.25, 486 | "pin_symbol_size": 0.0, 487 | "text_offset_ratio": 0.08 488 | }, 489 | "legacy_lib_dir": "", 490 | "legacy_lib_list": [], 491 | "meta": { 492 | "version": 1 493 | }, 494 | "net_format_name": "", 495 | "ngspice": { 496 | "fix_include_paths": true, 497 | "fix_passive_vals": false, 498 | "meta": { 499 | "version": 0 500 | }, 501 | "model_mode": 0, 502 | "workbook_filename": "" 503 | }, 504 | "page_layout_descr_file": "", 505 | "plot_directory": "v1.1/", 506 | "spice_adjust_passive_values": false, 507 | "spice_current_sheet_as_root": false, 508 | "spice_external_command": "spice \"%I\"", 509 | "spice_model_current_sheet_as_root": true, 510 | "spice_save_all_currents": false, 511 | "spice_save_all_voltages": false, 512 | "subpart_first_id": 65, 513 | "subpart_id_separator": 0 514 | }, 515 | "sheets": [ 516 | [ 517 | "162e5bdd-61a8-46a3-8485-826b5d58e1a1", 518 | "" 519 | ], 520 | [ 521 | "7231f57f-8d8d-419c-a764-9c9a9a6ebbda", 522 | "JVS Power" 523 | ] 524 | ], 525 | "text_variables": {} 526 | } 527 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CERN Open Hardware Licence Version 2 - Weakly Reciprocal 2 | 3 | 4 | Preamble 5 | 6 | CERN has developed this licence to promote collaboration among 7 | hardware designers and to provide a legal tool which supports the 8 | freedom to use, study, modify, share and distribute hardware designs 9 | and products based on those designs. Version 2 of the CERN Open 10 | Hardware Licence comes in three variants: CERN-OHL-P (permissive); and 11 | two reciprocal licences: this licence, CERN-OHL-W (weakly reciprocal) 12 | and CERN-OHL-S (strongly reciprocal). 13 | 14 | The CERN-OHL-W is copyright CERN 2020. Anyone is welcome to use it, in 15 | unmodified form only. 16 | 17 | Use of this Licence does not imply any endorsement by CERN of any 18 | Licensor or their designs nor does it imply any involvement by CERN in 19 | their development. 20 | 21 | 22 | 1 Definitions 23 | 24 | 1.1 'Licence' means this CERN-OHL-W. 25 | 26 | 1.2 'Compatible Licence' means 27 | 28 | a) any earlier version of the CERN Open Hardware licence, or 29 | 30 | b) any version of the CERN-OHL-S or the CERN-OHL-W, or 31 | 32 | c) any licence which permits You to treat the Source to which 33 | it applies as licensed under CERN-OHL-S or CERN-OHL-W 34 | provided that on Conveyance of any such Source, or any 35 | associated Product You treat the Source in question as being 36 | licensed under CERN-OHL-S or CERN-OHL-W as appropriate. 37 | 38 | 1.3 'Source' means information such as design materials or digital 39 | code which can be applied to Make or test a Product or to 40 | prepare a Product for use, Conveyance or sale, regardless of its 41 | medium or how it is expressed. It may include Notices. 42 | 43 | 1.4 'Covered Source' means Source that is explicitly made available 44 | under this Licence. 45 | 46 | 1.5 'Product' means any device, component, work or physical object, 47 | whether in finished or intermediate form, arising from the use, 48 | application or processing of Covered Source. 49 | 50 | 1.6 'Make' means to create or configure something, whether by 51 | manufacture, assembly, compiling, loading or applying Covered 52 | Source or another Product or otherwise. 53 | 54 | 1.7 'Available Component' means any part, sub-assembly, library or 55 | code which: 56 | 57 | a) is licensed to You as Complete Source under a Compatible 58 | Licence; or 59 | 60 | b) is available, at the time a Product or the Source containing 61 | it is first Conveyed, to You and any other prospective 62 | licensees 63 | 64 | i) with sufficient rights and information (including any 65 | configuration and programming files and information 66 | about its characteristics and interfaces) to enable it 67 | either to be Made itself, or to be sourced and used to 68 | Make the Product; or 69 | ii) as part of the normal distribution of a tool used to 70 | design or Make the Product. 71 | 72 | 1.8 'External Material' means anything (including Source) which: 73 | 74 | a) is only combined with Covered Source in such a way that it 75 | interfaces with the Covered Source using a documented 76 | interface which is described in the Covered Source; and 77 | 78 | b) is not a derivative of or contains Covered Source, or, if it 79 | is, it is solely to the extent necessary to facilitate such 80 | interfacing. 81 | 82 | 1.9 'Complete Source' means the set of all Source necessary to Make 83 | a Product, in the preferred form for making modifications, 84 | including necessary installation and interfacing information 85 | both for the Product, and for any included Available Components. 86 | If the format is proprietary, it must also be made available in 87 | a format (if the proprietary tool can create it) which is 88 | viewable with a tool available to potential licensees and 89 | licensed under a licence approved by the Free Software 90 | Foundation or the Open Source Initiative. Complete Source need 91 | not include the Source of any Available Component, provided that 92 | You include in the Complete Source sufficient information to 93 | enable a recipient to Make or source and use the Available 94 | Component to Make the Product. 95 | 96 | 1.10 'Source Location' means a location where a Licensor has placed 97 | Covered Source, and which that Licensor reasonably believes will 98 | remain easily accessible for at least three years for anyone to 99 | obtain a digital copy. 100 | 101 | 1.11 'Notice' means copyright, acknowledgement and trademark notices, 102 | Source Location references, modification notices (subsection 103 | 3.3(b)) and all notices that refer to this Licence and to the 104 | disclaimer of warranties that are included in the Covered 105 | Source. 106 | 107 | 1.12 'Licensee' or 'You' means any person exercising rights under 108 | this Licence. 109 | 110 | 1.13 'Licensor' means a natural or legal person who creates or 111 | modifies Covered Source. A person may be a Licensee and a 112 | Licensor at the same time. 113 | 114 | 1.14 'Convey' means to communicate to the public or distribute. 115 | 116 | 117 | 2 Applicability 118 | 119 | 2.1 This Licence governs the use, copying, modification, Conveying 120 | of Covered Source and Products, and the Making of Products. By 121 | exercising any right granted under this Licence, You irrevocably 122 | accept these terms and conditions. 123 | 124 | 2.2 This Licence is granted by the Licensor directly to You, and 125 | shall apply worldwide and without limitation in time. 126 | 127 | 2.3 You shall not attempt to restrict by contract or otherwise the 128 | rights granted under this Licence to other Licensees. 129 | 130 | 2.4 This Licence is not intended to restrict fair use, fair dealing, 131 | or any other similar right. 132 | 133 | 134 | 3 Copying, Modifying and Conveying Covered Source 135 | 136 | 3.1 You may copy and Convey verbatim copies of Covered Source, in 137 | any medium, provided You retain all Notices. 138 | 139 | 3.2 You may modify Covered Source, other than Notices, provided that 140 | You irrevocably undertake to make that modified Covered Source 141 | available from a Source Location should You Convey a Product in 142 | circumstances where the recipient does not otherwise receive a 143 | copy of the modified Covered Source. In each case subsection 3.3 144 | shall apply. 145 | 146 | You may only delete Notices if they are no longer applicable to 147 | the corresponding Covered Source as modified by You and You may 148 | add additional Notices applicable to Your modifications. 149 | 150 | 3.3 You may Convey modified Covered Source (with the effect that You 151 | shall also become a Licensor) provided that You: 152 | 153 | a) retain Notices as required in subsection 3.2; 154 | 155 | b) add a Notice to the modified Covered Source stating that You 156 | have modified it, with the date and brief description of how 157 | You have modified it; 158 | 159 | c) add a Source Location Notice for the modified Covered Source 160 | if You Convey in circumstances where the recipient does not 161 | otherwise receive a copy of the modified Covered Source; and 162 | 163 | d) license the modified Covered Source under the terms and 164 | conditions of this Licence (or, as set out in subsection 165 | 8.3, a later version, if permitted by the licence of the 166 | original Covered Source). Such modified Covered Source must 167 | be licensed as a whole, but excluding Available Components 168 | contained in it or External Material to which it is 169 | interfaced, which remain licensed under their own applicable 170 | licences. 171 | 172 | 173 | 4 Making and Conveying Products 174 | 175 | 4.1 You may Make Products, and/or Convey them, provided that You 176 | either provide each recipient with a copy of the Complete Source 177 | or ensure that each recipient is notified of the Source Location 178 | of the Complete Source. That Complete Source includes Covered 179 | Source and You must accordingly satisfy Your obligations set out 180 | in subsection 3.3. If specified in a Notice, the Product must 181 | visibly and securely display the Source Location on it or its 182 | packaging or documentation in the manner specified in that 183 | Notice. 184 | 185 | 4.2 Where You Convey a Product which incorporates External Material, 186 | the Complete Source for that Product which You are required to 187 | provide under subsection 4.1 need not include any Source for the 188 | External Material. 189 | 190 | 4.3 You may license Products under terms of Your choice, provided 191 | that such terms do not restrict or attempt to restrict any 192 | recipients' rights under this Licence to the Covered Source. 193 | 194 | 195 | 5 Research and Development 196 | 197 | You may Convey Covered Source, modified Covered Source or Products to 198 | a legal entity carrying out development, testing or quality assurance 199 | work on Your behalf provided that the work is performed on terms which 200 | prevent the entity from both using the Source or Products for its own 201 | internal purposes and Conveying the Source or Products or any 202 | modifications to them to any person other than You. Any modifications 203 | made by the entity shall be deemed to be made by You pursuant to 204 | subsection 3.2. 205 | 206 | 207 | 6 DISCLAIMER AND LIABILITY 208 | 209 | 6.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products 210 | are provided 'as is' and any express or implied warranties, 211 | including, but not limited to, implied warranties of 212 | merchantability, of satisfactory quality, non-infringement of 213 | third party rights, and fitness for a particular purpose or use 214 | are disclaimed in respect of any Source or Product to the 215 | maximum extent permitted by law. The Licensor makes no 216 | representation that any Source or Product does not or will not 217 | infringe any patent, copyright, trade secret or other 218 | proprietary right. The entire risk as to the use, quality, and 219 | performance of any Source or Product shall be with You and not 220 | the Licensor. This disclaimer of warranty is an essential part 221 | of this Licence and a condition for the grant of any rights 222 | granted under this Licence. 223 | 224 | 6.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to 225 | the maximum extent permitted by law, have no liability for 226 | direct, indirect, special, incidental, consequential, exemplary, 227 | punitive or other damages of any character including, without 228 | limitation, procurement of substitute goods or services, loss of 229 | use, data or profits, or business interruption, however caused 230 | and on any theory of contract, warranty, tort (including 231 | negligence), product liability or otherwise, arising in any way 232 | in relation to the Covered Source, modified Covered Source 233 | and/or the Making or Conveyance of a Product, even if advised of 234 | the possibility of such damages, and You shall hold the 235 | Licensor(s) free and harmless from any liability, costs, 236 | damages, fees and expenses, including claims by third parties, 237 | in relation to such use. 238 | 239 | 240 | 7 Patents 241 | 242 | 7.1 Subject to the terms and conditions of this Licence, each 243 | Licensor hereby grants to You a perpetual, worldwide, 244 | non-exclusive, no-charge, royalty-free, irrevocable (except as 245 | stated in subsections 7.2 and 8.4) patent license to Make, have 246 | Made, use, offer to sell, sell, import, and otherwise transfer 247 | the Covered Source and Products, where such licence applies only 248 | to those patent claims licensable by such Licensor that are 249 | necessarily infringed by exercising rights under the Covered 250 | Source as Conveyed by that Licensor. 251 | 252 | 7.2 If You institute patent litigation against any entity (including 253 | a cross-claim or counterclaim in a lawsuit) alleging that the 254 | Covered Source or a Product constitutes direct or contributory 255 | patent infringement, or You seek any declaration that a patent 256 | licensed to You under this Licence is invalid or unenforceable 257 | then any rights granted to You under this Licence shall 258 | terminate as of the date such process is initiated. 259 | 260 | 261 | 8 General 262 | 263 | 8.1 If any provisions of this Licence are or subsequently become 264 | invalid or unenforceable for any reason, the remaining 265 | provisions shall remain effective. 266 | 267 | 8.2 You shall not use any of the name (including acronyms and 268 | abbreviations), image, or logo by which the Licensor or CERN is 269 | known, except where needed to comply with section 3, or where 270 | the use is otherwise allowed by law. Any such permitted use 271 | shall be factual and shall not be made so as to suggest any kind 272 | of endorsement or implication of involvement by the Licensor or 273 | its personnel. 274 | 275 | 8.3 CERN may publish updated versions and variants of this Licence 276 | which it considers to be in the spirit of this version, but may 277 | differ in detail to address new problems or concerns. New 278 | versions will be published with a unique version number and a 279 | variant identifier specifying the variant. If the Licensor has 280 | specified that a given variant applies to the Covered Source 281 | without specifying a version, You may treat that Covered Source 282 | as being released under any version of the CERN-OHL with that 283 | variant. If no variant is specified, the Covered Source shall be 284 | treated as being released under CERN-OHL-S. The Licensor may 285 | also specify that the Covered Source is subject to a specific 286 | version of the CERN-OHL or any later version in which case You 287 | may apply this or any later version of CERN-OHL with the same 288 | variant identifier published by CERN. 289 | 290 | You may treat Covered Source licensed under CERN-OHL-W as 291 | licensed under CERN-OHL-S if and only if all Available 292 | Components referenced in the Covered Source comply with the 293 | corresponding definition of Available Component for CERN-OHL-S. 294 | 295 | 8.4 This Licence shall terminate with immediate effect if You fail 296 | to comply with any of its terms and conditions. 297 | 298 | 8.5 However, if You cease all breaches of this Licence, then Your 299 | Licence from any Licensor is reinstated unless such Licensor has 300 | terminated this Licence by giving You, while You remain in 301 | breach, a notice specifying the breach and requiring You to cure 302 | it within 30 days, and You have failed to come into compliance 303 | in all material respects by the end of the 30 day period. Should 304 | You repeat the breach after receipt of a cure notice and 305 | subsequent reinstatement, this Licence will terminate 306 | immediately and permanently. Section 6 shall continue to apply 307 | after any termination. 308 | 309 | 8.6 This Licence shall not be enforceable except by a Licensor 310 | acting as such, and third party beneficiary rights are 311 | specifically excluded. 312 | -------------------------------------------------------------------------------- /td-io.pretty/RPi_Pico_SMD.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RPi_Pico_SMD (layer F.Cu) (tedit 602B7B15) 2 | (descr "Through hole straight pin header, 2x20, 2.54mm pitch, double rows") 3 | (tags "Through hole pin header THT 2x20 2.54mm double row") 4 | (fp_text reference REF** (at 0 0) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RPi_Pico_SMD (at 0 2.159) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 1.1 25.5) (end 1.5 25.5) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start -1.5 25.5) (end -1.1 25.5) (layer F.SilkS) (width 0.12)) 12 | (fp_line (start 10.5 25.5) (end 3.7 25.5) (layer F.SilkS) (width 0.12)) 13 | (fp_line (start 10.5 15.1) (end 10.5 15.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 10.5 7.4) (end 10.5 7.8) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 10.5 -18) (end 10.5 -17.6) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 10.5 -25.5) (end 10.5 -25.2) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 10.5 -2.7) (end 10.5 -2.3) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 10.5 12.5) (end 10.5 12.9) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 10.5 -7.8) (end 10.5 -7.4) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 10.5 -12.9) (end 10.5 -12.5) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 10.5 -0.2) (end 10.5 0.2) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 10.5 4.9) (end 10.5 5.3) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 10.5 20.1) (end 10.5 20.5) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 10.5 22.7) (end 10.5 23.1) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 10.5 17.6) (end 10.5 18) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 10.5 -15.4) (end 10.5 -15) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 10.5 -23.1) (end 10.5 -22.7) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 10.5 -20.5) (end 10.5 -20.1) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start 10.5 10) (end 10.5 10.4) (layer F.SilkS) (width 0.12)) 30 | (fp_line (start 10.5 2.3) (end 10.5 2.7) (layer F.SilkS) (width 0.12)) 31 | (fp_line (start 10.5 -5.3) (end 10.5 -4.9) (layer F.SilkS) (width 0.12)) 32 | (fp_line (start 10.5 -10.4) (end 10.5 -10) (layer F.SilkS) (width 0.12)) 33 | (fp_line (start -10.5 22.7) (end -10.5 23.1) (layer F.SilkS) (width 0.12)) 34 | (fp_line (start -10.5 20.1) (end -10.5 20.5) (layer F.SilkS) (width 0.12)) 35 | (fp_line (start -10.5 17.6) (end -10.5 18) (layer F.SilkS) (width 0.12)) 36 | (fp_line (start -10.5 15.1) (end -10.5 15.5) (layer F.SilkS) (width 0.12)) 37 | (fp_line (start -10.5 12.5) (end -10.5 12.9) (layer F.SilkS) (width 0.12)) 38 | (fp_line (start -10.5 10) (end -10.5 10.4) (layer F.SilkS) (width 0.12)) 39 | (fp_line (start -10.5 7.4) (end -10.5 7.8) (layer F.SilkS) (width 0.12)) 40 | (fp_line (start -10.5 4.9) (end -10.5 5.3) (layer F.SilkS) (width 0.12)) 41 | (fp_line (start -10.5 2.3) (end -10.5 2.7) (layer F.SilkS) (width 0.12)) 42 | (fp_line (start -10.5 -0.2) (end -10.5 0.2) (layer F.SilkS) (width 0.12)) 43 | (fp_line (start -10.5 -2.7) (end -10.5 -2.3) (layer F.SilkS) (width 0.12)) 44 | (fp_line (start -10.5 -5.3) (end -10.5 -4.9) (layer F.SilkS) (width 0.12)) 45 | (fp_line (start -10.5 -7.8) (end -10.5 -7.4) (layer F.SilkS) (width 0.12)) 46 | (fp_line (start -10.5 -10.4) (end -10.5 -10) (layer F.SilkS) (width 0.12)) 47 | (fp_line (start -10.5 -12.9) (end -10.5 -12.5) (layer F.SilkS) (width 0.12)) 48 | (fp_line (start -10.5 -15.4) (end -10.5 -15) (layer F.SilkS) (width 0.12)) 49 | (fp_line (start -10.5 -18) (end -10.5 -17.6) (layer F.SilkS) (width 0.12)) 50 | (fp_line (start -10.5 -20.5) (end -10.5 -20.1) (layer F.SilkS) (width 0.12)) 51 | (fp_line (start -10.5 -23.1) (end -10.5 -22.7) (layer F.SilkS) (width 0.12)) 52 | (fp_line (start -10.5 -25.5) (end -10.5 -25.2) (layer F.SilkS) (width 0.12)) 53 | (fp_line (start -7.493 -22.833) (end -7.493 -25.5) (layer F.SilkS) (width 0.12)) 54 | (fp_line (start -10.5 -22.833) (end -7.493 -22.833) (layer F.SilkS) (width 0.12)) 55 | (fp_line (start -3.7 25.5) (end -10.5 25.5) (layer F.SilkS) (width 0.12)) 56 | (fp_line (start -10.5 -25.5) (end 10.5 -25.5) (layer F.SilkS) (width 0.12)) 57 | (fp_line (start -11 26) (end -11 -26) (layer F.CrtYd) (width 0.12)) 58 | (fp_line (start 11 26) (end -11 26) (layer F.CrtYd) (width 0.12)) 59 | (fp_line (start 11 -26) (end 11 26) (layer F.CrtYd) (width 0.12)) 60 | (fp_line (start -11 -26) (end 11 -26) (layer F.CrtYd) (width 0.12)) 61 | (fp_line (start -10.5 -24.2) (end -9.2 -25.5) (layer F.Fab) (width 0.12)) 62 | (fp_line (start -10.5 25.5) (end -10.5 -25.5) (layer F.Fab) (width 0.12)) 63 | (fp_line (start 10.5 25.5) (end -10.5 25.5) (layer F.Fab) (width 0.12)) 64 | (fp_line (start 10.5 -25.5) (end 10.5 25.5) (layer F.Fab) (width 0.12)) 65 | (fp_line (start -10.5 -25.5) (end 10.5 -25.5) (layer F.Fab) (width 0.12)) 66 | (fp_poly (pts (xy -1.5 -16.5) (xy -3.5 -16.5) (xy -3.5 -18.5) (xy -1.5 -18.5)) (layer Dwgs.User) (width 0.1)) 67 | (fp_poly (pts (xy -1.5 -14) (xy -3.5 -14) (xy -3.5 -16) (xy -1.5 -16)) (layer Dwgs.User) (width 0.1)) 68 | (fp_poly (pts (xy -1.5 -11.5) (xy -3.5 -11.5) (xy -3.5 -13.5) (xy -1.5 -13.5)) (layer Dwgs.User) (width 0.1)) 69 | (fp_poly (pts (xy 3.7 -20.2) (xy -3.7 -20.2) (xy -3.7 -24.9) (xy 3.7 -24.9)) (layer Dwgs.User) (width 0.1)) 70 | (fp_text user %R (at 0 0 180) (layer F.Fab) 71 | (effects (font (size 1 1) (thickness 0.15))) 72 | ) 73 | (fp_text user GP1 (at -12.9 -21.6 45) (layer F.SilkS) 74 | (effects (font (size 0.8 0.8) (thickness 0.15))) 75 | ) 76 | (fp_text user GP2 (at -12.9 -16.51 45) (layer F.SilkS) 77 | (effects (font (size 0.8 0.8) (thickness 0.15))) 78 | ) 79 | (fp_text user GP0 (at -12.8 -24.13 45) (layer F.SilkS) 80 | (effects (font (size 0.8 0.8) (thickness 0.15))) 81 | ) 82 | (fp_text user GP3 (at -12.8 -13.97 45) (layer F.SilkS) 83 | (effects (font (size 0.8 0.8) (thickness 0.15))) 84 | ) 85 | (fp_text user GP4 (at -12.8 -11.43 45) (layer F.SilkS) 86 | (effects (font (size 0.8 0.8) (thickness 0.15))) 87 | ) 88 | (fp_text user GP5 (at -12.8 -8.89 45) (layer F.SilkS) 89 | (effects (font (size 0.8 0.8) (thickness 0.15))) 90 | ) 91 | (fp_text user GP6 (at -12.8 -3.81 45) (layer F.SilkS) 92 | (effects (font (size 0.8 0.8) (thickness 0.15))) 93 | ) 94 | (fp_text user GP7 (at -12.7 -1.3 45) (layer F.SilkS) 95 | (effects (font (size 0.8 0.8) (thickness 0.15))) 96 | ) 97 | (fp_text user GP8 (at -12.8 1.27 45) (layer F.SilkS) 98 | (effects (font (size 0.8 0.8) (thickness 0.15))) 99 | ) 100 | (fp_text user GP9 (at -12.8 3.81 45) (layer F.SilkS) 101 | (effects (font (size 0.8 0.8) (thickness 0.15))) 102 | ) 103 | (fp_text user GP10 (at -13.054 8.89 45) (layer F.SilkS) 104 | (effects (font (size 0.8 0.8) (thickness 0.15))) 105 | ) 106 | (fp_text user GP11 (at -13.2 11.43 45) (layer F.SilkS) 107 | (effects (font (size 0.8 0.8) (thickness 0.15))) 108 | ) 109 | (fp_text user GP12 (at -13.2 13.97 45) (layer F.SilkS) 110 | (effects (font (size 0.8 0.8) (thickness 0.15))) 111 | ) 112 | (fp_text user GP13 (at -13.054 16.51 45) (layer F.SilkS) 113 | (effects (font (size 0.8 0.8) (thickness 0.15))) 114 | ) 115 | (fp_text user GP14 (at -13.1 21.59 45) (layer F.SilkS) 116 | (effects (font (size 0.8 0.8) (thickness 0.15))) 117 | ) 118 | (fp_text user GP15 (at -13.054 24.13 45) (layer F.SilkS) 119 | (effects (font (size 0.8 0.8) (thickness 0.15))) 120 | ) 121 | (fp_text user GP16 (at 13.054 24.13 45) (layer F.SilkS) 122 | (effects (font (size 0.8 0.8) (thickness 0.15))) 123 | ) 124 | (fp_text user GP17 (at 13.054 21.59 45) (layer F.SilkS) 125 | (effects (font (size 0.8 0.8) (thickness 0.15))) 126 | ) 127 | (fp_text user GP18 (at 13.054 16.51 45) (layer F.SilkS) 128 | (effects (font (size 0.8 0.8) (thickness 0.15))) 129 | ) 130 | (fp_text user GP19 (at 13.054 13.97 45) (layer F.SilkS) 131 | (effects (font (size 0.8 0.8) (thickness 0.15))) 132 | ) 133 | (fp_text user GP20 (at 13.054 11.43 45) (layer F.SilkS) 134 | (effects (font (size 0.8 0.8) (thickness 0.15))) 135 | ) 136 | (fp_text user GP21 (at 13.054 8.9 45) (layer F.SilkS) 137 | (effects (font (size 0.8 0.8) (thickness 0.15))) 138 | ) 139 | (fp_text user GP22 (at 13.054 3.81 45) (layer F.SilkS) 140 | (effects (font (size 0.8 0.8) (thickness 0.15))) 141 | ) 142 | (fp_text user RUN (at 13 1.27 45) (layer F.SilkS) 143 | (effects (font (size 0.8 0.8) (thickness 0.15))) 144 | ) 145 | (fp_text user GP26 (at 13.054 -1.27 45) (layer F.SilkS) 146 | (effects (font (size 0.8 0.8) (thickness 0.15))) 147 | ) 148 | (fp_text user GP27 (at 13.054 -3.8 45) (layer F.SilkS) 149 | (effects (font (size 0.8 0.8) (thickness 0.15))) 150 | ) 151 | (fp_text user GP28 (at 13.054 -9.144 45) (layer F.SilkS) 152 | (effects (font (size 0.8 0.8) (thickness 0.15))) 153 | ) 154 | (fp_text user ADC_VREF (at 14 -12.5 45) (layer F.SilkS) 155 | (effects (font (size 0.8 0.8) (thickness 0.15))) 156 | ) 157 | (fp_text user 3V3 (at 12.9 -13.9 45) (layer F.SilkS) 158 | (effects (font (size 0.8 0.8) (thickness 0.15))) 159 | ) 160 | (fp_text user 3V3_EN (at 13.7 -17.2 45) (layer F.SilkS) 161 | (effects (font (size 0.8 0.8) (thickness 0.15))) 162 | ) 163 | (fp_text user VSYS (at 13.2 -21.59 45) (layer F.SilkS) 164 | (effects (font (size 0.8 0.8) (thickness 0.15))) 165 | ) 166 | (fp_text user VBUS (at 13.3 -24.2 45) (layer F.SilkS) 167 | (effects (font (size 0.8 0.8) (thickness 0.15))) 168 | ) 169 | (fp_text user GND (at -12.8 -19.05 45) (layer F.SilkS) 170 | (effects (font (size 0.8 0.8) (thickness 0.15))) 171 | ) 172 | (fp_text user GND (at -12.8 -6.35 45) (layer F.SilkS) 173 | (effects (font (size 0.8 0.8) (thickness 0.15))) 174 | ) 175 | (fp_text user GND (at -12.8 6.35 45) (layer F.SilkS) 176 | (effects (font (size 0.8 0.8) (thickness 0.15))) 177 | ) 178 | (fp_text user GND (at -12.8 19.05 45) (layer F.SilkS) 179 | (effects (font (size 0.8 0.8) (thickness 0.15))) 180 | ) 181 | (fp_text user GND (at 12.8 19.05 45) (layer F.SilkS) 182 | (effects (font (size 0.8 0.8) (thickness 0.15))) 183 | ) 184 | (fp_text user GND (at 12.8 6.35 45) (layer F.SilkS) 185 | (effects (font (size 0.8 0.8) (thickness 0.15))) 186 | ) 187 | (fp_text user GND (at 12.8 -19.05 45) (layer F.SilkS) 188 | (effects (font (size 0.8 0.8) (thickness 0.15))) 189 | ) 190 | (fp_text user AGND (at 13.054 -6.35 45) (layer F.SilkS) 191 | (effects (font (size 0.8 0.8) (thickness 0.15))) 192 | ) 193 | (fp_text user SWCLK (at -5.7 26.2) (layer F.SilkS) 194 | (effects (font (size 0.8 0.8) (thickness 0.15))) 195 | ) 196 | (fp_text user SWDIO (at 5.6 26.2) (layer F.SilkS) 197 | (effects (font (size 0.8 0.8) (thickness 0.15))) 198 | ) 199 | (fp_text user "Copper Keepouts shown on Dwgs layer" (at 0.1 -30.2) (layer Cmts.User) 200 | (effects (font (size 1 1) (thickness 0.15))) 201 | ) 202 | (pad 1 smd rect (at -8.89 -24.13) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 203 | (pad 2 smd rect (at -8.89 -21.59) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 204 | (pad 3 smd rect (at -8.89 -19.05) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 205 | (pad 4 smd rect (at -8.89 -16.51) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 206 | (pad 5 smd rect (at -8.89 -13.97) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 207 | (pad 6 smd rect (at -8.89 -11.43) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 208 | (pad 7 smd rect (at -8.89 -8.89) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 209 | (pad 8 smd rect (at -8.89 -6.35) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 210 | (pad 9 smd rect (at -8.89 -3.81) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 211 | (pad 10 smd rect (at -8.89 -1.27) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 212 | (pad 11 smd rect (at -8.89 1.27) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 213 | (pad 12 smd rect (at -8.89 3.81) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 214 | (pad 13 smd rect (at -8.89 6.35) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 215 | (pad 14 smd rect (at -8.89 8.89) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 216 | (pad 15 smd rect (at -8.89 11.43) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 217 | (pad 16 smd rect (at -8.89 13.97) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 218 | (pad 17 smd rect (at -8.89 16.51) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 219 | (pad 18 smd rect (at -8.89 19.05) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 220 | (pad 19 smd rect (at -8.89 21.59) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 221 | (pad 20 smd rect (at -8.89 24.13) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 222 | (pad 40 smd rect (at 8.89 -24.13) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 223 | (pad 39 smd rect (at 8.89 -21.59) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 224 | (pad 38 smd rect (at 8.89 -19.05) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 225 | (pad 37 smd rect (at 8.89 -16.51) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 226 | (pad 36 smd rect (at 8.89 -13.97) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 227 | (pad 35 smd rect (at 8.89 -11.43) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 228 | (pad 34 smd rect (at 8.89 -8.89) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 229 | (pad 33 smd rect (at 8.89 -6.35) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 230 | (pad 32 smd rect (at 8.89 -3.81) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 231 | (pad 31 smd rect (at 8.89 -1.27) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 232 | (pad 30 smd rect (at 8.89 1.27) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 233 | (pad 29 smd rect (at 8.89 3.81) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 234 | (pad 28 smd rect (at 8.89 6.35) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 235 | (pad 27 smd rect (at 8.89 8.89) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 236 | (pad 26 smd rect (at 8.89 11.43) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 237 | (pad 25 smd rect (at 8.89 13.97) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 238 | (pad 24 smd rect (at 8.89 16.51) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 239 | (pad 23 smd rect (at 8.89 19.05) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 240 | (pad 22 smd rect (at 8.89 21.59) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 241 | (pad 21 smd rect (at 8.89 24.13) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Paste F.Mask)) 242 | (pad "" np_thru_hole oval (at -2.725 -24) (size 1.8 1.8) (drill 1.8) (layers *.Cu *.Mask)) 243 | (pad "" np_thru_hole oval (at 2.725 -24) (size 1.8 1.8) (drill 1.8) (layers *.Cu *.Mask)) 244 | (pad "" np_thru_hole oval (at -2.425 -20.97) (size 1.5 1.5) (drill 1.5) (layers *.Cu *.Mask)) 245 | (pad "" np_thru_hole oval (at 2.425 -20.97) (size 1.5 1.5) (drill 1.5) (layers *.Cu *.Mask)) 246 | (pad 41 smd rect (at -2.54 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 247 | (pad 42 smd rect (at 0 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 248 | (pad 43 smd rect (at 2.54 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Paste F.Mask)) 249 | ) 250 | -------------------------------------------------------------------------------- /MCU_RaspberryPi_and_Boards.pretty/RPi_Pico_SMD_TH.kicad_mod: -------------------------------------------------------------------------------- 1 | (module RPi_Pico_SMD_TH (layer F.Cu) (tedit 5F638C80) 2 | (descr "Through hole straight pin header, 2x20, 2.54mm pitch, double rows") 3 | (tags "Through hole pin header THT 2x20 2.54mm double row") 4 | (fp_text reference REF** (at 0 0) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value RPi_Pico_SMD_TH (at 0 2.159) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 1.1 25.5) (end 1.5 25.5) (layer F.SilkS) (width 0.12)) 11 | (fp_line (start -1.5 25.5) (end -1.1 25.5) (layer F.SilkS) (width 0.12)) 12 | (fp_line (start 10.5 25.5) (end 3.7 25.5) (layer F.SilkS) (width 0.12)) 13 | (fp_line (start 10.5 15.1) (end 10.5 15.5) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 10.5 7.4) (end 10.5 7.8) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 10.5 -18) (end 10.5 -17.6) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 10.5 -25.5) (end 10.5 -25.2) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 10.5 -2.7) (end 10.5 -2.3) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 10.5 12.5) (end 10.5 12.9) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 10.5 -7.8) (end 10.5 -7.4) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start 10.5 -12.9) (end 10.5 -12.5) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start 10.5 -0.2) (end 10.5 0.2) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start 10.5 4.9) (end 10.5 5.3) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start 10.5 20.1) (end 10.5 20.5) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start 10.5 22.7) (end 10.5 23.1) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start 10.5 17.6) (end 10.5 18) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start 10.5 -15.4) (end 10.5 -15) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start 10.5 -23.1) (end 10.5 -22.7) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start 10.5 -20.5) (end 10.5 -20.1) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start 10.5 10) (end 10.5 10.4) (layer F.SilkS) (width 0.12)) 30 | (fp_line (start 10.5 2.3) (end 10.5 2.7) (layer F.SilkS) (width 0.12)) 31 | (fp_line (start 10.5 -5.3) (end 10.5 -4.9) (layer F.SilkS) (width 0.12)) 32 | (fp_line (start 10.5 -10.4) (end 10.5 -10) (layer F.SilkS) (width 0.12)) 33 | (fp_line (start -10.5 22.7) (end -10.5 23.1) (layer F.SilkS) (width 0.12)) 34 | (fp_line (start -10.5 20.1) (end -10.5 20.5) (layer F.SilkS) (width 0.12)) 35 | (fp_line (start -10.5 17.6) (end -10.5 18) (layer F.SilkS) (width 0.12)) 36 | (fp_line (start -10.5 15.1) (end -10.5 15.5) (layer F.SilkS) (width 0.12)) 37 | (fp_line (start -10.5 12.5) (end -10.5 12.9) (layer F.SilkS) (width 0.12)) 38 | (fp_line (start -10.5 10) (end -10.5 10.4) (layer F.SilkS) (width 0.12)) 39 | (fp_line (start -10.5 7.4) (end -10.5 7.8) (layer F.SilkS) (width 0.12)) 40 | (fp_line (start -10.5 4.9) (end -10.5 5.3) (layer F.SilkS) (width 0.12)) 41 | (fp_line (start -10.5 2.3) (end -10.5 2.7) (layer F.SilkS) (width 0.12)) 42 | (fp_line (start -10.5 -0.2) (end -10.5 0.2) (layer F.SilkS) (width 0.12)) 43 | (fp_line (start -10.5 -2.7) (end -10.5 -2.3) (layer F.SilkS) (width 0.12)) 44 | (fp_line (start -10.5 -5.3) (end -10.5 -4.9) (layer F.SilkS) (width 0.12)) 45 | (fp_line (start -10.5 -7.8) (end -10.5 -7.4) (layer F.SilkS) (width 0.12)) 46 | (fp_line (start -10.5 -10.4) (end -10.5 -10) (layer F.SilkS) (width 0.12)) 47 | (fp_line (start -10.5 -12.9) (end -10.5 -12.5) (layer F.SilkS) (width 0.12)) 48 | (fp_line (start -10.5 -15.4) (end -10.5 -15) (layer F.SilkS) (width 0.12)) 49 | (fp_line (start -10.5 -18) (end -10.5 -17.6) (layer F.SilkS) (width 0.12)) 50 | (fp_line (start -10.5 -20.5) (end -10.5 -20.1) (layer F.SilkS) (width 0.12)) 51 | (fp_line (start -10.5 -23.1) (end -10.5 -22.7) (layer F.SilkS) (width 0.12)) 52 | (fp_line (start -10.5 -25.5) (end -10.5 -25.2) (layer F.SilkS) (width 0.12)) 53 | (fp_line (start -7.493 -22.833) (end -7.493 -25.5) (layer F.SilkS) (width 0.12)) 54 | (fp_line (start -10.5 -22.833) (end -7.493 -22.833) (layer F.SilkS) (width 0.12)) 55 | (fp_line (start -3.7 25.5) (end -10.5 25.5) (layer F.SilkS) (width 0.12)) 56 | (fp_line (start -10.5 -25.5) (end 10.5 -25.5) (layer F.SilkS) (width 0.12)) 57 | (fp_line (start -11 26) (end -11 -26) (layer F.CrtYd) (width 0.12)) 58 | (fp_line (start 11 26) (end -11 26) (layer F.CrtYd) (width 0.12)) 59 | (fp_line (start 11 -26) (end 11 26) (layer F.CrtYd) (width 0.12)) 60 | (fp_line (start -11 -26) (end 11 -26) (layer F.CrtYd) (width 0.12)) 61 | (fp_line (start -10.5 -24.2) (end -9.2 -25.5) (layer F.Fab) (width 0.12)) 62 | (fp_line (start -10.5 25.5) (end -10.5 -25.5) (layer F.Fab) (width 0.12)) 63 | (fp_line (start 10.5 25.5) (end -10.5 25.5) (layer F.Fab) (width 0.12)) 64 | (fp_line (start 10.5 -25.5) (end 10.5 25.5) (layer F.Fab) (width 0.12)) 65 | (fp_line (start -10.5 -25.5) (end 10.5 -25.5) (layer F.Fab) (width 0.12)) 66 | (fp_text user %R (at 0 0 180) (layer F.Fab) 67 | (effects (font (size 1 1) (thickness 0.15))) 68 | ) 69 | (fp_text user GP1 (at -12.9 -21.6 45) (layer F.SilkS) 70 | (effects (font (size 0.8 0.8) (thickness 0.15))) 71 | ) 72 | (fp_text user GP2 (at -12.9 -16.51 45) (layer F.SilkS) 73 | (effects (font (size 0.8 0.8) (thickness 0.15))) 74 | ) 75 | (fp_text user GP0 (at -12.8 -24.13 45) (layer F.SilkS) 76 | (effects (font (size 0.8 0.8) (thickness 0.15))) 77 | ) 78 | (fp_text user GP3 (at -12.8 -13.97 45) (layer F.SilkS) 79 | (effects (font (size 0.8 0.8) (thickness 0.15))) 80 | ) 81 | (fp_text user GP4 (at -12.8 -11.43 45) (layer F.SilkS) 82 | (effects (font (size 0.8 0.8) (thickness 0.15))) 83 | ) 84 | (fp_text user GP5 (at -12.8 -8.89 45) (layer F.SilkS) 85 | (effects (font (size 0.8 0.8) (thickness 0.15))) 86 | ) 87 | (fp_text user GP6 (at -12.8 -3.81 45) (layer F.SilkS) 88 | (effects (font (size 0.8 0.8) (thickness 0.15))) 89 | ) 90 | (fp_text user GP7 (at -12.7 -1.3 45) (layer F.SilkS) 91 | (effects (font (size 0.8 0.8) (thickness 0.15))) 92 | ) 93 | (fp_text user GP8 (at -12.8 1.27 45) (layer F.SilkS) 94 | (effects (font (size 0.8 0.8) (thickness 0.15))) 95 | ) 96 | (fp_text user GP9 (at -12.8 3.81 45) (layer F.SilkS) 97 | (effects (font (size 0.8 0.8) (thickness 0.15))) 98 | ) 99 | (fp_text user GP10 (at -13.054 8.89 45) (layer F.SilkS) 100 | (effects (font (size 0.8 0.8) (thickness 0.15))) 101 | ) 102 | (fp_text user GP11 (at -13.2 11.43 45) (layer F.SilkS) 103 | (effects (font (size 0.8 0.8) (thickness 0.15))) 104 | ) 105 | (fp_text user GP12 (at -13.2 13.97 45) (layer F.SilkS) 106 | (effects (font (size 0.8 0.8) (thickness 0.15))) 107 | ) 108 | (fp_text user GP13 (at -13.054 16.51 45) (layer F.SilkS) 109 | (effects (font (size 0.8 0.8) (thickness 0.15))) 110 | ) 111 | (fp_text user GP14 (at -13.1 21.59 45) (layer F.SilkS) 112 | (effects (font (size 0.8 0.8) (thickness 0.15))) 113 | ) 114 | (fp_text user GP15 (at -13.054 24.13 45) (layer F.SilkS) 115 | (effects (font (size 0.8 0.8) (thickness 0.15))) 116 | ) 117 | (fp_text user GP16 (at 13.054 24.13 45) (layer F.SilkS) 118 | (effects (font (size 0.8 0.8) (thickness 0.15))) 119 | ) 120 | (fp_text user GP17 (at 13.054 21.59 45) (layer F.SilkS) 121 | (effects (font (size 0.8 0.8) (thickness 0.15))) 122 | ) 123 | (fp_text user GP18 (at 13.054 16.51 45) (layer F.SilkS) 124 | (effects (font (size 0.8 0.8) (thickness 0.15))) 125 | ) 126 | (fp_text user GP19 (at 13.054 13.97 45) (layer F.SilkS) 127 | (effects (font (size 0.8 0.8) (thickness 0.15))) 128 | ) 129 | (fp_text user GP20 (at 13.054 11.43 45) (layer F.SilkS) 130 | (effects (font (size 0.8 0.8) (thickness 0.15))) 131 | ) 132 | (fp_text user GP21 (at 13.054 8.9 45) (layer F.SilkS) 133 | (effects (font (size 0.8 0.8) (thickness 0.15))) 134 | ) 135 | (fp_text user GP22 (at 13.054 3.81 45) (layer F.SilkS) 136 | (effects (font (size 0.8 0.8) (thickness 0.15))) 137 | ) 138 | (fp_text user RUN (at 13 1.27 45) (layer F.SilkS) 139 | (effects (font (size 0.8 0.8) (thickness 0.15))) 140 | ) 141 | (fp_text user GP26 (at 13.054 -1.27 45) (layer F.SilkS) 142 | (effects (font (size 0.8 0.8) (thickness 0.15))) 143 | ) 144 | (fp_text user GP27 (at 13.054 -3.8 45) (layer F.SilkS) 145 | (effects (font (size 0.8 0.8) (thickness 0.15))) 146 | ) 147 | (fp_text user GP28 (at 13.054 -9.144 45) (layer F.SilkS) 148 | (effects (font (size 0.8 0.8) (thickness 0.15))) 149 | ) 150 | (fp_text user ADC_VREF (at 14 -12.5 45) (layer F.SilkS) 151 | (effects (font (size 0.8 0.8) (thickness 0.15))) 152 | ) 153 | (fp_text user 3V3 (at 12.9 -13.9 45) (layer F.SilkS) 154 | (effects (font (size 0.8 0.8) (thickness 0.15))) 155 | ) 156 | (fp_text user 3V3_EN (at 13.7 -17.2 45) (layer F.SilkS) 157 | (effects (font (size 0.8 0.8) (thickness 0.15))) 158 | ) 159 | (fp_text user VSYS (at 13.2 -21.59 45) (layer F.SilkS) 160 | (effects (font (size 0.8 0.8) (thickness 0.15))) 161 | ) 162 | (fp_text user VBUS (at 13.3 -24.2 45) (layer F.SilkS) 163 | (effects (font (size 0.8 0.8) (thickness 0.15))) 164 | ) 165 | (fp_text user GND (at -12.8 -19.05 45) (layer F.SilkS) 166 | (effects (font (size 0.8 0.8) (thickness 0.15))) 167 | ) 168 | (fp_text user GND (at -12.8 -6.35 45) (layer F.SilkS) 169 | (effects (font (size 0.8 0.8) (thickness 0.15))) 170 | ) 171 | (fp_text user GND (at -12.8 6.35 45) (layer F.SilkS) 172 | (effects (font (size 0.8 0.8) (thickness 0.15))) 173 | ) 174 | (fp_text user GND (at -12.8 19.05 45) (layer F.SilkS) 175 | (effects (font (size 0.8 0.8) (thickness 0.15))) 176 | ) 177 | (fp_text user GND (at 12.8 19.05 45) (layer F.SilkS) 178 | (effects (font (size 0.8 0.8) (thickness 0.15))) 179 | ) 180 | (fp_text user GND (at 12.8 6.35 45) (layer F.SilkS) 181 | (effects (font (size 0.8 0.8) (thickness 0.15))) 182 | ) 183 | (fp_text user GND (at 12.8 -19.05 45) (layer F.SilkS) 184 | (effects (font (size 0.8 0.8) (thickness 0.15))) 185 | ) 186 | (fp_text user AGND (at 13.054 -6.35 45) (layer F.SilkS) 187 | (effects (font (size 0.8 0.8) (thickness 0.15))) 188 | ) 189 | (fp_text user SWCLK (at -5.7 26.2) (layer F.SilkS) 190 | (effects (font (size 0.8 0.8) (thickness 0.15))) 191 | ) 192 | (fp_text user SWDIO (at 5.6 26.2) (layer F.SilkS) 193 | (effects (font (size 0.8 0.8) (thickness 0.15))) 194 | ) 195 | (fp_poly (pts (xy -1.5 -16.5) (xy -3.5 -16.5) (xy -3.5 -18.5) (xy -1.5 -18.5)) (layer Dwgs.User) (width 0.1)) 196 | (fp_poly (pts (xy -1.5 -14) (xy -3.5 -14) (xy -3.5 -16) (xy -1.5 -16)) (layer Dwgs.User) (width 0.1)) 197 | (fp_poly (pts (xy -1.5 -11.5) (xy -3.5 -11.5) (xy -3.5 -13.5) (xy -1.5 -13.5)) (layer Dwgs.User) (width 0.1)) 198 | (fp_poly (pts (xy 3.7 -20.2) (xy -3.7 -20.2) (xy -3.7 -24.9) (xy 3.7 -24.9)) (layer Dwgs.User) (width 0.1)) 199 | (fp_text user "Copper Keepouts shown on Dwgs layer" (at 0.1 -30.2) (layer Cmts.User) 200 | (effects (font (size 1 1) (thickness 0.15))) 201 | ) 202 | (pad 1 thru_hole oval (at -8.89 -24.13) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 203 | (pad 2 thru_hole oval (at -8.89 -21.59) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 204 | (pad 3 thru_hole rect (at -8.89 -19.05) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 205 | (pad 4 thru_hole oval (at -8.89 -16.51) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 206 | (pad 5 thru_hole oval (at -8.89 -13.97) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 207 | (pad 6 thru_hole oval (at -8.89 -11.43) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 208 | (pad 7 thru_hole oval (at -8.89 -8.89) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 209 | (pad 8 thru_hole rect (at -8.89 -6.35) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 210 | (pad 9 thru_hole oval (at -8.89 -3.81) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 211 | (pad 10 thru_hole oval (at -8.89 -1.27) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 212 | (pad 11 thru_hole oval (at -8.89 1.27) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 213 | (pad 12 thru_hole oval (at -8.89 3.81) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 214 | (pad 13 thru_hole rect (at -8.89 6.35) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 215 | (pad 14 thru_hole oval (at -8.89 8.89) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 216 | (pad 15 thru_hole oval (at -8.89 11.43) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 217 | (pad 16 thru_hole oval (at -8.89 13.97) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 218 | (pad 17 thru_hole oval (at -8.89 16.51) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 219 | (pad 18 thru_hole rect (at -8.89 19.05) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 220 | (pad 19 thru_hole oval (at -8.89 21.59) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 221 | (pad 20 thru_hole oval (at -8.89 24.13) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 222 | (pad 21 thru_hole oval (at 8.89 24.13) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 223 | (pad 22 thru_hole oval (at 8.89 21.59) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 224 | (pad 23 thru_hole rect (at 8.89 19.05) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 225 | (pad 24 thru_hole oval (at 8.89 16.51) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 226 | (pad 25 thru_hole oval (at 8.89 13.97) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 227 | (pad 26 thru_hole oval (at 8.89 11.43) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 228 | (pad 27 thru_hole oval (at 8.89 8.89) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 229 | (pad 28 thru_hole rect (at 8.89 6.35) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 230 | (pad 29 thru_hole oval (at 8.89 3.81) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 231 | (pad 30 thru_hole oval (at 8.89 1.27) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 232 | (pad 31 thru_hole oval (at 8.89 -1.27) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 233 | (pad 32 thru_hole oval (at 8.89 -3.81) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 234 | (pad 33 thru_hole rect (at 8.89 -6.35) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 235 | (pad 34 thru_hole oval (at 8.89 -8.89) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 236 | (pad 35 thru_hole oval (at 8.89 -11.43) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 237 | (pad 36 thru_hole oval (at 8.89 -13.97) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 238 | (pad 37 thru_hole oval (at 8.89 -16.51) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 239 | (pad 38 thru_hole rect (at 8.89 -19.05) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 240 | (pad 39 thru_hole oval (at 8.89 -21.59) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 241 | (pad 40 thru_hole oval (at 8.89 -24.13) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 242 | (pad 1 smd rect (at -8.89 -24.13) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 243 | (pad 2 smd rect (at -8.89 -21.59) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 244 | (pad 3 smd rect (at -8.89 -19.05) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 245 | (pad 4 smd rect (at -8.89 -16.51) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 246 | (pad 5 smd rect (at -8.89 -13.97) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 247 | (pad 6 smd rect (at -8.89 -11.43) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 248 | (pad 7 smd rect (at -8.89 -8.89) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 249 | (pad 8 smd rect (at -8.89 -6.35) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 250 | (pad 9 smd rect (at -8.89 -3.81) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 251 | (pad 10 smd rect (at -8.89 -1.27) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 252 | (pad 11 smd rect (at -8.89 1.27) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 253 | (pad 12 smd rect (at -8.89 3.81) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 254 | (pad 13 smd rect (at -8.89 6.35) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 255 | (pad 14 smd rect (at -8.89 8.89) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 256 | (pad 15 smd rect (at -8.89 11.43) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 257 | (pad 16 smd rect (at -8.89 13.97) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 258 | (pad 17 smd rect (at -8.89 16.51) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 259 | (pad 18 smd rect (at -8.89 19.05) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 260 | (pad 19 smd rect (at -8.89 21.59) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 261 | (pad 20 smd rect (at -8.89 24.13) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 262 | (pad 40 smd rect (at 8.89 -24.13) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 263 | (pad 39 smd rect (at 8.89 -21.59) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 264 | (pad 38 smd rect (at 8.89 -19.05) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 265 | (pad 37 smd rect (at 8.89 -16.51) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 266 | (pad 36 smd rect (at 8.89 -13.97) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 267 | (pad 35 smd rect (at 8.89 -11.43) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 268 | (pad 34 smd rect (at 8.89 -8.89) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 269 | (pad 33 smd rect (at 8.89 -6.35) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 270 | (pad 32 smd rect (at 8.89 -3.81) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 271 | (pad 31 smd rect (at 8.89 -1.27) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 272 | (pad 30 smd rect (at 8.89 1.27) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 273 | (pad 29 smd rect (at 8.89 3.81) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 274 | (pad 28 smd rect (at 8.89 6.35) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 275 | (pad 27 smd rect (at 8.89 8.89) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 276 | (pad 26 smd rect (at 8.89 11.43) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 277 | (pad 25 smd rect (at 8.89 13.97) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 278 | (pad 24 smd rect (at 8.89 16.51) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 279 | (pad 23 smd rect (at 8.89 19.05) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 280 | (pad 22 smd rect (at 8.89 21.59) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 281 | (pad 21 smd rect (at 8.89 24.13) (size 3.5 1.7) (drill (offset 0.9 0)) (layers F.Cu F.Mask)) 282 | (pad "" np_thru_hole oval (at -2.725 -24) (size 1.8 1.8) (drill 1.8) (layers *.Cu *.Mask)) 283 | (pad "" np_thru_hole oval (at 2.725 -24) (size 1.8 1.8) (drill 1.8) (layers *.Cu *.Mask)) 284 | (pad "" np_thru_hole oval (at -2.425 -20.97) (size 1.5 1.5) (drill 1.5) (layers *.Cu *.Mask)) 285 | (pad "" np_thru_hole oval (at 2.425 -20.97) (size 1.5 1.5) (drill 1.5) (layers *.Cu *.Mask)) 286 | (pad 41 smd rect (at -2.54 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 287 | (pad 41 thru_hole oval (at -2.54 23.9) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 288 | (pad 42 smd rect (at 0 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 289 | (pad 42 thru_hole rect (at 0 23.9) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 290 | (pad 43 smd rect (at 2.54 23.9 90) (size 3.5 1.7) (drill (offset -0.9 0)) (layers F.Cu F.Mask)) 291 | (pad 43 thru_hole oval (at 2.54 23.9) (size 1.7 1.7) (drill 1.02) (layers *.Cu *.Mask)) 292 | ) 293 | --------------------------------------------------------------------------------