commit 5284e7ba727b16756408ef557513974578c4a384 Author: William Toohey Date: Sun Sep 4 14:49:12 2016 +1000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2693308 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +Hardware/History/ +Hardware/__Previews/ +*.d +*.sym +*.o +*.lss +*.map +*.eep +*.bin +*.elf +Firmware/Bootloader/ +*.hex +Firmware/LUFA/ +Hardware/Project Outputs for SDVX_Mini/ +Hardware/Project Logs for SDVX_Mini/ diff --git a/Firmware/Keyboard/Config.c b/Firmware/Keyboard/Config.c new file mode 100644 index 0000000..100e7c3 --- /dev/null +++ b/Firmware/Keyboard/Config.c @@ -0,0 +1,42 @@ +#include + +#include +#include + +#define MAGIC_NUMBER 43 + +static sdvx_config_t defaults PROGMEM = { + .switches = { + HID_KEYBOARD_SC_Z, + HID_KEYBOARD_SC_X, + HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN, + HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK, + HID_KEYBOARD_SC_C, + HID_KEYBOARD_SC_M, + HID_KEYBOARD_SC_ENTER}, + .ledsOn = true, + .debounce = 30 +}; + +uint8_t firstRun EEMEM; // init to 255 +sdvx_config_t eeConfig EEMEM; + +sdvx_config_t sdvxConfig; + +void InitConfig(void) { + if (eeprom_read_byte(&firstRun) != MAGIC_NUMBER) { // store defaults + memcpy_P(&sdvxConfig, &defaults, sizeof(sdvx_config_t)); + eeprom_write_block(&sdvxConfig, &eeConfig, sizeof(sdvx_config_t)); + eeprom_write_byte(&firstRun, MAGIC_NUMBER); // defaults set + } + eeprom_read_block(&sdvxConfig, &eeConfig, sizeof(sdvx_config_t)); + sdvxConfig.version = FIRMWARE_VERSION; +} + +void SetConfig(uint8_t* config) { + memcpy(&sdvxConfig, config, sizeof(sdvx_config_t)); + // Version is set in firmware, not software + sdvxConfig.version = FIRMWARE_VERSION; + + eeprom_write_block(&sdvxConfig, &eeConfig, sizeof(sdvx_config_t)); +} \ No newline at end of file diff --git a/Firmware/Keyboard/Config.h b/Firmware/Keyboard/Config.h new file mode 100644 index 0000000..9d686ba --- /dev/null +++ b/Firmware/Keyboard/Config.h @@ -0,0 +1,29 @@ +#ifndef _CONFIG_H +#define _CONFIG_H + +#include +#include +#include + +// For ease of code sharing with the OsuPad +#define SWITCH_COUNT 7 +// essentially sizeof the config type + 1 for some reason +// TODO: what is the reason +#define CONFIG_BYTES (SWITCH_COUNT + 4) +#define MAGIC_RESET_NUMBER 42 +#define FIRMWARE_VERSION 1 + +typedef struct { + // SWITCH ORDER: A-D, FXL-R, START + uint8_t switches[SWITCH_COUNT]; + bool ledsOn; + uint8_t debounce; + uint8_t version; +} sdvx_config_t; + +extern sdvx_config_t sdvxConfig; + +extern void InitConfig(void); +extern void SetConfig(uint8_t* config); + +#endif \ No newline at end of file diff --git a/Firmware/Keyboard/Config/LUFAConfig.h b/Firmware/Keyboard/Config/LUFAConfig.h new file mode 100644 index 0000000..5fae1fa --- /dev/null +++ b/Firmware/Keyboard/Config/LUFAConfig.h @@ -0,0 +1,84 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE +#endif diff --git a/Firmware/Keyboard/DFU/hid_bootloader_loader.py b/Firmware/Keyboard/DFU/hid_bootloader_loader.py new file mode 100644 index 0000000..2598fde --- /dev/null +++ b/Firmware/Keyboard/DFU/hid_bootloader_loader.py @@ -0,0 +1,120 @@ +""" + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +""" + +""" + Front-end programmer for the LUFA HID class bootloader. + + Usage: + python hid_bootloader_loader.py .hex + + Example: + python hid_bootloader_loader.py at90usb1287 Mouse.hex + + Requires the pywinusb (https://pypi.python.org/pypi/pywinusb/) and + IntelHex (http://bialix.com/intelhex/) libraries. +""" + +import sys +from pywinusb import hid +from intelhex import IntelHex + + +# Device information table +device_info_map = dict() +device_info_map['at90usb1287'] = {'page_size': 256, 'flash_kb': 128} +device_info_map['at90usb1286'] = {'page_size': 256, 'flash_kb': 128} +device_info_map['at90usb647'] = {'page_size': 256, 'flash_kb': 64} +device_info_map['at90usb646'] = {'page_size': 256, 'flash_kb': 64} +device_info_map['atmega32u4'] = {'page_size': 128, 'flash_kb': 32} +device_info_map['atmega32u2'] = {'page_size': 128, 'flash_kb': 32} +device_info_map['atmega16u4'] = {'page_size': 128, 'flash_kb': 16} +device_info_map['atmega16u2'] = {'page_size': 128, 'flash_kb': 16} +device_info_map['at90usb162'] = {'page_size': 128, 'flash_kb': 16} +device_info_map['atmega8u2'] = {'page_size': 128, 'flash_kb': 8} +device_info_map['at90usb82'] = {'page_size': 128, 'flash_kb': 8} + + +def get_hid_device_handle(): + hid_device_filter = hid.HidDeviceFilter(vendor_id=0x03EB, + product_id=0x2067) + + valid_hid_devices = hid_device_filter.get_devices() + + if len(valid_hid_devices) is 0: + return None + else: + return valid_hid_devices[0] + + +def send_page_data(hid_device, address, data): + # Bootloader page data should be the HID Report ID (always zero) followed + # by the starting address to program, then one device's flash page worth + # of data + output_report_data = [0] + output_report_data.extend([address & 0xFF, address >> 8]) + output_report_data.extend(data) + + hid_device.send_output_report(output_report_data) + + +def program_device(hex_data, device_info): + hid_device = get_hid_device_handle() + + if hid_device is None: + print("No valid HID device found.") + sys.exit(1) + + try: + hid_device.open() + print("Connected to bootloader.") + + # Program in all data from the loaded HEX file, in a number of device + # page sized chunks + for addr in range(0, hex_data.maxaddr(), device_info['page_size']): + # Compute the address range of the current page in the device + current_page_range = range(addr, addr+device_info['page_size']) + + # Extract the data from the hex file at the specified start page + # address and convert it to a regular list of bytes + page_data = [hex_data[i] for i in current_page_range] + + print("Writing address 0x%04X-0x%04X" % (current_page_range[0], current_page_range[-1])) + + # Devices with more than 64KB of flash should shift down the page + # address so that it is 16-bit (page size is guaranteed to be + # >= 256 bytes so no non-zero address bits are discarded) + if device_info['flash_kb'] < 64: + send_page_data(hid_device, addr, page_data) + else: + send_page_data(hid_device, addr >> 8, page_data) + + # Once programming is complete, start the application via a dummy page + # program to the page address 0xFFFF + print("Programming complete, starting application.") + send_page_data(hid_device, 0xFFFF, [0] * device_info['page_size']) + + finally: + hid_device.close() + + +if __name__ == '__main__': + # Load the specified HEX file + try: + hex_data = IntelHex(sys.argv[2]) + except: + print("Could not open the specified HEX file.") + sys.exit(1) + + # Retrieve the device information entry for the specified device + try: + device_info = device_info_map[sys.argv[1]] + except: + print("Unknown device name specified.") + sys.exit(1) + + program_device(hex_data, device_info) diff --git a/Firmware/Keyboard/Descriptors.c b/Firmware/Keyboard/Descriptors.c new file mode 100644 index 0000000..5a63154 --- /dev/null +++ b/Firmware/Keyboard/Descriptors.c @@ -0,0 +1,366 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * USB Device Descriptors, for library use when in USB device mode. Descriptors are special + * computer-readable structures which the host requests upon device enumeration, to determine + * the device's capabilities and functions. + */ + +#include "Descriptors.h" + +/** HID class report descriptor. This is a special descriptor constructed with values from the + * USBIF HID class specification to describe the reports and capabilities of the HID device. This + * descriptor is parsed by the host and its contents used to determine what data (and in what encoding) + * the device will send, and what it may be sent back from the host. Refer to the HID specification for + * more details on HID report descriptors. + */ +const USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = +{ + HID_RI_USAGE_PAGE(16, 0xFFDC), /* Vendor Page 0xDC */ + HID_RI_USAGE(8, 0xFB), /* Vendor Usage 0xFB */ + HID_RI_COLLECTION(8, 0x01), /* Vendor Usage 1 */ + HID_RI_USAGE(8, 0x02), /* Vendor Usage 2 */ + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0xFF), + HID_RI_REPORT_SIZE(8, 8), + HID_RI_REPORT_COUNT(8, CONFIG_BYTES), + HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + + HID_RI_USAGE(8, 0x02), /* Vendor Usage 2 */ + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0xFF), + HID_RI_REPORT_SIZE(8, 8), + HID_RI_REPORT_COUNT(8, CONFIG_BYTES), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE), + HID_RI_END_COLLECTION(0), +}; + +/** HID class report descriptor. This is a special descriptor constructed with values from the + * USBIF HID class specification to describe the reports and capabilities of the HID device. This + * descriptor is parsed by the host and its contents used to determine what data (and in what encoding) + * the device will send, and what it may be sent back from the host. Refer to the HID specification for + * more details on HID report descriptors. + */ +const USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] = +{ + // Use the HID class driver's standard Keyboard report + HID_DESCRIPTOR_KEYBOARD(SWITCH_COUNT) +}; + +/** HID class report descriptor. This is a special descriptor constructed with values from the + * USBIF HID class specification to describe the reports and capabilities of the HID device. This + * descriptor is parsed by the host and its contents used to determine what data (and in what encoding) + * the device will send, and what it may be sent back from the host. Refer to the HID specification for + * more details on HID report descriptors. + * + * This descriptor describes the mouse HID interface's report structure. + */ +const USB_Descriptor_HIDReport_Datatype_t PROGMEM MouseReport[] = +{ + /* Use the HID class driver's standard Mouse report. + * Min X/Y Axis values: -128 + * Max X/Y Axis values: 127 + * Min physical X/Y Axis values (used to determine resolution): -128 + * Max physical X/Y Axis values (used to determine resolution): 127 + * NOTE: need at least 1 button or report does not work + * Buttons: 1 + * Absolute screen coordinates: false + */ + HID_DESCRIPTOR_MOUSE(-128, 127, -128, 127, 1, false) +}; + +/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall + * device characteristics, including the supported USB version, control endpoint size and the + * number of device configurations. The descriptor is read out by the USB host when the enumeration + * process begins. + */ +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +{ + .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, + + .USBSpecification = VERSION_BCD(1,1,0), + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, + + .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + // mon.im VID/PID pair, unique! + .VendorID = 0x16D0, + .ProductID = 0x0A6D, + .ReleaseNumber = VERSION_BCD(0,0,1), + + .ManufacturerStrIndex = STRING_ID_Manufacturer, + .ProductStrIndex = STRING_ID_Product, + .SerialNumStrIndex = STRING_ID_Product, + + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS +}; + +/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage + * of the device in one of its supported configurations, including information about any device interfaces + * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting + * a configuration so that the host may correctly communicate with the USB device. + */ +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +{ + .Config = + { + .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, + + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), + .TotalInterfaces = 3, + + .ConfigurationNumber = 1, + .ConfigurationStrIndex = NO_DESCRIPTOR, + + .ConfigAttributes = USB_CONFIG_ATTR_RESERVED, + + .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) + }, + + .HID1_Interface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_Keyboard, + .AlternateSetting = 0x00, + + .TotalEndpoints = 1, + + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + + .InterfaceStrIndex = STRING_ID_Product + }, + + .HID1_KeyboardHID = + { + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, + + .HIDSpec = VERSION_BCD(1,1,1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(KeyboardReport) + }, + + .HID1_ReportINEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = KEYBOARD_EPADDR, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = KEYBOARD_EPSIZE, + .PollingIntervalMS = 0x01 + }, + + .HID2_MouseInterface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_Mouse, + .AlternateSetting = 0x00, + + .TotalEndpoints = 1, + + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_BootSubclass, + .Protocol = HID_CSCP_MouseBootProtocol, + + .InterfaceStrIndex = STRING_ID_Product + }, + + .HID2_MouseHID = + { + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, + + .HIDSpec = VERSION_BCD(1,1,1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(MouseReport) + }, + + .HID2_ReportINEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = MOUSE_IN_EPADDR, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = MOUSE_EPSIZE, + .PollingIntervalMS = 0x01 + }, + + .HID3_Interface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_Generic, + .AlternateSetting = 0x00, + + .TotalEndpoints = 1, + + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + + .InterfaceStrIndex = STRING_ID_Config + }, + + .HID3_VendorHID = + { + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, + + .HIDSpec = VERSION_BCD(1,1,1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(GenericReport) + }, + + .HID3_ReportINEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = GENERIC_EPADDR, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = GENERIC_EPSIZE, + .PollingIntervalMS = 255 + }, +}; + +/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests + * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate + * via the language ID table available at USB.org what languages the device supports for its string descriptors. + */ +const USB_Descriptor_String_t PROGMEM LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGUAGE_ID_ENG); + +/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable + * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +const USB_Descriptor_String_t PROGMEM ManufacturerString = USB_STRING_DESCRIPTOR(L"mon.im"); + +/** Product descriptor string. This is a Unicode string containing the product's details in human readable form, + * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(L"Pocket Voltex"); + + +const USB_Descriptor_String_t PROGMEM ConfigString = USB_STRING_DESCRIPTOR(L"SDVX Config"); + +/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" + * documentation) by the application code so that the address and size of a requested descriptor can be given + * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function + * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the + * USB host. + */ +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + const void** const DescriptorAddress) +{ + const uint8_t DescriptorType = (wValue >> 8); + const uint8_t DescriptorNumber = (wValue & 0xFF); + + const void* Address = NULL; + uint16_t Size = NO_DESCRIPTOR; + + switch (DescriptorType) + { + case DTYPE_Device: + Address = &DeviceDescriptor; + Size = sizeof(USB_Descriptor_Device_t); + break; + case DTYPE_Configuration: + Address = &ConfigurationDescriptor; + Size = sizeof(USB_Descriptor_Configuration_t); + break; + case DTYPE_String: + switch (DescriptorNumber) + { + case STRING_ID_Language: + Address = &LanguageString; + Size = pgm_read_byte(&LanguageString.Header.Size); + break; + case STRING_ID_Manufacturer: + Address = &ManufacturerString; + Size = pgm_read_byte(&ManufacturerString.Header.Size); + break; + case STRING_ID_Product: + Address = &ProductString; + Size = pgm_read_byte(&ProductString.Header.Size); + break; + case STRING_ID_Config: + Address = &ConfigString; + Size = pgm_read_byte(&ConfigString.Header.Size); + break; + } + + break; + case HID_DTYPE_HID: + Size = sizeof(USB_HID_Descriptor_HID_t); + switch (wIndex) { + case INTERFACE_ID_Keyboard: + Address = &ConfigurationDescriptor.HID1_KeyboardHID; + break; + case INTERFACE_ID_Mouse: + Address = &ConfigurationDescriptor.HID2_MouseHID; + break; + case INTERFACE_ID_Generic: + Address = &ConfigurationDescriptor.HID3_VendorHID; + break; + } + break; + case HID_DTYPE_Report: + switch (wIndex) { + case INTERFACE_ID_Keyboard: + Address = &KeyboardReport; + Size = sizeof(KeyboardReport); + break; + case INTERFACE_ID_Mouse: + Address = &MouseReport; + Size = sizeof(MouseReport); + break; + case INTERFACE_ID_Generic: + Address = &GenericReport; + Size = sizeof(GenericReport); + break; + } + break; + } + + *DescriptorAddress = Address; + return Size; +} + diff --git a/Firmware/Keyboard/Descriptors.h b/Firmware/Keyboard/Descriptors.h new file mode 100644 index 0000000..99c94d6 --- /dev/null +++ b/Firmware/Keyboard/Descriptors.h @@ -0,0 +1,114 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Descriptors.c. + */ + +#ifndef _DESCRIPTORS_H_ +#define _DESCRIPTORS_H_ + + /* Includes: */ + #include + + #include + + #include "Config.h" + + /* Type Defines: */ + /** Type define for the device configuration descriptor structure. This must be defined in the + * application code, as the configuration descriptor contains several sub-descriptors which + * vary between devices, and which describe the device's usage to the host. + */ + typedef struct + { + USB_Descriptor_Configuration_Header_t Config; + + // Keyboard HID Interface + USB_Descriptor_Interface_t HID1_Interface; + USB_HID_Descriptor_HID_t HID1_KeyboardHID; + USB_Descriptor_Endpoint_t HID1_ReportINEndpoint; + + // Mouse HID Interface + USB_Descriptor_Interface_t HID2_MouseInterface; + USB_HID_Descriptor_HID_t HID2_MouseHID; + USB_Descriptor_Endpoint_t HID2_ReportINEndpoint; + + // Generic HID Interface for configuration + USB_Descriptor_Interface_t HID3_Interface; + USB_HID_Descriptor_HID_t HID3_VendorHID; + USB_Descriptor_Endpoint_t HID3_ReportINEndpoint; + } USB_Descriptor_Configuration_t; + + /** Enum for the device interface descriptor IDs within the device. Each interface descriptor + * should have a unique ID index associated with it, which can be used to refer to the + * interface from other descriptors. + */ + enum InterfaceDescriptors_t + { + INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */ + INTERFACE_ID_Mouse = 1, /**< Mouse interface descriptor ID */ + INTERFACE_ID_Generic = 2 /**< Generic interface descriptor ID */ + }; + + /** Enum for the device string descriptor IDs within the device. Each string descriptor should + * have a unique ID index associated with it, which can be used to refer to the string from + * other descriptors. + */ + enum StringDescriptors_t + { + STRING_ID_Language = 0, /**< Supported Languages string descriptor ID (must be zero) */ + STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */ + STRING_ID_Product = 2, /**< Product string ID */ + STRING_ID_Config = 3 /**< Config string ID */ + }; + + /* Macros: */ + /** Endpoint address of the Keyboard HID reporting IN endpoint. */ + #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1) + + #define MOUSE_IN_EPADDR (ENDPOINT_DIR_IN | 2) + + #define GENERIC_EPADDR (ENDPOINT_DIR_IN | 3) + + /** Size in bytes of the Keyboard HID reporting IN endpoint. */ + #define KEYBOARD_EPSIZE 8 + #define MOUSE_EPSIZE 8 + #define GENERIC_EPSIZE CONFIG_BYTES + + /* Function Prototypes: */ + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + const void** const DescriptorAddress) + ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + +#endif + diff --git a/Firmware/Keyboard/Encoder.c b/Firmware/Keyboard/Encoder.c new file mode 100644 index 0000000..5cd4204 --- /dev/null +++ b/Firmware/Keyboard/Encoder.c @@ -0,0 +1,74 @@ +#include "Encoder.h" + +// SDVX Controller - PD0-3 +#define ENCODER_COUNT 2 + +#define ENCODER_PORT PORTD +#define ENCODER_PIN PIND +#define ENCODER_DDR DDRD + +#define GET_ENCODER_0() (ENCODER_PIN & 0b11) +#define GET_ENCODER_1() ((ENCODER_PIN >> 2) & 0b11) + +typedef struct { + int8_t position; + uint8_t state; +} encoder_t; + +static volatile encoder_t encoders[ENCODER_COUNT] = {}; + +void encoder_init(void) { + // inputs + ENCODER_DDR &= ~0x0F; + // pullups + ENCODER_PORT |= 0x0F; + + encoders[0].state = GET_ENCODER_0(); + encoders[1].state = GET_ENCODER_1(); + + // Edge interrupts on all INT pins + EICRA = _BV(ISC30) | _BV(ISC20) | _BV(ISC10) | _BV(ISC00); + // Enable the interrupts + EIMSK = _BV(INT3) | _BV(INT2) | _BV(INT1) | _BV(INT0); + // Clear interrupt flags + EIFR = _BV(INTF3) | _BV(INTF2) | _BV(INTF1) | _BV(INTF0); +} + +int8_t encoder_get(uint8_t num) { + return encoders[num].position; +} + +void encoder_set(uint8_t num, int8_t val) { + encoders[num].position = val; +} + +// Adapted from the wonderful Encoder.h by PJRC +void update(uint8_t num, uint8_t newState) { + int8_t position = encoders[num].position; + uint8_t state = encoders[num].state | (newState << 2); + encoders[num].state = newState; + switch (state) { + case 1: case 7: case 8: case 14: + if(position < 127) + encoders[num].position++; + return; + case 2: case 4: case 11: case 13: + if(position > -128) + encoders[num].position--; + return; + case 3: case 12: + if(position < 125) + encoders[num].position += 2; + return; + case 6: case 9: + if(position > -126) + encoders[num].position -= 2; + return; + } + +} + +ISR(INT0_vect) { update(0, GET_ENCODER_0()); } +ISR(INT1_vect) { update(0, GET_ENCODER_0()); } +ISR(INT2_vect) { update(1, GET_ENCODER_1()); } +ISR(INT3_vect) { update(1, GET_ENCODER_1()); } \ No newline at end of file diff --git a/Firmware/Keyboard/Encoder.h b/Firmware/Keyboard/Encoder.h new file mode 100644 index 0000000..58110e6 --- /dev/null +++ b/Firmware/Keyboard/Encoder.h @@ -0,0 +1,12 @@ +#ifndef Encoder_h_ +#define Encoder_h_ + +#include +#include +#include + +void encoder_init(void); +int8_t encoder_get(uint8_t num); +void encoder_set(uint8_t num, int8_t val); + +#endif diff --git a/Firmware/Keyboard/Keyboard.c b/Firmware/Keyboard/Keyboard.c new file mode 100644 index 0000000..84d2bc9 --- /dev/null +++ b/Firmware/Keyboard/Keyboard.c @@ -0,0 +1,389 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Main source file for the Keyboard demo. This file contains the main tasks of + * the demo and is responsible for the initial application hardware configuration. + */ + +#include "Keyboard.h" +#include "Config.h" +#include "Encoder.h" + +#define READ_SWITCH(x) (!(*pins[switches[x].switchPort] & _BV(switches[x].switchPin))) +#define SET_LED(x) (*ports[switches[x].lightPort] |= _BV(switches[x].lightPin)) +#define CLEAR_LED(x) (*ports[switches[x].lightPort] &= ~_BV(switches[x].lightPin)) + +typedef struct +{ + uint8_t Modifier; // Keyboard modifier byte indicating pressed modifier keys (\c HID_KEYBOARD_MODIFER_* masks) + uint8_t Reserved; // Reserved for OEM use, always set to 0. + uint8_t KeyCode[SWITCH_COUNT]; // Length determined by the number of keys that can be reported +} Keyboard_Report_t; + +/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */ +static uint8_t PrevKeyboardHIDReportBuffer[sizeof(Keyboard_Report_t)]; +static uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)]; +static uint8_t PrevGenericHIDReportBuffer[CONFIG_BYTES]; + +/** LUFA HID Class driver interface configuration and state information. This structure is + * passed to all HID Class driver functions, so that multiple instances of the same class + * within a device can be differentiated from one another. + */ +USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = +{ + .Config = + { + .InterfaceNumber = INTERFACE_ID_Keyboard, + .ReportINEndpoint = + { + .Address = KEYBOARD_EPADDR, + .Size = KEYBOARD_EPSIZE, + .Banks = 1, + }, + .PrevReportINBuffer = PrevKeyboardHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer), + }, +}; + +/** LUFA HID Class driver interface configuration and state information. This structure is + * passed to all HID Class driver functions, so that multiple instances of the same class + * within a device can be differentiated from one another. This is for the mouse HID + * interface within the device. + */ +USB_ClassInfo_HID_Device_t Mouse_HID_Interface = +{ + .Config = + { + .InterfaceNumber = INTERFACE_ID_Mouse, + .ReportINEndpoint = + { + .Address = MOUSE_IN_EPADDR, + .Size = MOUSE_EPSIZE, + .Banks = 1, + }, + .PrevReportINBuffer = PrevMouseHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer), + }, +}; + +USB_ClassInfo_HID_Device_t Generic_HID_Interface = +{ + .Config = + { + .InterfaceNumber = INTERFACE_ID_Generic, + .ReportINEndpoint = + { + .Address = GENERIC_EPADDR, + .Size = GENERIC_EPSIZE, + .Banks = 1, + }, + .PrevReportINBuffer = PrevGenericHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevGenericHIDReportBuffer), + }, +}; + +// NOTE: atemga16u2 does not have a PORTA +typedef enum { + B = 0, + C, + D +} port_t; + +static volatile uint8_t *ports[] = {&PORTB, &PORTC, &PORTD}; +static volatile uint8_t *pins[] = {&PINB, &PINC, &PIND}; +static volatile uint8_t *ddrs[] = {&DDRB, &DDRC, &DDRD}; + +typedef struct { + port_t switchPort; + uint8_t switchPin; + port_t lightPort; + uint8_t lightPin; + uint8_t state; + uint8_t lastReport; + uint8_t debounce; +} switch_t; + +static switch_t switches[SWITCH_COUNT] = { + {C, 7, C, 6}, // A + {B, 4, B, 5}, // B + {B, 2, B, 3}, // C + {D, 6, D, 7}, // D + {B, 6, B, 7}, // FX L + {B, 0, B, 1}, // FX R + {D, 5, D, 4} // START +}; +static uint8_t switchesChanged = 1; + +uint32_t Boot_Key ATTR_NO_INIT; +#define MAGIC_BOOT_KEY 0xDEADBE7A +// offset * word size +#define BOOTLOADER_START_ADDRESS (0x1c00 * 2) + +void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3); +void Bootloader_Jump_Check(void) +{ + // If the reset source was the bootloader and the key is correct, clear it and jump to the bootloader + if ((MCUSR & (1 << WDRF)) && (Boot_Key == MAGIC_BOOT_KEY)) + { + Boot_Key = 0; + ((void (*)(void))BOOTLOADER_START_ADDRESS)(); + } +} + +void RebootToBootloader(void) { + // With this uncommented, reboot fails. Odd. + //USB_Disable(); + cli(); + + // Back to the bootloader + Boot_Key = MAGIC_BOOT_KEY; + wdt_enable(WDTO_250MS); + while(1); +} + +void update_switches(void) { + uint8_t i, newState; + + for(i = 0; i < SWITCH_COUNT; i++) { + // The I2C data starts at the 6th bit and goes down + newState = READ_SWITCH(i); + if(newState) { + SET_LED(i); + } else { + CLEAR_LED(i); + } + if(!switches[i].debounce && newState != switches[i].lastReport) { + switches[i].state = newState; + switches[i].debounce = sdvxConfig.debounce; + switchesChanged = 1; + } + } +} + +/** Main program entry point. This routine contains the overall program flow, including initial + * setup of all components and the main program loop. + */ +int main(void) +{ + GlobalInterruptDisable(); + + uint8_t i; + + InitConfig(); + + SetupHardware(); + + // FX_L held while plugging in + if(READ_SWITCH(4)) { + RebootToBootloader(); + } + + // Blink to show we're not in bootloader + for(i = 0; i < SWITCH_COUNT; i++) { + *ports[switches[i].lightPort] |= _BV(switches[i].lightPin); + _delay_ms(50); + *ports[switches[i].lightPort] &= ~_BV(switches[i].lightPin); + } + + GlobalInterruptEnable(); + + for (;;) + { + HID_Device_USBTask(&Keyboard_HID_Interface); + HID_Device_USBTask(&Mouse_HID_Interface); + HID_Device_USBTask(&Generic_HID_Interface); + USB_USBTask(); + } +} + +/** Configures the board hardware and chip peripherals for the demo's functionality. */ +void SetupHardware() +{ + uint8_t i; + + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + for(i = 0; i < SWITCH_COUNT; i++) { + switches[i].state = 0; + switches[i].lastReport = 0; + switches[i].debounce = 0; + // setup switches to be inputs + *ddrs[switches[i].switchPort] &= ~_BV(switches[i].switchPin); + // with internal pullups + *ports[switches[i].switchPort] |= _BV(switches[i].switchPin); + // setup LEDs to be outputs + *ddrs[switches[i].lightPort] |= _BV(switches[i].lightPin); + // off by default + *ports[switches[i].lightPort] &= ~_BV(switches[i].lightPin); + } + + /* Hardware Initialization */ + encoder_init(); + USB_Init(); +} + +/** HID class driver callback function for the creation of HID reports to the host. + * + * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced + * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature + * \param[out] ReportData Pointer to a buffer where the created report should be stored + * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent) + * + * \return Boolean \c true to force the sending of the report, \c false to let the library determine if it needs to be sent + */ +bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + const uint8_t ReportType, + void* ReportData, + uint16_t* const ReportSize) +{ + if(ReportType != HID_REPORT_ITEM_In) { + *ReportSize = 0; + return false; + } + if (HIDInterfaceInfo == &Keyboard_HID_Interface) { + Keyboard_Report_t* KeyboardReport = (Keyboard_Report_t*)ReportData; + update_switches(); + + if(!switchesChanged) { + *ReportSize = 0; + return false; + } + + for(uint8_t i = 0; i < SWITCH_COUNT; i++) { + KeyboardReport->KeyCode[i] = switches[i].state ? sdvxConfig.switches[i] : 0; + switches[i].lastReport = switches[i].state; + // Update blinkenlights + if(switches[i].state) { + if(sdvxConfig.ledsOn) { + // TODO + } + } + } + + *ReportSize = sizeof(Keyboard_Report_t); + + switchesChanged = 0; + return true; + } else if(HIDInterfaceInfo == &Mouse_HID_Interface) { + USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData; + + MouseReport->X = encoder_get(0); + MouseReport->Y = -encoder_get(1); + + encoder_set(0, 0); + encoder_set(1, 0); + + *ReportSize = sizeof(USB_MouseReport_Data_t); + return true; + } else if(HIDInterfaceInfo == &Generic_HID_Interface) { + uint8_t* ConfigReport = (uint8_t*)ReportData; + memcpy(ConfigReport, &sdvxConfig, sizeof(sdvx_config_t)); + *ReportSize = CONFIG_BYTES; + return true; + } + *ReportSize = 0; + return false; + +} + +/** HID class driver callback function for the processing of HID reports from the host. + * + * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced + * \param[in] ReportID Report ID of the received report from the host + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature + * \param[in] ReportData Pointer to a buffer where the received report has been stored + * \param[in] ReportSize Size in bytes of the received HID report + */ +void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + const uint8_t ReportID, + const uint8_t ReportType, + const void* ReportData, + const uint16_t ReportSize) +{ + if(HIDInterfaceInfo == &Generic_HID_Interface && ReportType == HID_REPORT_ITEM_Out) { + uint8_t* ConfigReport = (uint8_t*)ReportData; + // So we can upgrade firmware without having to hit the button + if(ConfigReport[CONFIG_BYTES-1] == MAGIC_RESET_NUMBER) { + RebootToBootloader(); + } + SetConfig(ConfigReport); + } +} + + +/** Event handler for the library USB Connection event. */ +void EVENT_USB_Device_Connect(void) +{ + +} + +/** Event handler for the library USB Disconnection event. */ +void EVENT_USB_Device_Disconnect(void) +{ + +} + +/** Event handler for the library USB Configuration Changed event. */ +void EVENT_USB_Device_ConfigurationChanged(void) +{ + HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface); + HID_Device_ConfigureEndpoints(&Mouse_HID_Interface); + HID_Device_ConfigureEndpoints(&Generic_HID_Interface); + + USB_Device_EnableSOFEvents(); +} + +/** Event handler for the library USB Control Request reception event. */ +void EVENT_USB_Device_ControlRequest(void) +{ + HID_Device_ProcessControlRequest(&Keyboard_HID_Interface); + HID_Device_ProcessControlRequest(&Mouse_HID_Interface); + HID_Device_ProcessControlRequest(&Generic_HID_Interface); +} + +/** Event handler for the USB device Start Of Frame event. */ +void EVENT_USB_Device_StartOfFrame(void) +{ + HID_Device_MillisecondElapsed(&Keyboard_HID_Interface); + HID_Device_MillisecondElapsed(&Mouse_HID_Interface); + HID_Device_MillisecondElapsed(&Generic_HID_Interface); + + for(int i = 0; i < SWITCH_COUNT; i++) { + if(switches[i].debounce) { + switches[i].debounce--; + } + } +} diff --git a/Firmware/Keyboard/Keyboard.h b/Firmware/Keyboard/Keyboard.h new file mode 100644 index 0000000..0dc0ab9 --- /dev/null +++ b/Firmware/Keyboard/Keyboard.h @@ -0,0 +1,73 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Keyboard.c. + */ + +#ifndef _KEYBOARD_H_ +#define _KEYBOARD_H_ + + /* Includes: */ + #include + #include + #include + #include + #include + #include + + #include "Descriptors.h" + + #include + #include + + /* Function Prototypes: */ + void SetupHardware(void); + + void EVENT_USB_Device_Connect(void); + void EVENT_USB_Device_Disconnect(void); + void EVENT_USB_Device_ConfigurationChanged(void); + void EVENT_USB_Device_ControlRequest(void); + void EVENT_USB_Device_StartOfFrame(void); + + bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + const uint8_t ReportType, + void* ReportData, + uint16_t* const ReportSize); + void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + const uint8_t ReportID, + const uint8_t ReportType, + const void* ReportData, + const uint16_t ReportSize); + +#endif + diff --git a/Firmware/Keyboard/asciihid.h b/Firmware/Keyboard/asciihid.h new file mode 100644 index 0000000..4170e9a --- /dev/null +++ b/Firmware/Keyboard/asciihid.h @@ -0,0 +1,145 @@ +// https://github.com/SFE-Chris/UNO-HIDKeyboard-Library/blob/master/HIDKeyboard.h + +#include + +// HID Values of Function Keys +#define F1 0x3a +#define F2 0x3b +#define F3 0x3c +#define F4 0x3d +#define F5 0x3e +#define F6 0x3f +#define F7 0x40 +#define F8 0x41 +#define F9 0x42 +#define F10 0x43 +#define F11 0x44 +#define F12 0x45 + +// HID Values of Special Keys +#define ENTER 0x28 +#define ESCAPE 0x29 +#define BACKSPACE 0x2a +#define TAB 0x2b +#define SPACEBAR 0x2c +#define CAPSLOCK 0x39 +#define PRINTSCREEN 0x46 +#define SCROLLLOCK 0x47 +#define PAUSE 0x48 +#define INSERT 0x49 +#define HOME 0x4a +#define PAGEUP 0x4b +#define DELETE 0x4c +#define END 0x4d +#define PAGEDOWN 0x4e +#define RIGHTARROW 0x4f +#define LEFTARROW 0x50 +#define DOWNARROW 0x51 +#define UPARROW 0x52 + +// HID Values of Keypad Keys +#define NUMLOCK 0x53 +#define KEYPADSLASH 0x54 +#define KEYPADSTAR 0x55 +#define KEYPADMINUS 0x56 +#define KEYPADPLUS 0x57 +#define KEYPADENTER 0x58 +#define KEYPAD1 0x59 +#define KEYPAD2 0x5a +#define KEYPAD3 0x5b +#define KEYPAD4 0x5c +#define KEYPAD5 0x5d +#define KEYPAD6 0x5e +#define KEYPAD7 0x5f +#define KEYPAD8 0x60 +#define KEYPAD9 0x61 +#define KEYPAD0 0x62 +#define KEYPADPERIOD 0x63 + +// HID Values of System Keys +#define KEYBOARDAPPLICATION 0x65 +#define KEYBOARDPOWER 0x66 +#define VOLUMEMUTE 0x7f +#define VOLUMEUP 0x80 +#define VOLUMEDOWN 0x81 + +// Common-use modifiers +#define CTRL 0x01 +#define SHIFT 0x02 +#define ALT 0x04 +#define GUI 0x08 + + +/**************************************************************************** + * + * ASCII->HID LOOKUP TABLE + * + * Taken from the HID Table definition at + * http://www.usb.org/developers/devclass_docs/Hut1_11.pdf + * + * This array maps the ASCII value of a type-able character to its + * corresponding HID value. + * + * Example: + * 'a' = ASCII value 97 = HID value 0x04 + * HIDTable['a'] = HIDTable[97] = 0x04 + * + * NOTE: + * "Shift Modified" HID values are the same as the non Shift-Modified values + * for any given character, e.g. the HID value for '2' is equal to the + * HID value for '@'. The Shift-Modified value is sent by setting the + * modifier value (buf[0]) to the corresponding modifier value in the + * modifier table. + * + ****************************************************************************/ +PROGMEM uint8_t HIDTable[] = { + 0x00, // 0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x28, // 10 + 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 20 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, // 30 + 0x00, 0x2c, 0x1e, 0x34, 0x20, 0x21, 0x22, 0x24, 0x34, 0x26, // 40 + 0x27, 0x25, 0x2e, 0x36, 0x2d, 0x37, 0x38, 0x27, 0x1e, 0x1f, // 50 + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x33, 0x33, 0x36, // 60 + 0x2e, 0x37, 0x38, 0x1f, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, // 70 + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, // 80 + 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, // 90 + 0x2f, 0x31, 0x30, 0x23, 0x2d, 0x35, 0x04, 0x05, 0x06, 0x07, // 100 + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, // 110 + 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, // 120 + 0x1c, 0x1d, 0x2f, 0x31, 0x30, 0x35, 127 // 127 +}; + + +/**************************************************************************** + * + * ASCII->MODIFIER LOOKUP TABLE + * + * Looks up whether or not the HID report should use the SHIFT modifier. + * + * Example: + * The character '2' and the character '@' have different ASCII values but + * the same HID value. This table uses the ASCII value to determine if + * we should hold shift while sending the key. e.g.: + * + * HIDTable['2'] = 0x1f and modifierTable['2'] = 0 + * HIDTable['@'] = 0x1f and modifierTable['@'] = SHIFT + * + * There's probaly a better way to do this, but it's functional. + * + ****************************************************************************/ +PROGMEM uint8_t modifierTable[] = { + 0x00, // 0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 10 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 20 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 30 + 0x00, 0x00, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, // 40 + SHIFT, 0x00, SHIFT, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 50 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, SHIFT, 0x00, SHIFT, // 60 + 0x00, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, // 70 + SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, // 80 + SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, // 90 + 0x00, 0x00, 0x00, SHIFT, SHIFT, 0x00, 0x00, 0x00, 0x00, 0x00, // 100 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 110 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 120 + 0x00, 0x00, SHIFT, SHIFT, SHIFT, SHIFT, 0x00 // 127 +}; \ No newline at end of file diff --git a/Firmware/Keyboard/makefile b/Firmware/Keyboard/makefile new file mode 100644 index 0000000..d971460 --- /dev/null +++ b/Firmware/Keyboard/makefile @@ -0,0 +1,69 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2014. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# +# -------------------------------------- +# LUFA Project Makefile. +# -------------------------------------- + +# Run "make help" for target help. + +MCU = atmega16u2 +ARCH = AVR8 +BOARD = USER +F_CPU = 8000000 +F_USB = $(F_CPU) +OPTIMIZATION = s +TARGET = Keyboard +SRC = $(TARGET).c Descriptors.c Config.c Encoder.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) +LUFA_PATH = ../LUFA +CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ +LD_FLAGS = + +AVRDUDE = avrdude -B 8 -c usbasp -p $(MCU) + + +# Default target +all: + +# Include LUFA build script makefiles +include $(LUFA_PATH)/Build/lufa_core.mk +include $(LUFA_PATH)/Build/lufa_sources.mk +include $(LUFA_PATH)/Build/lufa_build.mk +include $(LUFA_PATH)/Build/lufa_cppcheck.mk +include $(LUFA_PATH)/Build/lufa_doxygen.mk +include $(LUFA_PATH)/Build/lufa_dfu.mk +include $(LUFA_PATH)/Build/lufa_hid.mk +include $(LUFA_PATH)/Build/lufa_avrdude.mk +include $(LUFA_PATH)/Build/lufa_atprogram.mk + +debug: CC_FLAGS += -DDEBUG +debug: clean flash + +init: erase wfuse flashboot flash + +initboot: erase wfuse flashboot + +erase: + $(AVRDUDE) -e + +rfuse: + $(AVRDUDE) -U hfuse:r:-:h -U lfuse:r:-:h -U efuse:r:-:h + +wfuse: + $(AVRDUDE) -U lfuse:w:0xde:m -U hfuse:w:0xdb:m -U efuse:w:0xf6:m + +# To make this hex, compile HID Bootloader in LUFA +# FLASH_SIZE_KB := 16 +# BOOT_SECTION_SIZE_KB := 2 +# MCU = atmega16u2 +# ARCH = AVR8 +flashboot: + $(AVRDUDE) -U flash:w:DFU/BootloaderHID.hex:i + +flash: all + sleep 1 + python DFU/hid_bootloader_loader.py atmega16u2 Keyboard.hex diff --git a/Hardware/Gerbers/SDVX_Mini_v1.zip b/Hardware/Gerbers/SDVX_Mini_v1.zip new file mode 100644 index 0000000..ff3b199 Binary files /dev/null and b/Hardware/Gerbers/SDVX_Mini_v1.zip differ diff --git a/Hardware/SDVX_Mini.PcbDoc b/Hardware/SDVX_Mini.PcbDoc new file mode 100644 index 0000000..da42a6b Binary files /dev/null and b/Hardware/SDVX_Mini.PcbDoc differ diff --git a/Hardware/SDVX_Mini.PrjPCB b/Hardware/SDVX_Mini.PrjPCB new file mode 100644 index 0000000..6fe746b --- /dev/null +++ b/Hardware/SDVX_Mini.PrjPCB @@ -0,0 +1,1107 @@ +[Design] +Version=1.0 +HierarchyMode=0 +ChannelRoomNamingStyle=0 +ReleasesFolder= +ReleaseVaultGUID= +ReleaseVaultName= +ChannelDesignatorFormatString=$Component_$RoomName +ChannelRoomLevelSeperator=_ +OpenOutputs=1 +ArchiveProject=0 +TimestampOutput=0 +SeparateFolders=0 +TemplateLocationPath= +PinSwapBy_Netlabel=1 +PinSwapBy_Pin=1 +AllowPortNetNames=0 +AllowSheetEntryNetNames=1 +AppendSheetNumberToLocalNets=0 +NetlistSinglePinNets=0 +DefaultConfiguration=Default Configuration +UserID=0xFFFFFFFF +DefaultPcbProtel=1 +DefaultPcbPcad=0 +ReorderDocumentsOnCompile=1 +NameNetsHierarchically=0 +PowerPortNamesTakePriority=0 +PushECOToAnnotationFile=1 +DItemRevisionGUID= +ReportSuppressedErrorsInMessages=0 +OutputPath= +LogFolderPath= + +[Preferences] +PrefsVaultGUID= +PrefsRevisionGUID= + +[Document1] +DocumentPath=..\..\AltiumParts\MonParts.PcbLib +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=-1 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=1 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 + +[Document2] +DocumentPath=SDVX_Mini.SchDoc +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=-1 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=1 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 + +[Document3] +DocumentPath=SDVX_Mini.PcbDoc +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=-1 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=1 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 + +[Document4] +DocumentPath=..\..\AltiumParts\MonParts.SchLib +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=-1 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=1 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 + +[GeneratedDocument1] +DocumentPath=Project Outputs for SDVX_Mini\Design Rule Check - SDVX_Mini.html +DItemRevisionGUID= + +[GeneratedDocument2] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini-RoundHoles.TXT +DItemRevisionGUID= + +[GeneratedDocument3] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini-SlotHoles.TXT +DItemRevisionGUID= + +[GeneratedDocument4] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.DRR +DItemRevisionGUID= + +[GeneratedDocument5] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.EXTREP +DItemRevisionGUID= + +[GeneratedDocument6] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GBL +DItemRevisionGUID= + +[GeneratedDocument7] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GBO +DItemRevisionGUID= + +[GeneratedDocument8] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GBP +DItemRevisionGUID= + +[GeneratedDocument9] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GBS +DItemRevisionGUID= + +[GeneratedDocument10] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GKO +DItemRevisionGUID= + +[GeneratedDocument11] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GTL +DItemRevisionGUID= + +[GeneratedDocument12] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GTO +DItemRevisionGUID= + +[GeneratedDocument13] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GTP +DItemRevisionGUID= + +[GeneratedDocument14] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.GTS +DItemRevisionGUID= + +[GeneratedDocument15] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.LDP +DItemRevisionGUID= + +[GeneratedDocument16] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.REP +DItemRevisionGUID= + +[GeneratedDocument17] +DocumentPath=Project Outputs for SDVX_Mini\SDVX_Mini.RUL +DItemRevisionGUID= + +[Configuration1] +Name=Default Configuration +ParameterCount=0 +ConstraintFileCount=0 +ReleaseItemId= +CurrentRevision= +Variant=[No Variations] +GenerateBOM=1 +OutputJobsCount=0 + +[OutputGroup1] +Name=Netlist Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=CadnetixNetlist +OutputName1=Cadnetix Netlist +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +OutputType2=CalayNetlist +OutputName2=Calay Netlist +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +OutputType3=EDIF +OutputName3=EDIF for PCB +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +OutputType4=EESofNetlist +OutputName4=EESof Netlist +OutputDocumentPath4= +OutputVariantName4= +OutputDefault4=0 +OutputType5=IntergraphNetlist +OutputName5=Intergraph Netlist +OutputDocumentPath5= +OutputVariantName5= +OutputDefault5=0 +OutputType6=MentorBoardStationNetlist +OutputName6=Mentor BoardStation Netlist +OutputDocumentPath6= +OutputVariantName6= +OutputDefault6=0 +OutputType7=MultiWire +OutputName7=MultiWire +OutputDocumentPath7= +OutputVariantName7= +OutputDefault7=0 +OutputType8=OrCadPCB2Netlist +OutputName8=Orcad/PCB2 Netlist +OutputDocumentPath8= +OutputVariantName8= +OutputDefault8=0 +OutputType9=PADSNetlist +OutputName9=PADS ASCII Netlist +OutputDocumentPath9= +OutputVariantName9= +OutputDefault9=0 +OutputType10=Pcad +OutputName10=Pcad for PCB +OutputDocumentPath10= +OutputVariantName10= +OutputDefault10=0 +OutputType11=PCADNetlist +OutputName11=PCAD Netlist +OutputDocumentPath11= +OutputVariantName11= +OutputDefault11=0 +OutputType12=PCADnltNetlist +OutputName12=PCADnlt Netlist +OutputDocumentPath12= +OutputVariantName12= +OutputDefault12=0 +OutputType13=Protel2Netlist +OutputName13=Protel2 Netlist +OutputDocumentPath13= +OutputVariantName13= +OutputDefault13=0 +OutputType14=ProtelNetlist +OutputName14=Protel +OutputDocumentPath14= +OutputVariantName14= +OutputDefault14=0 +OutputType15=RacalNetlist +OutputName15=Racal Netlist +OutputDocumentPath15= +OutputVariantName15= +OutputDefault15=0 +OutputType16=RINFNetlist +OutputName16=RINF Netlist +OutputDocumentPath16= +OutputVariantName16= +OutputDefault16=0 +OutputType17=SciCardsNetlist +OutputName17=SciCards Netlist +OutputDocumentPath17= +OutputVariantName17= +OutputDefault17=0 +OutputType18=SIMetrixNetlist +OutputName18=SIMetrix +OutputDocumentPath18= +OutputVariantName18= +OutputDefault18=0 +OutputType19=SIMPLISNetlist +OutputName19=SIMPLIS +OutputDocumentPath19= +OutputVariantName19= +OutputDefault19=0 +OutputType20=TangoNetlist +OutputName20=Tango Netlist +OutputDocumentPath20= +OutputVariantName20= +OutputDefault20=0 +OutputType21=TelesisNetlist +OutputName21=Telesis Netlist +OutputDocumentPath21= +OutputVariantName21= +OutputDefault21=0 +OutputType22=Verilog +OutputName22=Verilog File +OutputDocumentPath22= +OutputVariantName22= +OutputDefault22=0 +OutputType23=VHDL +OutputName23=VHDL File +OutputDocumentPath23= +OutputVariantName23= +OutputDefault23=0 +OutputType24=WireListNetlist +OutputName24=WireList Netlist +OutputDocumentPath24= +OutputVariantName24= +OutputDefault24=0 +OutputType25=XSpiceNetlist +OutputName25=XSpice Netlist +OutputDocumentPath25= +OutputVariantName25= +OutputDefault25=0 + +[OutputGroup2] +Name=Simulator Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=AdvSimNetlist +OutputName1=Mixed Sim +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +OutputType2=SIMetrixSimulation +OutputName2=SIMetrix +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +OutputType3=SIMPLISSimulation +OutputName3=SIMPLIS +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 + +[OutputGroup3] +Name=Documentation Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=Assembler Source Print +OutputName1=Assembler Source Prints +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType2=C Source Print +OutputName2=C Source Prints +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +PageOptions2=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType3=C/C++ Header Print +OutputName3=C/C++ Header Prints +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +PageOptions3=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType4=C++ Source Print +OutputName4=C++ Source Prints +OutputDocumentPath4= +OutputVariantName4= +OutputDefault4=0 +PageOptions4=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType5=Composite +OutputName5=Composite Drawing +OutputDocumentPath5= +OutputVariantName5= +OutputDefault5=0 +PageOptions5=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType6=Logic Analyser Print +OutputName6=Logic Analyser Prints +OutputDocumentPath6= +OutputVariantName6= +OutputDefault6=0 +PageOptions6=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType7=OpenBus Print +OutputName7=OpenBus Prints +OutputDocumentPath7= +OutputVariantName7= +OutputDefault7=0 +PageOptions7=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType8=PCB 3D Print +OutputName8=PCB 3D Print +OutputDocumentPath8= +OutputVariantName8=[No Variations] +OutputDefault8=0 +PageOptions8=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType9=PCB 3D Video +OutputName9=PCB 3D Video +OutputDocumentPath9= +OutputVariantName9=[No Variations] +OutputDefault9=0 +PageOptions9=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType10=PCB Print +OutputName10=PCB Prints +OutputDocumentPath10= +OutputVariantName10= +OutputDefault10=0 +PageOptions10=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType11=PCBLIB Print +OutputName11=PCBLIB Prints +OutputDocumentPath11= +OutputVariantName11= +OutputDefault11=0 +PageOptions11=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType12=Report Print +OutputName12=Report Prints +OutputDocumentPath12= +OutputVariantName12= +OutputDefault12=0 +PageOptions12=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType13=Schematic Print +OutputName13=Schematic Prints +OutputDocumentPath13= +OutputVariantName13= +OutputDefault13=0 +PageOptions13=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType14=SimView Print +OutputName14=SimView Prints +OutputDocumentPath14= +OutputVariantName14= +OutputDefault14=0 +PageOptions14=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType15=Software Platform Print +OutputName15=Software Platform Prints +OutputDocumentPath15= +OutputVariantName15= +OutputDefault15=0 +PageOptions15=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType16=VHDL Print +OutputName16=VHDL Prints +OutputDocumentPath16= +OutputVariantName16= +OutputDefault16=0 +PageOptions16=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType17=Wave Print +OutputName17=Wave Prints +OutputDocumentPath17= +OutputVariantName17= +OutputDefault17=0 +PageOptions17=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType18=WaveSim Print +OutputName18=WaveSim Prints +OutputDocumentPath18= +OutputVariantName18= +OutputDefault18=0 +PageOptions18=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 + +[OutputGroup4] +Name=Assembly Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=Assembly +OutputName1=Assembly Drawings +OutputDocumentPath1= +OutputVariantName1=[No Variations] +OutputDefault1=0 +PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType2=Pick Place +OutputName2=Generates pick and place files +OutputDocumentPath2= +OutputVariantName2=[No Variations] +OutputDefault2=0 +OutputType3=Test Points For Assembly +OutputName3=Test Point Report +OutputDocumentPath3= +OutputVariantName3=[No Variations] +OutputDefault3=0 + +[OutputGroup5] +Name=Fabrication Outputs +Description= +TargetPrinter=Canon MG6100 series Printer WS +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=Board Stack Report +OutputName1=Report Board Stack +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType2=CompositeDrill +OutputName2=Composite Drill Drawing +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +PageOptions2=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType3=Drill +OutputName3=Drill Drawing/Guides +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +PageOptions3=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType4=Final +OutputName4=Final Artwork Prints +OutputDocumentPath4= +OutputVariantName4=[No Variations] +OutputDefault4=0 +PageOptions4=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType5=Test Points +OutputName5=Test Point Report +OutputDocumentPath5= +OutputVariantName5= +OutputDefault5=0 +OutputType6=Mask +OutputName6=Solder/Paste Mask Prints +OutputDocumentPath6= +OutputVariantName6= +OutputDefault6=0 +PageOptions6=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType7=NC Drill +OutputName7=NC Drill Files +OutputDocumentPath7= +OutputVariantName7= +OutputDefault7=0 +Configuration7_Name1=OutputConfigurationParameter1 +Configuration7_Item1=BoardEdgeRoutToolDia=2000000|GenerateBoardEdgeRout=False|GenerateDrilledSlotsG85=False|GenerateEIADrillFile=False|GenerateSeparatePlatedNonPlatedFiles=False|NumberOfDecimals=4|NumberOfUnits=4|OptimizeChangeLocationCommands=True|OriginPosition=Absolute|Record=DrillView|Units=Metric|ZeroesMode=KeepLeadingAndTrailingZeroes +OutputType8=ODB +OutputName8=ODB++ Files +OutputDocumentPath8= +OutputVariantName8=[No Variations] +OutputDefault8=0 +OutputType9=Plane +OutputName9=Power-Plane Prints +OutputDocumentPath9= +OutputVariantName9= +OutputDefault9=0 +PageOptions9=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType10=Gerber +OutputName10=Gerber Files +OutputDocumentPath10= +OutputVariantName10=[No Variations] +OutputDefault10=0 +Configuration10_Name1=OutputConfigurationParameter1 +Configuration10_Item1=AddToAllLayerClasses.Set= |AddToAllPlots.Set=SerializeLayerHash.Version~2,ClassName~TLayerToBoolean|CentrePlots=False|DrillDrawingSymbol=GraphicsSymbol|DrillDrawingSymbolSize=500000|EmbeddedApertures=True|FilmBorderSize=10000000|FilmXSize=200000000|FilmYSize=160000000|FlashAllFills=False|FlashPadShapes=True|G54OnApertureChange=False|GenerateDRCRulesFile=True|GenerateReliefShapes=True|GerberUnit=Metric|IncludeUnconnectedMidLayerPads=False|LayerClassesMirror.Set= |LayerClassesPlot.Set= |LeadingAndTrailingZeroesMode=SuppressLeadingZeroes|MaxApertureSize=2500000|MinusApertureTolerance=39|Mirror.Set=SerializeLayerHash.Version~2,ClassName~TLayerToBoolean|MirrorDrillDrawingPlots=False|MirrorDrillGuidePlots=False|NumberOfDecimals=4|OptimizeChangeLocationCommands=True|OriginPosition=Relative|Panelize=False|Plot.Set=SerializeLayerHash.Version~2,ClassName~TLayerToBoolean,16973830~1,16973832~1,16973834~1,16777217~1,16842751~1,16973835~1,16973833~1,16973831~1,16973837~1|PlotPositivePlaneLayers=False|PlotUsedDrillDrawingLayerPairs=False|PlotUsedDrillGuideLayerPairs=False|PlusApertureTolerance=39|Record=GerberView|SoftwareArcs=False|Sorted=False + +[OutputGroup6] +Name=Report Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=BOM_PartType +OutputName1=Bill of Materials +OutputDocumentPath1= +OutputVariantName1=[No Variations] +OutputDefault1=0 +PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType2=ComponentCrossReference +OutputName2=Component Cross Reference Report +OutputDocumentPath2= +OutputVariantName2=[No Variations] +OutputDefault2=0 +OutputType3=ReportHierarchy +OutputName3=Report Project Hierarchy +OutputDocumentPath3= +OutputVariantName3=[No Variations] +OutputDefault3=0 +OutputType4=Script +OutputName4=Script Output +OutputDocumentPath4= +OutputVariantName4=[No Variations] +OutputDefault4=0 +OutputType5=SimpleBOM +OutputName5=Simple BOM +OutputDocumentPath5= +OutputVariantName5=[No Variations] +OutputDefault5=0 +OutputType6=SinglePinNetReporter +OutputName6=Report Single Pin Nets +OutputDocumentPath6= +OutputVariantName6=[No Variations] +OutputDefault6=0 + +[OutputGroup7] +Name=Other Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=Text Print +OutputName1=Text Print +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +PageOptions1=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType2=Text Print +OutputName2=Text Print +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +PageOptions2=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType3=Text Print +OutputName3=Text Print +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +PageOptions3=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType4=Text Print +OutputName4=Text Print +OutputDocumentPath4= +OutputVariantName4= +OutputDefault4=0 +PageOptions4=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType5=Text Print +OutputName5=Text Print +OutputDocumentPath5= +OutputVariantName5= +OutputDefault5=0 +PageOptions5=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType6=Text Print +OutputName6=Text Print +OutputDocumentPath6= +OutputVariantName6= +OutputDefault6=0 +PageOptions6=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType7=Text Print +OutputName7=Text Print +OutputDocumentPath7= +OutputVariantName7= +OutputDefault7=0 +PageOptions7=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType8=Text Print +OutputName8=Text Print +OutputDocumentPath8= +OutputVariantName8= +OutputDefault8=0 +PageOptions8=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType9=Text Print +OutputName9=Text Print +OutputDocumentPath9= +OutputVariantName9= +OutputDefault9=0 +PageOptions9=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType10=Text Print +OutputName10=Text Print +OutputDocumentPath10= +OutputVariantName10= +OutputDefault10=0 +PageOptions10=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType11=Text Print +OutputName11=Text Print +OutputDocumentPath11= +OutputVariantName11= +OutputDefault11=0 +PageOptions11=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType12=Text Print +OutputName12=Text Print +OutputDocumentPath12= +OutputVariantName12= +OutputDefault12=0 +PageOptions12=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType13=Text Print +OutputName13=Text Print +OutputDocumentPath13= +OutputVariantName13= +OutputDefault13=0 +PageOptions13=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType14=Text Print +OutputName14=Text Print +OutputDocumentPath14= +OutputVariantName14= +OutputDefault14=0 +PageOptions14=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType15=Text Print +OutputName15=Text Print +OutputDocumentPath15= +OutputVariantName15= +OutputDefault15=0 +PageOptions15=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType16=Text Print +OutputName16=Text Print +OutputDocumentPath16= +OutputVariantName16= +OutputDefault16=0 +PageOptions16=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType17=Text Print +OutputName17=Text Print +OutputDocumentPath17= +OutputVariantName17= +OutputDefault17=0 +PageOptions17=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType18=Text Print +OutputName18=Text Print +OutputDocumentPath18= +OutputVariantName18= +OutputDefault18=0 +PageOptions18=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType19=Text Print +OutputName19=Text Print +OutputDocumentPath19= +OutputVariantName19= +OutputDefault19=0 +PageOptions19=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType20=Text Print +OutputName20=Text Print +OutputDocumentPath20= +OutputVariantName20= +OutputDefault20=0 +PageOptions20=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType21=Text Print +OutputName21=Text Print +OutputDocumentPath21= +OutputVariantName21= +OutputDefault21=0 +PageOptions21=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType22=Text Print +OutputName22=Text Print +OutputDocumentPath22= +OutputVariantName22= +OutputDefault22=0 +PageOptions22=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType23=Text Print +OutputName23=Text Print +OutputDocumentPath23= +OutputVariantName23= +OutputDefault23=0 +PageOptions23=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType24=Text Print +OutputName24=Text Print +OutputDocumentPath24= +OutputVariantName24= +OutputDefault24=0 +PageOptions24=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType25=Text Print +OutputName25=Text Print +OutputDocumentPath25= +OutputVariantName25= +OutputDefault25=0 +PageOptions25=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType26=Text Print +OutputName26=Text Print +OutputDocumentPath26= +OutputVariantName26= +OutputDefault26=0 +PageOptions26=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType27=Text Print +OutputName27=Text Print +OutputDocumentPath27= +OutputVariantName27= +OutputDefault27=0 +PageOptions27=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType28=Text Print +OutputName28=Text Print +OutputDocumentPath28= +OutputVariantName28= +OutputDefault28=0 +PageOptions28=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType29=Text Print +OutputName29=Text Print +OutputDocumentPath29= +OutputVariantName29= +OutputDefault29=0 +PageOptions29=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 + +[OutputGroup8] +Name=Validation Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=Configuration compliance +OutputName1=Environment configuration compliance check +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +OutputType2=Design Rules Check +OutputName2=Design Rules Check +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +PageOptions2=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType3=Differences Report +OutputName3=Differences Report +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +PageOptions3=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType4=Electrical Rules Check +OutputName4=Electrical Rules Check +OutputDocumentPath4= +OutputVariantName4= +OutputDefault4=0 +PageOptions4=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 +OutputType5=Footprint Comparison Report +OutputName5=Footprint Comparison Report +OutputDocumentPath5= +OutputVariantName5= +OutputDefault5=0 + +[OutputGroup9] +Name=Export Outputs +Description= +TargetPrinter=Microsoft Print to PDF +PrinterOptions=Record=PrinterOptions|Copies=1|Duplex=1|TrueTypeOptions=3|Collate=1|PrintWhat=1 +OutputType1=AutoCAD dwg/dxf PCB +OutputName1=AutoCAD dwg/dxf File PCB +OutputDocumentPath1= +OutputVariantName1= +OutputDefault1=0 +OutputType2=AutoCAD dwg/dxf Schematic +OutputName2=AutoCAD dwg/dxf File Schematic +OutputDocumentPath2= +OutputVariantName2= +OutputDefault2=0 +OutputType3=ExportIDF +OutputName3=Export IDF +OutputDocumentPath3= +OutputVariantName3= +OutputDefault3=0 +OutputType4=ExportSTEP +OutputName4=Export STEP +OutputDocumentPath4= +OutputVariantName4=[No Variations] +OutputDefault4=0 + +[Modification Levels] +Type1=1 +Type2=1 +Type3=1 +Type4=1 +Type5=1 +Type6=1 +Type7=1 +Type8=1 +Type9=1 +Type10=1 +Type11=1 +Type12=1 +Type13=1 +Type14=1 +Type15=1 +Type16=1 +Type17=1 +Type18=1 +Type19=1 +Type20=1 +Type21=1 +Type22=1 +Type23=1 +Type24=1 +Type25=1 +Type26=1 +Type27=1 +Type28=1 +Type29=1 +Type30=1 +Type31=1 +Type32=1 +Type33=1 +Type34=1 +Type35=1 +Type36=1 +Type37=1 +Type38=1 +Type39=1 +Type40=1 +Type41=1 +Type42=1 +Type43=1 +Type44=1 +Type45=1 +Type46=1 +Type47=1 +Type48=1 +Type49=1 +Type50=1 +Type51=1 +Type52=1 +Type53=1 +Type54=1 +Type55=1 +Type56=1 +Type57=1 +Type58=1 +Type59=1 +Type60=1 +Type61=1 +Type62=1 +Type63=1 +Type64=1 +Type65=1 +Type66=1 +Type67=1 +Type68=1 +Type69=1 +Type70=1 +Type71=1 +Type72=1 +Type73=1 +Type74=1 +Type75=1 +Type76=1 +Type77=1 +Type78=1 + +[Difference Levels] +Type1=1 +Type2=1 +Type3=1 +Type4=1 +Type5=1 +Type6=1 +Type7=1 +Type8=1 +Type9=1 +Type10=1 +Type11=1 +Type12=1 +Type13=1 +Type14=1 +Type15=1 +Type16=1 +Type17=1 +Type18=1 +Type19=1 +Type20=1 +Type21=1 +Type22=1 +Type23=1 +Type24=1 +Type25=1 +Type26=1 +Type27=1 +Type28=1 +Type29=1 +Type30=1 +Type31=1 +Type32=1 +Type33=1 +Type34=1 +Type35=1 +Type36=1 +Type37=1 +Type38=1 +Type39=1 +Type40=1 +Type41=1 +Type42=1 +Type43=1 + +[Electrical Rules Check] +Type1=1 +Type2=1 +Type3=2 +Type4=1 +Type5=2 +Type6=2 +Type7=1 +Type8=1 +Type9=1 +Type10=1 +Type11=2 +Type12=2 +Type13=2 +Type14=1 +Type15=1 +Type16=1 +Type17=1 +Type18=1 +Type19=1 +Type20=1 +Type21=1 +Type22=1 +Type23=1 +Type24=1 +Type25=2 +Type26=2 +Type27=2 +Type28=1 +Type29=1 +Type30=1 +Type31=1 +Type32=2 +Type33=2 +Type34=2 +Type35=1 +Type36=2 +Type37=1 +Type38=2 +Type39=2 +Type40=2 +Type41=0 +Type42=2 +Type43=1 +Type44=1 +Type45=2 +Type46=1 +Type47=2 +Type48=2 +Type49=1 +Type50=2 +Type51=1 +Type52=1 +Type53=1 +Type54=1 +Type55=1 +Type56=2 +Type57=1 +Type58=1 +Type59=0 +Type60=1 +Type61=2 +Type62=2 +Type63=1 +Type64=0 +Type65=2 +Type66=3 +Type67=2 +Type68=2 +Type69=1 +Type70=2 +Type71=2 +Type72=2 +Type73=2 +Type74=1 +Type75=2 +Type76=1 +Type77=1 +Type78=1 +Type79=1 +Type80=2 +Type81=3 +Type82=3 +Type83=3 +Type84=3 +Type85=3 +Type86=2 +Type87=2 +Type88=2 +Type89=1 +Type90=1 +Type91=3 +Type92=3 +Type93=2 +Type94=2 +Type95=2 +Type96=2 +Type97=2 +Type98=0 +Type99=1 +Type100=2 +Type101=1 + +[ERC Connection Matrix] +L1=NNNNNNNNNNNWNNNWW +L2=NNWNNNNWWWNWNWNWN +L3=NWEENEEEENEWNEEWN +L4=NNENNNWEENNWNENWN +L5=NNNNNNNNNNNNNNNNN +L6=NNENNNNEENNWNENWN +L7=NNEWNNWEENNWNENWN +L8=NWEENEENEEENNEENN +L9=NWEENEEEENEWNEEWW +L10=NWNNNNNENNEWNNEWN +L11=NNENNNNEEENWNENWN +L12=WWWWNWWNWWWNWWWNN +L13=NNNNNNNNNNNWNNNWW +L14=NWEENEEEENEWNEEWW +L15=NNENNNNEEENWNENWW +L16=WWWWNWWNWWWNWWWNW +L17=WNNNNNNNWNNNWWWWN + +[Annotate] +SortOrder=3 +SortLocation=0 +MatchParameter1=Comment +MatchStrictly1=1 +MatchParameter2=Library Reference +MatchStrictly2=1 +PhysicalNamingFormat=$Component_$RoomName +GlobalIndexSortOrder=3 +GlobalIndexSortLocation=0 + +[PrjClassGen] +CompClassManualEnabled=0 +CompClassManualRoomEnabled=0 +NetClassAutoBusEnabled=1 +NetClassAutoCompEnabled=0 +NetClassAutoNamedHarnessEnabled=0 +NetClassManualEnabled=1 + +[LibraryUpdateOptions] +SelectedOnly=0 +PartTypes=0 +FullReplace=1 +UpdateDesignatorLock=1 +UpdatePartIDLock=1 +PreserveParameterLocations=1 +DoGraphics=1 +DoParameters=1 +DoModels=1 +AddParameters=0 +RemoveParameters=0 +AddModels=1 +RemoveModels=1 +UpdateCurrentModels=1 + +[DatabaseUpdateOptions] +SelectedOnly=0 +PartTypes=0 + +[Comparison Options] +ComparisonOptions0=Kind=Net|MinPercent=75|MinMatch=3|ShowMatch=-1|Confirm=-1|UseName=-1|InclAllRules=0 +ComparisonOptions1=Kind=Net Class|MinPercent=75|MinMatch=3|ShowMatch=-1|Confirm=-1|UseName=-1|InclAllRules=0 +ComparisonOptions2=Kind=Component Class|MinPercent=75|MinMatch=3|ShowMatch=-1|Confirm=-1|UseName=-1|InclAllRules=0 +ComparisonOptions3=Kind=Rule|MinPercent=75|MinMatch=3|ShowMatch=-1|Confirm=-1|UseName=-1|InclAllRules=0 +ComparisonOptions4=Kind=Differential Pair|MinPercent=50|MinMatch=1|ShowMatch=0|Confirm=0|UseName=0|InclAllRules=0 +ComparisonOptions5=Kind=Structure Class|MinPercent=75|MinMatch=3|ShowMatch=-1|Confirm=-1|UseName=-1|InclAllRules=0 + +[SmartPDF] +PageOptions=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-4|MediaType=1|DitherType=10|PaperKind=A4|PrintScaleMode=1 + diff --git a/Hardware/SDVX_Mini.PrjPCBStructure b/Hardware/SDVX_Mini.PrjPCBStructure new file mode 100644 index 0000000..badde71 --- /dev/null +++ b/Hardware/SDVX_Mini.PrjPCBStructure @@ -0,0 +1 @@ +Record=TopLevelDocument|FileName=SDVX_Mini.SchDoc diff --git a/Hardware/SDVX_Mini.SchDoc b/Hardware/SDVX_Mini.SchDoc new file mode 100644 index 0000000..8a494ce Binary files /dev/null and b/Hardware/SDVX_Mini.SchDoc differ diff --git a/Hardware/seeed_bom.csv b/Hardware/seeed_bom.csv new file mode 100644 index 0000000..953d547 --- /dev/null +++ b/Hardware/seeed_bom.csv @@ -0,0 +1,10 @@ +Part/Designator,OPL SKU,Quantity,comment +C1,302010003,1,0402 1uf +C2,302010053,1,0402 10uf +R1,301010289,1,0603 22r +R2,301010052,1,0402 22r +R3,301010004,1,0402 10k +"R4,R5,R6,R7,R8,R9,R10",301010163,7,0603 220r +U1,310010018,1,atmega +J1,320010005,1,usb conn +XT1,306030005,1,resonator