├── Sticker.pdf ├── circuit ├── GBA-BT-HID.kicad_pcb-bak ├── GBA-BT-HID.pro ├── GBA-BT-HID-cache.lib ├── GBA-BT-HID.bak ├── GBA-BT-HID.sch └── GBA-BT-HID.kicad_pcb ├── esp32 ├── .gitignore ├── Makefile ├── main │ ├── gba_rom.h │ ├── main.c │ ├── uart.h │ ├── component.mk │ ├── multiboot.h │ ├── hc05.h │ ├── uart.c │ ├── multiboot.c │ └── hc05.c └── sdkconfig ├── images ├── Diagram.png ├── DSC_0244.JPG ├── DSC_0245.jpeg ├── DSC_0710.jpg └── ESP32-diagram.png ├── .gitignore ├── gba ├── .gitignore ├── source │ ├── hc05.h │ ├── uart.h │ ├── hc05.c │ ├── uart.c │ └── main.c ├── CMakeLists.txt └── gba_rules.cmake ├── arduino ├── gba-bt-hid-fw.ino ├── memory.ino └── multiboot.ino ├── README.md └── LICENSE.md /Sticker.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/Sticker.pdf -------------------------------------------------------------------------------- /circuit/GBA-BT-HID.kicad_pcb-bak: -------------------------------------------------------------------------------- 1 | (kicad_pcb (version 4) (host kicad "dummy file") ) 2 | -------------------------------------------------------------------------------- /esp32/.gitignore: -------------------------------------------------------------------------------- 1 | # Intellij 2 | *.iml 3 | .idea 4 | 5 | build/* 6 | cmake-build-debug/* -------------------------------------------------------------------------------- /images/Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/images/Diagram.png -------------------------------------------------------------------------------- /images/DSC_0244.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/images/DSC_0244.JPG -------------------------------------------------------------------------------- /images/DSC_0245.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/images/DSC_0245.jpeg -------------------------------------------------------------------------------- /images/DSC_0710.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/images/DSC_0710.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Intellij 2 | *.iml 3 | .idea 4 | 5 | # GB Roms 6 | *.gba 7 | 8 | cmake-build-debug/* -------------------------------------------------------------------------------- /esp32/Makefile: -------------------------------------------------------------------------------- 1 | PROJECT_NAME := gba-bt-hid-fw-esp32 2 | 3 | include $(IDF_PATH)/make/project.mk 4 | -------------------------------------------------------------------------------- /gba/.gitignore: -------------------------------------------------------------------------------- 1 | # Intellij 2 | *.iml 3 | .idea 4 | 5 | # GB Roms 6 | *.gba 7 | 8 | cmake-build-debug/* -------------------------------------------------------------------------------- /images/ESP32-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shyri/gba-bt-hid/HEAD/images/ESP32-diagram.png -------------------------------------------------------------------------------- /esp32/main/gba_rom.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-10-30. 3 | // 4 | 5 | #ifndef GBA_BT_HID_FW_ESP32_GBA_ROM_H 6 | #define GBA_BT_HID_FW_ESP32_GBA_ROM_H 7 | 8 | #include 9 | 10 | const uint8_t rom[58544]; 11 | 12 | #endif //GBA_BT_HID_FW_ESP32_GBA_ROM_H 13 | -------------------------------------------------------------------------------- /esp32/main/main.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-10-22. 3 | // 4 | #include "multiboot.h" 5 | #include "hc05.h" 6 | 7 | #define __BTSTACK_FILE__ "main.c" 8 | 9 | int btstack_main(int argc, const char *argv[]); 10 | 11 | int btstack_main(int argc, const char *argv[]) { 12 | multiboot(); 13 | initHC05(); 14 | 15 | return 0; 16 | } -------------------------------------------------------------------------------- /esp32/main/uart.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-10-30. 3 | // 4 | 5 | #ifndef GBA_BT_HID_FW_ESP32_UART_H 6 | #define GBA_BT_HID_FW_ESP32_UART_H 7 | 8 | #include 9 | 10 | void initUART(); 11 | 12 | int uartRead(char *message); 13 | 14 | void uartWrite(const char *message); 15 | 16 | #endif //GBA_BT_HID_FW_ESP32_UART_H 17 | -------------------------------------------------------------------------------- /gba/source/hc05.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-01-05. 3 | // 4 | 5 | #ifndef GBA_BT_HID_HC05_H 6 | #define GBA_BT_HID_HC05_H 7 | bool startCommandMode(); 8 | bool connectLast(); 9 | void sendGamepad(int xAxis, int yAxis, int zAxis, int rAxis, int buttons1, int buttons2); 10 | bool checkPaired(); 11 | void sendDisconnect(); 12 | #endif //GBA_BT_HID_HC05_H 13 | -------------------------------------------------------------------------------- /esp32/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | CFLAGS += -Wno-format 10 | 11 | -------------------------------------------------------------------------------- /esp32/main/multiboot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-09-12. 3 | // 4 | 5 | #ifndef GBA_BT_HID_FW_SP32_MULTIBOOT_H 6 | #define GBA_BT_HID_FW_SP32_MULTIBOOT_H 7 | 8 | #include 9 | #include 10 | #include "gba_rom.h" 11 | 12 | void initSPI(); 13 | 14 | uint32_t send(uint32_t command); 15 | 16 | void multiboot(); 17 | 18 | #endif //GBA_BT_HID_FW_SP32_MULTIBOOT_H 19 | -------------------------------------------------------------------------------- /esp32/main/hc05.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-10-31. 3 | // 4 | 5 | #ifndef GBA_BT_HID_FW_ESP32_HC05_H 6 | #define GBA_BT_HID_FW_ESP32_HC05_H 7 | 8 | #include "uart.h" 9 | #include 10 | #include 11 | #include "nvs_flash.h" 12 | #include "nvs.h" 13 | 14 | #define STORAGE_NAMESPACE "storage" 15 | 16 | void initHC05(); 17 | 18 | void checkHC05(); 19 | 20 | #endif //GBA_BT_HID_FW_ESP32_HC05_H 21 | -------------------------------------------------------------------------------- /gba/source/uart.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2018-12-31. 3 | // 4 | 5 | #ifndef GBA_BT_HID_UART_H 6 | #define GBA_BT_HID_UART_H 7 | 8 | #define SIO_CTS 0x0004 9 | #define SIO_PARITY_ODD 0x0008 10 | #define SIO_SEND_DATA 0x0010 11 | #define SIO_RECV_DATA 0x0020 12 | #define SIO_ERROR 0x0040 13 | #define SIO_LENGTH_8 0x0080 14 | #define SIO_USE_FIFO 0x0100 15 | #define SIO_USE_PARITY 0x0200 16 | #define SIO_SEND_ENABLE 0x0400 17 | #define SIO_RECV_ENABLE 0x0800 18 | #define UART_READ_TIMEOUT 50000 19 | 20 | void initUART(short baudRate); 21 | //unsigned char uartRead(int timeout); 22 | unsigned char uartRead(); 23 | void uartWrite(unsigned char data); 24 | void uartReadMessage(unsigned char * message); 25 | void uartSendMessage(char * message); 26 | #endif //GBA_BT_HID_UART_H 27 | -------------------------------------------------------------------------------- /circuit/GBA-BT-HID.pro: -------------------------------------------------------------------------------- 1 | update=22/05/2015 07:44:53 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [pcbnew] 9 | version=1 10 | LastNetListRead= 11 | UseCmpFile=1 12 | PadDrill=0.600000000000 13 | PadDrillOvalY=0.600000000000 14 | PadSizeH=1.500000000000 15 | PadSizeV=1.500000000000 16 | PcbTextSizeV=1.500000000000 17 | PcbTextSizeH=1.500000000000 18 | PcbTextThickness=0.300000000000 19 | ModuleTextSizeV=1.000000000000 20 | ModuleTextSizeH=1.000000000000 21 | ModuleTextSizeThickness=0.150000000000 22 | SolderMaskClearance=0.000000000000 23 | SolderMaskMinWidth=0.000000000000 24 | DrawSegmentWidth=0.200000000000 25 | BoardOutlineThickness=0.100000000000 26 | ModuleOutlineThickness=0.150000000000 27 | [cvpcb] 28 | version=1 29 | NetIExt=net 30 | [eeschema] 31 | version=1 32 | LibDir= 33 | [eeschema/libraries] 34 | -------------------------------------------------------------------------------- /gba/source/hc05.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "uart.h" 4 | 5 | 6 | bool prefix(const char *pre, const char *str){ 7 | return strncmp(pre, str, strlen(pre)) == 0; 8 | } 9 | 10 | void sendHeader() { 11 | uartWrite(0xFD); 12 | uartWrite(0x06); 13 | } 14 | 15 | bool startCommandMode() { 16 | uartWrite('$'); 17 | uartWrite('$'); 18 | uartWrite('$'); 19 | 20 | unsigned char message[50]; 21 | uartReadMessage(message); 22 | 23 | return strcmp("CMD", message) == 0; 24 | } 25 | 26 | bool connectLast() { 27 | uartSendMessage("CFR"); 28 | 29 | unsigned char message[50]; 30 | uartReadMessage(message); 31 | 32 | return prefix("%CONNECT", message); 33 | } 34 | 35 | void sendGamepad(int xAxis, int yAxis, int zAxis, int rAxis, int buttons1, int buttons2) { 36 | sendHeader(); 37 | uartWrite(xAxis); 38 | uartWrite(yAxis); 39 | uartWrite(zAxis); 40 | uartWrite(rAxis); 41 | uartWrite(buttons1); 42 | uartWrite(buttons2); 43 | } 44 | 45 | bool checkPaired() { 46 | unsigned char message[50]; 47 | uartReadMessage(message); 48 | 49 | return prefix("%CONNECT", message); 50 | } 51 | 52 | void sendDisconnect() { 53 | uartWrite(0x00); 54 | uartWrite(0x0D); 55 | } -------------------------------------------------------------------------------- /gba/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | project(gba_bt_hid) 3 | 4 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}) 5 | include(gba_rules) 6 | 7 | set(CMAKE_SYSTEM_NAME Generic) 8 | #set(CMAKE_SYSTEM_PROCESSOR armv4) 9 | #set(CMAKE_CXX_STANDARD 11) 10 | 11 | set(DEVKITARM $ENV{DEVKITARM}) 12 | set(DEVKITPRO $ENV{DEVKITPRO}) 13 | 14 | if(NOT DEVKITPRO) 15 | message(FATAL_ERROR "DEVKITPRO environment variable not set") 16 | endif() 17 | 18 | if(NOT DEVKITARM) 19 | message(FATAL_ERROR "DEVKITARM environment variable not set") 20 | endif() 21 | 22 | set(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc) 23 | set(CMAKE_CXX_COMPILER ${DEVKITARM}/bin/arm-none-eabi-g++) 24 | 25 | set(CMAKE_FIND_ROOT_PATH ${DEVKITARM}) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 27 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 28 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 29 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 30 | 31 | set(CMAKE_FIND_LIBRARY_PREFIXES lib) 32 | set(CMAKE_FIND_LIBRARY_SUFFIXES .a) 33 | 34 | include_directories(${DEVKITPRO}/libgba/include) 35 | link_directories(${DEVKITPRO}/libgba/lib) 36 | find_library(GBA gba) 37 | 38 | add_definitions(-DARM7) 39 | 40 | set(EXE_NAME gba_bt_hid_mb) 41 | file(GLOB_RECURSE SOURCE_FILES 42 | source/* 43 | ) 44 | add_executable(${EXE_NAME} ${SOURCE_FILES}) 45 | 46 | target_link_libraries(${EXE_NAME} GBA) 47 | set_target_properties(${EXE_NAME} 48 | PROPERTIES 49 | LINK_FLAGS -specs=gba_mb.specs 50 | COMPILER_FLAGS "-mthumb -mthumb-interwork") 51 | 52 | objcopy_file(${EXE_NAME}) 53 | gbafix_file(${EXE_NAME}) 54 | -------------------------------------------------------------------------------- /gba/source/uart.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2018-12-31. 3 | // 4 | #include 5 | #include 6 | #include "uart.h" 7 | 8 | void initUART(short baudRate) { 9 | REG_RCNT = R_UART; // RCNT Mode Selection, in Normal/Multiplayer/UART modes (R/W) 10 | REG_SIOCNT = 0; // Reset SIO Control Register 11 | REG_SIOCNT = baudRate | SIO_LENGTH_8 | SIO_SEND_ENABLE | SIO_RECV_ENABLE | SIO_USE_FIFO | SIO_UART; 12 | } 13 | 14 | unsigned char uartRead() { 15 | // Wait until we have a full byte or timeout (The recv data flag will go 0) 16 | int i = UART_READ_TIMEOUT; 17 | do { 18 | i--; 19 | if(i == 0) { 20 | return 0x00; 21 | } 22 | } while(REG_SIOCNT & 0x0020); 23 | 24 | // Return the character in the data register 25 | return (unsigned char) REG_SIODATA8; 26 | } 27 | 28 | void uartWrite(unsigned char data) { 29 | while(REG_SIOCNT & 0x0010); 30 | 31 | // Write byte to Data register 32 | REG_SIODATA8 = data; 33 | } 34 | 35 | 36 | void uartReadMessage(unsigned char * message) { 37 | int i = 0; 38 | unsigned char read = uartRead(); 39 | while (read != 0x0D) { // Until we receive a CR 40 | switch(read) { 41 | case 0x00: // NULL 42 | return; 43 | case 0x0A: // LF 44 | // Ignore 45 | break; 46 | default: 47 | message[i] = read; 48 | i++; 49 | } 50 | read = uartRead(); 51 | } 52 | 53 | return; 54 | } 55 | 56 | void uartSendMessage(char * message) { 57 | int messageSize = sizeof(message) / sizeof(message[0]); 58 | for(int i = 0; i < messageSize - 1; i++) { 59 | uartWrite((unsigned char) message[i]); 60 | } 61 | 62 | uartWrite(0x0D); 63 | } -------------------------------------------------------------------------------- /gba/gba_rules.cmake: -------------------------------------------------------------------------------- 1 | macro(OBJCOPY_FILE EXE_NAME) 2 | set(FO ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.gba) 3 | set(FI ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}) 4 | message(STATUS ${FO}) 5 | add_custom_command( 6 | OUTPUT "${FO}" 7 | COMMAND ${DEVKITARM}/bin/arm-none-eabi-objcopy 8 | ARGS -O binary ${FI} ${FO} 9 | DEPENDS ${FI}) 10 | get_filename_component(TGT "${EXE_NAME}" NAME) 11 | add_custom_target("TargetObjCopy_${TGT}" ALL DEPENDS ${FO} VERBATIM) 12 | get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) 13 | set_directory_properties( 14 | PROPERTIES 15 | ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${FO}") 16 | set_source_files_properties("${FO}" PROPERTIES GENERATED TRUE) 17 | endmacro(OBJCOPY_FILE) 18 | 19 | if(NOT GBAFIX_EXE) 20 | message(STATUS "Looking for arm-none-eabi-objcopy") 21 | find_program(GBAFIX_EXE gbafix ${DEVKITARM}/bin) 22 | if(GBAFIX_EXE) 23 | message(STATUS "Looking for arm-none-eabi-objcopy -- ${GBAFIX_EXE}") 24 | endif(GBAFIX_EXE) 25 | endif(NOT GBAFIX_EXE) 26 | 27 | if(GBAFIX_EXE) 28 | macro(GBAFIX_FILE EXE_NAME) 29 | set(FO ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.gba) 30 | set(BIN ${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.bin) 31 | get_filename_component(TGT "${EXE_NAME}" NAME) 32 | add_custom_target("Target_GBA${TGT}" ALL DEPENDS ${FO} VERBATIM COMMAND ${GBAFIX_EXE} ${FO}) 33 | get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) 34 | set_directory_properties( 35 | PROPERTIES 36 | ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${FO}") 37 | set_source_files_properties(${FO} PROPERTIES GENERATED TRUE) 38 | endmacro(GBAFIX_FILE) 39 | endif(GBAFIX_EXE) -------------------------------------------------------------------------------- /esp32/main/uart.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-10-30. 3 | // 4 | 5 | #include "uart.h" 6 | #include "driver/uart.h" 7 | #include "esp_log.h" 8 | 9 | 10 | // Note: UART2 default pins IO16, IO17 do not work on ESP32-WROVER module 11 | // because these pins connected to PSRAM 12 | #define ECHO_TEST_TXD (23) 13 | #define ECHO_TEST_RXD (25) 14 | 15 | // RTS for RS485 Half-Duplex Mode manages DE/~RE 16 | #define ECHO_TEST_RTS (18) 17 | 18 | // CTS is not used in RS485 Half-Duplex Mode 19 | #define ECHO_TEST_CTS UART_PIN_NO_CHANGE 20 | 21 | #define BUF_SIZE (127) 22 | #define BAUD_RATE (115200) 23 | 24 | // Read packet timeout 25 | #define PACKET_READ_TICS (10 / portTICK_RATE_MS) 26 | #define ECHO_TASK_STACK_SIZE (2048) 27 | #define ECHO_TASK_PRIO (10) 28 | #define UART_PORT (UART_NUM_2) 29 | 30 | // CTS is not used in RS485 Half-Duplex Mode 31 | #define ECHO_TEST_CTS UART_PIN_NO_CHANGE 32 | 33 | static const char *TAG = "UART"; 34 | uint8_t *data; 35 | 36 | void initUART() { 37 | printf("Initializing UART\n"); 38 | 39 | uart_config_t uart_config = { 40 | .baud_rate = BAUD_RATE, 41 | .data_bits = UART_DATA_8_BITS, 42 | .parity = UART_PARITY_DISABLE, 43 | .stop_bits = UART_STOP_BITS_1, 44 | .flow_ctrl = UART_HW_FLOWCTRL_DISABLE 45 | }; 46 | 47 | uart_param_config(UART_PORT, &uart_config); 48 | uart_set_pin(UART_PORT, ECHO_TEST_TXD, ECHO_TEST_RXD, ECHO_TEST_RTS, ECHO_TEST_CTS); 49 | uart_driver_install(UART_PORT, BUF_SIZE * 2, 0, 0, NULL, 0); 50 | uart_set_mode(UART_PORT, UART_MODE_RS485_HALF_DUPLEX); 51 | 52 | data = (uint8_t *) malloc(BUF_SIZE); 53 | } 54 | 55 | int uartRead(char *message) { 56 | int len = uart_read_bytes(UART_PORT, data, BUF_SIZE, PACKET_READ_TICS); 57 | 58 | if (len > 0) { 59 | printf("Received %u bytes:", len); 60 | 61 | for (int i = 0; i < len; i++) { 62 | message[i] = data[i]; 63 | printf("0x%.2X ", (uint8_t) data[i]); 64 | } 65 | printf("\n"); 66 | } 67 | 68 | 69 | return len; 70 | } 71 | 72 | void uartWrite(const char *message) { 73 | printf("Sending %s:\n", message); 74 | uart_write_bytes(UART_PORT, message, strlen(message)); 75 | } -------------------------------------------------------------------------------- /arduino/gba-bt-hid-fw.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define SS_PIN 10 4 | #define MUX_PIN 5 5 | 6 | #define ROM_WRITE_PIN 2 7 | #define MB_PIN 4 8 | #define UART_PIN 3 9 | 10 | #define COMMAND_DELETE_REQUEST 0xA0 11 | #define COMMAND_DELETE_REQUEST_ACK 0xA1 12 | #define COMMAND_DELETED 0xA2 13 | #define COMMAND_ERROR 0xA5 14 | #define COMMAND_SUCCESS 0xA6 15 | 16 | 17 | void dumpRom(uint32_t romLength); 18 | uint32_t readROMLength(); 19 | uint32_t romLength; 20 | long fcnt = 0; 21 | int writeMode = 0; 22 | 23 | void setup() { 24 | Serial.begin(115200); 25 | 26 | pinMode(SS_PIN, OUTPUT); 27 | digitalWrite(SS_PIN, HIGH); 28 | 29 | pinMode(MUX_PIN, OUTPUT); 30 | digitalWrite(MUX_PIN, HIGH); 31 | 32 | pinMode(MB_PIN, OUTPUT); 33 | digitalWrite(MB_PIN, HIGH); 34 | 35 | pinMode(UART_PIN, OUTPUT); 36 | digitalWrite(UART_PIN, LOW); 37 | 38 | pinMode(ROM_WRITE_PIN, INPUT); 39 | writeMode = digitalRead(ROM_WRITE_PIN); 40 | } 41 | 42 | void loop() { 43 | if(writeMode) { 44 | SPI.begin(); 45 | writeROMRoutine(); 46 | while (1) {} 47 | } else { 48 | Serial.println("GBA Bluetoot HID"); 49 | SPI.begin(); 50 | Serial.print("ROM Size: "); 51 | romLength = readROMLength(); 52 | Serial.println(romLength, HEX); 53 | SPI.end(); 54 | multiboot(); 55 | while (1) {} 56 | } 57 | } 58 | 59 | int readCommand() { 60 | while (Serial.available() == 0); 61 | return Serial.read(); 62 | } 63 | 64 | void sendCommand(int command) { 65 | Serial.write(COMMAND_DELETED); 66 | } 67 | 68 | void writeROMRoutine() { 69 | int incomingByte = readCommand(); 70 | 71 | if(incomingByte == COMMAND_DELETE_REQUEST) { 72 | Serial.write(COMMAND_DELETE_REQUEST_ACK); 73 | 74 | if(chipErase()) { 75 | Serial.write(COMMAND_DELETED); 76 | } else { 77 | Serial.write(COMMAND_ERROR); 78 | } 79 | } 80 | 81 | int size1 = readCommand(); 82 | int size2 = readCommand(); 83 | int size3 = readCommand(); 84 | int size4 = readCommand(); 85 | 86 | uint32_t romSize = ((size1 << 24) | (size2 << 16) | (size3 << 8) | size4) & 0xFFFF; 87 | 88 | uint32_t address = 0; 89 | 90 | writeROMByte(address, size1); 91 | address++; 92 | writeROMByte(address, size2); 93 | address++; 94 | writeROMByte(address, size3); 95 | address++; 96 | writeROMByte(address, size4); 97 | address++; 98 | 99 | enableROMWrite(address); 100 | 101 | int bytesWritten = 0x04; 102 | while(address < romSize + 4) { 103 | if(bytesWritten == 0x100) { 104 | commitROMWrite(); 105 | bytesWritten = 0x00; 106 | while(!enableROMWrite(address)); 107 | } 108 | int romByte = readCommand(); 109 | SPI.transfer(romByte); 110 | //writeROMByte(address, romByte); 111 | Serial.write(romByte); 112 | bytesWritten++; 113 | address++; 114 | } 115 | 116 | commitROMWrite(); 117 | 118 | Serial.write(COMMAND_SUCCESS); 119 | } 120 | 121 | void dumpRom(uint32_t page) { 122 | digitalWrite(SS_PIN, LOW); 123 | 124 | SPI.transfer(0x03); 125 | 126 | SPI.transfer((page >> 8) & 0xFF); 127 | SPI.transfer(page & 0xFF); 128 | SPI.transfer(0x00); 129 | 130 | int j = 0; 131 | for(uint32_t i = 0; i < 0x100; i++) { 132 | int rv = SPI.transfer(0x00); 133 | Serial.print("0x"); 134 | Serial.print(rv, HEX); 135 | Serial.print(" "); 136 | j++; 137 | if(j == 16) { 138 | Serial.println(" "); 139 | j = 0; 140 | } 141 | } 142 | 143 | digitalWrite(SS_PIN, HIGH); 144 | } 145 | -------------------------------------------------------------------------------- /arduino/memory.ino: -------------------------------------------------------------------------------- 1 | uint32_t readROMLength() { 2 | digitalWrite(SS_PIN, LOW); 3 | 4 | SPI.transfer(0x03); 5 | 6 | SPI.transfer(0x00); 7 | SPI.transfer(0x00); 8 | SPI.transfer(0x00); 9 | 10 | uint32_t size1 = SPI.transfer(0x00); 11 | uint32_t size2 = SPI.transfer(0x00); 12 | uint32_t size3 = SPI.transfer(0x00); 13 | uint32_t size4 = SPI.transfer(0x00); 14 | 15 | uint32_t readRomSize = ((size1 << 24) | (size2 << 16) | (size3 << 8) | size4); 16 | 17 | digitalWrite(SS_PIN, HIGH); 18 | 19 | return readRomSize; 20 | } 21 | 22 | uint32_t read4ROMBytes(int startAddress) { 23 | digitalWrite(MUX_PIN, HIGH); 24 | delayMicroseconds(10); 25 | SPI.end(); 26 | 27 | SPI.setBitOrder(MSBFIRST); 28 | SPI.setDataMode(SPI_MODE0); 29 | SPI.begin(); 30 | startAddress = startAddress + 0x04; 31 | 32 | digitalWrite(SS_PIN, LOW); 33 | 34 | uint32_t page = startAddress / 0x100; 35 | uint32_t startPoint = startAddress % 0x100; 36 | 37 | SPI.transfer(0x03); 38 | SPI.transfer((page >> 8) & 0xFF); 39 | SPI.transfer(page & 0xFF); 40 | SPI.transfer(startPoint); 41 | 42 | uint32_t byte1 = 0x00; 43 | uint32_t byte2 = 0x00; 44 | uint32_t byte3 = 0x00; 45 | uint32_t byte4 = 0x00; 46 | 47 | if(startAddress <= romLength) { 48 | byte1 = SPI.transfer(0x00); 49 | } 50 | 51 | if(startAddress + 1 <= romLength) { 52 | byte2 = SPI.transfer(0x00); 53 | } 54 | 55 | if(startAddress + 2 <= romLength) { 56 | byte3 = SPI.transfer(0x00); 57 | } 58 | 59 | if(startAddress + 3 <= romLength) { 60 | byte4 = SPI.transfer(0x00); 61 | } 62 | 63 | //w = rom[i] | (rom[i + 1] << 8) | (rom[i + 2] << 16) | (rom[i + 3] << 24) ; 64 | uint32_t fullByte = ((byte4 << 24) | (byte3 << 16) | (byte2 << 8) | byte1); 65 | digitalWrite(SS_PIN, HIGH); 66 | 67 | return fullByte; 68 | } 69 | 70 | void waitWhileBusy() { 71 | int rv; 72 | do { 73 | delay(10); 74 | 75 | digitalWrite(SS_PIN, LOW); 76 | SPI.transfer(0x05); 77 | rv = SPI.transfer(0x00); 78 | digitalWrite(SS_PIN, HIGH); 79 | } while(rv != 0); 80 | } 81 | 82 | bool checkWEL() { 83 | digitalWrite(SS_PIN, LOW); 84 | SPI.transfer(0x05); 85 | int rv = SPI.transfer(0x00); 86 | digitalWrite(SS_PIN, HIGH); 87 | 88 | return rv & 0x02; 89 | } 90 | 91 | bool chipErase() { 92 | waitWhileBusy(); 93 | 94 | digitalWrite(SS_PIN, LOW); 95 | SPI.transfer(0x06); 96 | digitalWrite(SS_PIN, HIGH); 97 | 98 | if(checkWEL()) { 99 | digitalWrite(SS_PIN, LOW); 100 | SPI.transfer(0x60); 101 | digitalWrite(SS_PIN, HIGH); 102 | 103 | waitWhileBusy(); 104 | return true; 105 | } else { 106 | return false; 107 | } 108 | } 109 | 110 | boolean enableROMWrite(uint32_t address) { 111 | waitWhileBusy(); 112 | 113 | int page = (address >> 8) & 0xFFFF; 114 | int startByte = address & 0xFF; 115 | 116 | digitalWrite(SS_PIN, LOW); 117 | SPI.transfer(0x06); 118 | digitalWrite(SS_PIN, HIGH); 119 | 120 | if(checkWEL()) { 121 | digitalWrite(SS_PIN, LOW); 122 | SPI.transfer(0x02); 123 | 124 | SPI.transfer((page >> 8) & 0xFF); 125 | SPI.transfer(page & 0xFF); 126 | SPI.transfer(startByte); 127 | 128 | return true; 129 | } else { 130 | return false; 131 | } 132 | } 133 | 134 | void commitROMWrite() { 135 | digitalWrite(SS_PIN, HIGH); 136 | 137 | waitWhileBusy(); 138 | } 139 | 140 | void writeROMByte(int address, int byte) { 141 | waitWhileBusy(); 142 | 143 | int page = (address >> 8) & 0xFFFF; 144 | int startByte = address & 0xFF; 145 | 146 | digitalWrite(SS_PIN, LOW); 147 | SPI.transfer(0x06); 148 | digitalWrite(SS_PIN, HIGH); 149 | 150 | if(checkWEL()) { 151 | digitalWrite(SS_PIN, LOW); 152 | SPI.transfer(0x02); 153 | 154 | SPI.transfer((page >> 8) & 0xFF); 155 | SPI.transfer(page & 0xFF); 156 | SPI.transfer(startByte); 157 | 158 | SPI.transfer(byte); 159 | 160 | digitalWrite(SS_PIN, HIGH); 161 | 162 | waitWhileBusy(); 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## GBA as Bluetooth Gamepad ## 2 | Turn your Game Boy Advance into a Bluetooth Controller :) 3 | ![Gameboy](images/DSC_0710.jpg?raw=true "GBA") 4 | 5 | ### How to use it: ### 6 | After launching the rom the bluetooth module enters discoverable mode. This means you can pair to it from whatever device you are going to use it with (PC, phone, Android TV...). After pairing the program will start sending keys to the device. The device address is stored so next time you launch you just have to press A to automatically connect to that device. 7 | 8 | ### How it works: ### 9 | The project is basically an ESP32 connected to the GBA through the link port. With the device connected and without any cartridge inserted in the GBA, once the GBA turns on the ESP32 sends a small rom to be loaded in the GBA. This rom is a program made to enable communication between the ESP32 and GBA for both handling bluetooth conneciton and sending the user input to the ESP32 when it is connected to a bluetooth host and act as a gamepad. Unfortunatelly it only works with traditional GBA as I couln't make it work with GBA SP. I think GBA SP just doesn't give enough current. 10 | 11 | When turned on the ESP32 (using the code found in [esp32](esp32) peforms a multiboot sequence through the SPI to the GBA sending a rom that the ESP32 has stored in the flash memory. The code for this rom can be found in [gba](gba). Once loaded the ESP32 enables the UART port in the same pins and the rom communicates with the ESP32 using UART through the link port. 12 | 13 | This project was tested with ESP-IDF v3.3.2 that you can find here: 14 | 15 | https://github.com/espressif/esp-idf/releases 16 | 17 | You also will need to install btstack. Commit https://github.com/bluekitchen/btstack/commit/a0a4507b35ea396d076a62a67efb1a5a800c5ff9 is the most recent version that is proved to work in this project. 18 | 19 | Just follow the ESP32 environment instructions here 20 | 21 | The ESP32 is powered by the 3.3V the GBA gives through the port. 22 | Once the ESP32 is programmed the male link port connector should be wired to it like the following diagram: 23 | ![ESP32Diagram](images/ESP32-diagram.png?raw=true "Diagram") 24 | 25 | The first prototype was made with an Atmega and HC-05: 26 | ### Old version prototype: ### 27 | ![Gameboy](images/DSC_0244.JPG?raw=true "GBA") 28 | The [gba](gba) contains the code for a GBA program that uses the link port to communicate with a HC-05 bluetooth module using UART (HC-05 flashed with RN-42 firmware, find how to do it in the links at the bottom). 29 | 30 | This rom is stored in a W25Q32 flash chip. An Atmega328P performs a multiboot sequence reading from this chip and sending to the GBA through the link port. You can find the Atmega code [here](arduino) (It is actually written for arduino so you'll need to burn arduino's bootloader if you want to use it). 31 | 32 | Once multiboot ends, the gba program runs and talks to the HC-05 to handle bluetooth connection, and key presses. 33 | 34 | Additional 74XX157 quad 2-input multiplexer makes possible to multiplex SPI to read from the flash chip and send the multiboot, it alternates byte reads from the flash chip and send them to the GBA. Then using hcf4066 switch link port pins are switched from the spi to the HC-05 uart pins. 35 | 36 | The whole circuit runs at 3.3V provided by GBA through the link port. 37 | 38 | Final version of the circuit includes a 6 pin port that allows to reprogram the atmega if necessary. Also it lets to turn the atmega into a special write mode to reprogram the flash memory. You can find the code for the memory programmer [here](arduino-rom-flasher) it needs to run in a separate board (not arduino due to the large size of the rom to program, I used a Stellaris Launchpad) 39 | 40 | There's a KiCad project [here](circuit) that includes this diagram: 41 | ![Diagram](images/Diagram.png?raw=true "GBA") 42 | 43 | ![Gameboy](images/DSC_0245.jpeg?raw=true "GBA") 44 | 45 | ### Links that helped me to get this done: ### 46 | ESP32 as a bluetooth Gamepad: 47 | Thanks to the Bluecubemod from Nathan Reeves I learned how to turn ESP32 into a bluetooth gamepad 48 | https://github.com/NathanReeves/BlueCubeMod 49 | 50 | HC-05 as bluetooth HID device: 51 | 52 | https://www.youtube.com/watch?v=y8PcNbAA6AQ 53 | 54 | https://www.youtube.com/watch?v=BBqsVKMYz1I 55 | 56 | GBA Multiboot: 57 | 58 | http://www.akkit.org/info/gbatek.htm 59 | 60 | https://github.com/akkera102/gba_01_multiboot 61 | 62 | https://github.com/ataulien/elm-gba-multiboot 63 | 64 | https://github.com/cartr/MSMCcable 65 | 66 | https://github.com/tangrs/usb-gba-multiboot 67 | 68 | https://github.com/MerryMage/gba-multiboot 69 | -------------------------------------------------------------------------------- /arduino/multiboot.ino: -------------------------------------------------------------------------------- 1 | uint8_t header[] = { 2 | 0x2E, 0x00, 0x00, 0xEA, 0x24, 0xFF, 0xAE, 0x51, 0x69, 0x9A, 0xA2, 0x21, 0x3D, 0x84, 0x82, 0x0A, 3 | 0x84, 0xE4, 0x09, 0xAD, 0x11, 0x24, 0x8B, 0x98, 0xC0, 0x81, 0x7F, 0x21, 0xA3, 0x52, 0xBE, 0x19, 4 | 0x93, 0x09, 0xCE, 0x20, 0x10, 0x46, 0x4A, 0x4A, 0xF8, 0x27, 0x31, 0xEC, 0x58, 0xC7, 0xE8, 0x33, 5 | 0x82, 0xE3, 0xCE, 0xBF, 0x85, 0xF4, 0xDF, 0x94, 0xCE, 0x4B, 0x09, 0xC1, 0x94, 0x56, 0x8A, 0xC0, 6 | 0x13, 0x72, 0xA7, 0xFC, 0x9F, 0x84, 0x4D, 0x73, 0xA3, 0xCA, 0x9A, 0x61, 0x58, 0x97, 0xA3, 0x27, 7 | 0xFC, 0x03, 0x98, 0x76, 0x23, 0x1D, 0xC7, 0x61, 0x03, 0x04, 0xAE, 0x56, 0xBF, 0x38, 0x84, 0x00, 8 | 0x40, 0xA7, 0x0E, 0xFD, 0xFF, 0x52, 0xFE, 0x03, 0x6F, 0x95, 0x30, 0xF1, 0x97, 0xFB, 0xC0, 0x85, 9 | 0x60, 0xD6, 0x80, 0x25, 0xA9, 0x63, 0xBE, 0x03, 0x01, 0x4E, 0x38, 0xE2, 0xF9, 0xA2, 0x34, 0xFF, 10 | 0xBB, 0x3E, 0x03, 0x44, 0x78, 0x00, 0x90, 0xCB, 0x88, 0x11, 0x3A, 0x94, 0x65, 0xC0, 0x7C, 0x63, 11 | 0x87, 0xF0, 0x3C, 0xAF, 0xD6, 0x25, 0xE4, 0x8B, 0x38, 0x0A, 0xAC, 0x72, 0x21, 0xD4, 0xF8, 0x07, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x30, 0x31, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00}; 14 | 15 | uint32_t send(uint32_t command) { 16 | uint32_t rv[4]; 17 | 18 | rv[0] = SPI.transfer((command >> 24) & 0xFF); 19 | rv[1] = SPI.transfer((command >> 16) & 0xFF); 20 | rv[2] = SPI.transfer((command >> 8) & 0xFF); 21 | rv[3] = SPI.transfer(command & 0xFF); 22 | 23 | delayMicroseconds(36); 24 | return rv[3] | (rv[2] << 8) | (rv[1] << 16) | (rv[0] << 24); 25 | } 26 | 27 | void initMultibootSPI() { 28 | SPI.end(); 29 | SPI.setBitOrder(MSBFIRST); 30 | SPI.setDataMode(SPI_MODE3); 31 | SPI.setClockDivider(SPI_CLOCK_DIV32); 32 | SPI.begin(); 33 | delayMicroseconds(10); 34 | digitalWrite(MUX_PIN, LOW); 35 | } 36 | 37 | void sendHandshake(uint32_t rv) { 38 | // handshake_data 11h+client_data[1]+client_data[2]+client_data[3] 39 | uint32_t handshake_data = (((rv >> 16) + 0xf) & 0xff) | 0x00006400; 40 | Serial.print("Sending Handshake: "); Serial.println(handshake_data, HEX); 41 | rv = send(handshake_data); 42 | Serial.println(rv, HEX); 43 | } 44 | 45 | void sendROMHeader() { 46 | Serial.println("Sending ROM Header"); 47 | uint32_t block; 48 | 49 | // Send Header in blocks of two bytes 50 | for (uint32_t i = 0; i <= 0x5f; i++) { 51 | block = header[2 * i]; 52 | block = header[2 * i + 1] << 8 | block; 53 | fcnt += 2; 54 | 55 | send(block); 56 | Serial.print(block, HEX); 57 | } 58 | Serial.println("Header Transfered"); 59 | uint32_t rv = send(0x00006200); // Transfer of header data completed 60 | Serial.println(rv, HEX); 61 | } 62 | 63 | void multiboot() { 64 | initMultibootSPI(); 65 | 66 | uint32_t rom_size = sizeof(header) + romLength; 67 | rom_size = (rom_size + 0xf) & 0xFFFFFFF0; // Align rom length to 16 68 | Serial.print("ROM Size:"); 69 | Serial.println(rom_size, HEX); 70 | 71 | uint32_t rv; 72 | 73 | Serial.println("Waiting for GBA"); 74 | while (rv != 0x72026202) { 75 | rv = send(0x00006202); 76 | } 77 | Serial.print("GBA Found: "); Serial.println(rv, HEX); 78 | rv = 0; 79 | 80 | send(0x00006202); // Found GBA 81 | send(0x00006102); // Recognition OK 82 | 83 | sendROMHeader(); // Transfer C0h bytes header data in units of 16bits with no encrpytion 84 | 85 | rv = send(0x00006202); // Exchange master/slave info again 86 | Serial.println(rv, HEX); 87 | 88 | Serial.println("Sending Palette"); 89 | // palette_data as "81h+color*10h+direction*8+speed*2", or as "0f1h+color*2" for fixed palette, whereas color=0..6, speed=0..3, direction=0..1. 90 | // Then wait until 0x73hh**** is received. hh represents client_data 91 | while (((rv >> 24) & 0xFF) != 0x73) { 92 | rv = send(0x000063D1); 93 | Serial.println(rv, HEX); 94 | } 95 | 96 | uint32_t client_data = ((rv >> 16) & 0xFF); // Random client generated data used for later handshake 97 | Serial.print("Client Data:"); 98 | Serial.println(client_data, HEX); 99 | 100 | uint32_t m = ((rv & 0x00ff0000) >> 8) + 0xffff00d1; 101 | uint32_t h = ((rv & 0x00ff0000) >> 16) + 0xf; 102 | 103 | sendHandshake(rv); 104 | 105 | Serial.print("Sending length information: "); Serial.println((rom_size - 0x190) / 4, HEX); 106 | rv = send((rom_size - 0x190) / 4); // Send length information and receive random data[1-3] (seed) 107 | Serial.println(rv, HEX); 108 | 109 | uint32_t f = (((rv & 0x00ff0000) >> 8) + h) | 0xffff0000; 110 | uint32_t c = 0x0000c387; 111 | 112 | uint32_t bytes_sent = 0; 113 | uint32_t w, w2, bitt; 114 | int i = 0; 115 | 116 | Serial.println("Sending ROM"); 117 | while (fcnt < rom_size) { 118 | if (bytes_sent == 32) { 119 | bytes_sent = 0; 120 | } 121 | 122 | //w = rom[i] | (rom[i + 1] << 8) | (rom[i + 2] << 16) | (rom[i + 3] << 24) ; 123 | 124 | w = read4ROMBytes(i); 125 | 126 | i = i + 4; 127 | bytes_sent += 4; 128 | 129 | if (fcnt % 0x80 == 0 || fcnt > 63488 || fcnt == rom_size) { 130 | Serial.print(fcnt, HEX); Serial.print("/"); Serial.println(rom_size, HEX); 131 | } 132 | 133 | 134 | w2 = w; 135 | 136 | for (bitt = 0; bitt < 32; bitt++) { 137 | if ((c ^ w) & 0x01) { 138 | c = (c >> 1) ^ 0x0000c37b; 139 | } 140 | else { 141 | c = c >> 1; 142 | } 143 | w = w >> 1; 144 | } 145 | 146 | 147 | m = (0x6f646573 * m) + 1; 148 | initMultibootSPI(); 149 | rv = send(w2 ^ ((~(0x02000000 + fcnt)) + 1) ^m ^ 0x43202f2f); 150 | 151 | fcnt = fcnt + 4; 152 | } 153 | Serial.println(rv, HEX); 154 | Serial.println("ROM sent! Doing checksum now..."); 155 | 156 | 157 | for (bitt = 0; bitt < 32; bitt++) { 158 | if ((c ^ f) & 0x01) { 159 | c = ( c >> 1) ^ 0x0000c37b; 160 | } 161 | else { 162 | c = c >> 1; 163 | } 164 | 165 | f = f >> 1; 166 | } 167 | Serial.print("CRC: "); Serial.println(c, HEX); 168 | 169 | Serial.println("Waiting for CRC"); 170 | while (rv != 0x00750065) { 171 | rv = send(0x00000065); 172 | } 173 | 174 | 175 | rv = send(0x00000066); 176 | Serial.println(rv, HEX); 177 | 178 | Serial.println("Exchanging CRC"); 179 | rv = send(c); 180 | Serial.println(rv, HEX); 181 | 182 | Serial.println("Done!"); 183 | 184 | 185 | digitalWrite(MB_PIN, LOW); 186 | digitalWrite(UART_PIN, HIGH); 187 | } 188 | -------------------------------------------------------------------------------- /gba/source/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "uart.h" 8 | #include "hc05.h" 9 | 10 | //--------------------------------------------------------------------------------- 11 | // Program entry point 12 | //--------------------------------------------------------------------------------- 13 | #define DISCONNECT_COUNTER 150 14 | 15 | unsigned char xAxis = 0x00; 16 | unsigned char yAxis = 0x00; 17 | unsigned char zAxis = 0x00; 18 | unsigned char rAxis = 0x00; 19 | unsigned char buttons1 = 0x00; 20 | unsigned char buttons2 = 0x00; 21 | uint32_t lastAxis = 0x00000000; 22 | uint16_t lastButtons = 0x0000; 23 | uint32_t disconnectCounter = 0; 24 | 25 | typedef enum HC05_BUTTONS { 26 | BUTTON_A = (1 << 0), 27 | BUTTON_B = (1 << 1), 28 | BUTTON_L = (1 << 4), 29 | BUTTON_R = (1 << 5), 30 | BUTTON_SELECT = (1 << 4), 31 | BUTTON_START = (1 << 5), 32 | PAD_DOWN = 0x7F, 33 | PAD_UP = 0x80, 34 | PAD_RIGHT = 0x7F, 35 | PAD_LEFT = 0x80 36 | } HC05_BUTTONS_BITS; 37 | 38 | typedef enum STATUS { 39 | DISCOVERING = 0, 40 | CONNECTING = 1, 41 | CONNECTED = 2, 42 | DISCONNECTING = 3, 43 | } STATES; 44 | 45 | int status = DISCOVERING; 46 | 47 | uint32_t getCurrentAxises() { 48 | return rAxis | (zAxis << 8) | (yAxis << 16) | (xAxis << 24); 49 | } 50 | 51 | uint16_t getCurrentButtons() { 52 | return buttons2 | (buttons1 << 8); 53 | } 54 | 55 | void clearConsole() { 56 | printf("\x1b[4;0H GBA BLUETOOTH GAMEPAD\n"); 57 | printf("\x1b[8;0H \n"); 58 | printf("\x1b[9;0H \n"); 59 | printf("\x1b[10;0H \n"); 60 | printf("\x1b[11;0H \n"); 61 | printf("\x1b[12;0H \n"); 62 | printf("\x1b[13;0H \n"); 63 | printf("\x1b[14;0H \n"); 64 | } 65 | 66 | void sendButtons() { 67 | if (lastAxis != getCurrentAxises() || lastButtons != getCurrentButtons()) { 68 | sendGamepad(xAxis, yAxis, zAxis, rAxis, buttons1, buttons2); 69 | 70 | lastAxis = getCurrentAxises(); 71 | lastButtons = getCurrentButtons(); 72 | } 73 | } 74 | 75 | void resetButtons() { 76 | xAxis = 0x00; 77 | yAxis = 0x00; 78 | zAxis = 0x00; 79 | rAxis = 0x00; 80 | buttons1 = 0x00; 81 | buttons2 = 0x00; 82 | } 83 | 84 | void enableDiscovery() { 85 | clearConsole(); 86 | printf("\x1b[9;4HDiscovery Mode Enabled\n"); 87 | printf("\x1b[11;0H Press A to pair last device\n"); 88 | status = DISCOVERING; 89 | } 90 | 91 | void autoConnect() { 92 | clearConsole(); 93 | printf("\x1b[9;9HConnecting...\n"); 94 | 95 | if (startCommandMode()) { 96 | status = CONNECTING; 97 | connectLast(); 98 | } else { 99 | enableDiscovery(); 100 | printf("\x1b[14;5HConnection Failed :(\n"); 101 | } 102 | } 103 | 104 | void disconnect() { 105 | status = DISCONNECTING; 106 | clearConsole(); 107 | printf("\x1b[9;6HDisconnecting...\n"); 108 | sendDisconnect(); 109 | enableDiscovery(); 110 | } 111 | 112 | void processButtons(int keys_pressed) { 113 | if (keys_pressed & KEY_A) { 114 | buttons1 = buttons1 | BUTTON_A; 115 | } 116 | 117 | if (keys_pressed & KEY_B) { 118 | buttons1 = buttons1 | BUTTON_B; 119 | } 120 | 121 | if (keys_pressed & KEY_L) { 122 | buttons1 = buttons1 | BUTTON_L; 123 | } 124 | 125 | if (keys_pressed & KEY_R) { 126 | buttons1 = buttons1 | BUTTON_R; 127 | } 128 | 129 | if (keys_pressed & KEY_START) { 130 | buttons2 = buttons2 | BUTTON_START; 131 | disconnectCounter++; 132 | if (disconnectCounter == DISCONNECT_COUNTER) { 133 | disconnect(); 134 | return; 135 | } 136 | } else { 137 | disconnectCounter = 0; 138 | } 139 | 140 | if (keys_pressed & KEY_SELECT) { 141 | buttons2 = buttons2 | BUTTON_SELECT; 142 | } 143 | 144 | if (keys_pressed & KEY_UP) { 145 | yAxis = PAD_UP; 146 | } 147 | 148 | if (keys_pressed & KEY_DOWN) { 149 | yAxis = PAD_DOWN; 150 | } 151 | 152 | if (keys_pressed & KEY_RIGHT) { 153 | xAxis = PAD_RIGHT; 154 | } 155 | 156 | if (keys_pressed & KEY_LEFT) { 157 | xAxis = PAD_LEFT; 158 | } 159 | 160 | sendButtons(); 161 | } 162 | 163 | int main(void) { 164 | //--------------------------------------------------------------------------------- 165 | // the vblank interrupt must be enabled for VBlankIntrWait() to work 166 | // since the default dispatcher handles the bios flags no vblank handler 167 | // is required 168 | irqInit(); 169 | irqEnable(IRQ_VBLANK); 170 | REG_IME = 1; 171 | 172 | // consoleDemoInit(); 173 | 174 | consoleInit(0, // charbase 175 | 4, // mapbase 176 | 0, // background number 177 | NULL, // font 178 | 0, // font size 179 | 15 // 16 color palette 180 | ); 181 | 182 | // set the screen colors, color 0 is the background color 183 | // the foreground color is index 1 of the selected 16 color palette 184 | BG_COLORS[0] = RGB8(255, 255, 255); 185 | BG_COLORS[241] = RGB8(58, 110, 165); 186 | 187 | SetMode(MODE_0 | BG0_ON); 188 | 189 | enableDiscovery(); 190 | 191 | initUART(SIO_115200); 192 | 193 | while (1) { 194 | int keys_pressed; 195 | 196 | VBlankIntrWait(); 197 | 198 | resetButtons(); 199 | 200 | scanKeys(); 201 | 202 | keys_pressed = keysHeld(); 203 | 204 | switch (status) { 205 | case DISCOVERING: 206 | if (keys_pressed & KEY_A) { 207 | autoConnect(); 208 | } else if (checkPaired()) { 209 | status = CONNECTED; 210 | clearConsole(); 211 | printf("\x1b[9;10HConnected!\n"); 212 | printf("\x1b[11;3HHold Start to disconnect\n"); 213 | break; 214 | } 215 | break; 216 | case CONNECTING: 217 | if (checkPaired()) { 218 | status = CONNECTED; 219 | clearConsole(); 220 | printf("\x1b[9;10HConnected!\n"); 221 | printf("\x1b[11;3HHold Start to disconnect\n"); 222 | break; 223 | } 224 | break; 225 | case CONNECTED: 226 | processButtons(keys_pressed); 227 | break; 228 | } 229 | } 230 | } -------------------------------------------------------------------------------- /esp32/main/multiboot.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri on 2019-09-12. 3 | // 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "multiboot.h" 11 | 12 | #define PIN_NUM_MISO 25 13 | #define PIN_NUM_MOSI 23 14 | #define PIN_NUM_CLK 19 15 | #define PIN_NUM_CS 22 16 | 17 | #define PIN_NUM_DC 21 18 | #define PIN_NUM_RST 18 19 | #define PIN_NUM_BCKL 5 20 | 21 | const uint8_t gba_header[] = { 22 | 0x2E, 0x00, 0x00, 0xEA, 0x24, 0xFF, 0xAE, 0x51, 0x69, 0x9A, 0xA2, 0x21, 0x3D, 0x84, 0x82, 0x0A, 23 | 0x84, 0xE4, 0x09, 0xAD, 0x11, 0x24, 0x8B, 0x98, 0xC0, 0x81, 0x7F, 0x21, 0xA3, 0x52, 0xBE, 0x19, 24 | 0x93, 0x09, 0xCE, 0x20, 0x10, 0x46, 0x4A, 0x4A, 0xF8, 0x27, 0x31, 0xEC, 0x58, 0xC7, 0xE8, 0x33, 25 | 0x82, 0xE3, 0xCE, 0xBF, 0x85, 0xF4, 0xDF, 0x94, 0xCE, 0x4B, 0x09, 0xC1, 0x94, 0x56, 0x8A, 0xC0, 26 | 0x13, 0x72, 0xA7, 0xFC, 0x9F, 0x84, 0x4D, 0x73, 0xA3, 0xCA, 0x9A, 0x61, 0x58, 0x97, 0xA3, 0x27, 27 | 0xFC, 0x03, 0x98, 0x76, 0x23, 0x1D, 0xC7, 0x61, 0x03, 0x04, 0xAE, 0x56, 0xBF, 0x38, 0x84, 0x00, 28 | 0x40, 0xA7, 0x0E, 0xFD, 0xFF, 0x52, 0xFE, 0x03, 0x6F, 0x95, 0x30, 0xF1, 0x97, 0xFB, 0xC0, 0x85, 29 | 0x60, 0xD6, 0x80, 0x25, 0xA9, 0x63, 0xBE, 0x03, 0x01, 0x4E, 0x38, 0xE2, 0xF9, 0xA2, 0x34, 0xFF, 30 | 0xBB, 0x3E, 0x03, 0x44, 0x78, 0x00, 0x90, 0xCB, 0x88, 0x11, 0x3A, 0x94, 0x65, 0xC0, 0x7C, 0x63, 31 | 0x87, 0xF0, 0x3C, 0xAF, 0xD6, 0x25, 0xE4, 0x8B, 0x38, 0x0A, 0xAC, 0x72, 0x21, 0xD4, 0xF8, 0x07, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 33 | 0x30, 0x31, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00}; 34 | 35 | void lcd_spi_pre_transfer_callback(spi_transaction_t *t) { 36 | int dc = (int) t->user; 37 | gpio_set_level(PIN_NUM_DC, dc); 38 | } 39 | 40 | spi_device_handle_t spi; 41 | uint32_t fcnt; 42 | 43 | void initSPI() { 44 | esp_err_t ret; 45 | 46 | spi_bus_config_t buscfg = { 47 | .miso_io_num=PIN_NUM_MISO, 48 | .mosi_io_num=PIN_NUM_MOSI, 49 | .sclk_io_num=PIN_NUM_CLK, 50 | .quadwp_io_num=-1, 51 | .quadhd_io_num=-1, 52 | .max_transfer_sz=8 53 | }; 54 | 55 | spi_device_interface_config_t devcfg = { 56 | .clock_speed_hz=5 * 100 * 1000, //Clock out at 500 Khz 57 | .mode=3, //SPI mode 3 58 | .spics_io_num=PIN_NUM_CS, //CS pin 59 | .queue_size=7, //We want to be able to queue 7 transactions at a time 60 | .pre_cb=lcd_spi_pre_transfer_callback, //Specify pre-transfer callback to handle D/C line 61 | }; 62 | 63 | //Initialize the SPI bus 64 | ret = spi_bus_initialize(HSPI_HOST, &buscfg, 1); 65 | ESP_ERROR_CHECK(ret); 66 | 67 | //Attach the device to the SPI bus 68 | ret = spi_bus_add_device(HSPI_HOST, &devcfg, &spi); 69 | ESP_ERROR_CHECK(ret); 70 | } 71 | 72 | void shutdownSPI() { 73 | spi_bus_remove_device(spi); 74 | spi_bus_free(HSPI_HOST); 75 | } 76 | 77 | uint32_t send(uint32_t command) { 78 | uint8_t tx[4]; 79 | tx[0] = (uint8_t)((command >> 24) & 0xFF); 80 | tx[1] = (uint8_t)((command >> 16) & 0xFF); 81 | tx[2] = (uint8_t)((command >> 8) & 0xFF); 82 | tx[3] = (uint8_t)(command & 0xFF); 83 | 84 | 85 | esp_err_t ret; 86 | spi_transaction_t trans; 87 | memset(&trans, 0, sizeof(spi_transaction_t)); 88 | trans.length = 8 * 4; 89 | trans.user = (void *) 1; 90 | trans.tx_buffer = tx; 91 | trans.flags = SPI_TRANS_USE_RXDATA; 92 | ret = spi_device_transmit(spi, &trans); 93 | ESP_ERROR_CHECK(ret); // TODO Error check 94 | 95 | return trans.rx_data[3] | (trans.rx_data[2] << 8) | (trans.rx_data[1] << 16) | (trans.rx_data[0] << 24); 96 | } 97 | 98 | void sendHandshake(uint32_t rv) { 99 | // handshake_data 11h+client_data[1]+client_data[2]+client_data[3] 100 | uint32_t handshake_data = (((rv >> 16) + 0xf) & 0xff) | 0x00006400; 101 | printf("Sending Handshake: %X", handshake_data); 102 | rv = send(handshake_data); 103 | printf("Response: %X", rv); 104 | } 105 | 106 | void sendROMHeader() { 107 | printf("Sending ROM Header"); 108 | uint32_t block; 109 | memset(&block, 0, sizeof(uint32_t)); 110 | // Send Header in blocks of two bytes 111 | for (uint32_t i = 0; i <= 0x5f; i++) { 112 | block = gba_header[2 * i]; 113 | block = gba_header[2 * i + 1] << 8 | block; 114 | fcnt += 2; 115 | 116 | send(block); 117 | printf("%X", block); 118 | } 119 | printf("Success"); 120 | uint32_t rv = send(0x00006200); // Transfer of header data completed 121 | printf("%X", rv); 122 | } 123 | 124 | void multiboot() { 125 | initSPI(); 126 | 127 | long romLength = sizeof(rom); 128 | uint32_t rom_size = sizeof(gba_header) + romLength; 129 | rom_size = (rom_size + 0xf) & 0xFFFFFFF0; // Align rom length to 16 130 | printf("ROM Size:\n"); 131 | printf("%X\n", rom_size); 132 | 133 | uint32_t rv; 134 | memset(&rv, 0, sizeof(uint32_t)); 135 | 136 | printf("Waiting for GBA\n"); 137 | while (rv != 0x72026202) { 138 | rv = send(0x00006202); 139 | } 140 | printf("GBA Found: \n"); 141 | printf("%X\n", rv); 142 | 143 | rv = 0; 144 | 145 | send(0x00006202); // Found GBA 146 | send(0x00006102); // Recognition OK 147 | 148 | sendROMHeader(); // Transfer C0h bytes header data in units of 16bits with no encrpytion 149 | 150 | rv = send(0x00006202); // Exchange master/slave info again 151 | printf("%X\n", rv); 152 | 153 | printf("Sending Palette\n"); 154 | // palette_data as "81h+color*10h+direction*8+speed*2", or as "0f1h+color*2" for fixed palette, whereas color=0..6, speed=0..3, direction=0..1. 155 | // Then wait until 0x73hh**** is received. hh represents client_data 156 | while (((rv >> 24) & 0xFF) != 0x73) { 157 | rv = send(0x000063D1); 158 | printf("%X\n", rv); 159 | } 160 | 161 | uint32_t client_data = ((rv >> 16) & 0xFF); // Random client generated data used for later handshake 162 | printf("Client Data:"); 163 | printf("%X\n", client_data); 164 | 165 | uint32_t m = ((rv & 0x00ff0000) >> 8) + 0xffff00d1; 166 | uint32_t h = ((rv & 0x00ff0000) >> 16) + 0xf; 167 | 168 | sendHandshake(rv); 169 | 170 | printf("Sending length information: "); 171 | printf("%X\n", (rom_size - 0x190) / 4); 172 | rv = send((rom_size - 0x190) / 4); // Send length information and receive random data[1-3] (seed) 173 | printf("%X\n", rv); 174 | 175 | uint32_t f = (((rv & 0x00ff0000) >> 8) + h) | 0xffff0000; 176 | uint32_t c = 0x0000c387; 177 | 178 | uint32_t bytes_sent = 0; 179 | uint32_t w, w2, bitt; 180 | int i = 0; 181 | 182 | printf("Sending ROM\n"); 183 | while (fcnt < rom_size) { 184 | if (bytes_sent == 32) { 185 | bytes_sent = 0; 186 | } 187 | 188 | w = rom[i] | (rom[i + 1] << 8) | (rom[i + 2] << 16) | (rom[i + 3] << 24); 189 | 190 | i = i + 4; 191 | bytes_sent += 4; 192 | 193 | if (fcnt % 0x80 == 0 || fcnt > 63488 || fcnt == rom_size) { 194 | printf("%X", fcnt); 195 | printf("/"); 196 | printf("%X\n", rom_size); 197 | } 198 | 199 | 200 | w2 = w; 201 | 202 | for (bitt = 0; bitt < 32; bitt++) { 203 | if ((c ^ w) & 0x01) { 204 | c = (c >> 1) ^ 0x0000c37b; 205 | } else { 206 | c = c >> 1; 207 | } 208 | w = w >> 1; 209 | } 210 | 211 | 212 | m = (0x6f646573 * m) + 1; 213 | rv = send(w2 ^ ((~(0x02000000 + fcnt)) + 1) ^ m ^ 0x43202f2f); 214 | 215 | fcnt = fcnt + 4; 216 | } 217 | printf("%X\n", rv); 218 | printf("ROM sent! Doing checksum now...\ne"); 219 | 220 | 221 | for (bitt = 0; bitt < 32; bitt++) { 222 | if ((c ^ f) & 0x01) { 223 | c = (c >> 1) ^ 0x0000c37b; 224 | } else { 225 | c = c >> 1; 226 | } 227 | 228 | f = f >> 1; 229 | } 230 | printf("CRC: "); 231 | printf("%X\n", c); 232 | 233 | printf("Waiting for CRC\n"); 234 | while (rv != 0x00750065) { 235 | rv = send(0x00000065); 236 | } 237 | 238 | 239 | rv = send(0x00000066); 240 | printf("%X\n", rv); 241 | 242 | printf("Exchanging CRC\n"); 243 | rv = send(c); 244 | printf("%X\n", rv); 245 | 246 | printf("Done!\n"); 247 | 248 | shutdownSPI(); 249 | printf("SPI shut down\n"); 250 | } -------------------------------------------------------------------------------- /circuit/GBA-BT-HID-cache.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # 74xx_74LS157 5 | # 6 | DEF 74xx_74LS157 U 0 40 Y Y 1 L N 7 | F0 "U" -300 750 50 H V C CNN 8 | F1 "74xx_74LS157" -300 -850 50 H V C CNN 9 | F2 "" 0 0 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | $FPLIST 12 | DIP?16* 13 | $ENDFPLIST 14 | DRAW 15 | S -300 700 300 -800 1 1 10 f 16 | X S 1 -500 -600 200 R 50 50 1 0 I 17 | X I1c 10 -500 -100 200 R 50 50 1 0 I 18 | X I0c 11 -500 0 200 R 50 50 1 0 I 19 | X Zd 12 500 -300 200 L 50 50 1 0 O 20 | X I1d 13 -500 -400 200 R 50 50 1 0 I 21 | X I0d 14 -500 -300 200 R 50 50 1 0 I 22 | X E 15 -500 -700 200 R 50 50 1 0 I I 23 | X VCC 16 0 900 200 D 50 50 1 0 W 24 | X I0a 2 -500 600 200 R 50 50 1 0 I 25 | X I1a 3 -500 500 200 R 50 50 1 0 I 26 | X Za 4 500 600 200 L 50 50 1 0 O 27 | X I0b 5 -500 300 200 R 50 50 1 0 I 28 | X I1b 6 -500 200 200 R 50 50 1 0 I 29 | X Zb 7 500 300 200 L 50 50 1 0 O 30 | X GND 8 0 -1000 200 U 50 50 1 0 W 31 | X Zc 9 500 0 200 L 50 50 1 0 O 32 | ENDDRAW 33 | ENDDEF 34 | # 35 | # Connector_Generic_Conn_01x06 36 | # 37 | DEF Connector_Generic_Conn_01x06 J 0 40 Y N 1 F N 38 | F0 "J" 0 300 50 H V C CNN 39 | F1 "Connector_Generic_Conn_01x06" 0 -450 50 H V C CNN 40 | F2 "" 0 0 50 H I C CNN 41 | F3 "" 0 0 50 H I C CNN 42 | $FPLIST 43 | Connector*:*_1x??_* 44 | $ENDFPLIST 45 | DRAW 46 | S -50 -295 0 -305 1 1 6 N 47 | S -50 -195 0 -205 1 1 6 N 48 | S -50 -95 0 -105 1 1 6 N 49 | S -50 5 0 -5 1 1 6 N 50 | S -50 105 0 95 1 1 6 N 51 | S -50 205 0 195 1 1 6 N 52 | S -50 250 50 -350 1 1 10 f 53 | X Pin_1 1 -200 200 150 R 50 50 1 1 P 54 | X Pin_2 2 -200 100 150 R 50 50 1 1 P 55 | X Pin_3 3 -200 0 150 R 50 50 1 1 P 56 | X Pin_4 4 -200 -100 150 R 50 50 1 1 P 57 | X Pin_5 5 -200 -200 150 R 50 50 1 1 P 58 | X Pin_6 6 -200 -300 150 R 50 50 1 1 P 59 | ENDDRAW 60 | ENDDEF 61 | # 62 | # Connector_Generic_GBA 63 | # 64 | DEF Connector_Generic_GBA J 0 40 Y N 1 F N 65 | F0 "J" 0 300 50 H V C CNN 66 | F1 "Connector_Generic_GBA" 0 -400 50 H V C CNN 67 | F2 "" 0 0 50 H I C CNN 68 | F3 "" 0 0 50 H I C CNN 69 | $FPLIST 70 | GBA 71 | $ENDFPLIST 72 | DRAW 73 | T 0 100 -200 50 0 0 0 CLK Normal 0 C C 74 | T 0 100 -300 50 0 0 0 GND Normal 0 C C 75 | T 0 100 -100 50 0 0 0 SD Normal 0 C C 76 | T 0 100 0 50 0 0 0 SI Normal 0 C C 77 | T 0 100 100 50 0 0 0 SO Normal 0 C C 78 | T 0 100 200 50 0 0 0 VCC Normal 0 C C 79 | S -50 -295 0 -305 1 1 6 N 80 | S -50 -195 0 -205 1 1 6 N 81 | S -50 -95 0 -105 1 1 6 N 82 | S -50 5 0 -5 1 1 6 N 83 | S -50 105 0 95 1 1 6 N 84 | S -50 205 0 195 1 1 6 N 85 | S -50 250 450 -350 1 1 10 f 86 | X Vcc 1 -200 200 150 R 50 50 1 1 O 87 | X SO 2 -200 100 150 R 50 50 1 1 O 88 | X SI 3 -200 0 150 R 50 50 1 1 I 89 | X SD 4 -200 -100 150 R 50 50 1 1 B 90 | X SC 5 -200 -200 150 R 50 50 1 1 B 91 | X GND 6 -200 -300 150 R 50 50 1 1 I 92 | ENDDRAW 93 | ENDDEF 94 | # 95 | # Connector_Generic_HC-05_breakout 96 | # 97 | DEF Connector_Generic_HC-05_breakout J 0 40 Y N 1 F N 98 | F0 "J" 0 300 50 H V C CNN 99 | F1 "Connector_Generic_HC-05_breakout" 0 -400 50 H V C CNN 100 | F2 "" 0 0 50 H I C CNN 101 | F3 "" 0 0 50 H I C CNN 102 | $FPLIST 103 | hc-05 104 | $ENDFPLIST 105 | DRAW 106 | T 0 50 -300 50 0 0 0 EN Normal 0 L C 107 | T 0 50 -100 50 0 0 0 GND Normal 0 L C 108 | T 0 50 100 50 0 0 0 RX Normal 0 L C 109 | T 0 50 200 50 0 0 0 STATE Normal 0 L C 110 | T 0 100 0 50 0 0 0 TX Normal 0 C C 111 | T 0 50 -200 50 0 0 0 VCC Normal 0 L C 112 | S -50 -295 0 -305 1 1 6 N 113 | S -50 -195 0 -205 1 1 6 N 114 | S -50 -95 0 -105 1 1 6 N 115 | S -50 5 0 -5 1 1 6 N 116 | S -50 105 0 95 1 1 6 N 117 | S -50 205 0 195 1 1 6 N 118 | S -50 250 550 -350 1 1 10 f 119 | X Pin_1 1 -200 200 150 R 50 50 1 1 O 120 | X Pin_2 2 -200 100 150 R 50 50 1 1 O 121 | X Pin_3 3 -200 0 150 R 50 50 1 1 P 122 | X Pin_4 4 -200 -100 150 R 50 50 1 1 W 123 | X Pin_5 5 -200 -200 150 R 50 50 1 1 W 124 | X Pin_6 6 -200 -300 150 R 50 50 1 1 I 125 | ENDDRAW 126 | ENDDEF 127 | # 128 | # Device_C_Small 129 | # 130 | DEF Device_C_Small C 0 10 N N 1 F N 131 | F0 "C" 10 70 50 H V L CNN 132 | F1 "Device_C_Small" 10 -80 50 H V L CNN 133 | F2 "" 0 0 50 H I C CNN 134 | F3 "" 0 0 50 H I C CNN 135 | $FPLIST 136 | C_* 137 | $ENDFPLIST 138 | DRAW 139 | P 2 0 1 13 -60 -20 60 -20 N 140 | P 2 0 1 12 -60 20 60 20 N 141 | X ~ 1 0 100 80 D 50 50 1 1 P 142 | X ~ 2 0 -100 80 U 50 50 1 1 P 143 | ENDDRAW 144 | ENDDEF 145 | # 146 | # Device_Crystal 147 | # 148 | DEF Device_Crystal Y 0 40 N N 1 F N 149 | F0 "Y" 0 150 50 H V C CNN 150 | F1 "Device_Crystal" 0 -150 50 H V C CNN 151 | F2 "" 0 0 50 H I C CNN 152 | F3 "" 0 0 50 H I C CNN 153 | $FPLIST 154 | Crystal* 155 | $ENDFPLIST 156 | DRAW 157 | S -45 100 45 -100 0 1 12 N 158 | P 2 0 1 0 -100 0 -75 0 N 159 | P 2 0 1 20 -75 -50 -75 50 N 160 | P 2 0 1 20 75 -50 75 50 N 161 | P 2 0 1 0 100 0 75 0 N 162 | X 1 1 -150 0 50 R 50 50 1 1 P 163 | X 2 2 150 0 50 L 50 50 1 1 P 164 | ENDDRAW 165 | ENDDEF 166 | # 167 | # Device_R_Small 168 | # 169 | DEF Device_R_Small R 0 10 N N 1 F N 170 | F0 "R" 30 20 50 H V L CNN 171 | F1 "Device_R_Small" 30 -40 50 H V L CNN 172 | F2 "" 0 0 50 H I C CNN 173 | F3 "" 0 0 50 H I C CNN 174 | $FPLIST 175 | R_* 176 | $ENDFPLIST 177 | DRAW 178 | S -30 70 30 -70 0 1 8 N 179 | X ~ 1 0 100 30 D 50 50 1 1 P 180 | X ~ 2 0 -100 30 U 50 50 1 1 P 181 | ENDDRAW 182 | ENDDEF 183 | # 184 | # MCU_Microchip_ATmega_ATmega328P-PU 185 | # 186 | DEF MCU_Microchip_ATmega_ATmega328P-PU U 0 20 Y Y 1 F N 187 | F0 "U" -500 1450 50 H V L BNN 188 | F1 "MCU_Microchip_ATmega_ATmega328P-PU" 100 -1450 50 H V L TNN 189 | F2 "Package_DIP:DIP-28_W7.62mm" 0 0 50 H I C CIN 190 | F3 "" 0 0 50 H I C CNN 191 | ALIAS ATmega48P-20PU ATmega48A-PU ATmega48PA-PU ATmega88PV-10PU ATmega88P-20PU ATmega88A-PU ATmega88PA-PU ATmega168PV-10PU ATmega168P-20PU ATmega168A-PU ATmega168PA-PU ATmega328-PU ATmega328P-PU 192 | $FPLIST 193 | DIP*W7.62mm* 194 | $ENDFPLIST 195 | DRAW 196 | S -500 -1400 500 1400 0 1 10 f 197 | X ~RESET~/PC6 1 600 -300 100 L 50 50 1 1 T 198 | X XTAL2/PB7 10 600 500 100 L 50 50 1 1 T 199 | X PD5 11 600 -1000 100 L 50 50 1 1 T 200 | X PD6 12 600 -1100 100 L 50 50 1 1 T 201 | X PD7 13 600 -1200 100 L 50 50 1 1 T 202 | X PB0 14 600 1200 100 L 50 50 1 1 T 203 | X PB1 15 600 1100 100 L 50 50 1 1 T 204 | X PB2 16 600 1000 100 L 50 50 1 1 T 205 | X PB3 17 600 900 100 L 50 50 1 1 T 206 | X PB4 18 600 800 100 L 50 50 1 1 T 207 | X PB5 19 600 700 100 L 50 50 1 1 T 208 | X PD0 2 600 -500 100 L 50 50 1 1 T 209 | X AVCC 20 100 1500 100 D 50 50 1 1 W 210 | X AREF 21 -600 1200 100 R 50 50 1 1 P 211 | X GND 22 0 -1500 100 U 50 50 1 1 P N 212 | X PC0 23 600 300 100 L 50 50 1 1 T 213 | X PC1 24 600 200 100 L 50 50 1 1 T 214 | X PC2 25 600 100 100 L 50 50 1 1 T 215 | X PC3 26 600 0 100 L 50 50 1 1 T 216 | X PC4 27 600 -100 100 L 50 50 1 1 T 217 | X PC5 28 600 -200 100 L 50 50 1 1 T 218 | X PD1 3 600 -600 100 L 50 50 1 1 T 219 | X PD2 4 600 -700 100 L 50 50 1 1 T 220 | X PD3 5 600 -800 100 L 50 50 1 1 T 221 | X PD4 6 600 -900 100 L 50 50 1 1 T 222 | X VCC 7 0 1500 100 D 50 50 1 1 W 223 | X GND 8 0 -1500 100 U 50 50 1 1 W 224 | X XTAL1/PB6 9 600 600 100 L 50 50 1 1 T 225 | ENDDRAW 226 | ENDDEF 227 | # 228 | # MCU_Microchip_PIC16_HCF4066BE 229 | # 230 | DEF MCU_Microchip_PIC16_HCF4066BE U 0 40 Y Y 1 F N 231 | F0 "U" 200 500 50 H V L CNN 232 | F1 "MCU_Microchip_PIC16_HCF4066BE" 200 400 50 H V L CNN 233 | F2 "" 0 -100 50 H I C CIN 234 | F3 "" 0 -100 50 H I C CNN 235 | ALIAS PIC16C505-IP 236 | $FPLIST 237 | PDIP* 238 | DIP* 239 | $ENDFPLIST 240 | DRAW 241 | S -750 350 750 -700 0 1 10 f 242 | X IN/OUT_A 1 -900 200 150 R 50 50 1 1 B 243 | X OUT/IN_D 10 -900 -100 150 R 50 50 1 1 B 244 | X IN/OUT_D 11 900 -100 150 L 50 50 1 1 B 245 | X CTR_D 12 -900 -600 150 R 50 50 1 1 I 246 | X CTR_A 13 -900 -300 150 R 50 50 1 1 I 247 | X VDD 14 0 500 150 D 50 50 1 1 W 248 | X OUT/IN_A 2 900 200 150 L 50 50 1 1 B 249 | X OUT_IN/B 3 -900 100 150 R 50 50 1 1 B 250 | X IN/OUT_B 4 900 100 150 L 50 50 1 1 B 251 | X CTR_B 5 -900 -400 150 R 50 50 1 1 I 252 | X CTR_C 6 -900 -500 150 R 50 50 1 1 I 253 | X VSS 7 0 -850 150 U 50 50 1 1 W 254 | X IN/OUT_C 8 -900 0 150 R 50 50 1 1 B 255 | X OUT/IN_C 9 900 0 150 L 50 50 1 1 B 256 | ENDDRAW 257 | ENDDEF 258 | # 259 | # Memory_Flash_W25Q32DIP 260 | # 261 | DEF Memory_Flash_W25Q32DIP U 0 20 Y Y 1 F N 262 | F0 "U" -350 350 50 H V C CNN 263 | F1 "Memory_Flash_W25Q32DIP" 300 350 50 H V C CNN 264 | F2 "Package_DIP:DIP-8_W7.62mm" 0 0 50 H I C CNN 265 | F3 "" 0 0 50 H I C CNN 266 | $FPLIST 267 | SOIC*5.23x5.23mm*P1.27mm* 268 | $ENDFPLIST 269 | DRAW 270 | S -400 300 400 -300 0 1 10 f 271 | X ~CS 1 -500 100 100 R 50 50 1 1 I 272 | X DO(IO1) 2 500 100 100 L 50 50 1 1 B 273 | X IO2 3 500 -100 100 L 50 50 1 1 B 274 | X GND 4 0 -400 100 U 50 50 1 1 W 275 | X DI(IO0) 5 500 200 100 L 50 50 1 1 B 276 | X CLK 6 -500 -100 100 R 50 50 1 1 I 277 | X IO3 7 500 -200 100 L 50 50 1 1 B 278 | X VCC 8 0 400 100 D 50 50 1 1 W 279 | ENDDRAW 280 | ENDDEF 281 | # 282 | # power_GND 283 | # 284 | DEF power_GND #PWR 0 0 Y Y 1 F P 285 | F0 "#PWR" 0 -250 50 H I C CNN 286 | F1 "power_GND" 0 -150 50 H V C CNN 287 | F2 "" 0 0 50 H I C CNN 288 | F3 "" 0 0 50 H I C CNN 289 | DRAW 290 | P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N 291 | X GND 1 0 0 0 D 50 50 1 1 W N 292 | ENDDRAW 293 | ENDDEF 294 | # 295 | # power_VCC 296 | # 297 | DEF power_VCC #PWR 0 0 Y Y 1 F P 298 | F0 "#PWR" 0 -150 50 H I C CNN 299 | F1 "power_VCC" 0 150 50 H V C CNN 300 | F2 "" 0 0 50 H I C CNN 301 | F3 "" 0 0 50 H I C CNN 302 | DRAW 303 | C 0 75 25 0 1 0 N 304 | P 2 0 1 0 0 0 0 50 N 305 | X VCC 1 0 0 0 U 50 50 1 1 W N 306 | ENDDRAW 307 | ENDDEF 308 | # 309 | #End Library 310 | -------------------------------------------------------------------------------- /esp32/main/hc05.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Shyri 3 | // Simulates a subset of HC-05 Bluetooth module commands and operations 4 | // 5 | #include "hc05.h" 6 | 7 | #include "btstack.h" 8 | #include "btstack_event.h" 9 | #include "btstack_stdin.h" 10 | 11 | #include "freertos/FreeRTOS.h" 12 | #include "freertos/task.h" 13 | #include "freertos/queue.h" 14 | #include "freertos/semphr.h" 15 | #include "btstack_run_loop_freertos.h" 16 | #include "driver/gpio.h" 17 | 18 | #define DEVICE_NAME "GBA Bluetooth" 19 | 20 | #define COM_MODE_REQUEST "$$$" 21 | #define COM_MODE_RESPONSE "CMD" 22 | #define AUTOCONNECT_REQUEST "CFR" 23 | #define CONNECTED_RESULT "%CONNECT" 24 | 25 | 26 | static bool inCommandMode = false; 27 | 28 | typedef enum DESCRIPTOR_BUTTONS { 29 | DPAD_N = 0x00, 30 | DPAD_NE = 0x01, 31 | DPAD_E = 0x02, 32 | DPAD_SE = 0x03, 33 | DPAD_S = 0x04, 34 | DPAD_SW = 0x05, 35 | DPAD_W = 0x06, 36 | DPAD_NW = 0x07, 37 | DPAD_RELEASED = 0x08, 38 | 39 | HID_KEY_A = 0x10, 40 | HID_KEY_B = 0x20, 41 | 42 | HID_KEY_R = 0x40, 43 | HID_KEY_L = 0x80, 44 | 45 | HID_KEY_START = 0x01, 46 | HID_KEY_SELECT = 0x02, 47 | 48 | } DESCRIPTOR_BUTTONs_BITS; 49 | 50 | typedef enum HC05_BUTTONS { 51 | BUTTON_A = (1 << 0), 52 | BUTTON_B = (1 << 1), 53 | BUTTON_L = (1 << 4), 54 | BUTTON_R = (1 << 5), 55 | BUTTON_SELECT = (1 << 4), 56 | BUTTON_START = (1 << 5), 57 | PAD_DOWN = 0x7F, 58 | PAD_UP = 0x80, 59 | PAD_RIGHT = 0x7F, 60 | PAD_LEFT = 0x80 61 | } HC05_BUTTONS_BITS; 62 | 63 | const uint8_t hid_descriptor_gba[] = { 64 | 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 65 | 0x09, 0x05, // Usage (Game Pad) 66 | 0xA1, 0x01, // Collection (Application) 67 | //Padding 68 | 0x95, 0x03, // REPORT_COUNT = 3 69 | 0x75, 0x08, // REPORT_SIZE = 8 70 | 0x81, 0x03, // INPUT = Cnst,Var,Abs 71 | //DPAD 72 | 0x09, 0x39, // Usage (Hat switch) 73 | 0x15, 0x00, // Logical Minimum (0) 74 | 0x25, 0x07, // Logical Maximum (7) 75 | 0x35, 0x00, // Physical Minimum (0) 76 | 0x46, 0x3B, 0x01, // Physical Maximum (315) 77 | 0x65, 0x14, // Unit (System: English Rotation, Length: Centimeter) 78 | 0x75, 0x04, // Report Size (4) 79 | 0x95, 0x01, // Report Count (1) 80 | 0x81, 0x42, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,Null State) 81 | //Buttons 82 | 0x65, 0x00, // Unit (None) 83 | 0x05, 0x09, // Usage Page (Button) 84 | 0x19, 0x01, // Usage Minimum (0x01) 85 | 0x29, 0x0E, // Usage Maximum (0x0E) 86 | 0x15, 0x00, // Logical Minimum (0) 87 | 0x25, 0x01, // Logical Maximum (1) 88 | 0x75, 0x01, // Report Size (1) 89 | 0x95, 0x0E, // Report Count (14) 90 | 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 91 | //Padding 92 | 0x06, 0x00, 0xFF, // Usage Page (Vendor Defined 0xFF00) 93 | 0x09, 0x20, // Usage (0x20) 94 | 0x75, 0x06, // Report Size (6) 95 | 0x95, 0x01, // Report Count (1) 96 | 0x15, 0x00, // Logical Minimum (0) 97 | 0x25, 0x7F, // Logical Maximum (127) 98 | 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 99 | 0x81, 0x02, 100 | 0xc0 101 | }; 102 | 103 | static uint8_t send_report[] = {0xa1, 0x11, 0xc0, 0x00, 0x08, 0}; 104 | 105 | static uint8_t hid_service_buffer[400]; 106 | static uint8_t device_id_sdp_service_buffer[400]; 107 | static const char hid_device_name[] = DEVICE_NAME; 108 | static uint16_t hid_cid = 0; 109 | 110 | static uint8_t but1_send = DPAD_RELEASED; 111 | static uint8_t but2_send = 0; 112 | static uint8_t but1_count = 0; 113 | static uint8_t but2_count = 0; 114 | 115 | static bool connected = false; 116 | 117 | static btstack_packet_callback_registration_t hci_event_callback_registration; 118 | 119 | void interpretMessage(int length, char *message); 120 | 121 | void initBluetooth(); 122 | 123 | void updateButtons(const char *message); 124 | 125 | static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t packet_size); 126 | 127 | void connectLastDevice(); 128 | 129 | esp_err_t save_addr(bd_addr_t *addr); 130 | 131 | esp_err_t read_addr(bd_addr_t *addr); 132 | 133 | 134 | static void read_uart() { 135 | while (1) { 136 | checkHC05(); 137 | vTaskDelay(2); 138 | } 139 | } 140 | 141 | void initHC05() { 142 | initBluetooth(); 143 | initUART(); 144 | xTaskCreate(read_uart, "read_uart", 2048, NULL, 1, NULL); 145 | } 146 | 147 | void initBluetooth() { 148 | hci_event_callback_registration.callback = &packet_handler; 149 | hci_add_event_handler(&hci_event_callback_registration); 150 | hci_register_sco_packet_handler(&packet_handler); 151 | gap_discoverable_control(1); 152 | gap_set_class_of_device(0x2508); 153 | gap_set_local_name(DEVICE_NAME); 154 | 155 | l2cap_init(); 156 | sdp_init(); 157 | memset(hid_service_buffer, 0, sizeof(hid_service_buffer)); 158 | hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2508, 33, 0, 0, 0, hid_descriptor_gba, 159 | sizeof(hid_descriptor_gba), hid_device_name); 160 | sdp_register_service(hid_service_buffer); 161 | device_id_create_sdp_record(device_id_sdp_service_buffer, 0x10003, DEVICE_ID_VENDOR_ID_SOURCE_BLUETOOTH, 162 | BLUETOOTH_COMPANY_ID_BLUEKITCHEN_GMBH, 1, 1); 163 | sdp_register_service(device_id_sdp_service_buffer); 164 | hid_device_init(1, sizeof(hid_descriptor_gba), hid_descriptor_gba); 165 | hid_device_register_packet_handler(&packet_handler); 166 | 167 | hci_power_control(HCI_POWER_ON); 168 | } 169 | 170 | void checkHC05() { 171 | char message[50]; 172 | int length = uartRead(message); 173 | 174 | if (length > 0) { 175 | interpretMessage(length, message); 176 | } 177 | } 178 | 179 | void interpretMessage(int length, char *message) { 180 | if (inCommandMode) { 181 | if (strncmp((const char *) message, AUTOCONNECT_REQUEST, length - 1) == 0) { // length-1 cause ending 0x0D 182 | inCommandMode = false; 183 | connectLastDevice(); 184 | } 185 | } else { 186 | if (strncmp((const char *) message, COM_MODE_REQUEST, length) == 0) { 187 | inCommandMode = true; 188 | uartWrite(COM_MODE_RESPONSE); 189 | } else if (connected) { 190 | // Check headers 191 | if (message[0] == 0xFD && message[1] == 0x06) { 192 | // Get HC-05 buttons 193 | updateButtons(message); 194 | } else if (message[0] == 0x00 && message[1] == 0x0D) { 195 | // Disconnection requested 196 | hid_device_disconnect(hid_cid); 197 | } 198 | } 199 | } 200 | } 201 | 202 | void bin(unsigned n) { 203 | unsigned i; 204 | for (i = 1 << 7; i > 0; i = i / 2) 205 | (n & i)? printf("1"): printf("0"); 206 | } 207 | 208 | void updateButtons(const char *message) { 209 | uint8_t xAxis = message[2]; 210 | uint8_t yAxis = message[3]; 211 | uint8_t buttons1 = message[6]; 212 | uint8_t buttons2 = message[7]; 213 | 214 | int dpad = 0; 215 | but1_send = 0; 216 | but2_send = 0; 217 | 218 | if (yAxis == PAD_DOWN) { 219 | if (xAxis == PAD_LEFT) { 220 | dpad = DPAD_SW; 221 | } else if (xAxis == PAD_RIGHT) { 222 | dpad = DPAD_SE; 223 | } else { 224 | dpad = DPAD_S; 225 | } 226 | } else if (yAxis == PAD_UP) { 227 | if (xAxis == PAD_LEFT) { 228 | dpad = DPAD_NW; 229 | } else if (xAxis == PAD_RIGHT) { 230 | dpad = DPAD_NE; 231 | } else { 232 | dpad = DPAD_N; 233 | } 234 | } else if (xAxis == PAD_LEFT) { 235 | dpad = DPAD_W; 236 | } else if (xAxis == PAD_RIGHT) { 237 | dpad = DPAD_E; 238 | } else { 239 | dpad = DPAD_RELEASED; 240 | } 241 | 242 | if (buttons1 & BUTTON_A) { 243 | but1_send += HID_KEY_A; 244 | } 245 | 246 | if (buttons1 & BUTTON_B) { 247 | but1_send += HID_KEY_B; 248 | } 249 | 250 | if (buttons1 & BUTTON_L) { 251 | but1_send += HID_KEY_L; 252 | } 253 | 254 | if (buttons1 & BUTTON_R) { 255 | but1_send += HID_KEY_R; 256 | } 257 | 258 | if (buttons2 & BUTTON_START) { 259 | but2_send += HID_KEY_START; 260 | } 261 | 262 | if (buttons2 & BUTTON_SELECT) { 263 | but2_send += HID_KEY_SELECT; 264 | } 265 | 266 | but1_send += dpad; 267 | 268 | printf("but1: "); 269 | bin((uint8_t) but1_send); 270 | printf("\nbut2: "); 271 | bin((uint8_t) but2_send); 272 | printf("\n"); 273 | } 274 | 275 | 276 | static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t packet_size) { 277 | UNUSED(channel); 278 | UNUSED(packet_size); 279 | 280 | bd_addr_t event_addr; 281 | 282 | switch (packet_type) { 283 | case HCI_EVENT_PACKET: 284 | switch (packet[0]) { 285 | case HCI_EVENT_HID_META: 286 | switch (hci_event_hid_meta_get_subevent_code(packet)) { 287 | case HID_SUBEVENT_CONNECTION_OPENED: 288 | if (hid_subevent_connection_opened_get_status(packet)) return; 289 | hid_cid = hid_subevent_connection_opened_get_hid_cid(packet); 290 | hid_device_request_can_send_now_event(hid_cid); //start loop 291 | log_info("HID Connected"); 292 | 293 | hid_subevent_connection_opened_get_bd_addr(packet, event_addr); 294 | char *address = bd_addr_to_str(event_addr); 295 | printf("Saving address: %s\n", address); 296 | save_addr(event_addr); 297 | 298 | connected = true; 299 | 300 | uartWrite(CONNECTED_RESULT); 301 | 302 | break; 303 | case HID_SUBEVENT_CONNECTION_CLOSED: 304 | log_info("HID Disconnected"); 305 | hid_cid = 0; 306 | break; 307 | case HID_SUBEVENT_CAN_SEND_NOW: 308 | 309 | // printf("but2_send 0x%.2X \n", (uint8_t) but2_send); 310 | send_report[4] = but1_send; 311 | send_report[5] = but2_send; 312 | hid_device_send_interrupt_message(hid_cid, &send_report[0], sizeof(send_report)); 313 | hid_device_request_can_send_now_event(hid_cid); 314 | break; 315 | default: 316 | break; 317 | } 318 | break; 319 | 320 | case HCI_EVENT_DISCONNECTION_COMPLETE: 321 | printf("Disconnected\n"); 322 | connected = false; 323 | break; 324 | default: 325 | break; 326 | } 327 | break; 328 | default: 329 | break; 330 | } 331 | } 332 | 333 | void connectLastDevice() { 334 | bd_addr_t mac_addr; 335 | if (read_addr(&mac_addr) == ESP_OK) { 336 | char *address = bd_addr_to_str(mac_addr); 337 | printf("Saved Address: %s \n", address); 338 | 339 | hid_device_connect(mac_addr, &hid_cid); 340 | } else { 341 | uartWrite("ERR"); 342 | } 343 | } 344 | 345 | esp_err_t save_addr(bd_addr_t *addr) { 346 | nvs_handle my_handle; 347 | esp_err_t err; 348 | 349 | err = nvs_open(STORAGE_NAMESPACE, NVS_READWRITE, &my_handle); 350 | if (err != ESP_OK) return err; 351 | 352 | size_t size = sizeof(bd_addr_t); 353 | err = nvs_set_blob(my_handle, "mac_addr", addr, size); 354 | if (err != ESP_OK) return err; 355 | 356 | err = nvs_commit(my_handle); 357 | if (err != ESP_OK) return err; 358 | 359 | nvs_close(my_handle); 360 | 361 | return ESP_OK; 362 | } 363 | 364 | 365 | esp_err_t read_addr(bd_addr_t *addr) { 366 | nvs_handle my_handle; 367 | esp_err_t err; 368 | 369 | err = nvs_open(STORAGE_NAMESPACE, NVS_READWRITE, &my_handle); 370 | if (err != ESP_OK) return err; 371 | 372 | size_t size = sizeof(bd_addr_t); 373 | nvs_get_blob(my_handle, "mac_addr", addr, &size); 374 | if (err != ESP_OK && err != ESP_ERR_NVS_NOT_FOUND) return err; 375 | 376 | nvs_close(my_handle); 377 | return err; 378 | } -------------------------------------------------------------------------------- /circuit/GBA-BT-HID.bak: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 4 2 | LIBS:GBA-BT-HID-cache 3 | EELAYER 29 0 4 | EELAYER END 5 | $Descr A4 11693 8268 6 | encoding utf-8 7 | Sheet 1 1 8 | Title "" 9 | Date "" 10 | Rev "" 11 | Comp "" 12 | Comment1 "" 13 | Comment2 "" 14 | Comment3 "" 15 | Comment4 "" 16 | $EndDescr 17 | $Comp 18 | L MCU_Microchip_ATmega:ATmega328P-PU U1 19 | U 1 1 5D036493 20 | P 2100 2600 21 | F 0 "U1" H 1456 2646 50 0000 R CNN 22 | F 1 "ATmega328P-PU" H 1456 2555 50 0000 R CNN 23 | F 2 "Package_DIP:DIP-28_W7.62mm" H 2100 2600 50 0001 C CIN 24 | F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf" H 2100 2600 50 0001 C CNN 25 | 1 2100 2600 26 | 1 0 0 -1 27 | $EndComp 28 | $Comp 29 | L Memory_Flash:W25Q32DIP U2 30 | U 1 1 5D0384C3 31 | P 4200 1500 32 | F 0 "U2" H 3900 2000 50 0000 C CNN 33 | F 1 "W25Q32DIP" H 3900 1900 50 0000 C CNN 34 | F 2 "Package_DIP:DIP-8_W7.62mm" H 4200 1500 50 0001 C CNN 35 | F 3 "http://www.winbond.com/resource-files/w25q32jv%20revg%2003272018%20plus.pdf" H 4200 1500 50 0001 C CNN 36 | 1 4200 1500 37 | 1 0 0 -1 38 | $EndComp 39 | $Comp 40 | L power:VCC #PWR0101 41 | U 1 1 5D038C4F 42 | P 2200 1100 43 | F 0 "#PWR0101" H 2200 950 50 0001 C CNN 44 | F 1 "VCC" H 2217 1273 50 0000 C CNN 45 | F 2 "" H 2200 1100 50 0001 C CNN 46 | F 3 "" H 2200 1100 50 0001 C CNN 47 | 1 2200 1100 48 | 1 0 0 -1 49 | $EndComp 50 | Wire Wire Line 51 | 2100 1100 2200 1100 52 | Connection ~ 2200 1100 53 | $Comp 54 | L power:GND #PWR0102 55 | U 1 1 5D039557 56 | P 2100 4100 57 | F 0 "#PWR0102" H 2100 3850 50 0001 C CNN 58 | F 1 "GND" H 2105 3927 50 0000 C CNN 59 | F 2 "" H 2100 4100 50 0001 C CNN 60 | F 3 "" H 2100 4100 50 0001 C CNN 61 | 1 2100 4100 62 | 1 0 0 -1 63 | $EndComp 64 | $Comp 65 | L Device:Crystal Y1 66 | U 1 1 5D039C0A 67 | P 3150 2200 68 | F 0 "Y1" H 3150 1932 50 0000 C CNN 69 | F 1 "16Mhz" H 3150 2023 50 0000 C CNN 70 | F 2 "Crystal:Resonator-2Pin_W10.0mm_H5.0mm" H 3150 2200 50 0001 C CNN 71 | F 3 "~" H 3150 2200 50 0001 C CNN 72 | 1 3150 2200 73 | -1 0 0 1 74 | $EndComp 75 | Wire Wire Line 76 | 2700 2000 3300 2000 77 | Wire Wire Line 78 | 3300 2000 3300 2200 79 | Wire Wire Line 80 | 3000 2100 3000 2200 81 | Wire Wire Line 82 | 2700 2100 3000 2100 83 | $Comp 84 | L Device:C_Small C1 85 | U 1 1 5D03C5C3 86 | P 3000 2300 87 | F 0 "C1" H 3092 2346 50 0000 L CNN 88 | F 1 "22pF" H 3092 2255 50 0000 L CNN 89 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 3000 2300 50 0001 C CNN 90 | F 3 "~" H 3000 2300 50 0001 C CNN 91 | 1 3000 2300 92 | 1 0 0 -1 93 | $EndComp 94 | Connection ~ 3000 2200 95 | $Comp 96 | L Device:C_Small C2 97 | U 1 1 5D03CEDC 98 | P 3300 2300 99 | F 0 "C2" H 3392 2346 50 0000 L CNN 100 | F 1 "22pF" H 3392 2255 50 0000 L CNN 101 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 3300 2300 50 0001 C CNN 102 | F 3 "~" H 3300 2300 50 0001 C CNN 103 | 1 3300 2300 104 | 1 0 0 -1 105 | $EndComp 106 | Connection ~ 3300 2200 107 | $Comp 108 | L power:GND #PWR0103 109 | U 1 1 5D03D614 110 | P 3000 2400 111 | F 0 "#PWR0103" H 3000 2150 50 0001 C CNN 112 | F 1 "GND" H 3005 2227 50 0000 C CNN 113 | F 2 "" H 3000 2400 50 0001 C CNN 114 | F 3 "" H 3000 2400 50 0001 C CNN 115 | 1 3000 2400 116 | 1 0 0 -1 117 | $EndComp 118 | $Comp 119 | L power:GND #PWR0104 120 | U 1 1 5D03DCED 121 | P 3300 2400 122 | F 0 "#PWR0104" H 3300 2150 50 0001 C CNN 123 | F 1 "GND" H 3305 2227 50 0000 C CNN 124 | F 2 "" H 3300 2400 50 0001 C CNN 125 | F 3 "" H 3300 2400 50 0001 C CNN 126 | 1 3300 2400 127 | 1 0 0 -1 128 | $EndComp 129 | Wire Wire Line 130 | 2700 1600 2800 1600 131 | Wire Wire Line 132 | 2800 1600 2800 1400 133 | Wire Wire Line 134 | 2800 1400 3700 1400 135 | Wire Wire Line 136 | 2700 1900 3050 1900 137 | Wire Wire Line 138 | 3050 1900 3050 1600 139 | Wire Wire Line 140 | 3050 1600 3700 1600 141 | $Comp 142 | L Connector_Generic:Conn_01x06 J1 143 | U 1 1 5D03F034 144 | P 3600 3100 145 | F 0 "J1" H 3680 3092 50 0000 L CNN 146 | F 1 "Conn_01x06" H 3680 3001 50 0000 L CNN 147 | F 2 "Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical" H 3600 3100 50 0001 C CNN 148 | F 3 "~" H 3600 3100 50 0001 C CNN 149 | 1 3600 3100 150 | 1 0 0 -1 151 | $EndComp 152 | Wire Wire Line 153 | 2700 3100 3400 3100 154 | Wire Wire Line 155 | 2700 3000 3000 3000 156 | Wire Wire Line 157 | 2700 3200 3400 3200 158 | Wire Wire Line 159 | 2700 3300 3100 3300 160 | $Comp 161 | L Device:R_Small R1 162 | U 1 1 5D042C79 163 | P 3000 2900 164 | F 0 "R1" H 3059 2946 50 0000 L CNN 165 | F 1 "10K" H 3059 2855 50 0000 L CNN 166 | F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" H 3000 2900 50 0001 C CNN 167 | F 3 "~" H 3000 2900 50 0001 C CNN 168 | 1 3000 2900 169 | 1 0 0 -1 170 | $EndComp 171 | Connection ~ 3000 3000 172 | Wire Wire Line 173 | 3000 3000 3400 3000 174 | $Comp 175 | L power:VCC #PWR0105 176 | U 1 1 5D04333C 177 | P 3400 2900 178 | F 0 "#PWR0105" H 3400 2750 50 0001 C CNN 179 | F 1 "VCC" H 3417 3073 50 0000 C CNN 180 | F 2 "" H 3400 2900 50 0001 C CNN 181 | F 3 "" H 3400 2900 50 0001 C CNN 182 | 1 3400 2900 183 | 1 0 0 -1 184 | $EndComp 185 | $Comp 186 | L power:GND #PWR0106 187 | U 1 1 5D0438C4 188 | P 3400 3400 189 | F 0 "#PWR0106" H 3400 3150 50 0001 C CNN 190 | F 1 "GND" H 3405 3227 50 0000 C CNN 191 | F 2 "" H 3400 3400 50 0001 C CNN 192 | F 3 "" H 3400 3400 50 0001 C CNN 193 | 1 3400 3400 194 | 1 0 0 -1 195 | $EndComp 196 | $Comp 197 | L power:VCC #PWR0107 198 | U 1 1 5D0440E6 199 | P 3000 2800 200 | F 0 "#PWR0107" H 3000 2650 50 0001 C CNN 201 | F 1 "VCC" H 3017 2973 50 0000 C CNN 202 | F 2 "" H 3000 2800 50 0001 C CNN 203 | F 3 "" H 3000 2800 50 0001 C CNN 204 | 1 3000 2800 205 | 1 0 0 -1 206 | $EndComp 207 | $Comp 208 | L Device:R_Small R2 209 | U 1 1 5D049EC7 210 | P 3100 3400 211 | F 0 "R2" H 3159 3446 50 0000 L CNN 212 | F 1 "1K" H 3159 3355 50 0000 L CNN 213 | F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" H 3100 3400 50 0001 C CNN 214 | F 3 "~" H 3100 3400 50 0001 C CNN 215 | 1 3100 3400 216 | 1 0 0 -1 217 | $EndComp 218 | Connection ~ 3100 3300 219 | Wire Wire Line 220 | 3100 3300 3400 3300 221 | $Comp 222 | L power:GND #PWR0108 223 | U 1 1 5D04A7B8 224 | P 3100 3500 225 | F 0 "#PWR0108" H 3100 3250 50 0001 C CNN 226 | F 1 "GND" H 3105 3327 50 0000 C CNN 227 | F 2 "" H 3100 3500 50 0001 C CNN 228 | F 3 "" H 3100 3500 50 0001 C CNN 229 | 1 3100 3500 230 | 1 0 0 -1 231 | $EndComp 232 | $Comp 233 | L 74xx:74LS157 U3 234 | U 1 1 5D04BDDE 235 | P 6200 2650 236 | F 0 "U3" H 5950 3550 50 0000 C CNN 237 | F 1 "74LS157" H 5950 3450 50 0000 C CNN 238 | F 2 "Package_DIP:DIP-16_W7.62mm" H 6200 2650 50 0001 C CNN 239 | F 3 "http://www.ti.com/lit/gpn/sn74LS157" H 6200 2650 50 0001 C CNN 240 | 1 6200 2650 241 | 1 0 0 -1 242 | $EndComp 243 | Wire Wire Line 244 | 4700 1700 4850 1700 245 | Wire Wire Line 246 | 4850 1700 4850 1600 247 | Wire Wire Line 248 | 4850 1100 4200 1100 249 | Wire Wire Line 250 | 4700 1600 4850 1600 251 | Connection ~ 4850 1600 252 | Wire Wire Line 253 | 4850 1600 4850 1100 254 | $Comp 255 | L power:GND #PWR0109 256 | U 1 1 5D04ED2D 257 | P 4200 1900 258 | F 0 "#PWR0109" H 4200 1650 50 0001 C CNN 259 | F 1 "GND" H 4205 1727 50 0000 C CNN 260 | F 2 "" H 4200 1900 50 0001 C CNN 261 | F 3 "" H 4200 1900 50 0001 C CNN 262 | 1 4200 1900 263 | 1 0 0 -1 264 | $EndComp 265 | $Comp 266 | L power:VCC #PWR0110 267 | U 1 1 5D04F35F 268 | P 4200 1100 269 | F 0 "#PWR0110" H 4200 950 50 0001 C CNN 270 | F 1 "VCC" H 4200 1250 50 0000 C CNN 271 | F 2 "" H 4200 1100 50 0001 C CNN 272 | F 3 "" H 4200 1100 50 0001 C CNN 273 | 1 4200 1100 274 | 1 0 0 -1 275 | $EndComp 276 | Connection ~ 4200 1100 277 | $Comp 278 | L Device:C_Small C3 279 | U 1 1 5D04FA93 280 | P 4850 1800 281 | F 0 "C3" H 4942 1846 50 0000 L CNN 282 | F 1 "0.1uF" H 4942 1755 50 0000 L CNN 283 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 4850 1800 50 0001 C CNN 284 | F 3 "~" H 4850 1800 50 0001 C CNN 285 | 1 4850 1800 286 | 1 0 0 -1 287 | $EndComp 288 | Connection ~ 4850 1700 289 | $Comp 290 | L power:GND #PWR0111 291 | U 1 1 5D050406 292 | P 4850 1900 293 | F 0 "#PWR0111" H 4850 1650 50 0001 C CNN 294 | F 1 "GND" H 4855 1727 50 0000 C CNN 295 | F 2 "" H 4850 1900 50 0001 C CNN 296 | F 3 "" H 4850 1900 50 0001 C CNN 297 | 1 4850 1900 298 | 1 0 0 -1 299 | $EndComp 300 | Wire Wire Line 301 | 4700 1300 5300 1300 302 | Wire Wire Line 303 | 5300 1300 5300 2350 304 | Wire Wire Line 305 | 5300 2350 5700 2350 306 | Wire Wire Line 307 | 4700 1400 5200 1400 308 | Wire Wire Line 309 | 5200 2750 5700 2750 310 | Wire Wire Line 311 | 5200 1400 5200 2750 312 | Wire Wire Line 313 | 3700 1700 3700 2350 314 | Wire Wire Line 315 | 3700 2350 5300 2350 316 | Connection ~ 5300 2350 317 | $Comp 318 | L power:GND #PWR0112 319 | U 1 1 5D0565DB 320 | P 5700 2450 321 | F 0 "#PWR0112" H 5700 2200 50 0001 C CNN 322 | F 1 "GND" H 5705 2277 50 0000 C CNN 323 | F 2 "" H 5700 2450 50 0001 C CNN 324 | F 3 "" H 5700 2450 50 0001 C CNN 325 | 1 5700 2450 326 | 1 0 0 -1 327 | $EndComp 328 | Wire Wire Line 329 | 2700 1700 3700 1700 330 | Wire Wire Line 331 | 3050 1900 3600 1900 332 | Wire Wire Line 333 | 3600 1900 3600 2700 334 | Wire Wire Line 335 | 3600 2700 4750 2700 336 | Wire Wire Line 337 | 4750 2700 4750 2950 338 | Wire Wire Line 339 | 4750 2950 5700 2950 340 | Connection ~ 3050 1900 341 | Wire Wire Line 342 | 2700 2900 2700 3000 343 | Wire Wire Line 344 | 2700 3600 3000 3600 345 | Wire Wire Line 346 | 3000 3600 3000 3800 347 | Wire Wire Line 348 | 3000 3800 4750 3800 349 | Wire Wire Line 350 | 4750 3800 4750 3250 351 | Wire Wire Line 352 | 4750 3250 5700 3250 353 | $Comp 354 | L power:GND #PWR0113 355 | U 1 1 5D06955B 356 | P 5700 3350 357 | F 0 "#PWR0113" H 5700 3100 50 0001 C CNN 358 | F 1 "GND" H 5705 3177 50 0000 C CNN 359 | F 2 "" H 5700 3350 50 0001 C CNN 360 | F 3 "" H 5700 3350 50 0001 C CNN 361 | 1 5700 3350 362 | 1 0 0 -1 363 | $EndComp 364 | $Comp 365 | L power:GND #PWR0114 366 | U 1 1 5D069BD8 367 | P 6200 3650 368 | F 0 "#PWR0114" H 6200 3400 50 0001 C CNN 369 | F 1 "GND" H 6205 3477 50 0000 C CNN 370 | F 2 "" H 6200 3650 50 0001 C CNN 371 | F 3 "" H 6200 3650 50 0001 C CNN 372 | 1 6200 3650 373 | 1 0 0 -1 374 | $EndComp 375 | $Comp 376 | L power:VCC #PWR0115 377 | U 1 1 5D06A336 378 | P 6200 1750 379 | F 0 "#PWR0115" H 6200 1600 50 0001 C CNN 380 | F 1 "VCC" H 6217 1923 50 0000 C CNN 381 | F 2 "" H 6200 1750 50 0001 C CNN 382 | F 3 "" H 6200 1750 50 0001 C CNN 383 | 1 6200 1750 384 | 1 0 0 -1 385 | $EndComp 386 | $Comp 387 | L MCU_Microchip_PIC16:HCF4066BE U4 388 | U 1 1 5D06B4B0 389 | P 8350 1700 390 | F 0 "U4" H 7800 2250 50 0000 C CNN 391 | F 1 "HCF4066BE" H 7800 2150 50 0000 C CNN 392 | F 2 "Package_DIP:DIP-14_W7.62mm" H 8350 1600 50 0001 C CIN 393 | F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/41236E.pdf" H 8350 1600 50 0001 C CNN 394 | 1 8350 1700 395 | 1 0 0 -1 396 | $EndComp 397 | Wire Wire Line 398 | 5700 2650 5450 2650 399 | Wire Wire Line 400 | 5450 2650 5450 1500 401 | Wire Wire Line 402 | 5450 1500 7450 1500 403 | Wire Wire Line 404 | 6700 2350 6900 2350 405 | Wire Wire Line 406 | 6900 2350 6900 1600 407 | Wire Wire Line 408 | 6900 1600 7450 1600 409 | Wire Wire Line 410 | 2700 3500 2900 3500 411 | Wire Wire Line 412 | 2900 3500 2900 4050 413 | Wire Wire Line 414 | 2900 4050 7200 4050 415 | Wire Wire Line 416 | 7200 4050 7200 2100 417 | Wire Wire Line 418 | 7200 2100 7400 2100 419 | Wire Wire Line 420 | 7450 2000 7400 2000 421 | Wire Wire Line 422 | 7400 2000 7400 2100 423 | Connection ~ 7400 2100 424 | Wire Wire Line 425 | 7400 2100 7450 2100 426 | Wire Wire Line 427 | 2700 3400 2800 3400 428 | Wire Wire Line 429 | 2800 3400 2800 4150 430 | Wire Wire Line 431 | 2800 4150 7300 4150 432 | Wire Wire Line 433 | 7300 4150 7300 2200 434 | Wire Wire Line 435 | 7300 2200 7400 2200 436 | Wire Wire Line 437 | 7450 2300 7400 2300 438 | Wire Wire Line 439 | 7400 2300 7400 2200 440 | Connection ~ 7400 2200 441 | Wire Wire Line 442 | 7400 2200 7450 2200 443 | $Comp 444 | L power:GND #PWR0116 445 | U 1 1 5D07C66F 446 | P 8350 2550 447 | F 0 "#PWR0116" H 8350 2300 50 0001 C CNN 448 | F 1 "GND" H 8355 2377 50 0000 C CNN 449 | F 2 "" H 8350 2550 50 0001 C CNN 450 | F 3 "" H 8350 2550 50 0001 C CNN 451 | 1 8350 2550 452 | 1 0 0 -1 453 | $EndComp 454 | $Comp 455 | L power:VCC #PWR0117 456 | U 1 1 5D07CBBC 457 | P 8350 1200 458 | F 0 "#PWR0117" H 8350 1050 50 0001 C CNN 459 | F 1 "VCC" H 8367 1373 50 0000 C CNN 460 | F 2 "" H 8350 1200 50 0001 C CNN 461 | F 3 "" H 8350 1200 50 0001 C CNN 462 | 1 8350 1200 463 | 1 0 0 -1 464 | $EndComp 465 | Wire Wire Line 466 | 2700 1800 2900 1800 467 | Wire Wire Line 468 | 2900 1800 2900 850 469 | Wire Wire Line 470 | 2900 850 6800 850 471 | Wire Wire Line 472 | 6800 850 6800 2650 473 | Wire Wire Line 474 | 6800 2650 6700 2650 475 | $Comp 476 | L Connector_Generic:GBA J2 477 | U 1 1 5D07EB8A 478 | P 10100 1600 479 | F 0 "J2" H 10580 1592 50 0000 L CNN 480 | F 1 "GBA" H 10580 1501 50 0000 L CNN 481 | F 2 "Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical" H 10100 1600 50 0001 C CNN 482 | F 3 "~" H 10100 1600 50 0001 C CNN 483 | 1 10100 1600 484 | 1 0 0 -1 485 | $EndComp 486 | $Comp 487 | L power:VCC #PWR0118 488 | U 1 1 5D0886C7 489 | P 9900 1400 490 | F 0 "#PWR0118" H 9900 1250 50 0001 C CNN 491 | F 1 "VCC" H 9917 1573 50 0000 C CNN 492 | F 2 "" H 9900 1400 50 0001 C CNN 493 | F 3 "" H 9900 1400 50 0001 C CNN 494 | 1 9900 1400 495 | 1 0 0 -1 496 | $EndComp 497 | $Comp 498 | L power:GND #PWR0119 499 | U 1 1 5D08A8E9 500 | P 9900 1900 501 | F 0 "#PWR0119" H 9900 1650 50 0001 C CNN 502 | F 1 "GND" H 9905 1727 50 0000 C CNN 503 | F 2 "" H 9900 1900 50 0001 C CNN 504 | F 3 "" H 9900 1900 50 0001 C CNN 505 | 1 9900 1900 506 | 1 0 0 -1 507 | $EndComp 508 | Wire Wire Line 509 | 9250 1500 9300 1500 510 | Wire Wire Line 511 | 9250 1800 9400 1800 512 | Wire Wire Line 513 | 9400 1800 9400 1600 514 | Wire Wire Line 515 | 9400 1600 9900 1600 516 | Wire Wire Line 517 | 6700 2950 9550 2950 518 | Wire Wire Line 519 | 9550 2950 9550 1800 520 | Wire Wire Line 521 | 9550 1800 9900 1800 522 | $Comp 523 | L power:VCC #PWR0120 524 | U 1 1 5D092F8D 525 | P 7700 4200 526 | F 0 "#PWR0120" H 7700 4050 50 0001 C CNN 527 | F 1 "VCC" H 7717 4373 50 0000 C CNN 528 | F 2 "" H 7700 4200 50 0001 C CNN 529 | F 3 "" H 7700 4200 50 0001 C CNN 530 | 1 7700 4200 531 | 1 0 0 -1 532 | $EndComp 533 | $Comp 534 | L power:GND #PWR0121 535 | U 1 1 5D0937F1 536 | P 7600 4700 537 | F 0 "#PWR0121" H 7600 4450 50 0001 C CNN 538 | F 1 "GND" H 7605 4527 50 0000 C CNN 539 | F 2 "" H 7600 4700 50 0001 C CNN 540 | F 3 "" H 7600 4700 50 0001 C CNN 541 | 1 7600 4700 542 | 1 0 0 -1 543 | $EndComp 544 | Wire Wire Line 545 | 7450 1700 7000 1700 546 | Wire Wire Line 547 | 7000 1700 7000 4300 548 | Wire Wire Line 549 | 9250 1600 9400 1600 550 | Connection ~ 9400 1600 551 | Wire Wire Line 552 | 9250 1700 9300 1700 553 | Wire Wire Line 554 | 9300 1700 9300 1500 555 | Connection ~ 9300 1500 556 | Wire Wire Line 557 | 9300 1500 9900 1500 558 | Wire Wire Line 559 | 7450 1800 7100 1800 560 | Wire Wire Line 561 | 7100 1800 7100 4400 562 | Wire Wire Line 563 | 7100 4400 7850 4400 564 | $Comp 565 | L Connector_Generic:HC-05_breakout J3 566 | U 1 1 5D12A03D 567 | P 8050 4400 568 | F 0 "J3" H 8630 4392 50 0000 L CNN 569 | F 1 "HC-05_breakout" H 8630 4301 50 0000 L CNN 570 | F 2 "Sensor:HC-05_breakout" H 8050 4400 50 0001 C CNN 571 | F 3 "~" H 8050 4400 50 0001 C CNN 572 | 1 8050 4400 573 | 1 0 0 -1 574 | $EndComp 575 | Wire Wire Line 576 | 7000 4300 7850 4300 577 | Wire Wire Line 578 | 7700 4200 7700 4600 579 | Wire Wire Line 580 | 7700 4600 7850 4600 581 | Wire Wire Line 582 | 7850 4500 7600 4500 583 | Wire Wire Line 584 | 7600 4500 7600 4700 585 | $EndSCHEMATC 586 | -------------------------------------------------------------------------------- /circuit/GBA-BT-HID.sch: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 4 2 | LIBS:GBA-BT-HID-cache 3 | EELAYER 29 0 4 | EELAYER END 5 | $Descr A4 11693 8268 6 | encoding utf-8 7 | Sheet 1 1 8 | Title "" 9 | Date "" 10 | Rev "" 11 | Comp "" 12 | Comment1 "" 13 | Comment2 "" 14 | Comment3 "" 15 | Comment4 "" 16 | $EndDescr 17 | $Comp 18 | L MCU_Microchip_ATmega:ATmega328P-PU U1 19 | U 1 1 5D036493 20 | P 2100 2600 21 | F 0 "U1" H 1456 2646 50 0000 R CNN 22 | F 1 "ATmega328P-PU" H 1456 2555 50 0000 R CNN 23 | F 2 "Package_DIP:DIP-28_W7.62mm" H 2100 2600 50 0001 C CIN 24 | F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf" H 2100 2600 50 0001 C CNN 25 | 1 2100 2600 26 | 1 0 0 -1 27 | $EndComp 28 | $Comp 29 | L Memory_Flash:W25Q32DIP U2 30 | U 1 1 5D0384C3 31 | P 4200 1500 32 | F 0 "U2" H 3900 2000 50 0000 C CNN 33 | F 1 "W25Q32DIP" H 3900 1900 50 0000 C CNN 34 | F 2 "Package_DIP:DIP-8_W7.62mm" H 4200 1500 50 0001 C CNN 35 | F 3 "http://www.winbond.com/resource-files/w25q32jv%20revg%2003272018%20plus.pdf" H 4200 1500 50 0001 C CNN 36 | 1 4200 1500 37 | 1 0 0 -1 38 | $EndComp 39 | $Comp 40 | L power:VCC #PWR0101 41 | U 1 1 5D038C4F 42 | P 2200 1100 43 | F 0 "#PWR0101" H 2200 950 50 0001 C CNN 44 | F 1 "VCC" H 2217 1273 50 0000 C CNN 45 | F 2 "" H 2200 1100 50 0001 C CNN 46 | F 3 "" H 2200 1100 50 0001 C CNN 47 | 1 2200 1100 48 | 1 0 0 -1 49 | $EndComp 50 | Wire Wire Line 51 | 2100 1100 2200 1100 52 | Connection ~ 2200 1100 53 | $Comp 54 | L power:GND #PWR0102 55 | U 1 1 5D039557 56 | P 2100 4100 57 | F 0 "#PWR0102" H 2100 3850 50 0001 C CNN 58 | F 1 "GND" H 2105 3927 50 0000 C CNN 59 | F 2 "" H 2100 4100 50 0001 C CNN 60 | F 3 "" H 2100 4100 50 0001 C CNN 61 | 1 2100 4100 62 | 1 0 0 -1 63 | $EndComp 64 | Wire Wire Line 65 | 2700 2000 3300 2000 66 | Wire Wire Line 67 | 3300 2000 3300 2200 68 | Wire Wire Line 69 | 3000 2100 3000 2200 70 | Wire Wire Line 71 | 2700 2100 3000 2100 72 | $Comp 73 | L Device:C_Small C1 74 | U 1 1 5D03C5C3 75 | P 3000 2300 76 | F 0 "C1" H 3092 2346 50 0000 L CNN 77 | F 1 "22pF" H 3092 2255 50 0000 L CNN 78 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 3000 2300 50 0001 C CNN 79 | F 3 "~" H 3000 2300 50 0001 C CNN 80 | 1 3000 2300 81 | 1 0 0 -1 82 | $EndComp 83 | $Comp 84 | L power:GND #PWR0103 85 | U 1 1 5D03D614 86 | P 3000 2400 87 | F 0 "#PWR0103" H 3000 2150 50 0001 C CNN 88 | F 1 "GND" H 3005 2227 50 0000 C CNN 89 | F 2 "" H 3000 2400 50 0001 C CNN 90 | F 3 "" H 3000 2400 50 0001 C CNN 91 | 1 3000 2400 92 | 1 0 0 -1 93 | $EndComp 94 | Wire Wire Line 95 | 2700 1600 2800 1600 96 | Wire Wire Line 97 | 2800 1600 2800 1400 98 | Wire Wire Line 99 | 2800 1400 3700 1400 100 | Wire Wire Line 101 | 2700 1900 3050 1900 102 | Wire Wire Line 103 | 3050 1900 3050 1600 104 | Wire Wire Line 105 | 3050 1600 3700 1600 106 | $Comp 107 | L Connector_Generic:Conn_01x06 J1 108 | U 1 1 5D03F034 109 | P 3600 3100 110 | F 0 "J1" H 3680 3092 50 0000 L CNN 111 | F 1 "Conn_01x06" H 3680 3001 50 0000 L CNN 112 | F 2 "Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical" H 3600 3100 50 0001 C CNN 113 | F 3 "~" H 3600 3100 50 0001 C CNN 114 | 1 3600 3100 115 | 1 0 0 -1 116 | $EndComp 117 | Wire Wire Line 118 | 2700 3100 3400 3100 119 | Wire Wire Line 120 | 2700 3000 3000 3000 121 | Wire Wire Line 122 | 2700 3200 3400 3200 123 | Wire Wire Line 124 | 2700 3300 3100 3300 125 | $Comp 126 | L Device:R_Small R1 127 | U 1 1 5D042C79 128 | P 3000 2900 129 | F 0 "R1" H 3059 2946 50 0000 L CNN 130 | F 1 "10K" H 3059 2855 50 0000 L CNN 131 | F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" H 3000 2900 50 0001 C CNN 132 | F 3 "~" H 3000 2900 50 0001 C CNN 133 | 1 3000 2900 134 | 1 0 0 -1 135 | $EndComp 136 | Connection ~ 3000 3000 137 | Wire Wire Line 138 | 3000 3000 3400 3000 139 | $Comp 140 | L power:VCC #PWR0105 141 | U 1 1 5D04333C 142 | P 3400 2900 143 | F 0 "#PWR0105" H 3400 2750 50 0001 C CNN 144 | F 1 "VCC" H 3417 3073 50 0000 C CNN 145 | F 2 "" H 3400 2900 50 0001 C CNN 146 | F 3 "" H 3400 2900 50 0001 C CNN 147 | 1 3400 2900 148 | 1 0 0 -1 149 | $EndComp 150 | $Comp 151 | L power:GND #PWR0106 152 | U 1 1 5D0438C4 153 | P 3400 3400 154 | F 0 "#PWR0106" H 3400 3150 50 0001 C CNN 155 | F 1 "GND" H 3405 3227 50 0000 C CNN 156 | F 2 "" H 3400 3400 50 0001 C CNN 157 | F 3 "" H 3400 3400 50 0001 C CNN 158 | 1 3400 3400 159 | 1 0 0 -1 160 | $EndComp 161 | $Comp 162 | L power:VCC #PWR0107 163 | U 1 1 5D0440E6 164 | P 3000 2800 165 | F 0 "#PWR0107" H 3000 2650 50 0001 C CNN 166 | F 1 "VCC" H 3017 2973 50 0000 C CNN 167 | F 2 "" H 3000 2800 50 0001 C CNN 168 | F 3 "" H 3000 2800 50 0001 C CNN 169 | 1 3000 2800 170 | 1 0 0 -1 171 | $EndComp 172 | $Comp 173 | L Device:R_Small R2 174 | U 1 1 5D049EC7 175 | P 3100 3400 176 | F 0 "R2" H 3159 3446 50 0000 L CNN 177 | F 1 "1K" H 3159 3355 50 0000 L CNN 178 | F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" H 3100 3400 50 0001 C CNN 179 | F 3 "~" H 3100 3400 50 0001 C CNN 180 | 1 3100 3400 181 | 1 0 0 -1 182 | $EndComp 183 | Connection ~ 3100 3300 184 | Wire Wire Line 185 | 3100 3300 3400 3300 186 | $Comp 187 | L power:GND #PWR0108 188 | U 1 1 5D04A7B8 189 | P 3100 3500 190 | F 0 "#PWR0108" H 3100 3250 50 0001 C CNN 191 | F 1 "GND" H 3105 3327 50 0000 C CNN 192 | F 2 "" H 3100 3500 50 0001 C CNN 193 | F 3 "" H 3100 3500 50 0001 C CNN 194 | 1 3100 3500 195 | 1 0 0 -1 196 | $EndComp 197 | $Comp 198 | L 74xx:74LS157 U3 199 | U 1 1 5D04BDDE 200 | P 6200 2650 201 | F 0 "U3" H 5950 3550 50 0000 C CNN 202 | F 1 "74LS157" H 5950 3450 50 0000 C CNN 203 | F 2 "Package_DIP:DIP-16_W7.62mm" H 6200 2650 50 0001 C CNN 204 | F 3 "http://www.ti.com/lit/gpn/sn74LS157" H 6200 2650 50 0001 C CNN 205 | 1 6200 2650 206 | 1 0 0 -1 207 | $EndComp 208 | Wire Wire Line 209 | 4700 1700 4850 1700 210 | Wire Wire Line 211 | 4850 1700 4850 1600 212 | Wire Wire Line 213 | 4850 1100 4200 1100 214 | Wire Wire Line 215 | 4700 1600 4850 1600 216 | Connection ~ 4850 1600 217 | Wire Wire Line 218 | 4850 1600 4850 1100 219 | $Comp 220 | L power:GND #PWR0109 221 | U 1 1 5D04ED2D 222 | P 4200 1900 223 | F 0 "#PWR0109" H 4200 1650 50 0001 C CNN 224 | F 1 "GND" H 4205 1727 50 0000 C CNN 225 | F 2 "" H 4200 1900 50 0001 C CNN 226 | F 3 "" H 4200 1900 50 0001 C CNN 227 | 1 4200 1900 228 | 1 0 0 -1 229 | $EndComp 230 | $Comp 231 | L power:VCC #PWR0110 232 | U 1 1 5D04F35F 233 | P 4200 1100 234 | F 0 "#PWR0110" H 4200 950 50 0001 C CNN 235 | F 1 "VCC" H 4200 1250 50 0000 C CNN 236 | F 2 "" H 4200 1100 50 0001 C CNN 237 | F 3 "" H 4200 1100 50 0001 C CNN 238 | 1 4200 1100 239 | 1 0 0 -1 240 | $EndComp 241 | Connection ~ 4200 1100 242 | $Comp 243 | L Device:C_Small C3 244 | U 1 1 5D04FA93 245 | P 4850 1800 246 | F 0 "C3" H 4942 1846 50 0000 L CNN 247 | F 1 "0.1uF" H 4942 1755 50 0000 L CNN 248 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 4850 1800 50 0001 C CNN 249 | F 3 "~" H 4850 1800 50 0001 C CNN 250 | 1 4850 1800 251 | 1 0 0 -1 252 | $EndComp 253 | Connection ~ 4850 1700 254 | $Comp 255 | L power:GND #PWR0111 256 | U 1 1 5D050406 257 | P 4850 1900 258 | F 0 "#PWR0111" H 4850 1650 50 0001 C CNN 259 | F 1 "GND" H 4855 1727 50 0000 C CNN 260 | F 2 "" H 4850 1900 50 0001 C CNN 261 | F 3 "" H 4850 1900 50 0001 C CNN 262 | 1 4850 1900 263 | 1 0 0 -1 264 | $EndComp 265 | Wire Wire Line 266 | 4700 1300 5300 1300 267 | Wire Wire Line 268 | 5300 1300 5300 2350 269 | Wire Wire Line 270 | 5300 2350 5700 2350 271 | Wire Wire Line 272 | 4700 1400 5200 1400 273 | Wire Wire Line 274 | 5200 2750 5700 2750 275 | Wire Wire Line 276 | 5200 1400 5200 2750 277 | $Comp 278 | L power:GND #PWR0112 279 | U 1 1 5D0565DB 280 | P 5700 2450 281 | F 0 "#PWR0112" H 5700 2200 50 0001 C CNN 282 | F 1 "GND" H 5705 2277 50 0000 C CNN 283 | F 2 "" H 5700 2450 50 0001 C CNN 284 | F 3 "" H 5700 2450 50 0001 C CNN 285 | 1 5700 2450 286 | 1 0 0 -1 287 | $EndComp 288 | Wire Wire Line 289 | 2700 1700 3700 1700 290 | Wire Wire Line 291 | 3050 1900 3600 1900 292 | Wire Wire Line 293 | 3600 2700 4750 2700 294 | Wire Wire Line 295 | 4750 2700 4750 2950 296 | Wire Wire Line 297 | 4750 2950 5700 2950 298 | Connection ~ 3050 1900 299 | Wire Wire Line 300 | 2700 2900 2700 3000 301 | Wire Wire Line 302 | 2700 3600 3000 3600 303 | Wire Wire Line 304 | 3000 3600 3000 3800 305 | Wire Wire Line 306 | 3000 3800 4750 3800 307 | Wire Wire Line 308 | 4750 3800 4750 3250 309 | Wire Wire Line 310 | 4750 3250 5700 3250 311 | $Comp 312 | L power:GND #PWR0113 313 | U 1 1 5D06955B 314 | P 5700 3350 315 | F 0 "#PWR0113" H 5700 3100 50 0001 C CNN 316 | F 1 "GND" H 5705 3177 50 0000 C CNN 317 | F 2 "" H 5700 3350 50 0001 C CNN 318 | F 3 "" H 5700 3350 50 0001 C CNN 319 | 1 5700 3350 320 | 1 0 0 -1 321 | $EndComp 322 | $Comp 323 | L power:GND #PWR0114 324 | U 1 1 5D069BD8 325 | P 6200 3650 326 | F 0 "#PWR0114" H 6200 3400 50 0001 C CNN 327 | F 1 "GND" H 6205 3477 50 0000 C CNN 328 | F 2 "" H 6200 3650 50 0001 C CNN 329 | F 3 "" H 6200 3650 50 0001 C CNN 330 | 1 6200 3650 331 | 1 0 0 -1 332 | $EndComp 333 | $Comp 334 | L power:VCC #PWR0115 335 | U 1 1 5D06A336 336 | P 6200 1750 337 | F 0 "#PWR0115" H 6200 1600 50 0001 C CNN 338 | F 1 "VCC" H 6217 1923 50 0000 C CNN 339 | F 2 "" H 6200 1750 50 0001 C CNN 340 | F 3 "" H 6200 1750 50 0001 C CNN 341 | 1 6200 1750 342 | 1 0 0 -1 343 | $EndComp 344 | $Comp 345 | L MCU_Microchip_PIC16:HCF4066BE U4 346 | U 1 1 5D06B4B0 347 | P 8350 1700 348 | F 0 "U4" H 7800 2250 50 0000 C CNN 349 | F 1 "HCF4066BE" H 7800 2150 50 0000 C CNN 350 | F 2 "Package_DIP:DIP-14_W7.62mm" H 8350 1600 50 0001 C CIN 351 | F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/41236E.pdf" H 8350 1600 50 0001 C CNN 352 | 1 8350 1700 353 | 1 0 0 -1 354 | $EndComp 355 | Wire Wire Line 356 | 5700 2650 5450 2650 357 | Wire Wire Line 358 | 5450 2650 5450 1500 359 | Wire Wire Line 360 | 5450 1500 7450 1500 361 | Wire Wire Line 362 | 6700 2350 6900 2350 363 | Wire Wire Line 364 | 6900 2350 6900 1600 365 | Wire Wire Line 366 | 6900 1600 7450 1600 367 | Wire Wire Line 368 | 2700 3500 2900 3500 369 | Wire Wire Line 370 | 2900 3500 2900 4050 371 | Wire Wire Line 372 | 2900 4050 7200 4050 373 | Wire Wire Line 374 | 7200 4050 7200 2100 375 | Wire Wire Line 376 | 7200 2100 7400 2100 377 | Wire Wire Line 378 | 7450 2000 7400 2000 379 | Wire Wire Line 380 | 7400 2000 7400 2100 381 | Connection ~ 7400 2100 382 | Wire Wire Line 383 | 7400 2100 7450 2100 384 | Wire Wire Line 385 | 2700 3400 2800 3400 386 | Wire Wire Line 387 | 2800 3400 2800 4150 388 | Wire Wire Line 389 | 2800 4150 7300 4150 390 | Wire Wire Line 391 | 7300 4150 7300 2200 392 | Wire Wire Line 393 | 7300 2200 7400 2200 394 | Wire Wire Line 395 | 7450 2300 7400 2300 396 | Wire Wire Line 397 | 7400 2300 7400 2200 398 | Connection ~ 7400 2200 399 | Wire Wire Line 400 | 7400 2200 7450 2200 401 | $Comp 402 | L power:GND #PWR0116 403 | U 1 1 5D07C66F 404 | P 8350 2550 405 | F 0 "#PWR0116" H 8350 2300 50 0001 C CNN 406 | F 1 "GND" H 8355 2377 50 0000 C CNN 407 | F 2 "" H 8350 2550 50 0001 C CNN 408 | F 3 "" H 8350 2550 50 0001 C CNN 409 | 1 8350 2550 410 | 1 0 0 -1 411 | $EndComp 412 | $Comp 413 | L power:VCC #PWR0117 414 | U 1 1 5D07CBBC 415 | P 8350 1200 416 | F 0 "#PWR0117" H 8350 1050 50 0001 C CNN 417 | F 1 "VCC" H 8367 1373 50 0000 C CNN 418 | F 2 "" H 8350 1200 50 0001 C CNN 419 | F 3 "" H 8350 1200 50 0001 C CNN 420 | 1 8350 1200 421 | 1 0 0 -1 422 | $EndComp 423 | Wire Wire Line 424 | 2700 1800 2900 1800 425 | Wire Wire Line 426 | 2900 1800 2900 850 427 | Wire Wire Line 428 | 2900 850 6800 850 429 | Wire Wire Line 430 | 6800 850 6800 2650 431 | Wire Wire Line 432 | 6800 2650 6700 2650 433 | $Comp 434 | L Connector_Generic:GBA J2 435 | U 1 1 5D07EB8A 436 | P 10100 1600 437 | F 0 "J2" H 10580 1592 50 0000 L CNN 438 | F 1 "GBA" H 10580 1501 50 0000 L CNN 439 | F 2 "Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical" H 10100 1600 50 0001 C CNN 440 | F 3 "~" H 10100 1600 50 0001 C CNN 441 | 1 10100 1600 442 | 1 0 0 -1 443 | $EndComp 444 | $Comp 445 | L power:VCC #PWR0118 446 | U 1 1 5D0886C7 447 | P 9900 1400 448 | F 0 "#PWR0118" H 9900 1250 50 0001 C CNN 449 | F 1 "VCC" H 9917 1573 50 0000 C CNN 450 | F 2 "" H 9900 1400 50 0001 C CNN 451 | F 3 "" H 9900 1400 50 0001 C CNN 452 | 1 9900 1400 453 | 1 0 0 -1 454 | $EndComp 455 | $Comp 456 | L power:GND #PWR0119 457 | U 1 1 5D08A8E9 458 | P 9900 1900 459 | F 0 "#PWR0119" H 9900 1650 50 0001 C CNN 460 | F 1 "GND" H 9905 1727 50 0000 C CNN 461 | F 2 "" H 9900 1900 50 0001 C CNN 462 | F 3 "" H 9900 1900 50 0001 C CNN 463 | 1 9900 1900 464 | 1 0 0 -1 465 | $EndComp 466 | Wire Wire Line 467 | 9250 1500 9300 1500 468 | Wire Wire Line 469 | 9250 1800 9400 1800 470 | Wire Wire Line 471 | 9400 1800 9400 1600 472 | Wire Wire Line 473 | 9400 1600 9900 1600 474 | Wire Wire Line 475 | 6700 2950 9550 2950 476 | Wire Wire Line 477 | 9550 2950 9550 1800 478 | Wire Wire Line 479 | 9550 1800 9900 1800 480 | $Comp 481 | L power:VCC #PWR0120 482 | U 1 1 5D092F8D 483 | P 7700 4200 484 | F 0 "#PWR0120" H 7700 4050 50 0001 C CNN 485 | F 1 "VCC" H 7717 4373 50 0000 C CNN 486 | F 2 "" H 7700 4200 50 0001 C CNN 487 | F 3 "" H 7700 4200 50 0001 C CNN 488 | 1 7700 4200 489 | 1 0 0 -1 490 | $EndComp 491 | $Comp 492 | L power:GND #PWR0121 493 | U 1 1 5D0937F1 494 | P 7600 4700 495 | F 0 "#PWR0121" H 7600 4450 50 0001 C CNN 496 | F 1 "GND" H 7605 4527 50 0000 C CNN 497 | F 2 "" H 7600 4700 50 0001 C CNN 498 | F 3 "" H 7600 4700 50 0001 C CNN 499 | 1 7600 4700 500 | 1 0 0 -1 501 | $EndComp 502 | Wire Wire Line 503 | 7450 1700 7000 1700 504 | Wire Wire Line 505 | 7000 1700 7000 4300 506 | Wire Wire Line 507 | 9250 1600 9400 1600 508 | Connection ~ 9400 1600 509 | Wire Wire Line 510 | 9250 1700 9300 1700 511 | Wire Wire Line 512 | 9300 1700 9300 1500 513 | Connection ~ 9300 1500 514 | Wire Wire Line 515 | 9300 1500 9900 1500 516 | Wire Wire Line 517 | 7450 1800 7100 1800 518 | Wire Wire Line 519 | 7100 1800 7100 4400 520 | Wire Wire Line 521 | 7100 4400 7850 4400 522 | $Comp 523 | L Connector_Generic:HC-05_breakout J3 524 | U 1 1 5D12A03D 525 | P 8050 4400 526 | F 0 "J3" H 8630 4392 50 0000 L CNN 527 | F 1 "HC-05_breakout" H 8630 4301 50 0000 L CNN 528 | F 2 "Sensor:HC-05_breakout" H 8050 4400 50 0001 C CNN 529 | F 3 "~" H 8050 4400 50 0001 C CNN 530 | 1 8050 4400 531 | 1 0 0 -1 532 | $EndComp 533 | Wire Wire Line 534 | 7000 4300 7850 4300 535 | Wire Wire Line 536 | 7700 4200 7700 4600 537 | Wire Wire Line 538 | 7700 4600 7850 4600 539 | Wire Wire Line 540 | 7850 4500 7600 4500 541 | Wire Wire Line 542 | 7600 4500 7600 4700 543 | Connection ~ 5300 2350 544 | Connection ~ 3300 2200 545 | Connection ~ 3000 2200 546 | Wire Wire Line 547 | 3600 1900 3600 2700 548 | Wire Wire Line 549 | 3700 2350 5300 2350 550 | Wire Wire Line 551 | 3700 1700 3700 2350 552 | $Comp 553 | L power:GND #PWR0104 554 | U 1 1 5D03DCED 555 | P 3300 2400 556 | F 0 "#PWR0104" H 3300 2150 50 0001 C CNN 557 | F 1 "GND" H 3305 2227 50 0000 C CNN 558 | F 2 "" H 3300 2400 50 0001 C CNN 559 | F 3 "" H 3300 2400 50 0001 C CNN 560 | 1 3300 2400 561 | 1 0 0 -1 562 | $EndComp 563 | $Comp 564 | L Device:C_Small C2 565 | U 1 1 5D03CEDC 566 | P 3300 2300 567 | F 0 "C2" H 3392 2346 50 0000 L CNN 568 | F 1 "22pF" H 3392 2255 50 0000 L CNN 569 | F 2 "Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm" H 3300 2300 50 0001 C CNN 570 | F 3 "~" H 3300 2300 50 0001 C CNN 571 | 1 3300 2300 572 | 1 0 0 -1 573 | $EndComp 574 | $Comp 575 | L Device:Crystal Y1 576 | U 1 1 5D039C0A 577 | P 3150 2200 578 | F 0 "Y1" H 3150 1932 50 0000 C CNN 579 | F 1 "16Mhz" H 3150 2023 50 0000 C CNN 580 | F 2 "Crystal:Resonator-2Pin_W10.0mm_H5.0mm" H 3150 2200 50 0001 C CNN 581 | F 3 "~" H 3150 2200 50 0001 C CNN 582 | 1 3150 2200 583 | -1 0 0 1 584 | $EndComp 585 | $EndSCHEMATC 586 | -------------------------------------------------------------------------------- /esp32/sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Espressif IoT Development Framework Configuration 4 | # 5 | CONFIG_IDF_TARGET="esp32" 6 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 7 | 8 | # 9 | # SDK tool configuration 10 | # 11 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 12 | CONFIG_PYTHON="python" 13 | CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y 14 | 15 | # 16 | # Application manager 17 | # 18 | CONFIG_APP_COMPILE_TIME_DATE=y 19 | CONFIG_APP_EXCLUDE_PROJECT_VER_VAR= 20 | CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= 21 | 22 | # 23 | # Bootloader config 24 | # 25 | CONFIG_LOG_BOOTLOADER_LEVEL_NONE= 26 | CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= 27 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y 28 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO= 29 | CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= 30 | CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= 31 | CONFIG_LOG_BOOTLOADER_LEVEL=2 32 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= 33 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 34 | CONFIG_BOOTLOADER_FACTORY_RESET= 35 | CONFIG_BOOTLOADER_APP_TEST= 36 | CONFIG_BOOTLOADER_WDT_ENABLE=y 37 | CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE= 38 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 39 | CONFIG_APP_ROLLBACK_ENABLE= 40 | 41 | # 42 | # Security features 43 | # 44 | CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT= 45 | CONFIG_SECURE_BOOT_ENABLED= 46 | CONFIG_FLASH_ENCRYPTION_ENABLED= 47 | 48 | # 49 | # Example Board Configuration 50 | # 51 | CONFIG_ESP_LYRAT_V4_3_BOARD= 52 | CONFIG_ESP_CUSTOM_BOARD=y 53 | 54 | # 55 | # Serial flasher config 56 | # 57 | CONFIG_ESPTOOLPY_PORT="/dev/cu.SLAB_USBtoUART" 58 | CONFIG_ESPTOOLPY_BAUD_115200B=y 59 | CONFIG_ESPTOOLPY_BAUD_230400B= 60 | CONFIG_ESPTOOLPY_BAUD_921600B= 61 | CONFIG_ESPTOOLPY_BAUD_2MB= 62 | CONFIG_ESPTOOLPY_BAUD_OTHER= 63 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 64 | CONFIG_ESPTOOLPY_BAUD=115200 65 | CONFIG_ESPTOOLPY_COMPRESSED=y 66 | CONFIG_FLASHMODE_QIO= 67 | CONFIG_FLASHMODE_QOUT= 68 | CONFIG_FLASHMODE_DIO=y 69 | CONFIG_FLASHMODE_DOUT= 70 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 71 | CONFIG_ESPTOOLPY_FLASHFREQ_80M= 72 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 73 | CONFIG_ESPTOOLPY_FLASHFREQ_26M= 74 | CONFIG_ESPTOOLPY_FLASHFREQ_20M= 75 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 76 | CONFIG_ESPTOOLPY_FLASHSIZE_1MB= 77 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB= 78 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 79 | CONFIG_ESPTOOLPY_FLASHSIZE_8MB= 80 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB= 81 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB" 82 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 83 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 84 | CONFIG_ESPTOOLPY_BEFORE_NORESET= 85 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 86 | CONFIG_ESPTOOLPY_AFTER_RESET=y 87 | CONFIG_ESPTOOLPY_AFTER_NORESET= 88 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 89 | CONFIG_MONITOR_BAUD_9600B= 90 | CONFIG_MONITOR_BAUD_57600B= 91 | CONFIG_MONITOR_BAUD_115200B=y 92 | CONFIG_MONITOR_BAUD_230400B= 93 | CONFIG_MONITOR_BAUD_921600B= 94 | CONFIG_MONITOR_BAUD_2MB= 95 | CONFIG_MONITOR_BAUD_OTHER= 96 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 97 | CONFIG_MONITOR_BAUD=115200 98 | 99 | # 100 | # Partition Table 101 | # 102 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 103 | CONFIG_PARTITION_TABLE_TWO_OTA= 104 | CONFIG_PARTITION_TABLE_CUSTOM= 105 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 106 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 107 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 108 | CONFIG_PARTITION_TABLE_MD5=y 109 | 110 | # 111 | # Compiler options 112 | # 113 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 114 | CONFIG_OPTIMIZATION_LEVEL_RELEASE= 115 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 116 | CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= 117 | CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= 118 | CONFIG_CXX_EXCEPTIONS= 119 | CONFIG_STACK_CHECK_NONE=y 120 | CONFIG_STACK_CHECK_NORM= 121 | CONFIG_STACK_CHECK_STRONG= 122 | CONFIG_STACK_CHECK_ALL= 123 | CONFIG_STACK_CHECK= 124 | CONFIG_WARN_WRITE_STRINGS= 125 | CONFIG_DISABLE_GCC8_WARNINGS= 126 | 127 | # 128 | # Component config 129 | # 130 | 131 | # 132 | # Application Level Tracing 133 | # 134 | CONFIG_ESP32_APPTRACE_DEST_TRAX= 135 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 136 | CONFIG_ESP32_APPTRACE_ENABLE= 137 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 138 | CONFIG_AWS_IOT_SDK= 139 | 140 | # 141 | # Bluetooth 142 | # 143 | CONFIG_BT_ENABLED=y 144 | 145 | # 146 | # Bluetooth controller 147 | # 148 | CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY= 149 | CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY= 150 | CONFIG_BTDM_CONTROLLER_MODE_BTDM=y 151 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3 152 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=2 153 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=0 154 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 155 | CONFIG_BTDM_CTRL_AUTO_LATENCY= 156 | CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF= 157 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3 158 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=2 159 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 160 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y 161 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1= 162 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 163 | CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y 164 | CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4= 165 | 166 | # 167 | # MODEM SLEEP Options 168 | # 169 | CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y 170 | CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y 171 | CONFIG_BTDM_MODEM_SLEEP_MODE_EVED= 172 | CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y 173 | CONFIG_BLE_SCAN_DUPLICATE=y 174 | CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y 175 | CONFIG_SCAN_DUPLICATE_BY_ADV_DATA= 176 | CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR= 177 | CONFIG_SCAN_DUPLICATE_TYPE=0 178 | CONFIG_DUPLICATE_SCAN_CACHE_SIZE=20 179 | CONFIG_BLE_MESH_SCAN_DUPLICATE_EN= 180 | CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y 181 | CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y 182 | CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100 183 | CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 184 | CONFIG_BTDM_COEX_BT_OPTIONS= 185 | CONFIG_BLUEDROID_ENABLED=y 186 | CONFIG_BLUEDROID_PINNED_TO_CORE_0=y 187 | CONFIG_BLUEDROID_PINNED_TO_CORE_1= 188 | CONFIG_BLUEDROID_PINNED_TO_CORE=0 189 | CONFIG_BTC_TASK_STACK_SIZE=3072 190 | CONFIG_BTU_TASK_STACK_SIZE=4096 191 | CONFIG_BLUEDROID_MEM_DEBUG= 192 | CONFIG_CLASSIC_BT_ENABLED= 193 | CONFIG_GATTS_ENABLE=y 194 | CONFIG_GATTS_SEND_SERVICE_CHANGE_MANUAL= 195 | CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO=y 196 | CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE=0 197 | CONFIG_GATTC_ENABLE=y 198 | CONFIG_GATTC_CACHE_NVS_FLASH= 199 | CONFIG_BLE_SMP_ENABLE=y 200 | CONFIG_SMP_SLAVE_CON_PARAMS_UPD_ENABLE= 201 | CONFIG_BT_STACK_NO_LOG= 202 | 203 | # 204 | # BT DEBUG LOG LEVEL 205 | # 206 | CONFIG_HCI_TRACE_LEVEL_NONE= 207 | CONFIG_HCI_TRACE_LEVEL_ERROR= 208 | CONFIG_HCI_TRACE_LEVEL_WARNING=y 209 | CONFIG_HCI_TRACE_LEVEL_API= 210 | CONFIG_HCI_TRACE_LEVEL_EVENT= 211 | CONFIG_HCI_TRACE_LEVEL_DEBUG= 212 | CONFIG_HCI_TRACE_LEVEL_VERBOSE= 213 | CONFIG_HCI_INITIAL_TRACE_LEVEL=2 214 | CONFIG_BTM_TRACE_LEVEL_NONE= 215 | CONFIG_BTM_TRACE_LEVEL_ERROR= 216 | CONFIG_BTM_TRACE_LEVEL_WARNING=y 217 | CONFIG_BTM_TRACE_LEVEL_API= 218 | CONFIG_BTM_TRACE_LEVEL_EVENT= 219 | CONFIG_BTM_TRACE_LEVEL_DEBUG= 220 | CONFIG_BTM_TRACE_LEVEL_VERBOSE= 221 | CONFIG_BTM_INITIAL_TRACE_LEVEL=2 222 | CONFIG_L2CAP_TRACE_LEVEL_NONE= 223 | CONFIG_L2CAP_TRACE_LEVEL_ERROR= 224 | CONFIG_L2CAP_TRACE_LEVEL_WARNING=y 225 | CONFIG_L2CAP_TRACE_LEVEL_API= 226 | CONFIG_L2CAP_TRACE_LEVEL_EVENT= 227 | CONFIG_L2CAP_TRACE_LEVEL_DEBUG= 228 | CONFIG_L2CAP_TRACE_LEVEL_VERBOSE= 229 | CONFIG_L2CAP_INITIAL_TRACE_LEVEL=2 230 | CONFIG_RFCOMM_TRACE_LEVEL_NONE= 231 | CONFIG_RFCOMM_TRACE_LEVEL_ERROR= 232 | CONFIG_RFCOMM_TRACE_LEVEL_WARNING=y 233 | CONFIG_RFCOMM_TRACE_LEVEL_API= 234 | CONFIG_RFCOMM_TRACE_LEVEL_EVENT= 235 | CONFIG_RFCOMM_TRACE_LEVEL_DEBUG= 236 | CONFIG_RFCOMM_TRACE_LEVEL_VERBOSE= 237 | CONFIG_RFCOMM_INITIAL_TRACE_LEVEL=2 238 | CONFIG_SDP_TRACE_LEVEL_NONE= 239 | CONFIG_SDP_TRACE_LEVEL_ERROR= 240 | CONFIG_SDP_TRACE_LEVEL_WARNING=y 241 | CONFIG_SDP_TRACE_LEVEL_API= 242 | CONFIG_SDP_TRACE_LEVEL_EVENT= 243 | CONFIG_SDP_TRACE_LEVEL_DEBUG= 244 | CONFIG_SDP_TRACE_LEVEL_VERBOSE= 245 | CONFIG_SDP_INITIAL_TRACE_LEVEL=2 246 | CONFIG_GAP_TRACE_LEVEL_NONE= 247 | CONFIG_GAP_TRACE_LEVEL_ERROR= 248 | CONFIG_GAP_TRACE_LEVEL_WARNING=y 249 | CONFIG_GAP_TRACE_LEVEL_API= 250 | CONFIG_GAP_TRACE_LEVEL_EVENT= 251 | CONFIG_GAP_TRACE_LEVEL_DEBUG= 252 | CONFIG_GAP_TRACE_LEVEL_VERBOSE= 253 | CONFIG_GAP_INITIAL_TRACE_LEVEL=2 254 | CONFIG_BNEP_TRACE_LEVEL_NONE= 255 | CONFIG_BNEP_TRACE_LEVEL_ERROR= 256 | CONFIG_BNEP_TRACE_LEVEL_WARNING=y 257 | CONFIG_BNEP_TRACE_LEVEL_API= 258 | CONFIG_BNEP_TRACE_LEVEL_EVENT= 259 | CONFIG_BNEP_TRACE_LEVEL_DEBUG= 260 | CONFIG_BNEP_TRACE_LEVEL_VERBOSE= 261 | CONFIG_BNEP_INITIAL_TRACE_LEVEL=2 262 | CONFIG_PAN_TRACE_LEVEL_NONE= 263 | CONFIG_PAN_TRACE_LEVEL_ERROR= 264 | CONFIG_PAN_TRACE_LEVEL_WARNING=y 265 | CONFIG_PAN_TRACE_LEVEL_API= 266 | CONFIG_PAN_TRACE_LEVEL_EVENT= 267 | CONFIG_PAN_TRACE_LEVEL_DEBUG= 268 | CONFIG_PAN_TRACE_LEVEL_VERBOSE= 269 | CONFIG_PAN_INITIAL_TRACE_LEVEL=2 270 | CONFIG_A2D_TRACE_LEVEL_NONE= 271 | CONFIG_A2D_TRACE_LEVEL_ERROR= 272 | CONFIG_A2D_TRACE_LEVEL_WARNING=y 273 | CONFIG_A2D_TRACE_LEVEL_API= 274 | CONFIG_A2D_TRACE_LEVEL_EVENT= 275 | CONFIG_A2D_TRACE_LEVEL_DEBUG= 276 | CONFIG_A2D_TRACE_LEVEL_VERBOSE= 277 | CONFIG_A2D_INITIAL_TRACE_LEVEL=2 278 | CONFIG_AVDT_TRACE_LEVEL_NONE= 279 | CONFIG_AVDT_TRACE_LEVEL_ERROR= 280 | CONFIG_AVDT_TRACE_LEVEL_WARNING=y 281 | CONFIG_AVDT_TRACE_LEVEL_API= 282 | CONFIG_AVDT_TRACE_LEVEL_EVENT= 283 | CONFIG_AVDT_TRACE_LEVEL_DEBUG= 284 | CONFIG_AVDT_TRACE_LEVEL_VERBOSE= 285 | CONFIG_AVDT_INITIAL_TRACE_LEVEL=2 286 | CONFIG_AVCT_TRACE_LEVEL_NONE= 287 | CONFIG_AVCT_TRACE_LEVEL_ERROR= 288 | CONFIG_AVCT_TRACE_LEVEL_WARNING=y 289 | CONFIG_AVCT_TRACE_LEVEL_API= 290 | CONFIG_AVCT_TRACE_LEVEL_EVENT= 291 | CONFIG_AVCT_TRACE_LEVEL_DEBUG= 292 | CONFIG_AVCT_TRACE_LEVEL_VERBOSE= 293 | CONFIG_AVCT_INITIAL_TRACE_LEVEL=2 294 | CONFIG_AVRC_TRACE_LEVEL_NONE= 295 | CONFIG_AVRC_TRACE_LEVEL_ERROR= 296 | CONFIG_AVRC_TRACE_LEVEL_WARNING=y 297 | CONFIG_AVRC_TRACE_LEVEL_API= 298 | CONFIG_AVRC_TRACE_LEVEL_EVENT= 299 | CONFIG_AVRC_TRACE_LEVEL_DEBUG= 300 | CONFIG_AVRC_TRACE_LEVEL_VERBOSE= 301 | CONFIG_AVRC_INITIAL_TRACE_LEVEL=2 302 | CONFIG_MCA_TRACE_LEVEL_NONE= 303 | CONFIG_MCA_TRACE_LEVEL_ERROR= 304 | CONFIG_MCA_TRACE_LEVEL_WARNING=y 305 | CONFIG_MCA_TRACE_LEVEL_API= 306 | CONFIG_MCA_TRACE_LEVEL_EVENT= 307 | CONFIG_MCA_TRACE_LEVEL_DEBUG= 308 | CONFIG_MCA_TRACE_LEVEL_VERBOSE= 309 | CONFIG_MCA_INITIAL_TRACE_LEVEL=2 310 | CONFIG_HID_TRACE_LEVEL_NONE= 311 | CONFIG_HID_TRACE_LEVEL_ERROR= 312 | CONFIG_HID_TRACE_LEVEL_WARNING=y 313 | CONFIG_HID_TRACE_LEVEL_API= 314 | CONFIG_HID_TRACE_LEVEL_EVENT= 315 | CONFIG_HID_TRACE_LEVEL_DEBUG= 316 | CONFIG_HID_TRACE_LEVEL_VERBOSE= 317 | CONFIG_HID_INITIAL_TRACE_LEVEL=2 318 | CONFIG_APPL_TRACE_LEVEL_NONE= 319 | CONFIG_APPL_TRACE_LEVEL_ERROR= 320 | CONFIG_APPL_TRACE_LEVEL_WARNING=y 321 | CONFIG_APPL_TRACE_LEVEL_API= 322 | CONFIG_APPL_TRACE_LEVEL_EVENT= 323 | CONFIG_APPL_TRACE_LEVEL_DEBUG= 324 | CONFIG_APPL_TRACE_LEVEL_VERBOSE= 325 | CONFIG_APPL_INITIAL_TRACE_LEVEL=2 326 | CONFIG_GATT_TRACE_LEVEL_NONE= 327 | CONFIG_GATT_TRACE_LEVEL_ERROR= 328 | CONFIG_GATT_TRACE_LEVEL_WARNING=y 329 | CONFIG_GATT_TRACE_LEVEL_API= 330 | CONFIG_GATT_TRACE_LEVEL_EVENT= 331 | CONFIG_GATT_TRACE_LEVEL_DEBUG= 332 | CONFIG_GATT_TRACE_LEVEL_VERBOSE= 333 | CONFIG_GATT_INITIAL_TRACE_LEVEL=2 334 | CONFIG_SMP_TRACE_LEVEL_NONE= 335 | CONFIG_SMP_TRACE_LEVEL_ERROR= 336 | CONFIG_SMP_TRACE_LEVEL_WARNING=y 337 | CONFIG_SMP_TRACE_LEVEL_API= 338 | CONFIG_SMP_TRACE_LEVEL_EVENT= 339 | CONFIG_SMP_TRACE_LEVEL_DEBUG= 340 | CONFIG_SMP_TRACE_LEVEL_VERBOSE= 341 | CONFIG_SMP_INITIAL_TRACE_LEVEL=2 342 | CONFIG_BTIF_TRACE_LEVEL_NONE= 343 | CONFIG_BTIF_TRACE_LEVEL_ERROR= 344 | CONFIG_BTIF_TRACE_LEVEL_WARNING=y 345 | CONFIG_BTIF_TRACE_LEVEL_API= 346 | CONFIG_BTIF_TRACE_LEVEL_EVENT= 347 | CONFIG_BTIF_TRACE_LEVEL_DEBUG= 348 | CONFIG_BTIF_TRACE_LEVEL_VERBOSE= 349 | CONFIG_BTIF_INITIAL_TRACE_LEVEL=2 350 | CONFIG_BTC_TRACE_LEVEL_NONE= 351 | CONFIG_BTC_TRACE_LEVEL_ERROR= 352 | CONFIG_BTC_TRACE_LEVEL_WARNING=y 353 | CONFIG_BTC_TRACE_LEVEL_API= 354 | CONFIG_BTC_TRACE_LEVEL_EVENT= 355 | CONFIG_BTC_TRACE_LEVEL_DEBUG= 356 | CONFIG_BTC_TRACE_LEVEL_VERBOSE= 357 | CONFIG_BTC_INITIAL_TRACE_LEVEL=2 358 | CONFIG_OSI_TRACE_LEVEL_NONE= 359 | CONFIG_OSI_TRACE_LEVEL_ERROR= 360 | CONFIG_OSI_TRACE_LEVEL_WARNING=y 361 | CONFIG_OSI_TRACE_LEVEL_API= 362 | CONFIG_OSI_TRACE_LEVEL_EVENT= 363 | CONFIG_OSI_TRACE_LEVEL_DEBUG= 364 | CONFIG_OSI_TRACE_LEVEL_VERBOSE= 365 | CONFIG_OSI_INITIAL_TRACE_LEVEL=2 366 | CONFIG_BLUFI_TRACE_LEVEL_NONE= 367 | CONFIG_BLUFI_TRACE_LEVEL_ERROR= 368 | CONFIG_BLUFI_TRACE_LEVEL_WARNING=y 369 | CONFIG_BLUFI_TRACE_LEVEL_API= 370 | CONFIG_BLUFI_TRACE_LEVEL_EVENT= 371 | CONFIG_BLUFI_TRACE_LEVEL_DEBUG= 372 | CONFIG_BLUFI_TRACE_LEVEL_VERBOSE= 373 | CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 374 | CONFIG_BT_ACL_CONNECTIONS=4 375 | CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST= 376 | CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY= 377 | CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK= 378 | CONFIG_SMP_ENABLE=y 379 | CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY= 380 | CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 381 | CONFIG_BT_RESERVE_DRAM=0xdb5c 382 | CONFIG_BLE_MESH= 383 | 384 | # 385 | # Driver configurations 386 | # 387 | 388 | # 389 | # ADC configuration 390 | # 391 | CONFIG_ADC_FORCE_XPD_FSM= 392 | CONFIG_ADC2_DISABLE_DAC=y 393 | 394 | # 395 | # SPI configuration 396 | # 397 | CONFIG_SPI_MASTER_IN_IRAM= 398 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 399 | CONFIG_SPI_SLAVE_IN_IRAM= 400 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 401 | 402 | # 403 | # eFuse Bit Manager 404 | # 405 | CONFIG_EFUSE_CUSTOM_TABLE= 406 | CONFIG_EFUSE_VIRTUAL= 407 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE= 408 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 409 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT= 410 | CONFIG_EFUSE_MAX_BLK_LEN=192 411 | 412 | # 413 | # ESP32-specific 414 | # 415 | CONFIG_IDF_TARGET_ESP32=y 416 | CONFIG_ESP32_REV_MIN_0=y 417 | CONFIG_ESP32_REV_MIN_1= 418 | CONFIG_ESP32_REV_MIN_2= 419 | CONFIG_ESP32_REV_MIN_3= 420 | CONFIG_ESP32_REV_MIN=0 421 | CONFIG_ESP32_DPORT_WORKAROUND=y 422 | CONFIG_ESP32_DEFAULT_CPU_FREQ_80= 423 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 424 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240= 425 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 426 | CONFIG_SPIRAM_SUPPORT= 427 | CONFIG_MEMMAP_TRACEMEM= 428 | CONFIG_MEMMAP_TRACEMEM_TWOBANKS= 429 | CONFIG_ESP32_TRAX= 430 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 431 | CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= 432 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 433 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 434 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 435 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 436 | CONFIG_MAIN_TASK_STACK_SIZE=4096 437 | CONFIG_IPC_TASK_STACK_SIZE=1024 438 | CONFIG_TIMER_TASK_STACK_SIZE=4096 439 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 440 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= 441 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= 442 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= 443 | CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= 444 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 445 | CONFIG_NEWLIB_NANO_FORMAT= 446 | CONFIG_CONSOLE_UART_DEFAULT=y 447 | CONFIG_CONSOLE_UART_CUSTOM= 448 | CONFIG_CONSOLE_UART_NONE= 449 | CONFIG_CONSOLE_UART_NUM=0 450 | CONFIG_CONSOLE_UART_BAUDRATE=115200 451 | CONFIG_ULP_COPROC_ENABLED= 452 | CONFIG_ULP_COPROC_RESERVE_MEM=0 453 | CONFIG_ESP32_PANIC_PRINT_HALT=y 454 | CONFIG_ESP32_PANIC_PRINT_REBOOT= 455 | CONFIG_ESP32_PANIC_SILENT_REBOOT= 456 | CONFIG_ESP32_PANIC_GDBSTUB= 457 | CONFIG_ESP32_DEBUG_OCDAWARE=y 458 | CONFIG_ESP32_DEBUG_STUBS_ENABLE=y 459 | CONFIG_INT_WDT=y 460 | CONFIG_INT_WDT_TIMEOUT_MS=300 461 | CONFIG_INT_WDT_CHECK_CPU1=y 462 | CONFIG_TASK_WDT=y 463 | CONFIG_TASK_WDT_PANIC= 464 | CONFIG_TASK_WDT_TIMEOUT_S=5 465 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 466 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 467 | CONFIG_BROWNOUT_DET=y 468 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 469 | CONFIG_BROWNOUT_DET_LVL_SEL_1= 470 | CONFIG_BROWNOUT_DET_LVL_SEL_2= 471 | CONFIG_BROWNOUT_DET_LVL_SEL_3= 472 | CONFIG_BROWNOUT_DET_LVL_SEL_4= 473 | CONFIG_BROWNOUT_DET_LVL_SEL_5= 474 | CONFIG_BROWNOUT_DET_LVL_SEL_6= 475 | CONFIG_BROWNOUT_DET_LVL_SEL_7= 476 | CONFIG_BROWNOUT_DET_LVL=0 477 | CONFIG_REDUCE_PHY_TX_POWER=y 478 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 479 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC= 480 | CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= 481 | CONFIG_ESP32_TIME_SYSCALL_USE_NONE= 482 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 483 | CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= 484 | CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC= 485 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256= 486 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 487 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0 488 | CONFIG_ESP32_XTAL_FREQ_40= 489 | CONFIG_ESP32_XTAL_FREQ_26= 490 | CONFIG_ESP32_XTAL_FREQ_AUTO=y 491 | CONFIG_ESP32_XTAL_FREQ=0 492 | CONFIG_DISABLE_BASIC_ROM_CONSOLE= 493 | CONFIG_ESP_TIMER_PROFILING= 494 | CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= 495 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 496 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 497 | 498 | # 499 | # Wi-Fi 500 | # 501 | CONFIG_SW_COEXIST_ENABLE=y 502 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 503 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 504 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER= 505 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 506 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 507 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 508 | CONFIG_ESP32_WIFI_CSI_ENABLED= 509 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 510 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 511 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 512 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 513 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 514 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 515 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= 516 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 517 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 518 | CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE= 519 | CONFIG_ESP32_WIFI_IRAM_OPT=y 520 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 521 | 522 | # 523 | # PHY 524 | # 525 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 526 | CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= 527 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 528 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 529 | 530 | # 531 | # Power Management 532 | # 533 | CONFIG_PM_ENABLE= 534 | 535 | # 536 | # ADC-Calibration 537 | # 538 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 539 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 540 | CONFIG_ADC_CAL_LUT_ENABLE=y 541 | 542 | # 543 | # Event Loop Library 544 | # 545 | CONFIG_EVENT_LOOP_PROFILING= 546 | 547 | # 548 | # ESP HTTP client 549 | # 550 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 551 | CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH= 552 | 553 | # 554 | # HTTP Server 555 | # 556 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 557 | CONFIG_HTTPD_MAX_URI_LEN=512 558 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 559 | CONFIG_HTTPD_PURGE_BUF_LEN=32 560 | CONFIG_HTTPD_LOG_PURGE_DATA= 561 | 562 | # 563 | # ESP HTTPS OTA 564 | # 565 | CONFIG_OTA_ALLOW_HTTP= 566 | 567 | # 568 | # Core dump 569 | # 570 | CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= 571 | CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y 572 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE= 573 | CONFIG_ESP32_ENABLE_COREDUMP=y 574 | CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 575 | CONFIG_ESP32_CORE_DUMP_UART_DELAY=0 576 | 577 | # 578 | # Ethernet 579 | # 580 | CONFIG_DMA_RX_BUF_NUM=10 581 | CONFIG_DMA_TX_BUF_NUM=10 582 | CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=y 583 | CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000 584 | CONFIG_EMAC_TASK_PRIORITY=20 585 | CONFIG_EMAC_TASK_STACK_SIZE=3072 586 | 587 | # 588 | # FAT Filesystem support 589 | # 590 | CONFIG_FATFS_CODEPAGE_DYNAMIC= 591 | CONFIG_FATFS_CODEPAGE_437=y 592 | CONFIG_FATFS_CODEPAGE_720= 593 | CONFIG_FATFS_CODEPAGE_737= 594 | CONFIG_FATFS_CODEPAGE_771= 595 | CONFIG_FATFS_CODEPAGE_775= 596 | CONFIG_FATFS_CODEPAGE_850= 597 | CONFIG_FATFS_CODEPAGE_852= 598 | CONFIG_FATFS_CODEPAGE_855= 599 | CONFIG_FATFS_CODEPAGE_857= 600 | CONFIG_FATFS_CODEPAGE_860= 601 | CONFIG_FATFS_CODEPAGE_861= 602 | CONFIG_FATFS_CODEPAGE_862= 603 | CONFIG_FATFS_CODEPAGE_863= 604 | CONFIG_FATFS_CODEPAGE_864= 605 | CONFIG_FATFS_CODEPAGE_865= 606 | CONFIG_FATFS_CODEPAGE_866= 607 | CONFIG_FATFS_CODEPAGE_869= 608 | CONFIG_FATFS_CODEPAGE_932= 609 | CONFIG_FATFS_CODEPAGE_936= 610 | CONFIG_FATFS_CODEPAGE_949= 611 | CONFIG_FATFS_CODEPAGE_950= 612 | CONFIG_FATFS_CODEPAGE=437 613 | CONFIG_FATFS_LFN_NONE=y 614 | CONFIG_FATFS_LFN_HEAP= 615 | CONFIG_FATFS_LFN_STACK= 616 | CONFIG_FATFS_FS_LOCK=0 617 | CONFIG_FATFS_TIMEOUT_MS=10000 618 | CONFIG_FATFS_PER_FILE_CACHE=y 619 | 620 | # 621 | # Modbus configuration 622 | # 623 | CONFIG_MB_QUEUE_LENGTH=20 624 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 625 | CONFIG_MB_SERIAL_BUF_SIZE=256 626 | CONFIG_MB_SERIAL_TASK_PRIO=10 627 | CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT= 628 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 629 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 630 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 631 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 632 | CONFIG_MB_TIMER_PORT_ENABLED=y 633 | CONFIG_MB_TIMER_GROUP=0 634 | CONFIG_MB_TIMER_INDEX=0 635 | 636 | # 637 | # FreeRTOS 638 | # 639 | CONFIG_FREERTOS_UNICORE= 640 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 641 | CONFIG_FREERTOS_CORETIMER_0=y 642 | CONFIG_FREERTOS_CORETIMER_1= 643 | CONFIG_FREERTOS_HZ=1000 644 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION= 645 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= 646 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= 647 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 648 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= 649 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 650 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3 651 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 652 | CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= 653 | CONFIG_FREERTOS_ASSERT_DISABLE= 654 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 655 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 656 | CONFIG_FREERTOS_LEGACY_HOOKS= 657 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 658 | CONFIG_SUPPORT_STATIC_ALLOCATION=y 659 | CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK= 660 | CONFIG_TIMER_TASK_PRIORITY=4 661 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 662 | CONFIG_TIMER_QUEUE_LENGTH=10 663 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 664 | CONFIG_FREERTOS_USE_TRACE_FACILITY= 665 | CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= 666 | CONFIG_FREERTOS_DEBUG_INTERNALS= 667 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 668 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 669 | CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE= 670 | 671 | # 672 | # Heap memory debugging 673 | # 674 | CONFIG_HEAP_POISONING_DISABLED=y 675 | CONFIG_HEAP_POISONING_LIGHT= 676 | CONFIG_HEAP_POISONING_COMPREHENSIVE= 677 | CONFIG_HEAP_TRACING= 678 | 679 | # 680 | # libsodium 681 | # 682 | 683 | # 684 | # Log output 685 | # 686 | CONFIG_LOG_DEFAULT_LEVEL_NONE= 687 | CONFIG_LOG_DEFAULT_LEVEL_ERROR=y 688 | CONFIG_LOG_DEFAULT_LEVEL_WARN= 689 | CONFIG_LOG_DEFAULT_LEVEL_INFO= 690 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG= 691 | CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= 692 | CONFIG_LOG_DEFAULT_LEVEL=1 693 | CONFIG_LOG_COLORS=y 694 | 695 | # 696 | # LWIP 697 | # 698 | CONFIG_L2_TO_L3_COPY= 699 | CONFIG_ETHARP_SUPPORT_VLAN= 700 | CONFIG_LWIP_IRAM_OPTIMIZATION= 701 | CONFIG_LWIP_MAX_SOCKETS=4 702 | CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS=y 703 | CONFIG_USE_ONLY_LWIP_SELECT= 704 | CONFIG_LWIP_SO_REUSE= 705 | CONFIG_LWIP_SO_RCVBUF= 706 | CONFIG_LWIP_IP_FRAG= 707 | CONFIG_LWIP_IP_REASSEMBLY= 708 | CONFIG_LWIP_STATS= 709 | CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y 710 | CONFIG_ESP_GRATUITOUS_ARP=y 711 | CONFIG_GARP_TMR_INTERVAL=60 712 | CONFIG_TCPIP_RECVMBOX_SIZE=32 713 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK= 714 | CONFIG_LWIP_DHCP_RESTORE_LAST_IP= 715 | 716 | # 717 | # DHCP server 718 | # 719 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 720 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 721 | CONFIG_LWIP_AUTOIP= 722 | CONFIG_LWIP_IPV6_AUTOCONFIG= 723 | CONFIG_LWIP_NETIF_LOOPBACK=y 724 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 725 | 726 | # 727 | # TCP 728 | # 729 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 730 | CONFIG_LWIP_MAX_LISTENING_TCP=16 731 | CONFIG_TCP_MAXRTX=12 732 | CONFIG_TCP_SYNMAXRTX=6 733 | CONFIG_TCP_MSS=1436 734 | CONFIG_TCP_MSL=60000 735 | CONFIG_TCP_SND_BUF_DEFAULT=5744 736 | CONFIG_TCP_WND_DEFAULT=5744 737 | CONFIG_TCP_RECVMBOX_SIZE=6 738 | CONFIG_TCP_QUEUE_OOSEQ=y 739 | CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= 740 | CONFIG_TCP_OVERSIZE_MSS=y 741 | CONFIG_TCP_OVERSIZE_QUARTER_MSS= 742 | CONFIG_TCP_OVERSIZE_DISABLE= 743 | 744 | # 745 | # UDP 746 | # 747 | CONFIG_LWIP_MAX_UDP_PCBS=16 748 | CONFIG_UDP_RECVMBOX_SIZE=6 749 | CONFIG_TCPIP_TASK_STACK_SIZE=2560 750 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 751 | CONFIG_TCPIP_TASK_AFFINITY_CPU0= 752 | CONFIG_TCPIP_TASK_AFFINITY_CPU1= 753 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 754 | CONFIG_PPP_SUPPORT= 755 | 756 | # 757 | # ICMP 758 | # 759 | CONFIG_LWIP_MULTICAST_PING= 760 | CONFIG_LWIP_BROADCAST_PING= 761 | 762 | # 763 | # LWIP RAW API 764 | # 765 | CONFIG_LWIP_MAX_RAW_PCBS=16 766 | 767 | # 768 | # SNTP 769 | # 770 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 771 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 772 | 773 | # 774 | # mbedTLS 775 | # 776 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 777 | CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC= 778 | CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= 779 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 780 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN= 781 | CONFIG_MBEDTLS_DEBUG= 782 | CONFIG_MBEDTLS_ECP_RESTARTABLE= 783 | CONFIG_MBEDTLS_CMAC_C= 784 | CONFIG_MBEDTLS_HARDWARE_AES=y 785 | CONFIG_MBEDTLS_HARDWARE_MPI=y 786 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y 787 | CONFIG_MBEDTLS_HARDWARE_SHA=y 788 | CONFIG_MBEDTLS_HAVE_TIME=y 789 | CONFIG_MBEDTLS_HAVE_TIME_DATE= 790 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 791 | CONFIG_MBEDTLS_TLS_SERVER_ONLY= 792 | CONFIG_MBEDTLS_TLS_CLIENT_ONLY= 793 | CONFIG_MBEDTLS_TLS_DISABLED= 794 | CONFIG_MBEDTLS_TLS_SERVER=y 795 | CONFIG_MBEDTLS_TLS_CLIENT=y 796 | CONFIG_MBEDTLS_TLS_ENABLED=y 797 | 798 | # 799 | # TLS Key Exchange Methods 800 | # 801 | CONFIG_MBEDTLS_PSK_MODES=y 802 | CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y 803 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y 804 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y 805 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y 806 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 807 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 808 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 809 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 810 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 811 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 812 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 813 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 814 | CONFIG_MBEDTLS_SSL_PROTO_SSL3= 815 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 816 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 817 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 818 | CONFIG_MBEDTLS_SSL_PROTO_DTLS=y 819 | CONFIG_MBEDTLS_SSL_ALPN=y 820 | CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y 821 | 822 | # 823 | # Symmetric Ciphers 824 | # 825 | CONFIG_MBEDTLS_AES_C=y 826 | CONFIG_MBEDTLS_CAMELLIA_C= 827 | CONFIG_MBEDTLS_DES_C= 828 | CONFIG_MBEDTLS_RC4_DISABLED=y 829 | CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= 830 | CONFIG_MBEDTLS_RC4_ENABLED= 831 | CONFIG_MBEDTLS_BLOWFISH_C= 832 | CONFIG_MBEDTLS_XTEA_C= 833 | CONFIG_MBEDTLS_CCM_C=y 834 | CONFIG_MBEDTLS_GCM_C=y 835 | CONFIG_MBEDTLS_RIPEMD160_C= 836 | 837 | # 838 | # Certificates 839 | # 840 | CONFIG_MBEDTLS_PEM_PARSE_C=y 841 | CONFIG_MBEDTLS_PEM_WRITE_C=y 842 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 843 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 844 | CONFIG_MBEDTLS_ECP_C=y 845 | CONFIG_MBEDTLS_ECDH_C=y 846 | CONFIG_MBEDTLS_ECDSA_C=y 847 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 848 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 849 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 850 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 851 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 852 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 853 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 854 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 855 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 856 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 857 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 858 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 859 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 860 | 861 | # 862 | # mDNS 863 | # 864 | CONFIG_MDNS_MAX_SERVICES=10 865 | 866 | # 867 | # ESP-MQTT Configurations 868 | # 869 | CONFIG_MQTT_PROTOCOL_311=y 870 | CONFIG_MQTT_TRANSPORT_SSL=y 871 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 872 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 873 | CONFIG_MQTT_USE_CUSTOM_CONFIG= 874 | CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED= 875 | CONFIG_MQTT_CUSTOM_OUTBOX= 876 | 877 | # 878 | # NVS 879 | # 880 | 881 | # 882 | # OpenSSL 883 | # 884 | CONFIG_OPENSSL_DEBUG= 885 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 886 | CONFIG_OPENSSL_ASSERT_EXIT= 887 | 888 | # 889 | # PThreads 890 | # 891 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 892 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 893 | CONFIG_PTHREAD_STACK_MIN=768 894 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y 895 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0= 896 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1= 897 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 898 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 899 | 900 | # 901 | # SPI Flash driver 902 | # 903 | CONFIG_SPI_FLASH_VERIFY_WRITE= 904 | CONFIG_SPI_FLASH_ENABLE_COUNTERS= 905 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 906 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 907 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= 908 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= 909 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 910 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 911 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 912 | 913 | # 914 | # SPIFFS Configuration 915 | # 916 | CONFIG_SPIFFS_MAX_PARTITIONS=3 917 | 918 | # 919 | # SPIFFS Cache Configuration 920 | # 921 | CONFIG_SPIFFS_CACHE=y 922 | CONFIG_SPIFFS_CACHE_WR=y 923 | CONFIG_SPIFFS_CACHE_STATS= 924 | CONFIG_SPIFFS_PAGE_CHECK=y 925 | CONFIG_SPIFFS_GC_MAX_RUNS=10 926 | CONFIG_SPIFFS_GC_STATS= 927 | CONFIG_SPIFFS_PAGE_SIZE=256 928 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 929 | CONFIG_SPIFFS_USE_MAGIC=y 930 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 931 | CONFIG_SPIFFS_META_LENGTH=4 932 | CONFIG_SPIFFS_USE_MTIME=y 933 | 934 | # 935 | # Debug Configuration 936 | # 937 | CONFIG_SPIFFS_DBG= 938 | CONFIG_SPIFFS_API_DBG= 939 | CONFIG_SPIFFS_GC_DBG= 940 | CONFIG_SPIFFS_CACHE_DBG= 941 | CONFIG_SPIFFS_CHECK_DBG= 942 | CONFIG_SPIFFS_TEST_VISUALISATION= 943 | 944 | # 945 | # TCP/IP Adapter 946 | # 947 | CONFIG_IP_LOST_TIMER_INTERVAL=120 948 | CONFIG_TCPIP_LWIP=y 949 | 950 | # 951 | # Unity unit testing library 952 | # 953 | CONFIG_UNITY_ENABLE_FLOAT=y 954 | CONFIG_UNITY_ENABLE_DOUBLE=y 955 | CONFIG_UNITY_ENABLE_COLOR= 956 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 957 | CONFIG_UNITY_ENABLE_FIXTURE= 958 | 959 | # 960 | # Virtual file system 961 | # 962 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 963 | CONFIG_SUPPORT_TERMIOS=y 964 | 965 | # 966 | # Wear Levelling 967 | # 968 | CONFIG_WL_SECTOR_SIZE_512= 969 | CONFIG_WL_SECTOR_SIZE_4096=y 970 | CONFIG_WL_SECTOR_SIZE=4096 971 | 972 | # 973 | # Wi-Fi Provisioning Manager 974 | # 975 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 976 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /circuit/GBA-BT-HID.kicad_pcb: -------------------------------------------------------------------------------- 1 | (kicad_pcb (version 20171130) (host pcbnew "(5.1.2-1)-1") 2 | 3 | (general 4 | (thickness 1.6) 5 | (drawings 4) 6 | (tracks 0) 7 | (zones 0) 8 | (modules 13) 9 | (nets 42) 10 | ) 11 | 12 | (page A4) 13 | (layers 14 | (0 F.Cu signal) 15 | (31 B.Cu signal) 16 | (32 B.Adhes user) 17 | (33 F.Adhes user) 18 | (34 B.Paste user) 19 | (35 F.Paste user) 20 | (36 B.SilkS user) 21 | (37 F.SilkS user) 22 | (38 B.Mask user) 23 | (39 F.Mask user) 24 | (40 Dwgs.User user) 25 | (41 Cmts.User user) 26 | (42 Eco1.User user) 27 | (43 Eco2.User user) 28 | (44 Edge.Cuts user) 29 | (45 Margin user) 30 | (46 B.CrtYd user) 31 | (47 F.CrtYd user) 32 | (48 B.Fab user) 33 | (49 F.Fab user) 34 | ) 35 | 36 | (setup 37 | (last_trace_width 0.25) 38 | (trace_clearance 0.2) 39 | (zone_clearance 0.508) 40 | (zone_45_only no) 41 | (trace_min 0.2) 42 | (via_size 0.8) 43 | (via_drill 0.4) 44 | (via_min_size 0.4) 45 | (via_min_drill 0.3) 46 | (uvia_size 0.3) 47 | (uvia_drill 0.1) 48 | (uvias_allowed no) 49 | (uvia_min_size 0.2) 50 | (uvia_min_drill 0.1) 51 | (edge_width 0.05) 52 | (segment_width 0.2) 53 | (pcb_text_width 0.3) 54 | (pcb_text_size 1.5 1.5) 55 | (mod_edge_width 0.12) 56 | (mod_text_size 1 1) 57 | (mod_text_width 0.15) 58 | (pad_size 1.524 1.524) 59 | (pad_drill 0.762) 60 | (pad_to_mask_clearance 0.051) 61 | (solder_mask_min_width 0.25) 62 | (aux_axis_origin 0 0) 63 | (visible_elements FFFFFF7F) 64 | (pcbplotparams 65 | (layerselection 0x010fc_ffffffff) 66 | (usegerberextensions false) 67 | (usegerberattributes false) 68 | (usegerberadvancedattributes false) 69 | (creategerberjobfile false) 70 | (excludeedgelayer true) 71 | (linewidth 0.100000) 72 | (plotframeref false) 73 | (viasonmask false) 74 | (mode 1) 75 | (useauxorigin false) 76 | (hpglpennumber 1) 77 | (hpglpenspeed 20) 78 | (hpglpendiameter 15.000000) 79 | (psnegative false) 80 | (psa4output false) 81 | (plotreference true) 82 | (plotvalue true) 83 | (plotinvisibletext false) 84 | (padsonsilk false) 85 | (subtractmaskfromsilk false) 86 | (outputformat 1) 87 | (mirror false) 88 | (drillshape 1) 89 | (scaleselection 1) 90 | (outputdirectory "")) 91 | ) 92 | 93 | (net 0 "") 94 | (net 1 GND) 95 | (net 2 "Net-(C1-Pad1)") 96 | (net 3 "Net-(C2-Pad1)") 97 | (net 4 VCC) 98 | (net 5 "Net-(J1-Pad5)") 99 | (net 6 "Net-(J1-Pad4)") 100 | (net 7 "Net-(J1-Pad3)") 101 | (net 8 "Net-(J1-Pad2)") 102 | (net 9 "Net-(J2-Pad5)") 103 | (net 10 "Net-(J2-Pad4)") 104 | (net 11 "Net-(J2-Pad3)") 105 | (net 12 "Net-(J2-Pad2)") 106 | (net 13 "Net-(J3-Pad6)") 107 | (net 14 "Net-(J3-Pad1)") 108 | (net 15 "Net-(J3-Pad2)") 109 | (net 16 "Net-(J3-Pad3)") 110 | (net 17 "Net-(U1-Pad28)") 111 | (net 18 "Net-(U1-Pad14)") 112 | (net 19 "Net-(U1-Pad27)") 113 | (net 20 "Net-(U1-Pad13)") 114 | (net 21 "Net-(U1-Pad26)") 115 | (net 22 "Net-(U1-Pad12)") 116 | (net 23 "Net-(U1-Pad25)") 117 | (net 24 "Net-(U1-Pad11)") 118 | (net 25 "Net-(U1-Pad24)") 119 | (net 26 "Net-(U1-Pad23)") 120 | (net 27 "Net-(U1-Pad21)") 121 | (net 28 "Net-(U1-Pad6)") 122 | (net 29 "Net-(U1-Pad19)") 123 | (net 30 "Net-(U1-Pad5)") 124 | (net 31 "Net-(U1-Pad18)") 125 | (net 32 "Net-(U1-Pad17)") 126 | (net 33 "Net-(U1-Pad16)") 127 | (net 34 "Net-(U1-Pad15)") 128 | (net 35 "Net-(U2-Pad2)") 129 | (net 36 "Net-(U3-Pad7)") 130 | (net 37 "Net-(U3-Pad13)") 131 | (net 38 "Net-(U3-Pad4)") 132 | (net 39 "Net-(U3-Pad11)") 133 | (net 40 "Net-(U3-Pad3)") 134 | (net 41 "Net-(U3-Pad2)") 135 | 136 | (net_class Default "This is the default net class." 137 | (clearance 0.2) 138 | (trace_width 0.25) 139 | (via_dia 0.8) 140 | (via_drill 0.4) 141 | (uvia_dia 0.3) 142 | (uvia_drill 0.1) 143 | (add_net GND) 144 | (add_net "Net-(C1-Pad1)") 145 | (add_net "Net-(C2-Pad1)") 146 | (add_net "Net-(J1-Pad2)") 147 | (add_net "Net-(J1-Pad3)") 148 | (add_net "Net-(J1-Pad4)") 149 | (add_net "Net-(J1-Pad5)") 150 | (add_net "Net-(J2-Pad2)") 151 | (add_net "Net-(J2-Pad3)") 152 | (add_net "Net-(J2-Pad4)") 153 | (add_net "Net-(J2-Pad5)") 154 | (add_net "Net-(J3-Pad1)") 155 | (add_net "Net-(J3-Pad2)") 156 | (add_net "Net-(J3-Pad3)") 157 | (add_net "Net-(J3-Pad6)") 158 | (add_net "Net-(U1-Pad11)") 159 | (add_net "Net-(U1-Pad12)") 160 | (add_net "Net-(U1-Pad13)") 161 | (add_net "Net-(U1-Pad14)") 162 | (add_net "Net-(U1-Pad15)") 163 | (add_net "Net-(U1-Pad16)") 164 | (add_net "Net-(U1-Pad17)") 165 | (add_net "Net-(U1-Pad18)") 166 | (add_net "Net-(U1-Pad19)") 167 | (add_net "Net-(U1-Pad21)") 168 | (add_net "Net-(U1-Pad23)") 169 | (add_net "Net-(U1-Pad24)") 170 | (add_net "Net-(U1-Pad25)") 171 | (add_net "Net-(U1-Pad26)") 172 | (add_net "Net-(U1-Pad27)") 173 | (add_net "Net-(U1-Pad28)") 174 | (add_net "Net-(U1-Pad5)") 175 | (add_net "Net-(U1-Pad6)") 176 | (add_net "Net-(U2-Pad2)") 177 | (add_net "Net-(U3-Pad11)") 178 | (add_net "Net-(U3-Pad13)") 179 | (add_net "Net-(U3-Pad2)") 180 | (add_net "Net-(U3-Pad3)") 181 | (add_net "Net-(U3-Pad4)") 182 | (add_net "Net-(U3-Pad7)") 183 | (add_net VCC) 184 | ) 185 | 186 | (module Crystal:Resonator-2Pin_W10.0mm_H5.0mm (layer F.Cu) (tedit 5A0FD1B2) (tstamp 5CEB4B90) 187 | (at 152 49 90) 188 | (descr "Ceramic Resomator/Filter 10.0x5.0 RedFrequency MG/MT/MX series, http://www.red-frequency.com/download/datenblatt/redfrequency-datenblatt-ir-zta.pdf, length*width=10.0x5.0mm^2 package, package length=10.0mm, package width=5.0mm, 2 pins") 189 | (tags "THT ceramic resonator filter") 190 | (path /5D039C0A) 191 | (fp_text reference Y1 (at 2.5 -3.7 90) (layer F.SilkS) 192 | (effects (font (size 1 1) (thickness 0.15))) 193 | ) 194 | (fp_text value 16Mhz (at 2.5 3.7 90) (layer F.Fab) 195 | (effects (font (size 1 1) (thickness 0.15))) 196 | ) 197 | (fp_arc (start 5 0) (end 5 -2.7) (angle 180) (layer F.SilkS) (width 0.12)) 198 | (fp_arc (start 0 0) (end 0 -2.7) (angle -180) (layer F.SilkS) (width 0.12)) 199 | (fp_arc (start 5 0) (end 5 -2.5) (angle 180) (layer F.Fab) (width 0.1)) 200 | (fp_arc (start 0 0) (end 0 -2.5) (angle -180) (layer F.Fab) (width 0.1)) 201 | (fp_arc (start 5 0) (end 5 -2.5) (angle 180) (layer F.Fab) (width 0.1)) 202 | (fp_arc (start 0 0) (end 0 -2.5) (angle -180) (layer F.Fab) (width 0.1)) 203 | (fp_line (start 8 -3) (end -3 -3) (layer F.CrtYd) (width 0.05)) 204 | (fp_line (start 8 3) (end 8 -3) (layer F.CrtYd) (width 0.05)) 205 | (fp_line (start -3 3) (end 8 3) (layer F.CrtYd) (width 0.05)) 206 | (fp_line (start -3 -3) (end -3 3) (layer F.CrtYd) (width 0.05)) 207 | (fp_line (start 0 2.7) (end 5 2.7) (layer F.SilkS) (width 0.12)) 208 | (fp_line (start 0 -2.7) (end 5 -2.7) (layer F.SilkS) (width 0.12)) 209 | (fp_line (start 0 2.5) (end 5 2.5) (layer F.Fab) (width 0.1)) 210 | (fp_line (start 0 -2.5) (end 5 -2.5) (layer F.Fab) (width 0.1)) 211 | (fp_line (start 0 2.5) (end 5 2.5) (layer F.Fab) (width 0.1)) 212 | (fp_line (start 0 -2.5) (end 5 -2.5) (layer F.Fab) (width 0.1)) 213 | (fp_text user %R (at 2.5 0 90) (layer F.Fab) 214 | (effects (font (size 1 1) (thickness 0.15))) 215 | ) 216 | (pad 2 thru_hole circle (at 5 0 90) (size 1.5 1.5) (drill 0.8) (layers *.Cu *.Mask) 217 | (net 2 "Net-(C1-Pad1)")) 218 | (pad 1 thru_hole circle (at 0 0 90) (size 1.5 1.5) (drill 0.8) (layers *.Cu *.Mask) 219 | (net 3 "Net-(C2-Pad1)")) 220 | (model ${KISYS3DMOD}/Crystal.3dshapes/Resonator-2Pin_W10.0mm_H5.0mm.wrl 221 | (at (xyz 0 0 0)) 222 | (scale (xyz 1 1 1)) 223 | (rotate (xyz 0 0 0)) 224 | ) 225 | ) 226 | 227 | (module Package_DIP:DIP-14_W7.62mm (layer F.Cu) (tedit 5A02E8C5) (tstamp 5CEB4B79) 228 | (at 155 62 90) 229 | (descr "14-lead though-hole mounted DIP package, row spacing 7.62 mm (300 mils)") 230 | (tags "THT DIP DIL PDIP 2.54mm 7.62mm 300mil") 231 | (path /5D06B4B0) 232 | (fp_text reference U4 (at 3.81 -2.33 90) (layer F.SilkS) 233 | (effects (font (size 1 1) (thickness 0.15))) 234 | ) 235 | (fp_text value HCF4066BE (at 3.81 17.57 90) (layer F.Fab) 236 | (effects (font (size 1 1) (thickness 0.15))) 237 | ) 238 | (fp_text user %R (at 3.81 7.62 90) (layer F.Fab) 239 | (effects (font (size 1 1) (thickness 0.15))) 240 | ) 241 | (fp_line (start 8.7 -1.55) (end -1.1 -1.55) (layer F.CrtYd) (width 0.05)) 242 | (fp_line (start 8.7 16.8) (end 8.7 -1.55) (layer F.CrtYd) (width 0.05)) 243 | (fp_line (start -1.1 16.8) (end 8.7 16.8) (layer F.CrtYd) (width 0.05)) 244 | (fp_line (start -1.1 -1.55) (end -1.1 16.8) (layer F.CrtYd) (width 0.05)) 245 | (fp_line (start 6.46 -1.33) (end 4.81 -1.33) (layer F.SilkS) (width 0.12)) 246 | (fp_line (start 6.46 16.57) (end 6.46 -1.33) (layer F.SilkS) (width 0.12)) 247 | (fp_line (start 1.16 16.57) (end 6.46 16.57) (layer F.SilkS) (width 0.12)) 248 | (fp_line (start 1.16 -1.33) (end 1.16 16.57) (layer F.SilkS) (width 0.12)) 249 | (fp_line (start 2.81 -1.33) (end 1.16 -1.33) (layer F.SilkS) (width 0.12)) 250 | (fp_line (start 0.635 -0.27) (end 1.635 -1.27) (layer F.Fab) (width 0.1)) 251 | (fp_line (start 0.635 16.51) (end 0.635 -0.27) (layer F.Fab) (width 0.1)) 252 | (fp_line (start 6.985 16.51) (end 0.635 16.51) (layer F.Fab) (width 0.1)) 253 | (fp_line (start 6.985 -1.27) (end 6.985 16.51) (layer F.Fab) (width 0.1)) 254 | (fp_line (start 1.635 -1.27) (end 6.985 -1.27) (layer F.Fab) (width 0.1)) 255 | (fp_arc (start 3.81 -1.33) (end 2.81 -1.33) (angle -180) (layer F.SilkS) (width 0.12)) 256 | (pad 14 thru_hole oval (at 7.62 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 257 | (net 4 VCC)) 258 | (pad 7 thru_hole oval (at 0 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 259 | (net 1 GND)) 260 | (pad 13 thru_hole oval (at 7.62 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 261 | (net 28 "Net-(U1-Pad6)")) 262 | (pad 6 thru_hole oval (at 0 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 263 | (net 30 "Net-(U1-Pad5)")) 264 | (pad 12 thru_hole oval (at 7.62 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 265 | (net 30 "Net-(U1-Pad5)")) 266 | (pad 5 thru_hole oval (at 0 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 267 | (net 28 "Net-(U1-Pad6)")) 268 | (pad 11 thru_hole oval (at 7.62 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 269 | (net 11 "Net-(J2-Pad3)")) 270 | (pad 4 thru_hole oval (at 0 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 271 | (net 11 "Net-(J2-Pad3)")) 272 | (pad 10 thru_hole oval (at 7.62 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 273 | (net 16 "Net-(J3-Pad3)")) 274 | (pad 3 thru_hole oval (at 0 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 275 | (net 36 "Net-(U3-Pad7)")) 276 | (pad 9 thru_hole oval (at 7.62 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 277 | (net 12 "Net-(J2-Pad2)")) 278 | (pad 2 thru_hole oval (at 0 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 279 | (net 12 "Net-(J2-Pad2)")) 280 | (pad 8 thru_hole oval (at 7.62 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 281 | (net 15 "Net-(J3-Pad2)")) 282 | (pad 1 thru_hole rect (at 0 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 283 | (net 39 "Net-(U3-Pad11)")) 284 | (model ${KISYS3DMOD}/Package_DIP.3dshapes/DIP-14_W7.62mm.wrl 285 | (at (xyz 0 0 0)) 286 | (scale (xyz 1 1 1)) 287 | (rotate (xyz 0 0 0)) 288 | ) 289 | ) 290 | 291 | (module Package_DIP:DIP-16_W7.62mm (layer F.Cu) (tedit 5A02E8C5) (tstamp 5CEB4B57) 292 | (at 110 61 90) 293 | (descr "16-lead though-hole mounted DIP package, row spacing 7.62 mm (300 mils)") 294 | (tags "THT DIP DIL PDIP 2.54mm 7.62mm 300mil") 295 | (path /5D04BDDE) 296 | (fp_text reference U3 (at 3.81 -2.33 90) (layer F.SilkS) 297 | (effects (font (size 1 1) (thickness 0.15))) 298 | ) 299 | (fp_text value 74LS157 (at 3.81 20.11 90) (layer F.Fab) 300 | (effects (font (size 1 1) (thickness 0.15))) 301 | ) 302 | (fp_text user %R (at 3.81 8.89 90) (layer F.Fab) 303 | (effects (font (size 1 1) (thickness 0.15))) 304 | ) 305 | (fp_line (start 8.7 -1.55) (end -1.1 -1.55) (layer F.CrtYd) (width 0.05)) 306 | (fp_line (start 8.7 19.3) (end 8.7 -1.55) (layer F.CrtYd) (width 0.05)) 307 | (fp_line (start -1.1 19.3) (end 8.7 19.3) (layer F.CrtYd) (width 0.05)) 308 | (fp_line (start -1.1 -1.55) (end -1.1 19.3) (layer F.CrtYd) (width 0.05)) 309 | (fp_line (start 6.46 -1.33) (end 4.81 -1.33) (layer F.SilkS) (width 0.12)) 310 | (fp_line (start 6.46 19.11) (end 6.46 -1.33) (layer F.SilkS) (width 0.12)) 311 | (fp_line (start 1.16 19.11) (end 6.46 19.11) (layer F.SilkS) (width 0.12)) 312 | (fp_line (start 1.16 -1.33) (end 1.16 19.11) (layer F.SilkS) (width 0.12)) 313 | (fp_line (start 2.81 -1.33) (end 1.16 -1.33) (layer F.SilkS) (width 0.12)) 314 | (fp_line (start 0.635 -0.27) (end 1.635 -1.27) (layer F.Fab) (width 0.1)) 315 | (fp_line (start 0.635 19.05) (end 0.635 -0.27) (layer F.Fab) (width 0.1)) 316 | (fp_line (start 6.985 19.05) (end 0.635 19.05) (layer F.Fab) (width 0.1)) 317 | (fp_line (start 6.985 -1.27) (end 6.985 19.05) (layer F.Fab) (width 0.1)) 318 | (fp_line (start 1.635 -1.27) (end 6.985 -1.27) (layer F.Fab) (width 0.1)) 319 | (fp_arc (start 3.81 -1.33) (end 2.81 -1.33) (angle -180) (layer F.SilkS) (width 0.12)) 320 | (pad 16 thru_hole oval (at 7.62 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 321 | (net 4 VCC)) 322 | (pad 8 thru_hole oval (at 0 17.78 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 323 | (net 1 GND)) 324 | (pad 15 thru_hole oval (at 7.62 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 325 | (net 1 GND)) 326 | (pad 7 thru_hole oval (at 0 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 327 | (net 36 "Net-(U3-Pad7)")) 328 | (pad 14 thru_hole oval (at 7.62 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 329 | (net 29 "Net-(U1-Pad19)")) 330 | (pad 6 thru_hole oval (at 0 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 331 | (net 1 GND)) 332 | (pad 13 thru_hole oval (at 7.62 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 333 | (net 37 "Net-(U3-Pad13)")) 334 | (pad 5 thru_hole oval (at 0 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 335 | (net 32 "Net-(U1-Pad17)")) 336 | (pad 12 thru_hole oval (at 7.62 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 337 | (net 9 "Net-(J2-Pad5)")) 338 | (pad 4 thru_hole oval (at 0 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 339 | (net 38 "Net-(U3-Pad4)")) 340 | (pad 11 thru_hole oval (at 7.62 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 341 | (net 39 "Net-(U3-Pad11)")) 342 | (pad 3 thru_hole oval (at 0 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 343 | (net 40 "Net-(U3-Pad3)")) 344 | (pad 10 thru_hole oval (at 7.62 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 345 | (net 35 "Net-(U2-Pad2)")) 346 | (pad 2 thru_hole oval (at 0 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 347 | (net 41 "Net-(U3-Pad2)")) 348 | (pad 9 thru_hole oval (at 7.62 17.78 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 349 | (net 31 "Net-(U1-Pad18)")) 350 | (pad 1 thru_hole rect (at 0 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 351 | (net 24 "Net-(U1-Pad11)")) 352 | (model ${KISYS3DMOD}/Package_DIP.3dshapes/DIP-16_W7.62mm.wrl 353 | (at (xyz 0 0 0)) 354 | (scale (xyz 1 1 1)) 355 | (rotate (xyz 0 0 0)) 356 | ) 357 | ) 358 | 359 | (module Package_DIP:DIP-8_W7.62mm (layer F.Cu) (tedit 5A02E8C5) (tstamp 5CEB4B33) 360 | (at 137 59 90) 361 | (descr "8-lead though-hole mounted DIP package, row spacing 7.62 mm (300 mils)") 362 | (tags "THT DIP DIL PDIP 2.54mm 7.62mm 300mil") 363 | (path /5D0384C3) 364 | (fp_text reference U2 (at 3.81 -2.33 90) (layer F.SilkS) 365 | (effects (font (size 1 1) (thickness 0.15))) 366 | ) 367 | (fp_text value W25Q32DIP (at 3.81 9.95 90) (layer F.Fab) 368 | (effects (font (size 1 1) (thickness 0.15))) 369 | ) 370 | (fp_text user %R (at 3.81 3.81 90) (layer F.Fab) 371 | (effects (font (size 1 1) (thickness 0.15))) 372 | ) 373 | (fp_line (start 8.7 -1.55) (end -1.1 -1.55) (layer F.CrtYd) (width 0.05)) 374 | (fp_line (start 8.7 9.15) (end 8.7 -1.55) (layer F.CrtYd) (width 0.05)) 375 | (fp_line (start -1.1 9.15) (end 8.7 9.15) (layer F.CrtYd) (width 0.05)) 376 | (fp_line (start -1.1 -1.55) (end -1.1 9.15) (layer F.CrtYd) (width 0.05)) 377 | (fp_line (start 6.46 -1.33) (end 4.81 -1.33) (layer F.SilkS) (width 0.12)) 378 | (fp_line (start 6.46 8.95) (end 6.46 -1.33) (layer F.SilkS) (width 0.12)) 379 | (fp_line (start 1.16 8.95) (end 6.46 8.95) (layer F.SilkS) (width 0.12)) 380 | (fp_line (start 1.16 -1.33) (end 1.16 8.95) (layer F.SilkS) (width 0.12)) 381 | (fp_line (start 2.81 -1.33) (end 1.16 -1.33) (layer F.SilkS) (width 0.12)) 382 | (fp_line (start 0.635 -0.27) (end 1.635 -1.27) (layer F.Fab) (width 0.1)) 383 | (fp_line (start 0.635 8.89) (end 0.635 -0.27) (layer F.Fab) (width 0.1)) 384 | (fp_line (start 6.985 8.89) (end 0.635 8.89) (layer F.Fab) (width 0.1)) 385 | (fp_line (start 6.985 -1.27) (end 6.985 8.89) (layer F.Fab) (width 0.1)) 386 | (fp_line (start 1.635 -1.27) (end 6.985 -1.27) (layer F.Fab) (width 0.1)) 387 | (fp_arc (start 3.81 -1.33) (end 2.81 -1.33) (angle -180) (layer F.SilkS) (width 0.12)) 388 | (pad 8 thru_hole oval (at 7.62 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 389 | (net 4 VCC)) 390 | (pad 4 thru_hole oval (at 0 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 391 | (net 1 GND)) 392 | (pad 7 thru_hole oval (at 7.62 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 393 | (net 4 VCC)) 394 | (pad 3 thru_hole oval (at 0 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 395 | (net 4 VCC)) 396 | (pad 6 thru_hole oval (at 7.62 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 397 | (net 29 "Net-(U1-Pad19)")) 398 | (pad 2 thru_hole oval (at 0 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 399 | (net 35 "Net-(U2-Pad2)")) 400 | (pad 5 thru_hole oval (at 7.62 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 401 | (net 32 "Net-(U1-Pad17)")) 402 | (pad 1 thru_hole rect (at 0 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 403 | (net 33 "Net-(U1-Pad16)")) 404 | (model ${KISYS3DMOD}/Package_DIP.3dshapes/DIP-8_W7.62mm.wrl 405 | (at (xyz 0 0 0)) 406 | (scale (xyz 1 1 1)) 407 | (rotate (xyz 0 0 0)) 408 | ) 409 | ) 410 | 411 | (module Package_DIP:DIP-28_W7.62mm (layer F.Cu) (tedit 5A02E8C5) (tstamp 5CEB4B17) 412 | (at 110 46 90) 413 | (descr "28-lead though-hole mounted DIP package, row spacing 7.62 mm (300 mils)") 414 | (tags "THT DIP DIL PDIP 2.54mm 7.62mm 300mil") 415 | (path /5D036493) 416 | (fp_text reference U1 (at 3.81 -2.33 90) (layer F.SilkS) 417 | (effects (font (size 1 1) (thickness 0.15))) 418 | ) 419 | (fp_text value ATmega328P-PU (at 3.81 35.35 90) (layer F.Fab) 420 | (effects (font (size 1 1) (thickness 0.15))) 421 | ) 422 | (fp_text user %R (at 3.81 16.51 90) (layer F.Fab) 423 | (effects (font (size 1 1) (thickness 0.15))) 424 | ) 425 | (fp_line (start 8.7 -1.55) (end -1.1 -1.55) (layer F.CrtYd) (width 0.05)) 426 | (fp_line (start 8.7 34.55) (end 8.7 -1.55) (layer F.CrtYd) (width 0.05)) 427 | (fp_line (start -1.1 34.55) (end 8.7 34.55) (layer F.CrtYd) (width 0.05)) 428 | (fp_line (start -1.1 -1.55) (end -1.1 34.55) (layer F.CrtYd) (width 0.05)) 429 | (fp_line (start 6.46 -1.33) (end 4.81 -1.33) (layer F.SilkS) (width 0.12)) 430 | (fp_line (start 6.46 34.35) (end 6.46 -1.33) (layer F.SilkS) (width 0.12)) 431 | (fp_line (start 1.16 34.35) (end 6.46 34.35) (layer F.SilkS) (width 0.12)) 432 | (fp_line (start 1.16 -1.33) (end 1.16 34.35) (layer F.SilkS) (width 0.12)) 433 | (fp_line (start 2.81 -1.33) (end 1.16 -1.33) (layer F.SilkS) (width 0.12)) 434 | (fp_line (start 0.635 -0.27) (end 1.635 -1.27) (layer F.Fab) (width 0.1)) 435 | (fp_line (start 0.635 34.29) (end 0.635 -0.27) (layer F.Fab) (width 0.1)) 436 | (fp_line (start 6.985 34.29) (end 0.635 34.29) (layer F.Fab) (width 0.1)) 437 | (fp_line (start 6.985 -1.27) (end 6.985 34.29) (layer F.Fab) (width 0.1)) 438 | (fp_line (start 1.635 -1.27) (end 6.985 -1.27) (layer F.Fab) (width 0.1)) 439 | (fp_arc (start 3.81 -1.33) (end 2.81 -1.33) (angle -180) (layer F.SilkS) (width 0.12)) 440 | (pad 28 thru_hole oval (at 7.62 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 441 | (net 17 "Net-(U1-Pad28)")) 442 | (pad 14 thru_hole oval (at 0 33.02 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 443 | (net 18 "Net-(U1-Pad14)")) 444 | (pad 27 thru_hole oval (at 7.62 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 445 | (net 19 "Net-(U1-Pad27)")) 446 | (pad 13 thru_hole oval (at 0 30.48 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 447 | (net 20 "Net-(U1-Pad13)")) 448 | (pad 26 thru_hole oval (at 7.62 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 449 | (net 21 "Net-(U1-Pad26)")) 450 | (pad 12 thru_hole oval (at 0 27.94 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 451 | (net 22 "Net-(U1-Pad12)")) 452 | (pad 25 thru_hole oval (at 7.62 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 453 | (net 23 "Net-(U1-Pad25)")) 454 | (pad 11 thru_hole oval (at 0 25.4 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 455 | (net 24 "Net-(U1-Pad11)")) 456 | (pad 24 thru_hole oval (at 7.62 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 457 | (net 25 "Net-(U1-Pad24)")) 458 | (pad 10 thru_hole oval (at 0 22.86 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 459 | (net 2 "Net-(C1-Pad1)")) 460 | (pad 23 thru_hole oval (at 7.62 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 461 | (net 26 "Net-(U1-Pad23)")) 462 | (pad 9 thru_hole oval (at 0 20.32 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 463 | (net 3 "Net-(C2-Pad1)")) 464 | (pad 22 thru_hole oval (at 7.62 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 465 | (net 1 GND)) 466 | (pad 8 thru_hole oval (at 0 17.78 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 467 | (net 1 GND)) 468 | (pad 21 thru_hole oval (at 7.62 17.78 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 469 | (net 27 "Net-(U1-Pad21)")) 470 | (pad 7 thru_hole oval (at 0 15.24 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 471 | (net 4 VCC)) 472 | (pad 20 thru_hole oval (at 7.62 20.32 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 473 | (net 4 VCC)) 474 | (pad 6 thru_hole oval (at 0 12.7 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 475 | (net 28 "Net-(U1-Pad6)")) 476 | (pad 19 thru_hole oval (at 7.62 22.86 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 477 | (net 29 "Net-(U1-Pad19)")) 478 | (pad 5 thru_hole oval (at 0 10.16 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 479 | (net 30 "Net-(U1-Pad5)")) 480 | (pad 18 thru_hole oval (at 7.62 25.4 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 481 | (net 31 "Net-(U1-Pad18)")) 482 | (pad 4 thru_hole oval (at 0 7.62 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 483 | (net 5 "Net-(J1-Pad5)")) 484 | (pad 17 thru_hole oval (at 7.62 27.94 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 485 | (net 32 "Net-(U1-Pad17)")) 486 | (pad 3 thru_hole oval (at 0 5.08 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 487 | (net 6 "Net-(J1-Pad4)")) 488 | (pad 16 thru_hole oval (at 7.62 30.48 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 489 | (net 33 "Net-(U1-Pad16)")) 490 | (pad 2 thru_hole oval (at 0 2.54 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 491 | (net 7 "Net-(J1-Pad3)")) 492 | (pad 15 thru_hole oval (at 7.62 33.02 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 493 | (net 34 "Net-(U1-Pad15)")) 494 | (pad 1 thru_hole rect (at 0 0 90) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 495 | (net 8 "Net-(J1-Pad2)")) 496 | (model ${KISYS3DMOD}/Package_DIP.3dshapes/DIP-28_W7.62mm.wrl 497 | (at (xyz 0 0 0)) 498 | (scale (xyz 1 1 1)) 499 | (rotate (xyz 0 0 0)) 500 | ) 501 | ) 502 | 503 | (module Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal (layer F.Cu) (tedit 5AE5139B) (tstamp 5CEB4AE7) 504 | (at 133 50 180) 505 | (descr "Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=10.16mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf") 506 | (tags "Resistor Axial_DIN0207 series Axial Horizontal pin pitch 10.16mm 0.25W = 1/4W length 6.3mm diameter 2.5mm") 507 | (path /5D049EC7) 508 | (fp_text reference R2 (at 5.08 -2.37) (layer F.SilkS) 509 | (effects (font (size 1 1) (thickness 0.15))) 510 | ) 511 | (fp_text value 1K (at 5.08 2.37) (layer F.Fab) 512 | (effects (font (size 1 1) (thickness 0.15))) 513 | ) 514 | (fp_text user %R (at 5.08 0) (layer F.Fab) 515 | (effects (font (size 1 1) (thickness 0.15))) 516 | ) 517 | (fp_line (start 11.21 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05)) 518 | (fp_line (start 11.21 1.5) (end 11.21 -1.5) (layer F.CrtYd) (width 0.05)) 519 | (fp_line (start -1.05 1.5) (end 11.21 1.5) (layer F.CrtYd) (width 0.05)) 520 | (fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05)) 521 | (fp_line (start 9.12 0) (end 8.35 0) (layer F.SilkS) (width 0.12)) 522 | (fp_line (start 1.04 0) (end 1.81 0) (layer F.SilkS) (width 0.12)) 523 | (fp_line (start 8.35 -1.37) (end 1.81 -1.37) (layer F.SilkS) (width 0.12)) 524 | (fp_line (start 8.35 1.37) (end 8.35 -1.37) (layer F.SilkS) (width 0.12)) 525 | (fp_line (start 1.81 1.37) (end 8.35 1.37) (layer F.SilkS) (width 0.12)) 526 | (fp_line (start 1.81 -1.37) (end 1.81 1.37) (layer F.SilkS) (width 0.12)) 527 | (fp_line (start 10.16 0) (end 8.23 0) (layer F.Fab) (width 0.1)) 528 | (fp_line (start 0 0) (end 1.93 0) (layer F.Fab) (width 0.1)) 529 | (fp_line (start 8.23 -1.25) (end 1.93 -1.25) (layer F.Fab) (width 0.1)) 530 | (fp_line (start 8.23 1.25) (end 8.23 -1.25) (layer F.Fab) (width 0.1)) 531 | (fp_line (start 1.93 1.25) (end 8.23 1.25) (layer F.Fab) (width 0.1)) 532 | (fp_line (start 1.93 -1.25) (end 1.93 1.25) (layer F.Fab) (width 0.1)) 533 | (pad 2 thru_hole oval (at 10.16 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 534 | (net 1 GND)) 535 | (pad 1 thru_hole circle (at 0 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 536 | (net 5 "Net-(J1-Pad5)")) 537 | (model ${KISYS3DMOD}/Resistor_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl 538 | (at (xyz 0 0 0)) 539 | (scale (xyz 1 1 1)) 540 | (rotate (xyz 0 0 0)) 541 | ) 542 | ) 543 | 544 | (module Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal (layer F.Cu) (tedit 5AE5139B) (tstamp 5CEB4AD0) 545 | (at 120 50 180) 546 | (descr "Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=10.16mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf") 547 | (tags "Resistor Axial_DIN0207 series Axial Horizontal pin pitch 10.16mm 0.25W = 1/4W length 6.3mm diameter 2.5mm") 548 | (path /5D042C79) 549 | (fp_text reference R1 (at 5.08 -2.37) (layer F.SilkS) 550 | (effects (font (size 1 1) (thickness 0.15))) 551 | ) 552 | (fp_text value 10K (at 5.08 2.37) (layer F.Fab) 553 | (effects (font (size 1 1) (thickness 0.15))) 554 | ) 555 | (fp_text user %R (at 5.08 0) (layer F.Fab) 556 | (effects (font (size 1 1) (thickness 0.15))) 557 | ) 558 | (fp_line (start 11.21 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05)) 559 | (fp_line (start 11.21 1.5) (end 11.21 -1.5) (layer F.CrtYd) (width 0.05)) 560 | (fp_line (start -1.05 1.5) (end 11.21 1.5) (layer F.CrtYd) (width 0.05)) 561 | (fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05)) 562 | (fp_line (start 9.12 0) (end 8.35 0) (layer F.SilkS) (width 0.12)) 563 | (fp_line (start 1.04 0) (end 1.81 0) (layer F.SilkS) (width 0.12)) 564 | (fp_line (start 8.35 -1.37) (end 1.81 -1.37) (layer F.SilkS) (width 0.12)) 565 | (fp_line (start 8.35 1.37) (end 8.35 -1.37) (layer F.SilkS) (width 0.12)) 566 | (fp_line (start 1.81 1.37) (end 8.35 1.37) (layer F.SilkS) (width 0.12)) 567 | (fp_line (start 1.81 -1.37) (end 1.81 1.37) (layer F.SilkS) (width 0.12)) 568 | (fp_line (start 10.16 0) (end 8.23 0) (layer F.Fab) (width 0.1)) 569 | (fp_line (start 0 0) (end 1.93 0) (layer F.Fab) (width 0.1)) 570 | (fp_line (start 8.23 -1.25) (end 1.93 -1.25) (layer F.Fab) (width 0.1)) 571 | (fp_line (start 8.23 1.25) (end 8.23 -1.25) (layer F.Fab) (width 0.1)) 572 | (fp_line (start 1.93 1.25) (end 8.23 1.25) (layer F.Fab) (width 0.1)) 573 | (fp_line (start 1.93 -1.25) (end 1.93 1.25) (layer F.Fab) (width 0.1)) 574 | (pad 2 thru_hole oval (at 10.16 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 575 | (net 8 "Net-(J1-Pad2)")) 576 | (pad 1 thru_hole circle (at 0 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 577 | (net 4 VCC)) 578 | (model ${KISYS3DMOD}/Resistor_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.wrl 579 | (at (xyz 0 0 0)) 580 | (scale (xyz 1 1 1)) 581 | (rotate (xyz 0 0 0)) 582 | ) 583 | ) 584 | 585 | (module Sensor:HC-05_breakout (layer F.Cu) (tedit 5CEAF249) (tstamp 5CEB4AB9) 586 | (at 158 17) 587 | (path /5D12A03D) 588 | (attr smd) 589 | (fp_text reference J3 (at -5 -19) (layer F.SilkS) 590 | (effects (font (size 0.700643 0.700643) (thickness 0.05))) 591 | ) 592 | (fp_text value HC-05_breakout (at -3.49194 15.2518) (layer F.SilkS) 593 | (effects (font (size 0.701231 0.701231) (thickness 0.05))) 594 | ) 595 | (fp_text user DIP-4_W7.62mm (at -3.04 -7.58) (layer F.Fab) 596 | (effects (font (size 1 1) (thickness 0.15))) 597 | ) 598 | (fp_line (start -8 -14) (end -8 23) (layer F.CrtYd) (width 0.05)) 599 | (fp_line (start -8 23) (end 8 23) (layer F.CrtYd) (width 0.05)) 600 | (fp_line (start 8 23) (end 8 -14) (layer F.CrtYd) (width 0.05)) 601 | (fp_line (start 8 -14) (end -8 -14) (layer F.CrtYd) (width 0.05)) 602 | (fp_text user %R (at 0 24.15 180) (layer F.Fab) 603 | (effects (font (size 1 1) (thickness 0.15))) 604 | ) 605 | (fp_poly (pts (xy -6.35 -13.85) (xy 6.35 -13.85) (xy 6.35 -6.95) (xy -6.35 -6.95)) (layer Dwgs.User) (width 0)) 606 | (fp_poly (pts (xy -6.35 -13.85) (xy 6.35 -13.85) (xy 6.35 -6.95) (xy -6.35 -6.95)) (layer Dwgs.User) (width 0)) 607 | (fp_poly (pts (xy -6.35 -13.85) (xy 6.35 -13.85) (xy 6.35 -6.95) (xy -6.35 -6.95)) (layer Dwgs.User) (width 0)) 608 | (fp_line (start -7.25 14.075) (end -7.25 -14.075) (layer Eco1.User) (width 0.05)) 609 | (fp_line (start 7.25 14.075) (end -7.25 14.075) (layer Eco1.User) (width 0.05)) 610 | (fp_line (start 7.25 -14.075) (end 7.25 14.075) (layer Eco1.User) (width 0.05)) 611 | (fp_line (start -7.25 -14.075) (end 7.25 -14.075) (layer Eco1.User) (width 0.05)) 612 | (fp_line (start 6.35 13.175) (end 6.35 12.495) (layer F.SilkS) (width 0.127)) 613 | (fp_line (start 6.22 13.175) (end 6.35 13.175) (layer F.SilkS) (width 0.127)) 614 | (fp_line (start -6.35 13.175) (end -6.22 13.175) (layer F.SilkS) (width 0.127)) 615 | (fp_line (start -6.35 12.495) (end -6.35 13.175) (layer F.SilkS) (width 0.127)) 616 | (fp_line (start 6.35 -13.825) (end 6.35 -7.145) (layer F.SilkS) (width 0.127)) 617 | (fp_line (start -6.35 -13.825) (end 6.35 -13.825) (layer F.SilkS) (width 0.127)) 618 | (fp_line (start -6.35 -7.145) (end -6.35 -13.825) (layer F.SilkS) (width 0.127)) 619 | (pad 6 thru_hole oval (at 6.35 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 620 | (net 13 "Net-(J3-Pad6)")) 621 | (pad 1 thru_hole rect (at -6.35 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 622 | (net 14 "Net-(J3-Pad1)")) 623 | (pad 2 thru_hole oval (at -3.81 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 624 | (net 15 "Net-(J3-Pad2)")) 625 | (pad 3 thru_hole oval (at -1.27 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 626 | (net 16 "Net-(J3-Pad3)")) 627 | (pad 4 thru_hole oval (at 1.27 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 628 | (net 1 GND)) 629 | (pad 5 thru_hole oval (at 3.81 21.05 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) 630 | (net 4 VCC)) 631 | ) 632 | 633 | (module Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical (layer F.Cu) (tedit 5A19A421) (tstamp 5CEB4A9B) 634 | (at 136 63 90) 635 | (descr "Through hole straight socket strip, 1x06, 2.00mm pitch, single row (from Kicad 4.0.7), script generated") 636 | (tags "Through hole socket strip THT 1x06 2.00mm single row") 637 | (path /5D07EB8A) 638 | (fp_text reference J2 (at 0 -2.5 90) (layer F.SilkS) 639 | (effects (font (size 1 1) (thickness 0.15))) 640 | ) 641 | (fp_text value GBA (at 0 12.5 90) (layer F.Fab) 642 | (effects (font (size 1 1) (thickness 0.15))) 643 | ) 644 | (fp_text user %R (at 0 5) (layer F.Fab) 645 | (effects (font (size 1 1) (thickness 0.15))) 646 | ) 647 | (fp_line (start -1.5 11.5) (end -1.5 -1.5) (layer F.CrtYd) (width 0.05)) 648 | (fp_line (start 1.5 11.5) (end -1.5 11.5) (layer F.CrtYd) (width 0.05)) 649 | (fp_line (start 1.5 -1.5) (end 1.5 11.5) (layer F.CrtYd) (width 0.05)) 650 | (fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.CrtYd) (width 0.05)) 651 | (fp_line (start 0 -1.06) (end 1.06 -1.06) (layer F.SilkS) (width 0.12)) 652 | (fp_line (start 1.06 -1.06) (end 1.06 0) (layer F.SilkS) (width 0.12)) 653 | (fp_line (start 1.06 1) (end 1.06 11.06) (layer F.SilkS) (width 0.12)) 654 | (fp_line (start -1.06 11.06) (end 1.06 11.06) (layer F.SilkS) (width 0.12)) 655 | (fp_line (start -1.06 1) (end -1.06 11.06) (layer F.SilkS) (width 0.12)) 656 | (fp_line (start -1.06 1) (end 1.06 1) (layer F.SilkS) (width 0.12)) 657 | (fp_line (start -1 11) (end -1 -1) (layer F.Fab) (width 0.1)) 658 | (fp_line (start 1 11) (end -1 11) (layer F.Fab) (width 0.1)) 659 | (fp_line (start 1 -0.5) (end 1 11) (layer F.Fab) (width 0.1)) 660 | (fp_line (start 0.5 -1) (end 1 -0.5) (layer F.Fab) (width 0.1)) 661 | (fp_line (start -1 -1) (end 0.5 -1) (layer F.Fab) (width 0.1)) 662 | (pad 6 thru_hole oval (at 0 10 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 663 | (net 1 GND)) 664 | (pad 5 thru_hole oval (at 0 8 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 665 | (net 9 "Net-(J2-Pad5)")) 666 | (pad 4 thru_hole oval (at 0 6 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 667 | (net 10 "Net-(J2-Pad4)")) 668 | (pad 3 thru_hole oval (at 0 4 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 669 | (net 11 "Net-(J2-Pad3)")) 670 | (pad 2 thru_hole oval (at 0 2 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 671 | (net 12 "Net-(J2-Pad2)")) 672 | (pad 1 thru_hole rect (at 0 0 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 673 | (net 4 VCC)) 674 | (model ${KISYS3DMOD}/Connector_PinSocket_2.00mm.3dshapes/PinSocket_1x06_P2.00mm_Vertical.wrl 675 | (at (xyz 0 0 0)) 676 | (scale (xyz 1 1 1)) 677 | (rotate (xyz 0 0 0)) 678 | ) 679 | ) 680 | 681 | (module Connector_PinSocket_2.00mm:PinSocket_1x06_P2.00mm_Vertical (layer F.Cu) (tedit 5A19A421) (tstamp 5CEB4A81) 682 | (at 173 48 180) 683 | (descr "Through hole straight socket strip, 1x06, 2.00mm pitch, single row (from Kicad 4.0.7), script generated") 684 | (tags "Through hole socket strip THT 1x06 2.00mm single row") 685 | (path /5D03F034) 686 | (fp_text reference J1 (at 0 -2.5) (layer F.SilkS) 687 | (effects (font (size 1 1) (thickness 0.15))) 688 | ) 689 | (fp_text value Conn_01x06 (at 0 12.5) (layer F.Fab) 690 | (effects (font (size 1 1) (thickness 0.15))) 691 | ) 692 | (fp_text user %R (at 0 5 90) (layer F.Fab) 693 | (effects (font (size 1 1) (thickness 0.15))) 694 | ) 695 | (fp_line (start -1.5 11.5) (end -1.5 -1.5) (layer F.CrtYd) (width 0.05)) 696 | (fp_line (start 1.5 11.5) (end -1.5 11.5) (layer F.CrtYd) (width 0.05)) 697 | (fp_line (start 1.5 -1.5) (end 1.5 11.5) (layer F.CrtYd) (width 0.05)) 698 | (fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.CrtYd) (width 0.05)) 699 | (fp_line (start 0 -1.06) (end 1.06 -1.06) (layer F.SilkS) (width 0.12)) 700 | (fp_line (start 1.06 -1.06) (end 1.06 0) (layer F.SilkS) (width 0.12)) 701 | (fp_line (start 1.06 1) (end 1.06 11.06) (layer F.SilkS) (width 0.12)) 702 | (fp_line (start -1.06 11.06) (end 1.06 11.06) (layer F.SilkS) (width 0.12)) 703 | (fp_line (start -1.06 1) (end -1.06 11.06) (layer F.SilkS) (width 0.12)) 704 | (fp_line (start -1.06 1) (end 1.06 1) (layer F.SilkS) (width 0.12)) 705 | (fp_line (start -1 11) (end -1 -1) (layer F.Fab) (width 0.1)) 706 | (fp_line (start 1 11) (end -1 11) (layer F.Fab) (width 0.1)) 707 | (fp_line (start 1 -0.5) (end 1 11) (layer F.Fab) (width 0.1)) 708 | (fp_line (start 0.5 -1) (end 1 -0.5) (layer F.Fab) (width 0.1)) 709 | (fp_line (start -1 -1) (end 0.5 -1) (layer F.Fab) (width 0.1)) 710 | (pad 6 thru_hole oval (at 0 10 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 711 | (net 1 GND)) 712 | (pad 5 thru_hole oval (at 0 8 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 713 | (net 5 "Net-(J1-Pad5)")) 714 | (pad 4 thru_hole oval (at 0 6 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 715 | (net 6 "Net-(J1-Pad4)")) 716 | (pad 3 thru_hole oval (at 0 4 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 717 | (net 7 "Net-(J1-Pad3)")) 718 | (pad 2 thru_hole oval (at 0 2 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 719 | (net 8 "Net-(J1-Pad2)")) 720 | (pad 1 thru_hole rect (at 0 0 180) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask) 721 | (net 4 VCC)) 722 | (model ${KISYS3DMOD}/Connector_PinSocket_2.00mm.3dshapes/PinSocket_1x06_P2.00mm_Vertical.wrl 723 | (at (xyz 0 0 0)) 724 | (scale (xyz 1 1 1)) 725 | (rotate (xyz 0 0 0)) 726 | ) 727 | ) 728 | 729 | (module Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm (layer F.Cu) (tedit 5AE50EF0) (tstamp 5CEB4A67) 730 | (at 164 43 180) 731 | (descr "C, Disc series, Radial, pin pitch=5.00mm, , diameter*width=4.7*2.5mm^2, Capacitor, http://www.vishay.com/docs/45233/krseries.pdf") 732 | (tags "C Disc series Radial pin pitch 5.00mm diameter 4.7mm width 2.5mm Capacitor") 733 | (path /5D04FA93) 734 | (fp_text reference C3 (at 2.5 -2.5) (layer F.SilkS) 735 | (effects (font (size 1 1) (thickness 0.15))) 736 | ) 737 | (fp_text value 0.1uF (at 2.5 2.5) (layer F.Fab) 738 | (effects (font (size 1 1) (thickness 0.15))) 739 | ) 740 | (fp_text user %R (at 2.5 0) (layer F.Fab) 741 | (effects (font (size 0.94 0.94) (thickness 0.141))) 742 | ) 743 | (fp_line (start 6.05 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05)) 744 | (fp_line (start 6.05 1.5) (end 6.05 -1.5) (layer F.CrtYd) (width 0.05)) 745 | (fp_line (start -1.05 1.5) (end 6.05 1.5) (layer F.CrtYd) (width 0.05)) 746 | (fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05)) 747 | (fp_line (start 4.97 1.055) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 748 | (fp_line (start 4.97 -1.37) (end 4.97 -1.055) (layer F.SilkS) (width 0.12)) 749 | (fp_line (start 0.03 1.055) (end 0.03 1.37) (layer F.SilkS) (width 0.12)) 750 | (fp_line (start 0.03 -1.37) (end 0.03 -1.055) (layer F.SilkS) (width 0.12)) 751 | (fp_line (start 0.03 1.37) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 752 | (fp_line (start 0.03 -1.37) (end 4.97 -1.37) (layer F.SilkS) (width 0.12)) 753 | (fp_line (start 4.85 -1.25) (end 0.15 -1.25) (layer F.Fab) (width 0.1)) 754 | (fp_line (start 4.85 1.25) (end 4.85 -1.25) (layer F.Fab) (width 0.1)) 755 | (fp_line (start 0.15 1.25) (end 4.85 1.25) (layer F.Fab) (width 0.1)) 756 | (fp_line (start 0.15 -1.25) (end 0.15 1.25) (layer F.Fab) (width 0.1)) 757 | (pad 2 thru_hole circle (at 5 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 758 | (net 1 GND)) 759 | (pad 1 thru_hole circle (at 0 0 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 760 | (net 4 VCC)) 761 | (model ${KISYS3DMOD}/Capacitor_THT.3dshapes/C_Disc_D4.7mm_W2.5mm_P5.00mm.wrl 762 | (at (xyz 0 0 0)) 763 | (scale (xyz 1 1 1)) 764 | (rotate (xyz 0 0 0)) 765 | ) 766 | ) 767 | 768 | (module Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm (layer F.Cu) (tedit 5AE50EF0) (tstamp 5CEB4A52) 769 | (at 159 47) 770 | (descr "C, Disc series, Radial, pin pitch=5.00mm, , diameter*width=4.7*2.5mm^2, Capacitor, http://www.vishay.com/docs/45233/krseries.pdf") 771 | (tags "C Disc series Radial pin pitch 5.00mm diameter 4.7mm width 2.5mm Capacitor") 772 | (path /5D03CEDC) 773 | (fp_text reference C2 (at 2.5 -2.5) (layer F.SilkS) 774 | (effects (font (size 1 1) (thickness 0.15))) 775 | ) 776 | (fp_text value 22pF (at 2.5 2.5) (layer F.Fab) 777 | (effects (font (size 1 1) (thickness 0.15))) 778 | ) 779 | (fp_text user %R (at 2.5 0) (layer F.Fab) 780 | (effects (font (size 0.94 0.94) (thickness 0.141))) 781 | ) 782 | (fp_line (start 6.05 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05)) 783 | (fp_line (start 6.05 1.5) (end 6.05 -1.5) (layer F.CrtYd) (width 0.05)) 784 | (fp_line (start -1.05 1.5) (end 6.05 1.5) (layer F.CrtYd) (width 0.05)) 785 | (fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05)) 786 | (fp_line (start 4.97 1.055) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 787 | (fp_line (start 4.97 -1.37) (end 4.97 -1.055) (layer F.SilkS) (width 0.12)) 788 | (fp_line (start 0.03 1.055) (end 0.03 1.37) (layer F.SilkS) (width 0.12)) 789 | (fp_line (start 0.03 -1.37) (end 0.03 -1.055) (layer F.SilkS) (width 0.12)) 790 | (fp_line (start 0.03 1.37) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 791 | (fp_line (start 0.03 -1.37) (end 4.97 -1.37) (layer F.SilkS) (width 0.12)) 792 | (fp_line (start 4.85 -1.25) (end 0.15 -1.25) (layer F.Fab) (width 0.1)) 793 | (fp_line (start 4.85 1.25) (end 4.85 -1.25) (layer F.Fab) (width 0.1)) 794 | (fp_line (start 0.15 1.25) (end 4.85 1.25) (layer F.Fab) (width 0.1)) 795 | (fp_line (start 0.15 -1.25) (end 0.15 1.25) (layer F.Fab) (width 0.1)) 796 | (pad 2 thru_hole circle (at 5 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 797 | (net 1 GND)) 798 | (pad 1 thru_hole circle (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 799 | (net 3 "Net-(C2-Pad1)")) 800 | (model ${KISYS3DMOD}/Capacitor_THT.3dshapes/C_Disc_D4.7mm_W2.5mm_P5.00mm.wrl 801 | (at (xyz 0 0 0)) 802 | (scale (xyz 1 1 1)) 803 | (rotate (xyz 0 0 0)) 804 | ) 805 | ) 806 | 807 | (module Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm (layer F.Cu) (tedit 5AE50EF0) (tstamp 5CEB4A3D) 808 | (at 159 51) 809 | (descr "C, Disc series, Radial, pin pitch=5.00mm, , diameter*width=4.7*2.5mm^2, Capacitor, http://www.vishay.com/docs/45233/krseries.pdf") 810 | (tags "C Disc series Radial pin pitch 5.00mm diameter 4.7mm width 2.5mm Capacitor") 811 | (path /5D03C5C3) 812 | (fp_text reference C1 (at 2.5 -2.5) (layer F.SilkS) 813 | (effects (font (size 1 1) (thickness 0.15))) 814 | ) 815 | (fp_text value 22pF (at 2.5 2.5) (layer F.Fab) 816 | (effects (font (size 1 1) (thickness 0.15))) 817 | ) 818 | (fp_text user %R (at 2.5 0) (layer F.Fab) 819 | (effects (font (size 0.94 0.94) (thickness 0.141))) 820 | ) 821 | (fp_line (start 6.05 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05)) 822 | (fp_line (start 6.05 1.5) (end 6.05 -1.5) (layer F.CrtYd) (width 0.05)) 823 | (fp_line (start -1.05 1.5) (end 6.05 1.5) (layer F.CrtYd) (width 0.05)) 824 | (fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05)) 825 | (fp_line (start 4.97 1.055) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 826 | (fp_line (start 4.97 -1.37) (end 4.97 -1.055) (layer F.SilkS) (width 0.12)) 827 | (fp_line (start 0.03 1.055) (end 0.03 1.37) (layer F.SilkS) (width 0.12)) 828 | (fp_line (start 0.03 -1.37) (end 0.03 -1.055) (layer F.SilkS) (width 0.12)) 829 | (fp_line (start 0.03 1.37) (end 4.97 1.37) (layer F.SilkS) (width 0.12)) 830 | (fp_line (start 0.03 -1.37) (end 4.97 -1.37) (layer F.SilkS) (width 0.12)) 831 | (fp_line (start 4.85 -1.25) (end 0.15 -1.25) (layer F.Fab) (width 0.1)) 832 | (fp_line (start 4.85 1.25) (end 4.85 -1.25) (layer F.Fab) (width 0.1)) 833 | (fp_line (start 0.15 1.25) (end 4.85 1.25) (layer F.Fab) (width 0.1)) 834 | (fp_line (start 0.15 -1.25) (end 0.15 1.25) (layer F.Fab) (width 0.1)) 835 | (pad 2 thru_hole circle (at 5 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 836 | (net 1 GND)) 837 | (pad 1 thru_hole circle (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) 838 | (net 2 "Net-(C1-Pad1)")) 839 | (model ${KISYS3DMOD}/Capacitor_THT.3dshapes/C_Disc_D4.7mm_W2.5mm_P5.00mm.wrl 840 | (at (xyz 0 0 0)) 841 | (scale (xyz 1 1 1)) 842 | (rotate (xyz 0 0 0)) 843 | ) 844 | ) 845 | 846 | (gr_line (start 106 35) (end 106 65) (layer F.Fab) (width 0.15) (tstamp 5CEB55B4)) 847 | (gr_line (start 176 35) (end 106 35) (layer F.Fab) (width 0.15)) 848 | (gr_line (start 176 65) (end 176 35) (layer F.Fab) (width 0.15)) 849 | (gr_line (start 106 65) (end 176 65) (layer F.Fab) (width 0.15)) 850 | 851 | ) 852 | --------------------------------------------------------------------------------