├── .editorconfig ├── .gitignore ├── LICENSE.md ├── README.md ├── deploy.js ├── index.js ├── package.json ├── server ├── index.js └── qmk_firmware │ ├── Makefile │ ├── build_keyboard.mk │ ├── build_test.mk │ ├── common.mk │ ├── keyboards │ └── kb │ │ ├── Makefile │ │ ├── kb.c │ │ └── keymaps │ │ └── default │ │ └── .keep │ ├── message.mk │ ├── quantum │ ├── analog.c │ ├── analog.h │ ├── api.c │ ├── api.h │ ├── api │ │ ├── api_sysex.c │ │ └── api_sysex.h │ ├── audio │ │ ├── audio.c │ │ ├── audio.h │ │ ├── audio_pwm.c │ │ ├── luts.c │ │ ├── luts.h │ │ ├── musical_notes.h │ │ ├── song_list.h │ │ ├── voices.c │ │ ├── voices.h │ │ └── wave.h │ ├── config_common.h │ ├── dynamic_macro.h │ ├── keycode_config.c │ ├── keycode_config.h │ ├── keymap.h │ ├── keymap_common.c │ ├── keymap_extras │ │ ├── keymap_bepo.h │ │ ├── keymap_br_abnt2.h │ │ ├── keymap_canadian_multilingual.h │ │ ├── keymap_colemak.h │ │ ├── keymap_dvorak.h │ │ ├── keymap_dvp.h │ │ ├── keymap_fr_ch.h │ │ ├── keymap_french.h │ │ ├── keymap_french_osx.h │ │ ├── keymap_german.h │ │ ├── keymap_german_ch.h │ │ ├── keymap_german_osx.h │ │ ├── keymap_jp.h │ │ ├── keymap_neo2.h │ │ ├── keymap_nordic.h │ │ ├── keymap_norwegian.h │ │ ├── keymap_plover.h │ │ ├── keymap_russian.h │ │ ├── keymap_spanish.h │ │ ├── keymap_uk.h │ │ └── keymap_unicode_cyrillic.h │ ├── light_ws2812.c │ ├── light_ws2812.h │ ├── matrix.c │ ├── pincontrol.h │ ├── process_keycode │ │ ├── process_chording.c │ │ ├── process_chording.h │ │ ├── process_leader.c │ │ ├── process_leader.h │ │ ├── process_midi.c │ │ ├── process_midi.h │ │ ├── process_music.c │ │ ├── process_music.h │ │ ├── process_printer.c │ │ ├── process_printer.h │ │ ├── process_printer_bb.c │ │ ├── process_tap_dance.c │ │ ├── process_tap_dance.h │ │ ├── process_unicode.c │ │ └── process_unicode.h │ ├── quantum.c │ ├── quantum.h │ ├── quantum_keycodes.h │ ├── rgblight.c │ ├── rgblight.h │ ├── serial_link │ │ ├── LICENSE │ │ ├── README.md │ │ ├── protocol │ │ │ ├── byte_stuffer.c │ │ │ ├── byte_stuffer.h │ │ │ ├── frame_router.c │ │ │ ├── frame_router.h │ │ │ ├── frame_validator.c │ │ │ ├── frame_validator.h │ │ │ ├── physical.h │ │ │ ├── transport.c │ │ │ ├── transport.h │ │ │ ├── triple_buffered_object.c │ │ │ └── triple_buffered_object.h │ │ ├── system │ │ │ ├── serial_link.c │ │ │ └── serial_link.h │ │ └── tests │ │ │ ├── Makefile │ │ │ ├── byte_stuffer_tests.cpp │ │ │ ├── frame_router_tests.cpp │ │ │ ├── frame_validator_tests.cpp │ │ │ ├── rules.mk │ │ │ ├── testlist.mk │ │ │ ├── transport_tests.cpp │ │ │ └── triple_buffered_object_tests.cpp │ ├── template │ │ ├── Makefile │ │ ├── config.h │ │ ├── keymaps │ │ │ └── default │ │ │ │ ├── Makefile │ │ │ │ ├── config.h │ │ │ │ ├── keymap.c │ │ │ │ └── readme.md │ │ ├── readme.md │ │ ├── rules.mk │ │ ├── template.c │ │ └── template.h │ ├── tools │ │ ├── eeprom_reset.hex │ │ └── readme.md │ ├── variable_trace.c │ ├── variable_trace.h │ ├── version.h │ └── visualizer │ │ ├── LICENSE.md │ │ ├── example_integration │ │ ├── callbacks.c │ │ ├── gfxconf.h │ │ ├── lcd_backlight_hal.c │ │ └── visualizer_user.c │ │ ├── lcd_backlight.c │ │ ├── lcd_backlight.h │ │ ├── led_test.c │ │ ├── led_test.h │ │ ├── readme.md │ │ ├── visualizer.c │ │ ├── visualizer.h │ │ └── visualizer.mk │ ├── testlist.mk │ └── tmk_core │ ├── .gitignore │ ├── .gitmodules │ ├── avr.mk │ ├── chibios.mk │ ├── common.mk │ ├── common │ ├── action.c │ ├── action.h │ ├── action_code.h │ ├── action_layer.c │ ├── action_layer.h │ ├── action_macro.c │ ├── action_macro.h │ ├── action_tapping.c │ ├── action_tapping.h │ ├── action_util.c │ ├── action_util.h │ ├── avr │ │ ├── bootloader.c │ │ ├── sleep_led.c │ │ ├── suspend.c │ │ ├── suspend_avr.h │ │ ├── timer.c │ │ ├── timer_avr.h │ │ ├── xprintf.S │ │ └── xprintf.h │ ├── backlight.c │ ├── backlight.h │ ├── bootloader.h │ ├── bootmagic.c │ ├── bootmagic.h │ ├── chibios │ │ ├── bootloader.c │ │ ├── eeprom.c │ │ ├── printf.c │ │ ├── printf.h │ │ ├── sleep_led.c │ │ ├── suspend.c │ │ └── timer.c │ ├── command.c │ ├── command.h │ ├── debug.c │ ├── debug.h │ ├── eeconfig.c │ ├── eeconfig.h │ ├── eeprom.h │ ├── host.c │ ├── host.h │ ├── host_driver.h │ ├── keyboard.c │ ├── keyboard.h │ ├── keycode.h │ ├── led.h │ ├── magic.c │ ├── magic.h │ ├── matrix.h │ ├── mbed │ │ ├── bootloader.c │ │ ├── suspend.c │ │ ├── timer.c │ │ ├── xprintf.cpp │ │ └── xprintf.h │ ├── mousekey.c │ ├── mousekey.h │ ├── nodebug.h │ ├── print.c │ ├── print.h │ ├── progmem.h │ ├── raw_hid.h │ ├── report.h │ ├── sendchar.h │ ├── sendchar_null.c │ ├── sendchar_uart.c │ ├── sleep_led.h │ ├── suspend.h │ ├── timer.h │ ├── uart.c │ ├── uart.h │ ├── util.c │ ├── util.h │ ├── virtser.h │ └── wait.h │ ├── ldscript_keymap_avr35.x │ ├── ldscript_keymap_avr5.x │ ├── native.mk │ ├── protocol.mk │ ├── protocol │ ├── lufa.mk │ └── lufa │ │ ├── LUFA-git │ │ └── LUFA │ │ │ ├── Build │ │ │ ├── HID_EEPROM_Loader │ │ │ │ ├── HID_EEPROM_Loader.c │ │ │ │ └── makefile │ │ │ ├── lufa_atprogram.mk │ │ │ ├── lufa_avrdude.mk │ │ │ ├── lufa_build.mk │ │ │ ├── lufa_core.mk │ │ │ ├── lufa_cppcheck.mk │ │ │ ├── lufa_dfu.mk │ │ │ ├── lufa_doxygen.mk │ │ │ ├── lufa_hid.mk │ │ │ └── lufa_sources.mk │ │ │ ├── CodeTemplates │ │ │ ├── DeviceTemplate │ │ │ │ ├── Descriptors.c │ │ │ │ ├── Descriptors.h │ │ │ │ ├── DeviceApplication.c │ │ │ │ ├── DeviceApplication.h │ │ │ │ └── asf.xml │ │ │ ├── DriverStubs │ │ │ │ ├── Board.h │ │ │ │ ├── Buttons.h │ │ │ │ ├── Dataflash.h │ │ │ │ ├── Joystick.h │ │ │ │ └── LEDs.h │ │ │ ├── HostTemplate │ │ │ │ ├── HostApplication.c │ │ │ │ ├── HostApplication.h │ │ │ │ └── asf.xml │ │ │ ├── LUFAConfig.h │ │ │ └── makefile_template │ │ │ ├── Common │ │ │ ├── ArchitectureSpecific.h │ │ │ ├── Architectures.h │ │ │ ├── Attributes.h │ │ │ ├── BoardTypes.h │ │ │ ├── Common.h │ │ │ ├── CompilerSpecific.h │ │ │ └── Endianness.h │ │ │ ├── DoxygenPages │ │ │ ├── BuildSystem.txt │ │ │ ├── BuildingLinkableLibraries.txt │ │ │ ├── ChangeLog.txt │ │ │ ├── CompileTimeTokens.txt │ │ │ ├── CompilingApps.txt │ │ │ ├── ConfiguringApps.txt │ │ │ ├── DevelopingWithLUFA.txt │ │ │ ├── DeviceSupport.txt │ │ │ ├── DirectorySummaries.txt │ │ │ ├── Donating.txt │ │ │ ├── ExportingLibrary.txt │ │ │ ├── FutureChanges.txt │ │ │ ├── GettingStarted.txt │ │ │ ├── Groups.txt │ │ │ ├── Images │ │ │ │ ├── AS5_AS6_Import │ │ │ │ │ ├── AS5_AS6_Import_Step1.png │ │ │ │ │ ├── AS5_AS6_Import_Step2.png │ │ │ │ │ ├── AS5_AS6_Import_Step3.png │ │ │ │ │ ├── AS5_AS6_Import_Step4.png │ │ │ │ │ ├── AS5_AS6_Import_Step5_1.png │ │ │ │ │ ├── AS5_AS6_Import_Step5_2.png │ │ │ │ │ └── AS5_AS6_Import_Step5_3.png │ │ │ │ ├── Author.jpg │ │ │ │ ├── LUFA.png │ │ │ │ └── LUFA_thumb.png │ │ │ ├── KnownIssues.txt │ │ │ ├── LUFAPoweredProjects.txt │ │ │ ├── LibraryResources.txt │ │ │ ├── LicenseInfo.txt │ │ │ ├── MainPage.txt │ │ │ ├── MigrationInformation.txt │ │ │ ├── OSDrivers.txt │ │ │ ├── ProgrammingApps.txt │ │ │ ├── SoftwareBootloaderJump.txt │ │ │ ├── Style │ │ │ │ ├── Footer.htm │ │ │ │ └── Style.css │ │ │ ├── VIDAndPIDValues.txt │ │ │ └── WritingBoardDrivers.txt │ │ │ ├── Drivers │ │ │ ├── Board │ │ │ │ ├── AVR8 │ │ │ │ │ ├── ADAFRUITU4 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── ATAVRUSBRF01 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── BENITO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── BIGMULTIO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── BLACKCAT │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── BUI │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── BUMBLEB │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── CULV3 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── DUCE │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── EVK527 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── JMDBU2 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── LEONARDO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MAXIMUS │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MICRO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MICROPENDOUS │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MICROSIN162 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MINIMUS │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── MULTIO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── OLIMEX162 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── OLIMEX32U4 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── OLIMEXISPMK2 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── OLIMEXT32U4 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── RZUSBSTICK │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── SPARKFUN8U2 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── STANGE_ISP │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── STK525 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── STK526 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── TEENSY │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── TUL │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── U2S │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── UDIP │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── UNO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── USB2AX │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── USBFOO │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── USBKEY │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── USBTINYMKII │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── XPLAIN │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ └── YUN │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ ├── Board.h │ │ │ │ ├── Buttons.h │ │ │ │ ├── Dataflash.h │ │ │ │ ├── Joystick.h │ │ │ │ ├── LEDs.h │ │ │ │ ├── Temperature.c │ │ │ │ ├── Temperature.h │ │ │ │ ├── UC3 │ │ │ │ │ ├── EVK1100 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── EVK1101 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ ├── Joystick.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── EVK1104 │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ └── UC3A3_XPLAINED │ │ │ │ │ │ ├── Board.h │ │ │ │ │ │ ├── Buttons.h │ │ │ │ │ │ └── LEDs.h │ │ │ │ └── XMEGA │ │ │ │ │ ├── A3BU_XPLAINED │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── B1_XPLAINED │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ ├── Dataflash.h │ │ │ │ │ └── LEDs.h │ │ │ │ │ └── C3_XPLAINED │ │ │ │ │ ├── Board.h │ │ │ │ │ ├── Buttons.h │ │ │ │ │ └── LEDs.h │ │ │ ├── Misc │ │ │ │ ├── AT45DB321C.h │ │ │ │ ├── AT45DB642D.h │ │ │ │ ├── RingBuffer.h │ │ │ │ └── TerminalCodes.h │ │ │ ├── Peripheral │ │ │ │ ├── ADC.h │ │ │ │ ├── AVR8 │ │ │ │ │ ├── ADC_AVR8.h │ │ │ │ │ ├── SPI_AVR8.h │ │ │ │ │ ├── SerialSPI_AVR8.h │ │ │ │ │ ├── Serial_AVR8.c │ │ │ │ │ ├── Serial_AVR8.h │ │ │ │ │ ├── TWI_AVR8.c │ │ │ │ │ └── TWI_AVR8.h │ │ │ │ ├── SPI.h │ │ │ │ ├── Serial.h │ │ │ │ ├── SerialSPI.h │ │ │ │ ├── TWI.h │ │ │ │ └── XMEGA │ │ │ │ │ ├── SPI_XMEGA.h │ │ │ │ │ ├── SerialSPI_XMEGA.h │ │ │ │ │ ├── Serial_XMEGA.c │ │ │ │ │ ├── Serial_XMEGA.h │ │ │ │ │ ├── TWI_XMEGA.c │ │ │ │ │ └── TWI_XMEGA.h │ │ │ └── USB │ │ │ │ ├── Class │ │ │ │ ├── AndroidAccessoryClass.h │ │ │ │ ├── AudioClass.h │ │ │ │ ├── CDCClass.h │ │ │ │ ├── Common │ │ │ │ │ ├── AndroidAccessoryClassCommon.h │ │ │ │ │ ├── AudioClassCommon.h │ │ │ │ │ ├── CDCClassCommon.h │ │ │ │ │ ├── HIDClassCommon.h │ │ │ │ │ ├── HIDParser.c │ │ │ │ │ ├── HIDParser.h │ │ │ │ │ ├── HIDReportData.h │ │ │ │ │ ├── MIDIClassCommon.h │ │ │ │ │ ├── MassStorageClassCommon.h │ │ │ │ │ ├── PrinterClassCommon.h │ │ │ │ │ ├── RNDISClassCommon.h │ │ │ │ │ └── StillImageClassCommon.h │ │ │ │ ├── Device │ │ │ │ │ ├── AudioClassDevice.c │ │ │ │ │ ├── AudioClassDevice.h │ │ │ │ │ ├── CDCClassDevice.c │ │ │ │ │ ├── CDCClassDevice.h │ │ │ │ │ ├── HIDClassDevice.c │ │ │ │ │ ├── HIDClassDevice.h │ │ │ │ │ ├── MIDIClassDevice.c │ │ │ │ │ ├── MIDIClassDevice.h │ │ │ │ │ ├── MassStorageClassDevice.c │ │ │ │ │ ├── MassStorageClassDevice.h │ │ │ │ │ ├── PrinterClassDevice.c │ │ │ │ │ ├── PrinterClassDevice.h │ │ │ │ │ ├── RNDISClassDevice.c │ │ │ │ │ └── RNDISClassDevice.h │ │ │ │ ├── HIDClass.h │ │ │ │ ├── Host │ │ │ │ │ ├── AndroidAccessoryClassHost.c │ │ │ │ │ ├── AndroidAccessoryClassHost.h │ │ │ │ │ ├── AudioClassHost.c │ │ │ │ │ ├── AudioClassHost.h │ │ │ │ │ ├── CDCClassHost.c │ │ │ │ │ ├── CDCClassHost.h │ │ │ │ │ ├── HIDClassHost.c │ │ │ │ │ ├── HIDClassHost.h │ │ │ │ │ ├── MIDIClassHost.c │ │ │ │ │ ├── MIDIClassHost.h │ │ │ │ │ ├── MassStorageClassHost.c │ │ │ │ │ ├── MassStorageClassHost.h │ │ │ │ │ ├── PrinterClassHost.c │ │ │ │ │ ├── PrinterClassHost.h │ │ │ │ │ ├── RNDISClassHost.c │ │ │ │ │ ├── RNDISClassHost.h │ │ │ │ │ ├── StillImageClassHost.c │ │ │ │ │ └── StillImageClassHost.h │ │ │ │ ├── MIDIClass.h │ │ │ │ ├── MassStorageClass.h │ │ │ │ ├── PrinterClass.h │ │ │ │ ├── RNDISClass.h │ │ │ │ └── StillImageClass.h │ │ │ │ ├── Core │ │ │ │ ├── AVR8 │ │ │ │ │ ├── Device_AVR8.c │ │ │ │ │ ├── Device_AVR8.h │ │ │ │ │ ├── EndpointStream_AVR8.c │ │ │ │ │ ├── EndpointStream_AVR8.h │ │ │ │ │ ├── Endpoint_AVR8.c │ │ │ │ │ ├── Endpoint_AVR8.h │ │ │ │ │ ├── Host_AVR8.c │ │ │ │ │ ├── Host_AVR8.h │ │ │ │ │ ├── OTG_AVR8.h │ │ │ │ │ ├── PipeStream_AVR8.c │ │ │ │ │ ├── PipeStream_AVR8.h │ │ │ │ │ ├── Pipe_AVR8.c │ │ │ │ │ ├── Pipe_AVR8.h │ │ │ │ │ ├── Template │ │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ │ └── Template_Pipe_RW.c │ │ │ │ │ ├── USBController_AVR8.c │ │ │ │ │ ├── USBController_AVR8.h │ │ │ │ │ ├── USBInterrupt_AVR8.c │ │ │ │ │ └── USBInterrupt_AVR8.h │ │ │ │ ├── ConfigDescriptors.c │ │ │ │ ├── ConfigDescriptors.h │ │ │ │ ├── Device.h │ │ │ │ ├── DeviceStandardReq.c │ │ │ │ ├── DeviceStandardReq.h │ │ │ │ ├── Endpoint.h │ │ │ │ ├── EndpointStream.h │ │ │ │ ├── Events.c │ │ │ │ ├── Events.h │ │ │ │ ├── Host.h │ │ │ │ ├── HostStandardReq.c │ │ │ │ ├── HostStandardReq.h │ │ │ │ ├── OTG.h │ │ │ │ ├── Pipe.h │ │ │ │ ├── PipeStream.h │ │ │ │ ├── StdDescriptors.h │ │ │ │ ├── StdRequestType.h │ │ │ │ ├── UC3 │ │ │ │ │ ├── Device_UC3.c │ │ │ │ │ ├── Device_UC3.h │ │ │ │ │ ├── EndpointStream_UC3.c │ │ │ │ │ ├── EndpointStream_UC3.h │ │ │ │ │ ├── Endpoint_UC3.c │ │ │ │ │ ├── Endpoint_UC3.h │ │ │ │ │ ├── Host_UC3.c │ │ │ │ │ ├── Host_UC3.h │ │ │ │ │ ├── PipeStream_UC3.c │ │ │ │ │ ├── PipeStream_UC3.h │ │ │ │ │ ├── Pipe_UC3.c │ │ │ │ │ ├── Pipe_UC3.h │ │ │ │ │ ├── Template │ │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ │ └── Template_Pipe_RW.c │ │ │ │ │ ├── USBController_UC3.c │ │ │ │ │ ├── USBController_UC3.h │ │ │ │ │ ├── USBInterrupt_UC3.c │ │ │ │ │ └── USBInterrupt_UC3.h │ │ │ │ ├── USBController.h │ │ │ │ ├── USBInterrupt.h │ │ │ │ ├── USBMode.h │ │ │ │ ├── USBTask.c │ │ │ │ ├── USBTask.h │ │ │ │ └── XMEGA │ │ │ │ │ ├── Device_XMEGA.c │ │ │ │ │ ├── Device_XMEGA.h │ │ │ │ │ ├── EndpointStream_XMEGA.c │ │ │ │ │ ├── EndpointStream_XMEGA.h │ │ │ │ │ ├── Endpoint_XMEGA.c │ │ │ │ │ ├── Endpoint_XMEGA.h │ │ │ │ │ ├── Host_XMEGA.c │ │ │ │ │ ├── PipeStream_XMEGA.c │ │ │ │ │ ├── Pipe_XMEGA.c │ │ │ │ │ ├── Template │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ └── Template_Endpoint_RW.c │ │ │ │ │ ├── USBController_XMEGA.c │ │ │ │ │ ├── USBController_XMEGA.h │ │ │ │ │ ├── USBInterrupt_XMEGA.c │ │ │ │ │ └── USBInterrupt_XMEGA.h │ │ │ │ └── USB.h │ │ │ ├── License.txt │ │ │ ├── Platform │ │ │ ├── Platform.h │ │ │ ├── UC3 │ │ │ │ ├── ClockManagement.h │ │ │ │ ├── Exception.S │ │ │ │ ├── InterruptManagement.c │ │ │ │ ├── InterruptManagement.h │ │ │ │ └── UC3ExperimentalInfo.txt │ │ │ └── XMEGA │ │ │ │ ├── ClockManagement.h │ │ │ │ └── XMEGAExperimentalInfo.txt │ │ │ ├── StudioIntegration │ │ │ ├── Docbook │ │ │ │ ├── mshelp │ │ │ │ │ └── placeholder.txt │ │ │ │ └── placeholder.txt │ │ │ ├── HV1 │ │ │ │ ├── helpcontentsetup.msha │ │ │ │ ├── lufa_docbook_transform.xslt │ │ │ │ ├── lufa_helpcontentsetup_transform.xslt │ │ │ │ ├── lufa_hv1_transform.xslt │ │ │ │ └── lufa_studio_help_styling.css │ │ │ ├── ProjectGenerator │ │ │ │ └── placeholder.txt │ │ │ ├── VSIX │ │ │ │ ├── LUFA.dll │ │ │ │ ├── LUFA.pkgdef │ │ │ │ ├── [Content_Types].xml │ │ │ │ ├── asf-manifest.xml │ │ │ │ ├── extension.vsixmanifest │ │ │ │ ├── generate_caches.py │ │ │ │ ├── lufa_asfmanifest_transform.xslt │ │ │ │ └── lufa_vsmanifest_transform.xslt │ │ │ ├── XDK │ │ │ │ ├── lufa_extension_transform.xslt │ │ │ │ ├── lufa_filelist_transform.xslt │ │ │ │ ├── lufa_indent_transform.xslt │ │ │ │ └── lufa_module_transform.xslt │ │ │ ├── lufa.xml │ │ │ ├── lufa_common.xml │ │ │ ├── lufa_drivers_board.xml │ │ │ ├── lufa_drivers_board_names.xml │ │ │ ├── lufa_drivers_misc.xml │ │ │ ├── lufa_drivers_peripheral.xml │ │ │ ├── lufa_drivers_usb.xml │ │ │ ├── lufa_drivers_usb_class.xml │ │ │ ├── lufa_drivers_usb_class_android.xml │ │ │ ├── lufa_drivers_usb_class_audio.xml │ │ │ ├── lufa_drivers_usb_class_cdc.xml │ │ │ ├── lufa_drivers_usb_class_hid.xml │ │ │ ├── lufa_drivers_usb_class_midi.xml │ │ │ ├── lufa_drivers_usb_class_ms.xml │ │ │ ├── lufa_drivers_usb_class_printer.xml │ │ │ ├── lufa_drivers_usb_class_rndis.xml │ │ │ ├── lufa_drivers_usb_class_si.xml │ │ │ ├── lufa_drivers_usb_core.xml │ │ │ ├── lufa_drivers_usb_core_avr8.xml │ │ │ ├── lufa_drivers_usb_core_uc3.xml │ │ │ ├── lufa_drivers_usb_core_xmega.xml │ │ │ ├── lufa_platform.xml │ │ │ ├── lufa_platform_uc3.xml │ │ │ ├── lufa_platform_xmega.xml │ │ │ ├── lufa_toolchain.xml │ │ │ └── makefile │ │ │ ├── Version.h │ │ │ ├── doxyfile │ │ │ └── makefile │ │ ├── adafruit_ble.cpp │ │ ├── adafruit_ble.h │ │ ├── bluetooth.c │ │ ├── bluetooth.h │ │ ├── descriptor.c │ │ ├── descriptor.h │ │ ├── lufa.c │ │ ├── lufa.h │ │ └── ringbuffer.hpp │ ├── readme.md │ ├── ring_buffer.h │ └── rules.mk ├── src ├── const │ ├── index.js │ ├── keycodes.js │ └── presets.js ├── files │ ├── generators │ │ ├── config.h.js │ │ ├── index.js │ │ ├── kb.h.js │ │ ├── keymap.c.js │ │ ├── rules.mk.js │ │ └── templates │ │ │ ├── config.h.js │ │ │ ├── kb.h.js │ │ │ ├── keymap.c.js │ │ │ └── rules.mk.js │ └── index.js ├── index.js ├── main │ ├── editor.js │ ├── index.js │ └── main.js ├── state │ ├── index.js │ ├── keyboard │ │ ├── index.js │ │ ├── key.js │ │ └── keycode.js │ └── ui.js ├── ui │ ├── display │ │ ├── index.js │ │ ├── key.js │ │ ├── keymap │ │ │ └── index.js │ │ └── wiring │ │ │ ├── index.js │ │ │ └── wire.js │ ├── elements │ │ ├── help │ │ │ └── index.js │ │ ├── numberbox │ │ │ └── index.js │ │ └── toggle │ │ │ └── index.js │ └── panes │ │ ├── compile │ │ └── index.js │ │ ├── index.js │ │ ├── keymap │ │ ├── configure │ │ │ ├── index.js │ │ │ ├── mods │ │ │ │ └── index.js │ │ │ └── selector │ │ │ │ └── index.js │ │ └── index.js │ │ ├── macros │ │ ├── editor │ │ │ ├── action │ │ │ │ └── index.js │ │ │ └── index.js │ │ └── index.js │ │ ├── pins │ │ ├── chooser.js │ │ └── index.js │ │ ├── quantum │ │ └── index.js │ │ ├── settings │ │ └── index.js │ │ ├── tabs │ │ ├── index.js │ │ └── tab.js │ │ └── wiring │ │ └── index.js └── utils.js └── static ├── css ├── codemirror.css ├── font-awesome.min.css └── main.css ├── files └── firmware.zip ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── fontawesome-webfont.woff2 ├── images ├── dropdown.png └── favicon.png ├── index.html ├── js ├── Blob.js ├── filesaver.min.js ├── jsonl.min.js ├── jszip-utils.js └── jszip.js └── presets ├── 1up-rgb-custom-pcb-full-map.json ├── 1up-rgb-custom-pcb-standard-map.json ├── 1up-rgb-hse-standard.json ├── 1up-sweet16.json ├── alps44.json ├── alps64-aek.json ├── bantam-pcb.json ├── gh60-ansi.json ├── gh60satan-ansi.json ├── jd45-default.json ├── minivan-arrow.json ├── minivan-std.json ├── miuni32-rgb-standard.json ├── planck.json ├── s60x-rgb-ansi.json ├── s60x-rgb-generic.json ├── s60x-rgb-iso.json ├── treasure-type9-default.json └── zlant-default.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_style = tab 6 | indent_size = 4 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | 3 | node_modules 4 | 5 | bundle.js 6 | local.json 7 | 8 | .idea -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Keyboard Firmware Builder 2 | 3 | ## Life Support 4 | 5 | On 13 March 2021, kbfirmware.com was shut down due to a lack of users, but has been brought back online after additional consideration. 6 | 7 | However, it should be considered end of life, as there will be no additional development and **may stop working at any time**. 8 | 9 | ### Docker Image 10 | 11 | The latest image of kbfirmware.com is available as a Docker image, available at https://hub.docker.com/repository/docker/ruiqimao/kbfirmware. 12 | 13 | By default, this image will use port 80. To use any other port, expose and set the `PORT` environment variable accordingly. 14 | 15 | ## Setup 16 | 17 | To set up the project for development, run `npm install` in the root of the project to install dependencies. 18 | 19 | Create a `local.json` file in `src/const`, in the format: 20 | 21 | { 22 | "API": "URL to server /build route", 23 | "PRESETS": "URL to static/presets folder" 24 | } 25 | 26 | ## Compiling 27 | 28 | To compile, run `npm run build`. 29 | 30 | ## Deploying 31 | 32 | To deploy a production version of the application, run `npm run deploy`. 33 | 34 | ## License 35 | 36 | Keyboard Firmware Builder is under the GNU GPL v3 license. The license information for QMK Firmware can be found at https://qmk.fm/license/. 37 | -------------------------------------------------------------------------------- /deploy.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const browserify = require('browserify'); 3 | const errorify = require('errorify'); 4 | const uglifyify = require('uglifyify'); 5 | 6 | const b = browserify({ 7 | entries: [ './src/index.js' ], 8 | cache: {}, 9 | packageCache: {}, 10 | plugin: [ errorify ] 11 | }) 12 | .transform('babelify', { 13 | presets: [ 'es2015', 'react' ] 14 | }) 15 | .transform({ 16 | global: true 17 | }, 'uglifyify'); 18 | 19 | b.on('update', bundle); 20 | b.on('log', console.log); 21 | b.on('error', console.error); 22 | bundle(); 23 | 24 | function bundle() { 25 | b.bundle().pipe(fs.createWriteStream('./static/js/bundle.js')); 26 | } 27 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const browserify = require('browserify'); 3 | const watchify = require('watchify'); 4 | const errorify = require('errorify'); 5 | 6 | const b = browserify({ 7 | entries: [ './src/index.js' ], 8 | cache: {}, 9 | packageCache: {}, 10 | plugin: [ watchify, errorify ] 11 | }) 12 | .transform('babelify', { 13 | presets: [ 'es2015', 'react' ] 14 | }); 15 | 16 | b.on('update', bundle); 17 | b.on('log', console.log); 18 | b.on('error', console.error); 19 | bundle(); 20 | 21 | function bundle() { 22 | b.bundle().pipe(fs.createWriteStream('./static/js/bundle.js')); 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qmkbuilder", 3 | "version": "1.0.0", 4 | "description": "QMK Firmware Builder", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "cross-env NODE_PATH=./src node index.js", 8 | "deploy": "cross-env NODE_PATH=./src NODE_ENV=production node deploy.js", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/ruiqimao/qmkbuilder.git" 14 | }, 15 | "author": "ruiqimao", 16 | "license": "ISC", 17 | "bugs": { 18 | "url": "https://github.com/ruiqimao/qmkbuilder/issues" 19 | }, 20 | "homepage": "https://github.com/ruiqimao/qmkbuilder#readme", 21 | "dependencies": { 22 | "babel": "^6.5.2", 23 | "babel-preset-es2015": "^6.18.0", 24 | "babel-preset-react": "^6.16.0", 25 | "babelify": "^7.3.0", 26 | "body-parser": "^1.15.2", 27 | "browserify": "^13.1.1", 28 | "classnames": "^2.2.5", 29 | "co": "^4.6.0", 30 | "codemirror": "^5.22.0", 31 | "crypto": "0.0.3", 32 | "errorify": "^0.3.1", 33 | "express": "^4.14.0", 34 | "react": "^15.4.1", 35 | "react-codemirror": "^0.3.0", 36 | "react-dom": "^15.4.1", 37 | "superagent": "^3.3.1", 38 | "uglifyify": "^3.0.4", 39 | "watchify": "^3.7.0" 40 | }, 41 | "devDependencies": { 42 | "cross-env": "^3.1.4" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /server/qmk_firmware/build_test.mk: -------------------------------------------------------------------------------- 1 | ifndef VERBOSE 2 | .SILENT: 3 | endif 4 | 5 | .DEFAULT_GOAL := all 6 | 7 | include common.mk 8 | 9 | TARGET=test/$(TEST) 10 | 11 | GTEST_OUTPUT = $(BUILD_DIR)/gtest 12 | 13 | TEST_OBJ = $(BUILD_DIR)/test_obj 14 | 15 | OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT) 16 | 17 | GTEST_INC := \ 18 | $(LIB_PATH)/googletest/googletest/include\ 19 | $(LIB_PATH)/googletest/googlemock/include\ 20 | 21 | GTEST_INTERNAL_INC :=\ 22 | $(LIB_PATH)/googletest/googletest\ 23 | $(LIB_PATH)/googletest/googlemock 24 | 25 | $(GTEST_OUTPUT)_SRC :=\ 26 | googletest/src/gtest-all.cc\ 27 | googletest/src/gtest_main.cc\ 28 | googlemock/src/gmock-all.cc 29 | 30 | $(GTEST_OUTPUT)_DEFS := 31 | $(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC) 32 | 33 | LDFLAGS += -lstdc++ -lpthread -shared-libgcc 34 | CREATE_MAP := no 35 | 36 | VPATH +=\ 37 | $(LIB_PATH)/googletest\ 38 | $(LIB_PATH)/googlemock 39 | 40 | all: elf 41 | 42 | VPATH += $(COMMON_VPATH) 43 | 44 | include $(TMK_PATH)/common.mk 45 | include $(QUANTUM_PATH)/serial_link/tests/rules.mk 46 | 47 | $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) 48 | $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) 49 | $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS) 50 | 51 | include $(TMK_PATH)/native.mk 52 | include $(TMK_PATH)/rules.mk 53 | 54 | 55 | $(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null) 56 | $(shell mkdir -p $(TEST_OBJ) 2>/dev/null) 57 | 58 | -------------------------------------------------------------------------------- /server/qmk_firmware/common.mk: -------------------------------------------------------------------------------- 1 | include message.mk 2 | 3 | # Directory common source files exist 4 | TOP_DIR = . 5 | TMK_DIR = tmk_core 6 | TMK_PATH = $(TOP_DIR)/$(TMK_DIR) 7 | LIB_PATH = $(TOP_DIR)/lib 8 | 9 | QUANTUM_DIR = quantum 10 | QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) 11 | 12 | BUILD_DIR := $(TOP_DIR)/.build 13 | 14 | SERIAL_DIR := $(QUANTUM_DIR)/serial_link 15 | SERIAL_PATH := $(QUANTUM_PATH)/serial_link 16 | SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c) 17 | SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c) 18 | SERIAL_DEFS += -DSERIAL_LINK_ENABLE 19 | 20 | COMMON_VPATH := $(TOP_DIR) 21 | COMMON_VPATH += $(TMK_PATH) 22 | COMMON_VPATH += $(QUANTUM_PATH) 23 | COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras 24 | COMMON_VPATH += $(QUANTUM_PATH)/audio 25 | COMMON_VPATH += $(QUANTUM_PATH)/process_keycode 26 | COMMON_VPATH += $(QUANTUM_PATH)/api 27 | COMMON_VPATH += $(SERIAL_PATH) -------------------------------------------------------------------------------- /server/qmk_firmware/keyboards/kb/Makefile: -------------------------------------------------------------------------------- 1 | ifndef MAKEFILE_INCLUDED 2 | include ../../Makefile 3 | endif 4 | -------------------------------------------------------------------------------- /server/qmk_firmware/keyboards/kb/kb.c: -------------------------------------------------------------------------------- 1 | #include "kb.h" 2 | -------------------------------------------------------------------------------- /server/qmk_firmware/keyboards/kb/keymaps/default/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/keyboards/kb/keymaps/default/.keep -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/analog.c: -------------------------------------------------------------------------------- 1 | // Simple analog to digitial conversion 2 | 3 | #include 4 | #include 5 | #include 6 | #include "analog.h" 7 | 8 | 9 | static uint8_t aref = (1<= 12) return 0; 26 | return adc_read(pgm_read_byte(pin_to_mux + pin)); 27 | #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) 28 | if (pin >= 8) return 0; 29 | return adc_read(pin); 30 | #else 31 | return 0; 32 | #endif 33 | } 34 | 35 | // Mux input 36 | int16_t adc_read(uint8_t mux) 37 | { 38 | #if defined(__AVR_AT90USB162__) 39 | return 0; 40 | #else 41 | uint8_t low; 42 | 43 | ADCSRA = (1< 5 | 6 | void analogReference(uint8_t mode); 7 | int16_t analogRead(uint8_t pin); 8 | int16_t adc_read(uint8_t mux); 9 | 10 | #define ADC_REF_POWER (1< 2 | #include 3 | #include 4 | 5 | #ifndef LUTS_H 6 | #define LUTS_H 7 | 8 | #define VIBRATO_LUT_LENGTH 20 9 | 10 | #define FREQUENCY_LUT_LENGTH 349 11 | 12 | extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; 13 | extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; 14 | 15 | #endif /* LUTS_H */ -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/audio/voices.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "luts.h" 6 | 7 | #ifndef VOICES_H 8 | #define VOICES_H 9 | 10 | float voice_envelope(float frequency); 11 | 12 | typedef enum { 13 | default_voice, 14 | #ifdef AUDIO_VOICES 15 | something, 16 | drums, 17 | butts_fader, 18 | octave_crunch, 19 | duty_osc, 20 | duty_octave_down, 21 | delayed_vibrato, 22 | // delayed_vibrato_octave, 23 | // duty_fifth_down, 24 | // duty_fourth_down, 25 | // duty_third_down, 26 | // duty_fifth_third_down, 27 | #endif 28 | number_of_voices // important that this is last 29 | } voice_type; 30 | 31 | void set_voice(voice_type v); 32 | void voice_iterate(void); 33 | void voice_deiterate(void); 34 | 35 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keycode_config.h: -------------------------------------------------------------------------------- 1 | #include "eeconfig.h" 2 | #include "keycode.h" 3 | 4 | #ifndef KEYCODE_CONFIG_H 5 | #define KEYCODE_CONFIG_H 6 | 7 | uint16_t keycode_config(uint16_t keycode); 8 | 9 | /* NOTE: Not portable. Bit field order depends on implementation */ 10 | typedef union { 11 | uint16_t raw; 12 | struct { 13 | bool swap_control_capslock:1; 14 | bool capslock_to_control:1; 15 | bool swap_lalt_lgui:1; 16 | bool swap_ralt_rgui:1; 17 | bool no_gui:1; 18 | bool swap_grave_esc:1; 19 | bool swap_backslash_backspace:1; 20 | bool nkro:1; 21 | }; 22 | } keymap_config_t; 23 | 24 | extern keymap_config_t keymap_config; 25 | 26 | #endif /* KEYCODE_CONFIG_H */ 27 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2012,2013 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef KEYMAP_H 19 | #define KEYMAP_H 20 | 21 | #include 22 | #include 23 | #include "action.h" 24 | #if defined(__AVR__) 25 | #include 26 | #endif 27 | #include "keycode.h" 28 | #include "action_macro.h" 29 | #include "report.h" 30 | #include "host.h" 31 | // #include "print.h" 32 | #include "debug.h" 33 | #include "keycode_config.h" 34 | 35 | // ChibiOS uses RESET in its FlagStatus enumeration 36 | // Therefore define it as QK_RESET here, to avoid name collision 37 | #if defined(PROTOCOL_CHIBIOS) 38 | #define RESET QK_RESET 39 | #endif 40 | 41 | #include "quantum_keycodes.h" 42 | 43 | // translates key to keycode 44 | uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); 45 | 46 | // translates function id to action 47 | uint16_t keymap_function_id_to_action( uint16_t function_id ); 48 | 49 | extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; 50 | extern const uint16_t fn_actions[]; 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_colemak.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_COLEMAK_H 2 | #define KEYMAP_COLEMAK_H 3 | 4 | #include "keymap.h" 5 | // For software implementation of colemak 6 | #define CM_Q KC_Q 7 | #define CM_W KC_W 8 | #define CM_F KC_E 9 | #define CM_P KC_R 10 | #define CM_G KC_T 11 | #define CM_J KC_Y 12 | #define CM_L KC_U 13 | #define CM_U KC_I 14 | #define CM_Y KC_O 15 | #define CM_SCLN KC_P 16 | 17 | #define CM_A KC_A 18 | #define CM_R KC_S 19 | #define CM_S KC_D 20 | #define CM_T KC_F 21 | #define CM_D KC_G 22 | #define CM_H KC_H 23 | #define CM_N KC_J 24 | #define CM_E KC_K 25 | #define CM_I KC_L 26 | #define CM_O KC_SCLN 27 | #define CM_COLN LSFT(CM_SCLN) 28 | 29 | #define CM_Z KC_Z 30 | #define CM_X KC_X 31 | #define CM_C KC_C 32 | #define CM_V KC_V 33 | #define CM_B KC_B 34 | #define CM_K KC_N 35 | #define CM_M KC_M 36 | #define CM_COMM KC_COMM 37 | #define CM_DOT KC_DOT 38 | #define CM_SLSH KC_SLSH 39 | 40 | // Make it easy to support these in macros 41 | // TODO: change macro implementation so these aren't needed 42 | #define KC_CM_Q CM_Q 43 | #define KC_CM_W CM_W 44 | #define KC_CM_F CM_F 45 | #define KC_CM_P CM_P 46 | #define KC_CM_G CM_G 47 | #define KC_CM_J CM_J 48 | #define KC_CM_L CM_L 49 | #define KC_CM_U CM_U 50 | #define KC_CM_Y CM_Y 51 | #define KC_CM_SCLN CM_SCLN 52 | 53 | #define KC_CM_A CM_A 54 | #define KC_CM_R CM_R 55 | #define KC_CM_S CM_S 56 | #define KC_CM_T CM_T 57 | #define KC_CM_D CM_D 58 | #define KC_CM_H CM_H 59 | #define KC_CM_N CM_N 60 | #define KC_CM_E CM_E 61 | #define KC_CM_I CM_I 62 | #define KC_CM_O CM_O 63 | 64 | #define KC_CM_Z CM_Z 65 | #define KC_CM_X CM_X 66 | #define KC_CM_C CM_C 67 | #define KC_CM_V CM_V 68 | #define KC_CM_B CM_B 69 | #define KC_CM_K CM_K 70 | #define KC_CM_M CM_M 71 | #define KC_CM_COMM CM_COMM 72 | #define KC_CM_DOT CM_DOT 73 | #define KC_CM_SLSH CM_SLSH 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_dvorak.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_DVORAK_H 2 | #define KEYMAP_DVORAK_H 3 | 4 | #include "keymap.h" 5 | 6 | // Normal characters 7 | #define DV_GRV KC_GRV 8 | #define DV_1 KC_1 9 | #define DV_2 KC_2 10 | #define DV_3 KC_3 11 | #define DV_4 KC_4 12 | #define DV_5 KC_5 13 | #define DV_6 KC_6 14 | #define DV_7 KC_7 15 | #define DV_8 KC_8 16 | #define DV_9 KC_9 17 | #define DV_0 KC_0 18 | #define DV_LBRC KC_MINS 19 | #define DV_RBRC KC_EQL 20 | 21 | #define DV_QUOT KC_Q 22 | #define DV_COMM KC_W 23 | #define DV_DOT KC_E 24 | #define DV_P KC_R 25 | #define DV_Y KC_T 26 | #define DV_F KC_Y 27 | #define DV_G KC_U 28 | #define DV_C KC_I 29 | #define DV_R KC_O 30 | #define DV_L KC_P 31 | #define DV_SLSH KC_LBRC 32 | #define DV_EQL KC_RBRC 33 | #define DV_BSLS KC_BSLS 34 | 35 | #define DV_A KC_A 36 | #define DV_O KC_S 37 | #define DV_E KC_D 38 | #define DV_U KC_F 39 | #define DV_I KC_G 40 | #define DV_D KC_H 41 | #define DV_H KC_J 42 | #define DV_T KC_K 43 | #define DV_N KC_L 44 | #define DV_S KC_SCLN 45 | #define DV_MINS KC_QUOT 46 | 47 | #define DV_SCLN KC_Z 48 | #define DV_Q KC_X 49 | #define DV_J KC_C 50 | #define DV_K KC_V 51 | #define DV_X KC_B 52 | #define DV_B KC_N 53 | #define DV_M KC_M 54 | #define DV_W KC_COMM 55 | #define DV_V KC_DOT 56 | #define DV_Z KC_SLSH 57 | 58 | // Shifted characters 59 | #define DV_TILD LSFT(DV_GRV) 60 | #define DV_EXLM LSFT(DV_1) 61 | #define DV_AT LSFT(DV_2) 62 | #define DV_HASH LSFT(DV_3) 63 | #define DV_DLR LSFT(DV_4) 64 | #define DV_PERC LSFT(DV_5) 65 | #define DV_CIRC LSFT(DV_6) 66 | #define DV_AMPR LSFT(DV_7) 67 | #define DV_ASTR LSFT(DV_8) 68 | #define DV_LPRN LSFT(DV_9) 69 | #define DV_RPRN LSFT(DV_0) 70 | #define DV_LCBR LSFT(DV_LBRC) 71 | #define DV_RCBR LSFT(DV_RBRC) 72 | 73 | #define DV_DQUO LSFT(DV_QUOT) 74 | #define DV_LABK LSFT(DV_COMM) 75 | #define DV_RABK LSFT(DV_DOT) 76 | 77 | #define DV_QUES LSFT(DV_SLSH) 78 | #define DV_PLUS LSFT(DV_EQL) 79 | #define DV_PIPE LSFT(DV_BSLS) 80 | 81 | #define DV_UNDS LSFT(DV_MINS) 82 | 83 | #define DV_COLN LSFT(DV_SCLN) 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_dvp.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_DVP_H 2 | #define KEYMAP_DVP_H 3 | 4 | #include "keymap.h" 5 | 6 | // Normal characters 7 | #define DP_DLR KC_GRV 8 | #define DP_AMPR KC_1 9 | #define DP_LBRC KC_2 10 | #define DP_LCBR KC_3 11 | #define DP_RCBR KC_4 12 | #define DP_LPRN KC_5 13 | #define DP_EQL KC_6 14 | #define DP_ASTR KC_7 15 | #define DP_RPRN KC_8 16 | #define DP_PLUS KC_9 17 | #define DP_RBRC KC_0 18 | #define DP_EXLM KC_MINS 19 | #define DP_HASH KC_EQL 20 | 21 | #define DP_SCLN KC_Q 22 | #define DP_COMM KC_W 23 | #define DP_DOT KC_E 24 | #define DP_P KC_R 25 | #define DP_Y KC_T 26 | #define DP_F KC_Y 27 | #define DP_G KC_U 28 | #define DP_C KC_I 29 | #define DP_R KC_O 30 | #define DP_L KC_P 31 | #define DP_SLSH KC_LBRC 32 | #define DP_AT KC_RBRC 33 | #define DP_BSLS KC_BSLS 34 | 35 | #define DP_A KC_A 36 | #define DP_O KC_S 37 | #define DP_E KC_D 38 | #define DP_U KC_F 39 | #define DP_I KC_G 40 | #define DP_D KC_H 41 | #define DP_H KC_J 42 | #define DP_T KC_K 43 | #define DP_N KC_L 44 | #define DP_S KC_SCLN 45 | #define DP_MINS KC_QUOT 46 | 47 | #define DP_QUOT KC_Z 48 | #define DP_Q KC_X 49 | #define DP_J KC_C 50 | #define DP_K KC_V 51 | #define DP_X KC_B 52 | #define DP_B KC_N 53 | #define DP_M KC_M 54 | #define DP_W KC_COMM 55 | #define DP_V KC_DOT 56 | #define DP_Z KC_SLSH 57 | 58 | // Shifted characters 59 | #define DP_TILD LSFT(DP_DLR) 60 | #define DP_PERC LSFT(DP_AMPR) 61 | #define DP_7 LSFT(DP_LBRC) 62 | #define DP_5 LSFT(DP_LCBR) 63 | #define DP_3 LSFT(DP_RCBR) 64 | #define DP_1 LSFT(DP_LPRN) 65 | #define DP_9 LSFT(DP_EQL) 66 | #define DP_0 LSFT(DP_ASTR) 67 | #define DP_2 LSFT(DP_RPRN) 68 | #define DP_4 LSFT(DP_PLUS) 69 | #define DP_6 LSFT(DP_RBRC) 70 | #define DP_8 LSFT(DP_EXLM) 71 | #define DP_GRV LSFT(DP_HASH) 72 | 73 | #define DP_COLN LSFT(DP_SCLN) 74 | #define DP_LABK LSFT(DP_COMM) 75 | #define DP_RABK LSFT(DP_DOT) 76 | #define DP_QUES LSFT(DP_SLSH) 77 | #define DP_CIRC LSFT(DP_AT) 78 | #define DP_PIPE LSFT(DP_BSLS) 79 | #define DP_UNDS LSFT(DP_MINS) 80 | #define DP_DQUO LSFT(DP_QUOT) 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_french.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_FRENCH_H 2 | #define KEYMAP_FRENCH_H 3 | 4 | #include "keymap.h" 5 | 6 | // Alt gr 7 | #define ALGR(kc) RALT(kc) 8 | #define NO_ALGR KC_RALT 9 | 10 | // Normal characters 11 | #define FR_SUP2 KC_GRV 12 | #define FR_AMP KC_1 13 | #define FR_EACU KC_2 14 | #define FR_QUOT KC_3 15 | #define FR_APOS KC_4 16 | #define FR_LPRN KC_5 17 | #define FR_MINS KC_6 18 | #define FR_EGRV KC_7 19 | #define FR_UNDS KC_8 20 | #define FR_CCED KC_9 21 | #define FR_AGRV KC_0 22 | #define FR_RPRN KC_MINS 23 | #define FR_EQL KC_EQL 24 | 25 | #define FR_A KC_Q 26 | #define FR_Z KC_W 27 | #define FR_CIRC KC_LBRC 28 | #define FR_DLR KC_RBRC 29 | 30 | #define FR_Q KC_A 31 | #define FR_M KC_SCLN 32 | #define FR_UGRV KC_QUOT 33 | #define FR_ASTR KC_NUHS 34 | 35 | #define FR_LESS KC_NUBS 36 | #define FR_W KC_Z 37 | #define FR_COMM KC_M 38 | #define FR_SCLN KC_COMM 39 | #define FR_COLN KC_DOT 40 | #define FR_EXLM KC_SLSH 41 | 42 | // Shifted characters 43 | #define FR_1 LSFT(KC_1) 44 | #define FR_2 LSFT(KC_2) 45 | #define FR_3 LSFT(KC_3) 46 | #define FR_4 LSFT(KC_4) 47 | #define FR_5 LSFT(KC_5) 48 | #define FR_6 LSFT(KC_6) 49 | #define FR_7 LSFT(KC_7) 50 | #define FR_8 LSFT(KC_8) 51 | #define FR_9 LSFT(KC_9) 52 | #define FR_0 LSFT(KC_0) 53 | #define FR_OVRR LSFT(FR_RPRN) 54 | #define FR_PLUS LSFT(FR_EQL) 55 | 56 | #define FR_UMLT LSFT(FR_CIRC) 57 | #define FR_PND LSFT(FR_DLR) 58 | #define FR_PERC LSFT(FR_UGRV) 59 | #define FR_MU LSFT(FR_ASTR) 60 | 61 | #define FR_GRTR LSFT(FR_LESS) 62 | #define FR_QUES LSFT(FR_COMM) 63 | #define FR_DOT LSFT(FR_SCLN) 64 | #define FR_SLSH LSFT(FR_COLN) 65 | #define FR_SECT LSFT(FR_EXLM) 66 | 67 | // Alt Gr-ed characters 68 | #define FR_TILD ALGR(KC_2) 69 | #define FR_HASH ALGR(KC_3) 70 | #define FR_LCBR ALGR(KC_4) 71 | #define FR_LBRC ALGR(KC_5) 72 | #define FR_PIPE ALGR(KC_6) 73 | #define FR_GRV ALGR(KC_7) 74 | #define FR_BSLS ALGR(KC_8) 75 | #define FR_CIRC ALGR(KC_9) 76 | #define FR_AT ALGR(KC_0) 77 | #define FR_RBRC ALGR(FR_RPRN) 78 | #define FR_RCBR ALGR(FR_EQL) 79 | 80 | #define FR_EURO ALGR(KC_E) 81 | #define FR_BULT ALGR(FR_DLR) 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_french_osx.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_FRENCH_OSX_H 2 | #define KEYMAP_FRENCH_OSX_H 3 | 4 | #include "keymap.h" 5 | 6 | // Normal characters 7 | #define FR_AT KC_GRV 8 | #define FR_AMP KC_1 9 | #define FR_EACU KC_2 10 | #define FR_QUOT KC_3 11 | #define FR_APOS KC_4 12 | #define FR_LPRN KC_5 13 | #define FR_SECT KC_6 14 | #define FR_EGRV KC_7 15 | #define FR_EXLM KC_8 16 | #define FR_CCED KC_9 17 | #define FR_AGRV KC_0 18 | #define FR_RPRN KC_MINS 19 | #define FR_MINS KC_EQL 20 | 21 | #define FR_A KC_Q 22 | #define FR_Z KC_W 23 | #define FR_CIRC KC_LBRC 24 | #define FR_DLR KC_RBRC 25 | 26 | #define FR_Q KC_A 27 | #define FR_M KC_SCLN 28 | #define FR_UGRV KC_QUOT 29 | #define FR_GRV KC_NUHS 30 | 31 | #define FR_LESS KC_NUBS 32 | #define FR_W KC_Z 33 | #define FR_COMM KC_M 34 | #define FR_SCLN KC_COMM 35 | #define FR_COLN KC_DOT 36 | #define FR_EQL KC_SLSH 37 | 38 | // Shifted characters 39 | #define FR_HASH LSFT(KC_GRV) 40 | #define FR_1 LSFT(KC_1) 41 | #define FR_2 LSFT(KC_2) 42 | #define FR_3 LSFT(KC_3) 43 | #define FR_4 LSFT(KC_4) 44 | #define FR_5 LSFT(KC_5) 45 | #define FR_6 LSFT(KC_6) 46 | #define FR_7 LSFT(KC_7) 47 | #define FR_8 LSFT(KC_8) 48 | #define FR_9 LSFT(KC_9) 49 | #define FR_0 LSFT(KC_0) 50 | #define FR_UNDS LSFT(FR_MINS) 51 | 52 | #define FR_UMLT LSFT(FR_CIRC) 53 | #define FR_ASTR LSFT(FR_DLR) 54 | 55 | #define FR_PERC LSFT(FR_UGRV) 56 | #define FR_PND LSFT(FR_GRV) 57 | 58 | #define FR_GRTR LSFT(FR_LESS) 59 | #define FR_QUES LSFT(FR_COMM) 60 | #define FR_DOT LSFT(FR_SCLN) 61 | #define FR_SLSH LSFT(FR_COLN) 62 | #define FR_PLUS LSFT(FR_EQL) 63 | 64 | // Alted characters 65 | #define FR_LCBR LALT(KC_5) 66 | #define FR_RCBR LALT(FR_RPRN) 67 | #define FR_EURO LALT(KC_E) 68 | #define FR_BULT LALT(FR_DLR) 69 | #define FR_TILD LALT(KC_N) 70 | 71 | // Shift+Alt-ed characters 72 | #define FR_LBRC LSFT(LALT(KC_5)) 73 | #define FR_RBRC LSFT(LALT(FR_RPRN)) 74 | #define FR_PIPE LSFT(LALT(KC_L)) 75 | #define FR_BSLS LSFT(LALT(FR_COLN)) 76 | 77 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_jp.h: -------------------------------------------------------------------------------- 1 | /* JP106-layout (Japanese Standard) 2 | * 3 | * For more information, see 4 | * http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html 5 | * note: This website is written in Japanese. 6 | */ 7 | 8 | 9 | #ifndef KEYMAP_JP_H 10 | #define KEYMAP_JP_H 11 | 12 | 13 | #include "keymap.h" 14 | 15 | 16 | #define JP_ZHTG KC_GRV // hankaku/zenkaku|kanzi 17 | #define JP_YEN KC_INT3 // yen, | 18 | #define JP_CIRC KC_EQL // ^, ~ 19 | #define JP_AT KC_LBRC // @, ` 20 | #define JP_LBRC KC_RBRC // [, { 21 | #define JP_COLN KC_QUOT // :, * 22 | #define JP_RBRC KC_NUHS // ], } 23 | #define JP_BSLS KC_INT1 // \, _ 24 | #define JP_MHEN KC_INT5 // muhenkan 25 | #define JP_HENK KC_INT4 // henkan 26 | #define JP_KANA KC_INT2 // katakana/hiragana|ro-mazi 27 | 28 | 29 | //Aliases for shifted symbols 30 | #define JP_DQT LSFT(KC_2) // " 31 | #define JP_AMPR LSFT(KC_6) // & 32 | #define JP_QUOT LSFT(KC_7) // ' 33 | #define JP_LPRN LSFT(KC_8) // ( 34 | #define JP_RPRN LSFT(KC_9) // ) 35 | #define JP_EQL LSFT(KC_MINS) // = 36 | #define JP_TILD LSFT(JP_CIRC) // ~ 37 | #define JP_PIPE LSFT(JP_YEN) // | 38 | #define JP_GRV LSFT(JP_AT) // ` 39 | #define JP_LCBR LSFT(JP_LBRC) // { 40 | #define JP_PLUS LSFT(KC_SCLN) // + 41 | #define JP_ASTR LSFT(JP_COLN) // * 42 | #define JP_RCBR LSFT(JP_RBRC) // } 43 | #define JP_UNDS LSFT(JP_BSLS) // _ 44 | 45 | 46 | // These symbols are correspond to US101-layout. 47 | #define JP_MINS KC_MINS // - 48 | #define JP_SCLN KC_SCLN // ; 49 | #define JP_COMM KC_COMM // , 50 | #define JP_DOT KC_DOT // . 51 | #define JP_SLSH KC_SLSH // / 52 | // shifted 53 | #define JP_EXLM KC_EXLM // ! 54 | #define JP_HASH KC_HASH // # 55 | #define JP_DLR KC_DLR // $ 56 | #define JP_PERC KC_PERC // % 57 | #define JP_LT KC_LT // < 58 | #define JP_GT KC_GT // > 59 | #define JP_QUES KC_QUES // ? 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_neo2.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_NEO2 2 | #define KEYMAP_NEO2 3 | 4 | #include "keymap.h" 5 | #include "keymap_german.h" 6 | 7 | #define NEO_A KC_D 8 | #define NEO_B KC_N 9 | #define NEO_C KC_R 10 | #define NEO_D DE_OE 11 | #define NEO_E KC_F 12 | #define NEO_F KC_O 13 | #define NEO_G KC_I 14 | #define NEO_H KC_U 15 | #define NEO_I KC_S 16 | #define NEO_J DE_MINS 17 | #define NEO_K DE_Z 18 | #define NEO_L KC_E 19 | #define NEO_M KC_M 20 | #define NEO_N KC_J 21 | #define NEO_O KC_G 22 | #define NEO_P KC_V 23 | #define NEO_Q KC_P 24 | #define NEO_R KC_K 25 | #define NEO_S KC_H 26 | #define NEO_T KC_L 27 | #define NEO_U KC_A 28 | #define NEO_V KC_W 29 | #define NEO_W KC_T 30 | #define NEO_X KC_Q 31 | #define NEO_Y DE_AE 32 | #define NEO_Z KC_B 33 | #define NEO_AE KC_C 34 | #define NEO_OE KC_X 35 | #define NEO_UE DE_Y 36 | #define NEO_SS DE_UE 37 | 38 | #define NEO_DOT DE_DOT 39 | #define NEO_COMM DE_COMM 40 | 41 | #define NEO_1 DE_1 42 | #define NEO_2 DE_2 43 | #define NEO_3 DE_3 44 | #define NEO_4 DE_4 45 | #define NEO_5 DE_5 46 | #define NEO_6 DE_6 47 | #define NEO_7 DE_7 48 | #define NEO_8 DE_8 49 | #define NEO_9 DE_9 50 | #define NEO_0 DE_0 51 | #define NEO_MINS DE_SS 52 | 53 | #define NEO_ACUT DE_PLUS 54 | #define NEO_GRV DE_ACUT 55 | #define NEO_CIRC DE_CIRC 56 | 57 | #define NEO_L1_L KC_CAPS 58 | #define NEO_L1_R DE_HASH 59 | 60 | #define NEO_L2_L DE_LESS 61 | #define NEO_L2_R DE_ALGR 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_nordic.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_NORDIC_H 2 | #define KEYMAP_NORDIC_H 3 | 4 | #include "keymap.h" 5 | 6 | // Alt gr 7 | #define ALGR(kc) RALT(kc) 8 | #define NO_ALGR KC_RALT 9 | 10 | // Normal characters 11 | #define NO_HALF KC_GRV 12 | #define NO_PLUS KC_MINS 13 | #define NO_ACUT KC_EQL 14 | 15 | #define NO_AM KC_LBRC 16 | #define NO_QUOT KC_RBRC // this is the "umlaut" char on Nordic keyboards, Apple layout 17 | #define NO_AE KC_SCLN 18 | #define NO_OSLH KC_QUOT 19 | #define NO_APOS KC_NUHS 20 | 21 | #define NO_LESS KC_NUBS 22 | #define NO_MINS KC_SLSH 23 | 24 | // Shifted characters 25 | #define NO_SECT LSFT(NO_HALF) 26 | #define NO_QUO2 LSFT(KC_2) 27 | #define NO_BULT LSFT(KC_4) 28 | #define NO_AMPR LSFT(KC_6) 29 | #define NO_SLSH LSFT(KC_7) 30 | #define NO_LPRN LSFT(KC_8) 31 | #define NO_RPRN LSFT(KC_9) 32 | #define NO_EQL LSFT(KC_0) 33 | #define NO_QUES LSFT(NO_PLUS) 34 | #define NO_GRV LSFT(NO_ACUT) 35 | 36 | #define NO_CIRC LSFT(NO_QUOT) 37 | 38 | #define NO_GRTR LSFT(NO_LESS) 39 | #define NO_SCLN LSFT(KC_COMM) 40 | #define NO_COLN LSFT(KC_DOT) 41 | #define NO_UNDS LSFT(NO_MINS) 42 | 43 | // Alt Gr-ed characters 44 | #define NO_AT ALGR(KC_2) 45 | #define NO_PND ALGR(KC_3) 46 | #define NO_DLR ALGR(KC_4) 47 | #define NO_LCBR ALGR(KC_7) 48 | #define NO_LBRC ALGR(KC_8) 49 | #define NO_RBRC ALGR(KC_9) 50 | #define NO_RCBR ALGR(KC_0) 51 | #define NO_PIPE ALGR(KC_NUBS) 52 | 53 | #define NO_EURO ALGR(KC_E) 54 | #define NO_TILD ALGR(NO_QUOT) 55 | 56 | #define NO_BSLS ALGR(KC_MINS) 57 | #define NO_MU ALGR(KC_M) 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_norwegian.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_NORWEGIAN_H 2 | #define KEYMAP_NORWEGIAN_H 3 | 4 | #include "keymap_nordic.h" 5 | 6 | // There are slight differrences in the keyboards in the nordic contries 7 | 8 | // Norwegian redifinitions from the nordic keyset 9 | #undef NO_ACUT 10 | #define NO_ACUT ALGR(NO_BSLS) // ´ 11 | #undef NO_AE 12 | #define NO_AE KC_QUOT // æ 13 | #undef NO_BSLS 14 | #define NO_BSLS KC_EQL // '\' 15 | #undef NO_CIRC 16 | #define NO_CIRC LSFT(KC_RBRC) // ^ 17 | #undef NO_GRV 18 | #define NO_GRV LSFT(NO_BSLS) // 19 | #undef NO_OSLH 20 | #define NO_OSLH KC_SCLN // ø 21 | #undef NO_PIPE 22 | #define NO_PIPE KC_GRV // | 23 | 24 | // Additional norwegian keys not defined in the nordic keyset 25 | #define NO_AA KC_LBRC // å 26 | #define NO_ASTR LSFT(KC_BSLS) // * 27 | 28 | // Norwegian unique MAC characters 29 | #define NO_ACUT_MAC KC_EQL // = 30 | #define NO_APOS_MAC KC_NUBS // ' 31 | #define NO_AT_MAC KC_BSLS // @ 32 | #define NO_BSLS_MAC ALGR(LSFT(KC_7)) // '\' 33 | #define NO_DLR_MAC LSFT(KC_4) // $ 34 | #define NO_GRV_MAC ALGR(NO_BSLS) // ` 35 | #define NO_GRTR_MAC LSFT(KC_GRV) // > 36 | #define NO_LCBR_MAC ALGR(LSFT(KC_8)) // } 37 | #define NO_LESS_MAC KC_GRV // > 38 | #define NO_PIPE_MAC ALGR(KC_7) // | 39 | #define NO_RCBR_MAC ALGR(LSFT(KC_9)) // } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_plover.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_PLOVER_H 2 | #define KEYMAP_PLOVER_H 3 | 4 | #include "keymap.h" 5 | 6 | #define PV_NUM KC_1 7 | #define PV_LS KC_Q 8 | #define PV_LT KC_W 9 | #define PV_LP KC_E 10 | #define PV_LH KC_R 11 | #define PV_LK KC_S 12 | #define PV_LW KC_D 13 | #define PV_LR KC_F 14 | 15 | #define PV_STAR KC_Y 16 | #define PV_RF KC_U 17 | #define PV_RP KC_I 18 | #define PV_RL KC_O 19 | #define PV_RT KC_P 20 | #define PV_RD KC_LBRC 21 | #define PV_RR KC_J 22 | #define PV_RB KC_K 23 | #define PV_RG KC_L 24 | #define PV_RS KC_SCLN 25 | #define PV_RZ KC_QUOT 26 | 27 | #define PV_A KC_C 28 | #define PV_O KC_V 29 | #define PV_E KC_N 30 | #define PV_U KC_M 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_spanish.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_SPANISH_H 2 | #define KEYMAP_SPANISH_H 3 | 4 | #include "keymap.h" 5 | 6 | // Alt gr 7 | #define ALGR(kc) RALT(kc) 8 | #define NO_ALGR KC_RALT 9 | 10 | // Normal characters 11 | #define ES_OVRR KC_GRV 12 | #define ES_APOS KC_MINS 13 | #define ES_IEXL KC_EQL 14 | 15 | #define ES_GRV KC_LBRC 16 | #define ES_PLUS KC_RBRC 17 | 18 | #define ES_NTIL KC_SCLN 19 | #define ES_ACUT KC_QUOT 20 | #define ES_CCED KC_NUHS 21 | 22 | #define ES_LESS KC_NUBS 23 | #define ES_MINS KC_SLSH 24 | 25 | // Shifted characters 26 | #define ES_ASML LSFT(ES_OVRR) 27 | #define ES_QUOT LSFT(KC_2) 28 | #define ES_OVDT LSFT(KC_3) 29 | #define ES_AMPR LSFT(KC_6) 30 | #define ES_SLSH LSFT(KC_7) 31 | #define ES_LPRN LSFT(KC_8) 32 | #define ES_RPRN LSFT(KC_9) 33 | #define ES_EQL LSFT(KC_0) 34 | #define ES_QUES LSFT(ES_APOS) 35 | #define ES_IQUE LSFT(ES_IEXL) 36 | 37 | #define ES_CIRC LSFT(ES_GRV) 38 | #define ES_ASTR LSFT(ES_PLUS) 39 | 40 | #define ES_UMLT LSFT(ES_GRV) 41 | 42 | #define ES_GRTR LSFT(ES_LESS) 43 | #define ES_SCLN LSFT(ES_COMM) 44 | #define ES_COLN LSFT(ES_DOT) 45 | #define ES_UNDS LSFT(ES_MINS) 46 | 47 | // Alt Gr-ed characters 48 | #define ES_BSLS ALGR(ES_OVRR) 49 | #define ES_PIPE ALGR(KC_1) 50 | #define ES_AT ALGR(KC_2) 51 | #define ES_HASH ALGR(KC_3) 52 | #define ES_TILD ALGR(ES_NTIL) 53 | #define ES_EURO ALGR(KC_5) 54 | #define ES_NOT ALGR(KC_6) 55 | 56 | #define ES_LBRC ALGR(ES_GRV) 57 | #define ES_RBRC ALGR(ES_PLUS) 58 | 59 | #define ES_LCBR ALGR(ES_ACUT) 60 | #define ES_RCRB ALGR(ES_CCED) 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/keymap_extras/keymap_uk.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYMAP_UK_H 2 | #define KEYMAP_UK_H 3 | 4 | #include "keymap.h" 5 | 6 | // Alt gr 7 | #define ALGR(kc) RALT(kc) 8 | #define NO_ALGR KC_RALT 9 | 10 | // Normal characters 11 | #define UK_HASH KC_NUHS 12 | 13 | #define UK_BSLS KC_NUBS 14 | 15 | // Shifted characters 16 | #define UK_NOT LSFT(KC_GRV) 17 | #define UK_QUOT LSFT(KC_2) 18 | #define UK_PND LSFT(KC_3) 19 | 20 | #define UK_AT LSFT(KC_QUOT) 21 | #define UK_TILD LSFT(KC_NUHS) 22 | 23 | #define UK_PIPE LSFT(KC_NUBS) 24 | 25 | // Alt Gr-ed characters 26 | #define UK_BRKP ALGR(KC_GRV) 27 | #define UK_EURO ALGR(KC_4) 28 | 29 | #define UK_EACT ALGR(KC_E) 30 | #define UK_UACT ALGR(KC_U) 31 | #define UK_IACT ALGR(KC_I) 32 | #define UK_OACT ALGR(KC_O) 33 | 34 | #define UK_AACT ALGR(KC_A) 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/pincontrol.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // Some helpers for controlling gpio pins 3 | #include 4 | 5 | enum { 6 | PinDirectionInput = 0, 7 | PinDirectionOutput = 1, 8 | PinLevelHigh = 1, 9 | PinLevelLow = 0, 10 | }; 11 | 12 | // ex: pinMode(B0, PinDirectionOutput); 13 | static inline void pinMode(uint8_t pin, int mode) { 14 | uint8_t bv = _BV(pin & 0xf); 15 | if (mode == PinDirectionOutput) { 16 | _SFR_IO8((pin >> 4) + 1) |= bv; 17 | } else { 18 | _SFR_IO8((pin >> 4) + 1) &= ~bv; 19 | _SFR_IO8((pin >> 4) + 2) &= ~bv; 20 | } 21 | } 22 | 23 | // ex: digitalWrite(B0, PinLevelHigh); 24 | static inline void digitalWrite(uint8_t pin, int mode) { 25 | uint8_t bv = _BV(pin & 0xf); 26 | if (mode == PinLevelHigh) { 27 | _SFR_IO8((pin >> 4) + 2) |= bv; 28 | } else { 29 | _SFR_IO8((pin >> 4) + 2) &= ~bv; 30 | } 31 | } 32 | 33 | // Return true if the pin is HIGH 34 | // digitalRead(B0) 35 | static inline bool digitalRead(uint8_t pin) { 36 | return _SFR_IO8(pin >> 4) & _BV(pin & 0xf); 37 | } 38 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_chording.c: -------------------------------------------------------------------------------- 1 | #include "process_chording.h" 2 | 3 | bool keys_chord(uint8_t keys[]) { 4 | uint8_t keys_size = sizeof(keys)/sizeof(keys[0]); 5 | bool pass = true; 6 | uint8_t in = 0; 7 | for (uint8_t i = 0; i < chord_key_count; i++) { 8 | bool found = false; 9 | for (uint8_t j = 0; j < keys_size; j++) { 10 | if (chord_keys[i] == (keys[j] & 0xFF)) { 11 | in++; // detects key in chord 12 | found = true; 13 | break; 14 | } 15 | } 16 | if (found) 17 | continue; 18 | if (chord_keys[i] != 0) { 19 | pass = false; // makes sure rest are blank 20 | } 21 | } 22 | return (pass && (in == keys_size)); 23 | } 24 | 25 | bool process_chording(uint16_t keycode, keyrecord_t *record) { 26 | if (keycode >= QK_CHORDING && keycode <= QK_CHORDING_MAX) { 27 | if (record->event.pressed) { 28 | if (!chording) { 29 | chording = true; 30 | for (uint8_t i = 0; i < CHORDING_MAX; i++) 31 | chord_keys[i] = 0; 32 | chord_key_count = 0; 33 | chord_key_down = 0; 34 | } 35 | chord_keys[chord_key_count] = (keycode & 0xFF); 36 | chord_key_count++; 37 | chord_key_down++; 38 | return false; 39 | } else { 40 | if (chording) { 41 | chord_key_down--; 42 | if (chord_key_down == 0) { 43 | chording = false; 44 | // Chord Dictionary 45 | if (keys_chord((uint8_t[]){KC_ENTER, KC_SPACE})) { 46 | register_code(KC_A); 47 | unregister_code(KC_A); 48 | return false; 49 | } 50 | for (uint8_t i = 0; i < chord_key_count; i++) { 51 | register_code(chord_keys[i]); 52 | unregister_code(chord_keys[i]); 53 | return false; 54 | } 55 | } 56 | } 57 | } 58 | } 59 | return true; 60 | } -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_chording.h: -------------------------------------------------------------------------------- 1 | #ifndef PROCESS_CHORDING_H 2 | #define PROCESS_CHORDING_H 3 | 4 | #include "quantum.h" 5 | 6 | // Chording stuff 7 | #define CHORDING_MAX 4 8 | bool chording = false; 9 | 10 | uint8_t chord_keys[CHORDING_MAX] = {0}; 11 | uint8_t chord_key_count = 0; 12 | uint8_t chord_key_down = 0; 13 | 14 | bool process_chording(uint16_t keycode, keyrecord_t *record); 15 | 16 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_leader.c: -------------------------------------------------------------------------------- 1 | #include "process_leader.h" 2 | 3 | __attribute__ ((weak)) 4 | void leader_start(void) {} 5 | 6 | __attribute__ ((weak)) 7 | void leader_end(void) {} 8 | 9 | // Leader key stuff 10 | bool leading = false; 11 | uint16_t leader_time = 0; 12 | 13 | uint16_t leader_sequence[5] = {0, 0, 0, 0, 0}; 14 | uint8_t leader_sequence_size = 0; 15 | 16 | bool process_leader(uint16_t keycode, keyrecord_t *record) { 17 | // Leader key set-up 18 | if (record->event.pressed) { 19 | if (!leading && keycode == KC_LEAD) { 20 | leader_start(); 21 | leading = true; 22 | leader_time = timer_read(); 23 | leader_sequence_size = 0; 24 | leader_sequence[0] = 0; 25 | leader_sequence[1] = 0; 26 | leader_sequence[2] = 0; 27 | leader_sequence[3] = 0; 28 | leader_sequence[4] = 0; 29 | return false; 30 | } 31 | if (leading && timer_elapsed(leader_time) < LEADER_TIMEOUT) { 32 | leader_sequence[leader_sequence_size] = keycode; 33 | leader_sequence_size++; 34 | return false; 35 | } 36 | } 37 | return true; 38 | } -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_leader.h: -------------------------------------------------------------------------------- 1 | #ifndef PROCESS_LEADER_H 2 | #define PROCESS_LEADER_H 3 | 4 | #include "quantum.h" 5 | 6 | bool process_leader(uint16_t keycode, keyrecord_t *record); 7 | 8 | void leader_start(void); 9 | void leader_end(void); 10 | 11 | #ifndef LEADER_TIMEOUT 12 | #define LEADER_TIMEOUT 200 13 | #endif 14 | #define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) 15 | #define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) 16 | #define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0) 17 | #define SEQ_FOUR_KEYS(key1, key2, key3, key4) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == 0) 18 | #define SEQ_FIVE_KEYS(key1, key2, key3, key4, key5) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == (key5)) 19 | 20 | #define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[5]; extern uint8_t leader_sequence_size 21 | #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) 22 | 23 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_music.h: -------------------------------------------------------------------------------- 1 | #ifndef PROCESS_MUSIC_H 2 | #define PROCESS_MUSIC_H 3 | 4 | #include "quantum.h" 5 | 6 | bool process_music(uint16_t keycode, keyrecord_t *record); 7 | 8 | bool is_music_on(void); 9 | void music_toggle(void); 10 | void music_on(void); 11 | void music_off(void); 12 | 13 | void audio_on_user(void); 14 | void music_on_user(void); 15 | void music_scale_user(void); 16 | 17 | void matrix_scan_music(void); 18 | 19 | #ifndef SCALE 20 | #define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ 21 | 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ 22 | 0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \ 23 | 0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \ 24 | 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), } 25 | #endif 26 | 27 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_printer.h: -------------------------------------------------------------------------------- 1 | #ifndef PROCESS_PRINTER_H 2 | #define PROCESS_PRINTER_H 3 | 4 | #include "quantum.h" 5 | 6 | #include "protocol/serial.h" 7 | 8 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/process_keycode/process_tap_dance.h: -------------------------------------------------------------------------------- 1 | #ifndef PROCESS_TAP_DANCE_H 2 | #define PROCESS_TAP_DANCE_H 3 | 4 | #ifdef TAP_DANCE_ENABLE 5 | 6 | #include 7 | #include 8 | 9 | typedef struct 10 | { 11 | uint8_t count; 12 | uint16_t keycode; 13 | uint16_t timer; 14 | bool interrupted; 15 | bool pressed; 16 | bool finished; 17 | } qk_tap_dance_state_t; 18 | 19 | #define TD(n) (QK_TAP_DANCE + n) 20 | 21 | typedef void (*qk_tap_dance_user_fn_t) (qk_tap_dance_state_t *state, void *user_data); 22 | 23 | typedef struct 24 | { 25 | struct { 26 | qk_tap_dance_user_fn_t on_each_tap; 27 | qk_tap_dance_user_fn_t on_dance_finished; 28 | qk_tap_dance_user_fn_t on_reset; 29 | } fn; 30 | qk_tap_dance_state_t state; 31 | void *user_data; 32 | } qk_tap_dance_action_t; 33 | 34 | typedef struct 35 | { 36 | uint16_t kc1; 37 | uint16_t kc2; 38 | } qk_tap_dance_pair_t; 39 | 40 | #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ 41 | .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ 42 | .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ 43 | } 44 | 45 | #define ACTION_TAP_DANCE_FN(user_fn) { \ 46 | .fn = { NULL, user_fn, NULL }, \ 47 | .user_data = NULL, \ 48 | } 49 | 50 | #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ 51 | .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ 52 | .user_data = NULL, \ 53 | } 54 | 55 | extern qk_tap_dance_action_t tap_dance_actions[]; 56 | 57 | /* To be used internally */ 58 | 59 | bool process_tap_dance(uint16_t keycode, keyrecord_t *record); 60 | void matrix_scan_tap_dance (void); 61 | void reset_tap_dance (qk_tap_dance_state_t *state); 62 | 63 | void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data); 64 | void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data); 65 | 66 | #else 67 | 68 | #define TD(n) KC_NO 69 | 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Fred Sundvik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/README.md: -------------------------------------------------------------------------------- 1 | # qmk_serial_link -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/protocol/byte_stuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef SERIAL_LINK_BYTE_STUFFER_H 26 | #define SERIAL_LINK_BYTE_STUFFER_H 27 | 28 | #include 29 | 30 | #define MAX_FRAME_SIZE 1024 31 | #define NUM_LINKS 2 32 | 33 | void init_byte_stuffer(void); 34 | void byte_stuffer_recv_byte(uint8_t link, uint8_t data); 35 | void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/protocol/frame_router.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef SERIAL_LINK_FRAME_ROUTER_H 26 | #define SERIAL_LINK_FRAME_ROUTER_H 27 | 28 | #include 29 | #include 30 | 31 | #define UP_LINK 0 32 | #define DOWN_LINK 1 33 | 34 | void router_set_master(bool master); 35 | void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size); 36 | void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/protocol/frame_validator.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef SERIAL_LINK_FRAME_VALIDATOR_H 26 | #define SERIAL_LINK_FRAME_VALIDATOR_H 27 | 28 | #include 29 | 30 | void validator_recv_frame(uint8_t link, uint8_t* data, uint16_t size); 31 | // The buffer pointed to by the data needs 4 additional bytes 32 | void validator_send_frame(uint8_t link, uint8_t* data, uint16_t size); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/protocol/physical.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef SERIAL_LINK_PHYSICAL_H 26 | #define SERIAL_LINK_PHYSICAL_H 27 | 28 | void send_data(uint8_t link, const uint8_t* data, uint16_t size); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/system/serial_link.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef SERIAL_LINK_H 26 | #define SERIAL_LINK_H 27 | 28 | #include "host_driver.h" 29 | #include 30 | 31 | void init_serial_link(void); 32 | void init_serial_link_hal(void); 33 | bool is_serial_link_connected(void); 34 | bool is_serial_link_master(void); 35 | host_driver_t* get_serial_link_driver(void); 36 | void serial_link_update(void); 37 | 38 | #if defined(PROTOCOL_CHIBIOS) 39 | #include "ch.h" 40 | 41 | static inline void serial_link_lock(void) { 42 | chSysLock(); 43 | } 44 | 45 | static inline void serial_link_unlock(void) { 46 | chSysUnlock(); 47 | } 48 | 49 | void signal_data_written(void); 50 | 51 | #else 52 | 53 | inline void serial_link_lock(void) { 54 | } 55 | 56 | inline void serial_link_unlock(void) { 57 | } 58 | 59 | void signal_data_written(void); 60 | 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/tests/rules.mk: -------------------------------------------------------------------------------- 1 | serial_link_byte_stuffer_SRC :=\ 2 | $(SERIAL_PATH)/tests/byte_stuffer_tests.cpp \ 3 | $(SERIAL_PATH)/protocol/byte_stuffer.c 4 | 5 | serial_link_frame_validator_SRC := \ 6 | $(SERIAL_PATH)/tests/frame_validator_tests.cpp \ 7 | $(SERIAL_PATH)/protocol/frame_validator.c 8 | 9 | serial_link_frame_router_SRC := \ 10 | $(SERIAL_PATH)/tests/frame_router_tests.cpp \ 11 | $(SERIAL_PATH)/protocol/byte_stuffer.c \ 12 | $(SERIAL_PATH)/protocol/frame_validator.c \ 13 | $(SERIAL_PATH)/protocol/frame_router.c 14 | 15 | serial_link_triple_buffered_object_SRC := \ 16 | $(SERIAL_PATH)/tests/triple_buffered_object_tests.cpp \ 17 | $(SERIAL_PATH)/protocol/triple_buffered_object.c 18 | 19 | serial_link_transport_SRC := \ 20 | $(SERIAL_PATH)/tests/transport_tests.cpp \ 21 | $(SERIAL_PATH)/protocol/transport.c \ 22 | $(SERIAL_PATH)/protocol/triple_buffered_object.c 23 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/serial_link/tests/testlist.mk: -------------------------------------------------------------------------------- 1 | TEST_LIST +=\ 2 | serial_link_byte_stuffer\ 3 | serial_link_frame_validator\ 4 | serial_link_frame_router\ 5 | serial_link_triple_buffered_object\ 6 | serial_link_transport -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/Makefile: -------------------------------------------------------------------------------- 1 | ifndef MAKEFILE_INCLUDED 2 | include ../../Makefile 3 | endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/keymaps/default/Makefile: -------------------------------------------------------------------------------- 1 | # Build Options 2 | # change to "no" to disable the options, or define them in the Makefile in 3 | # the appropriate keymap folder that will get included automatically 4 | # 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 6 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 8 | CONSOLE_ENABLE = no # Console for debug(+400) 9 | COMMAND_ENABLE = yes # Commands for debug and configuration 10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 12 | MIDI_ENABLE = no # MIDI controls 13 | AUDIO_ENABLE = no # Audio output on port C6 14 | UNICODE_ENABLE = no # Unicode 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 16 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 18 | 19 | ifndef QUANTUM_DIR 20 | include ../../../../Makefile 21 | endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/keymaps/default/config.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_USER_H 2 | #define CONFIG_USER_H 3 | 4 | #include "../../config.h" 5 | 6 | // place overrides here 7 | 8 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/keymaps/default/keymap.c: -------------------------------------------------------------------------------- 1 | #include "%KEYBOARD%.h" 2 | 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 4 | [0] = KEYMAP( /* Base */ 5 | KC_A, KC_1, KC_H, \ 6 | KC_TAB, KC_SPC \ 7 | ), 8 | }; 9 | 10 | const uint16_t PROGMEM fn_actions[] = { 11 | 12 | }; 13 | 14 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 15 | { 16 | // MACRODOWN only works in this function 17 | switch(id) { 18 | case 0: 19 | if (record->event.pressed) { 20 | register_code(KC_RSFT); 21 | } else { 22 | unregister_code(KC_RSFT); 23 | } 24 | break; 25 | } 26 | return MACRO_NONE; 27 | }; 28 | 29 | 30 | void matrix_init_user(void) { 31 | 32 | } 33 | 34 | void matrix_scan_user(void) { 35 | 36 | } 37 | 38 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { 39 | return true; 40 | } 41 | 42 | void led_set_user(uint8_t usb_led) { 43 | 44 | } -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/keymaps/default/readme.md: -------------------------------------------------------------------------------- 1 | # The default keymap for %KEYBOARD% -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/readme.md: -------------------------------------------------------------------------------- 1 | %KEYBOARD% keyboard firmware 2 | ====================== 3 | 4 | ## Quantum MK Firmware 5 | 6 | For the full Quantum feature list, see [the parent readme](/). 7 | 8 | ## Building 9 | 10 | Download or clone the whole firmware and navigate to the keyboards/%KEYBOARD% folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 11 | 12 | Depending on which keymap you would like to use, you will have to compile slightly differently. 13 | 14 | ### Default 15 | 16 | To build with the default keymap, simply run `make default`. 17 | 18 | ### Other Keymaps 19 | 20 | Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. 21 | 22 | To build the firmware binary hex file with a keymap just do `make` with a keymap like this: 23 | 24 | ``` 25 | $ make [default|jack|] 26 | ``` 27 | 28 | Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. 29 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/template.c: -------------------------------------------------------------------------------- 1 | #include "%KEYBOARD%.h" 2 | 3 | void matrix_init_kb(void) { 4 | // put your keyboard start-up code here 5 | // runs once when the firmware starts up 6 | 7 | matrix_init_user(); 8 | } 9 | 10 | void matrix_scan_kb(void) { 11 | // put your looping keyboard code here 12 | // runs every cycle (a lot) 13 | 14 | matrix_scan_user(); 15 | } 16 | 17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { 18 | // put your per-action keyboard code here 19 | // runs for every action, just before processing by the firmware 20 | 21 | return process_record_user(keycode, record); 22 | } 23 | 24 | void led_set_kb(uint8_t usb_led) { 25 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here 26 | 27 | led_set_user(usb_led); 28 | } 29 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/template/template.h: -------------------------------------------------------------------------------- 1 | #ifndef %KEYBOARD_UPPERCASE%_H 2 | #define %KEYBOARD_UPPERCASE%_H 3 | 4 | #include "quantum.h" 5 | 6 | // This a shortcut to help you visually see your layout. 7 | // The following is an example using the Planck MIT layout 8 | // The first section contains all of the arguements 9 | // The second converts the arguments into a two-dimensional array 10 | #define KEYMAP( \ 11 | k00, k01, k02, \ 12 | k10, k11 \ 13 | ) \ 14 | { \ 15 | { k00, k01, k02 }, \ 16 | { k10, KC_NO, k11 }, \ 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/tools/eeprom_reset.hex: -------------------------------------------------------------------------------- 1 | :10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 2 | :10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0 3 | :10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 4 | :10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0 5 | :10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 6 | :10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0 7 | :10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0 8 | :10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90 9 | :00000001FF 10 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/tools/readme.md: -------------------------------------------------------------------------------- 1 | `eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this: 2 | 3 | dfu-programmer atmega32u4 erase 4 | dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex 5 | 6 | You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom. 7 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/variable_trace.h: -------------------------------------------------------------------------------- 1 | #ifndef VARIABLE_TRACE_H 2 | #define VARIABLE_TRACE_H 3 | 4 | // For more information about the variable tracing see the readme. 5 | 6 | #include "print.h" 7 | 8 | #ifdef NUM_TRACED_VARIABLES 9 | 10 | // Start tracing a variable at the memory address addr 11 | // The name can be anything and is used only for reporting 12 | // The size should usually be the same size as the variable you are interested in 13 | #define ADD_TRACED_VARIABLE(name, addr, size) \ 14 | add_traced_variable(PSTR(name), (void*)addr, size, PSTR(__FILE__), __LINE__) 15 | 16 | // Stop tracing the variable with the given name 17 | #define REMOVE_TRACED_VARIABLE(name) remove_traced_variable(PSTR(name), PSTR(__FILE__), __LINE__) 18 | 19 | // Call to get messages when the variable has been changed 20 | #define VERIFY_TRACED_VARIABLES() verify_traced_variables(PSTR(__FILE__), __LINE__) 21 | 22 | #else 23 | 24 | #define ADD_TRACED_VARIABLE(name, addr, size) 25 | #define REMOVE_TRACED_VARIABLE(name) 26 | #define VERIFY_TRACED_VARIABLES() 27 | 28 | #endif 29 | 30 | // Don't call directly, use the macros instead 31 | void add_traced_variable(const char* name, void* addr, unsigned size, const char* func, int line); 32 | void remove_traced_variable(const char* name, const char* func, int line); 33 | void verify_traced_variables(const char* func, int line); 34 | #endif 35 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/version.h: -------------------------------------------------------------------------------- 1 | #define QMK_VERSION "2017-01-09-14:30:54" 2 | #define QMK_BUILDDATE "2017-01-09-14:30:54" 3 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/visualizer/LICENSE.md: -------------------------------------------------------------------------------- 1 | The files in this project are licensed under the MIT license 2 | It uses the following libraries 3 | uGFX - with it's own license, see the license.html file in the uGFX subfolder for more information 4 | tmk_core - is indirectly used and not included in the repository. It's licensed under the GPLv2 license 5 | Chibios - which is used by tmk_core is licensed under GPLv3. 6 | 7 | Therefore the effective license for any project using the library is GPLv3 8 | 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2016 Fred Sundvik 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/visualizer/example_integration/callbacks.c: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #include "keyboard.h" 26 | #include "action_layer.h" 27 | #include "visualizer.h" 28 | #include "host.h" 29 | 30 | void post_keyboard_init(void) { 31 | visualizer_init(); 32 | } 33 | 34 | void post_keyboard_task() { 35 | visualizer_set_state(default_layer_state, layer_state, host_keyboard_leds()); 36 | } 37 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/visualizer/lcd_backlight.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef LCD_BACKLIGHT_H_ 26 | #define LCD_BACKLIGHT_H_ 27 | #include "stdint.h" 28 | 29 | // Helper macros for storing hue, staturation and intensity as unsigned integers 30 | #define LCD_COLOR(hue, saturation, intensity) (hue << 16 | saturation << 8 | intensity) 31 | #define LCD_HUE(color) ((color >> 16) & 0xFF) 32 | #define LCD_SAT(color) ((color >> 8) & 0xFF) 33 | #define LCD_INT(color) (color & 0xFF) 34 | 35 | void lcd_backlight_init(void); 36 | void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity); 37 | void lcd_backlight_brightness(uint8_t b); 38 | 39 | void lcd_backlight_hal_init(void); 40 | void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b); 41 | 42 | #endif /* LCD_BACKLIGHT_H_ */ 43 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/visualizer/led_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Fred Sundvik 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | #ifndef TMK_VISUALIZER_LED_TEST_H_ 26 | #define TMK_VISUALIZER_LED_TEST_H_ 27 | 28 | #include "visualizer.h" 29 | 30 | bool keyframe_fade_in_all_leds(keyframe_animation_t* animation, visualizer_state_t* state); 31 | bool keyframe_fade_out_all_leds(keyframe_animation_t* animation, visualizer_state_t* state); 32 | bool keyframe_led_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state); 33 | bool keyframe_led_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state); 34 | bool keyframe_led_crossfade(keyframe_animation_t* animation, visualizer_state_t* state); 35 | bool keyframe_mirror_led_orientation(keyframe_animation_t* animation, visualizer_state_t* state); 36 | bool keyframe_normal_led_orientation(keyframe_animation_t* animation, visualizer_state_t* state); 37 | 38 | extern keyframe_animation_t led_test_animation; 39 | 40 | 41 | #endif /* TMK_VISUALIZER_LED_TEST_H_ */ 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/quantum/visualizer/readme.md: -------------------------------------------------------------------------------- 1 | # A visualization library for the TMK keyboard firmware 2 | 3 | This library is designed to work together with the [TMK keyboard firmware](https://github.com/tmk/tmk_keyboard). Currently it only works for [Chibios](http://www.chibios.org/) 4 | flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](http://www.ugfx.org/). 5 | 6 | ## To use this library as a user 7 | You can and should modify the visualizer\_user.c file. Check the comments in the file for more information. 8 | 9 | ## To add this library to custom keyboard projects 10 | 11 | 1. Add tmk_visualizer as a submodule to your project 12 | 1. Set VISUALIZER_DIR in the main keyboard project makefile to point to the submodule 13 | 1. Define LCD\_ENABLE and/or LCD\_BACKLIGHT\_ENABLE, to enable support 14 | 1. Include the visualizer.mk make file 15 | 1. Copy the files in the example\_integration folder to your keyboard project 16 | 1. All other files than the callback.c file are included automatically, so you will need to add callback.c to your makefile manually. If you already have a similar file in your project, you can just copy the functions instead of the whole file. 17 | 1. Edit the files to match your hardware. You might might want to read the Chibios and UGfx documentation, for more information. 18 | 1. If you enable LCD support you might also have to write a custom uGFX display driver, check the uGFX documentation for that. You probably also want to enable SPI support in your Chibios configuration. 19 | -------------------------------------------------------------------------------- /server/qmk_firmware/testlist.mk: -------------------------------------------------------------------------------- 1 | include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk 2 | 3 | define VALIDATE_TEST_LIST 4 | ifneq ($1,) 5 | ifeq ($$(findstring -,$1),-) 6 | $$(error Test names can't contain '-', but '$1' does) 7 | else 8 | $$(eval $$(call VALIDATE_TEST_LIST,$$(firstword $2),$$(wordlist 2,9999,$2))) 9 | endif 10 | endif 11 | endef 12 | 13 | $(eval $(call VALIDATE_TEST_LIST,$(firstword $(TEST_LIST)),$(wordlist 2,9999,$(TEST_LIST)))) -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/.gitignore: -------------------------------------------------------------------------------- 1 | .dep 2 | *.o 3 | *.eep 4 | *.elf 5 | *.hex 6 | *.lss 7 | *.lst 8 | *.map 9 | *.sym 10 | tags 11 | *~ 12 | build/ 13 | *.bak 14 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/.gitmodules -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/action_tapping.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | #ifndef ACTION_TAPPING_H 18 | #define ACTION_TAPPING_H 19 | 20 | 21 | 22 | /* period of tapping(ms) */ 23 | #ifndef TAPPING_TERM 24 | #define TAPPING_TERM 200 25 | #endif 26 | 27 | /* tap count needed for toggling a feature */ 28 | #ifndef TAPPING_TOGGLE 29 | #define TAPPING_TOGGLE 5 30 | #endif 31 | 32 | #define WAITING_BUFFER_SIZE 8 33 | 34 | 35 | #ifndef NO_ACTION_TAPPING 36 | void action_tapping_process(keyrecord_t record); 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/avr/suspend_avr.h: -------------------------------------------------------------------------------- 1 | #ifndef SUSPEND_AVR_H 2 | #define SUSPEND_AVR_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | #define wdt_intr_enable(value) \ 12 | __asm__ __volatile__ ( \ 13 | "in __tmp_reg__,__SREG__" "\n\t" \ 14 | "cli" "\n\t" \ 15 | "wdr" "\n\t" \ 16 | "sts %0,%1" "\n\t" \ 17 | "out __SREG__,__tmp_reg__" "\n\t" \ 18 | "sts %0,%2" "\n\t" \ 19 | : /* no outputs */ \ 20 | : "M" (_SFR_MEM_ADDR(_WD_CONTROL_REG)), \ 21 | "r" (_BV(_WD_CHANGE_BIT) | _BV(WDE)), \ 22 | "r" ((uint8_t) ((value & 0x08 ? _WD_PS3_MASK : 0x00) | \ 23 | _BV(WDIE) | (value & 0x07)) ) \ 24 | : "r0" \ 25 | ) 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/avr/timer_avr.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef TIMER_AVR_H 19 | #define TIMER_AVR_H 1 20 | 21 | #include 22 | 23 | #ifndef TIMER_PRESCALER 24 | # if F_CPU > 16000000 25 | # define TIMER_PRESCALER 256 26 | # elif F_CPU > 2000000 27 | # define TIMER_PRESCALER 64 28 | # elif F_CPU > 250000 29 | # define TIMER_PRESCALER 8 30 | # else 31 | # define TIMER_PRESCALER 1 32 | # endif 33 | #endif 34 | #define TIMER_RAW_FREQ (F_CPU/TIMER_PRESCALER) 35 | #define TIMER_RAW TCNT0 36 | #define TIMER_RAW_TOP (TIMER_RAW_FREQ/1000) 37 | 38 | #if (TIMER_RAW_TOP > 255) 39 | # error "Timer0 can't count 1ms at this clock freq. Use larger prescaler." 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/backlight.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Mathias Andersson 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef BACKLIGHT_H 19 | #define BACKLIGHT_H 20 | 21 | #include 22 | #include 23 | 24 | typedef union { 25 | uint8_t raw; 26 | struct { 27 | bool enable :1; 28 | uint8_t level :7; 29 | }; 30 | } backlight_config_t; 31 | 32 | void backlight_init(void); 33 | void backlight_increase(void); 34 | void backlight_decrease(void); 35 | void backlight_toggle(void); 36 | void backlight_step(void); 37 | void backlight_set(uint8_t level); 38 | void backlight_level(uint8_t level); 39 | uint8_t get_backlight_level(void); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/bootloader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef BOOTLOADER_H 19 | #define BOOTLOADER_H 20 | 21 | 22 | /* give code for your bootloader to come up if needed */ 23 | void bootloader_jump(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/chibios/bootloader.c: -------------------------------------------------------------------------------- 1 | #include "bootloader.h" 2 | 3 | #include "ch.h" 4 | #include "hal.h" 5 | 6 | #ifdef STM32_BOOTLOADER_ADDRESS 7 | /* STM32 */ 8 | 9 | #if defined(STM32F0XX) 10 | /* This code should be checked whether it runs correctly on platforms */ 11 | #define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) 12 | extern uint32_t __ram0_end__; 13 | 14 | void bootloader_jump(void) { 15 | *((unsigned long *)(SYMVAL(__ram0_end__) - 4)) = 0xDEADBEEF; // set magic flag => reset handler will jump into boot loader 16 | NVIC_SystemReset(); 17 | } 18 | 19 | #else /* defined(STM32F0XX) */ 20 | #error Check that the bootloader code works on your platform and add it to bootloader.c! 21 | #endif /* defined(STM32F0XX) */ 22 | 23 | #elif defined(KL2x) || defined(K20x) /* STM32_BOOTLOADER_ADDRESS */ 24 | /* Kinetis */ 25 | 26 | #if defined(KIIBOHD_BOOTLOADER) 27 | /* Kiibohd Bootloader (MCHCK and Infinity KB) */ 28 | #define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 29 | const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; 30 | void bootloader_jump(void) { 31 | __builtin_memcpy((void *)VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); 32 | // request reset 33 | SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; 34 | } 35 | 36 | #else /* defined(KIIBOHD_BOOTLOADER) */ 37 | /* Default for Kinetis - expecting an ARM Teensy */ 38 | void bootloader_jump(void) { 39 | chThdSleepMilliseconds(100); 40 | __BKPT(0); 41 | } 42 | #endif /* defined(KIIBOHD_BOOTLOADER) */ 43 | 44 | #else /* neither STM32 nor KINETIS */ 45 | __attribute__((weak)) 46 | void bootloader_jump(void) {} 47 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/chibios/suspend.c: -------------------------------------------------------------------------------- 1 | /* TODO */ 2 | 3 | #include "ch.h" 4 | #include "hal.h" 5 | 6 | #include "matrix.h" 7 | #include "action.h" 8 | #include "action_util.h" 9 | #include "mousekey.h" 10 | #include "host.h" 11 | #include "backlight.h" 12 | #include "suspend.h" 13 | 14 | void suspend_idle(uint8_t time) { 15 | // TODO: this is not used anywhere - what units is 'time' in? 16 | chThdSleepMilliseconds(time); 17 | } 18 | 19 | void suspend_power_down(void) { 20 | // TODO: figure out what to power down and how 21 | // shouldn't power down TPM/FTM if we want a breathing LED 22 | // also shouldn't power down USB 23 | 24 | // on AVR, this enables the watchdog for 15ms (max), and goes to 25 | // SLEEP_MODE_PWR_DOWN 26 | 27 | chThdSleepMilliseconds(17); 28 | } 29 | 30 | __attribute__ ((weak)) void matrix_power_up(void) {} 31 | __attribute__ ((weak)) void matrix_power_down(void) {} 32 | bool suspend_wakeup_condition(void) 33 | { 34 | matrix_power_up(); 35 | matrix_scan(); 36 | matrix_power_down(); 37 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { 38 | if (matrix_get_row(r)) return true; 39 | } 40 | return false; 41 | } 42 | 43 | // run immediately after wakeup 44 | void suspend_wakeup_init(void) 45 | { 46 | // clear keyboard state 47 | // need to do it manually, because we're running from ISR 48 | // and clear_keyboard() calls print 49 | // so only clear the variables in memory 50 | // the reports will be sent from main.c afterwards 51 | // or if the PC asks for GET_REPORT 52 | clear_mods(); 53 | clear_weak_mods(); 54 | clear_keys(); 55 | #ifdef MOUSEKEY_ENABLE 56 | mousekey_clear(); 57 | #endif /* MOUSEKEY_ENABLE */ 58 | #ifdef EXTRAKEY_ENABLE 59 | host_system_send(0); 60 | host_consumer_send(0); 61 | #endif /* EXTRAKEY_ENABLE */ 62 | #ifdef BACKLIGHT_ENABLE 63 | backlight_init(); 64 | #endif /* BACKLIGHT_ENABLE */ 65 | } 66 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/chibios/timer.c: -------------------------------------------------------------------------------- 1 | #include "ch.h" 2 | 3 | #include "timer.h" 4 | 5 | void timer_init(void) {} 6 | 7 | void timer_clear(void) {} 8 | 9 | uint16_t timer_read(void) 10 | { 11 | return (uint16_t)ST2MS(chVTGetSystemTime()); 12 | } 13 | 14 | uint32_t timer_read32(void) 15 | { 16 | return ST2MS(chVTGetSystemTime()); 17 | } 18 | 19 | uint16_t timer_elapsed(uint16_t last) 20 | { 21 | return (uint16_t)(ST2MS(chVTTimeElapsedSinceX(MS2ST(last)))); 22 | } 23 | 24 | uint32_t timer_elapsed32(uint32_t last) 25 | { 26 | return ST2MS(chVTTimeElapsedSinceX(MS2ST(last))); 27 | } 28 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/debug.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "debug.h" 3 | 4 | #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) 5 | 6 | debug_config_t debug_config = { 7 | /* GCC Bug 10676 - Using unnamed fields in initializers 8 | * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 */ 9 | #if GCC_VERSION >= 40600 10 | .enable = false, 11 | .matrix = false, 12 | .keyboard = false, 13 | .mouse = false, 14 | .reserved = 0 15 | #else 16 | { 17 | false, // .enable 18 | false, // .matrix 19 | false, // .keyboard 20 | false, // .mouse 21 | 0 // .reserved 22 | } 23 | #endif 24 | }; 25 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/eeconfig.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "eeprom.h" 4 | #include "eeconfig.h" 5 | 6 | void eeconfig_init(void) 7 | { 8 | eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); 9 | eeprom_update_byte(EECONFIG_DEBUG, 0); 10 | eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0); 11 | eeprom_update_byte(EECONFIG_KEYMAP, 0); 12 | eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); 13 | #ifdef BACKLIGHT_ENABLE 14 | eeprom_update_byte(EECONFIG_BACKLIGHT, 0); 15 | #endif 16 | #ifdef AUDIO_ENABLE 17 | eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default 18 | #endif 19 | #ifdef RGBLIGHT_ENABLE 20 | eeprom_update_dword(EECONFIG_RGBLIGHT, 0); 21 | #endif 22 | } 23 | 24 | void eeconfig_enable(void) 25 | { 26 | eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); 27 | } 28 | 29 | void eeconfig_disable(void) 30 | { 31 | eeprom_update_word(EECONFIG_MAGIC, 0xFFFF); 32 | } 33 | 34 | bool eeconfig_is_enabled(void) 35 | { 36 | return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); 37 | } 38 | 39 | uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } 40 | void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val); } 41 | 42 | uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } 43 | void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DEFAULT_LAYER, val); } 44 | 45 | uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } 46 | void eeconfig_update_keymap(uint8_t val) { eeprom_update_byte(EECONFIG_KEYMAP, val); } 47 | 48 | #ifdef BACKLIGHT_ENABLE 49 | uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } 50 | void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); } 51 | #endif 52 | 53 | #ifdef AUDIO_ENABLE 54 | uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } 55 | void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); } 56 | #endif 57 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/eeprom.h: -------------------------------------------------------------------------------- 1 | #ifndef TMK_CORE_COMMON_EEPROM_H_ 2 | #define TMK_CORE_COMMON_EEPROM_H_ 3 | 4 | #if defined(__AVR__) 5 | #include 6 | #else 7 | uint8_t eeprom_read_byte (const uint8_t *__p); 8 | uint16_t eeprom_read_word (const uint16_t *__p); 9 | uint32_t eeprom_read_dword (const uint32_t *__p); 10 | void eeprom_read_block (void *__dst, const void *__src, uint32_t __n); 11 | void eeprom_write_byte (uint8_t *__p, uint8_t __value); 12 | void eeprom_write_word (uint16_t *__p, uint16_t __value); 13 | void eeprom_write_dword (uint32_t *__p, uint32_t __value); 14 | void eeprom_write_block (const void *__src, void *__dst, uint32_t __n); 15 | void eeprom_update_byte (uint8_t *__p, uint8_t __value); 16 | void eeprom_update_word (uint16_t *__p, uint16_t __value); 17 | void eeprom_update_dword (uint32_t *__p, uint32_t __value); 18 | void eeprom_update_block (const void *__src, void *__dst, uint32_t __n); 19 | #endif 20 | 21 | 22 | #endif /* TMK_CORE_COMMON_EEPROM_H_ */ 23 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/host.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef HOST_H 19 | #define HOST_H 20 | 21 | #include 22 | #include 23 | #include "report.h" 24 | #include "host_driver.h" 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | extern uint8_t keyboard_idle; 32 | extern uint8_t keyboard_protocol; 33 | 34 | 35 | /* host driver */ 36 | void host_set_driver(host_driver_t *driver); 37 | host_driver_t *host_get_driver(void); 38 | 39 | /* host driver interface */ 40 | uint8_t host_keyboard_leds(void); 41 | void host_keyboard_send(report_keyboard_t *report); 42 | void host_mouse_send(report_mouse_t *report); 43 | void host_system_send(uint16_t data); 44 | void host_consumer_send(uint16_t data); 45 | 46 | uint16_t host_last_system_report(void); 47 | uint16_t host_last_consumer_report(void); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/host_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef HOST_DRIVER_H 19 | #define HOST_DRIVER_H 20 | 21 | #include 22 | #include "report.h" 23 | #ifdef MIDI_ENABLE 24 | #include "midi.h" 25 | #endif 26 | 27 | typedef struct { 28 | uint8_t (*keyboard_leds)(void); 29 | void (*send_keyboard)(report_keyboard_t *); 30 | void (*send_mouse)(report_mouse_t *); 31 | void (*send_system)(uint16_t); 32 | void (*send_consumer)(uint16_t); 33 | #ifdef MIDI_ENABLE 34 | void (*usb_send_func)(MidiDevice *, uint16_t, uint8_t, uint8_t, uint8_t); 35 | void (*usb_get_midi)(MidiDevice *); 36 | void (*midi_usb_init)(MidiDevice *); 37 | #endif 38 | } host_driver_t; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/led.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef LED_H 19 | #define LED_H 20 | #include "stdint.h" 21 | 22 | 23 | /* keyboard LEDs */ 24 | #define USB_LED_NUM_LOCK 0 25 | #define USB_LED_CAPS_LOCK 1 26 | #define USB_LED_SCROLL_LOCK 2 27 | #define USB_LED_COMPOSE 3 28 | #define USB_LED_KANA 4 29 | 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void led_set(uint8_t usb_led); 36 | 37 | void led_init_ports(void); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/magic.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #if defined(__AVR__) 4 | #include 5 | #endif 6 | #include "matrix.h" 7 | #include "bootloader.h" 8 | #include "debug.h" 9 | #include "keymap.h" 10 | #include "host.h" 11 | #include "action_layer.h" 12 | #include "eeconfig.h" 13 | #include "magic.h" 14 | 15 | keymap_config_t keymap_config; 16 | 17 | void magic(void) 18 | { 19 | /* check signature */ 20 | if (!eeconfig_is_enabled()) { 21 | eeconfig_init(); 22 | } 23 | 24 | /* debug enable */ 25 | debug_config.raw = eeconfig_read_debug(); 26 | 27 | /* keymap config */ 28 | keymap_config.raw = eeconfig_read_keymap(); 29 | 30 | uint8_t default_layer = 0; 31 | default_layer = eeconfig_read_default_layer(); 32 | default_layer_set((uint32_t)default_layer); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/magic.h: -------------------------------------------------------------------------------- 1 | #ifndef MAGIC_H 2 | #define MAGIC_H 3 | 4 | void magic(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/mbed/bootloader.c: -------------------------------------------------------------------------------- 1 | #include "bootloader.h" 2 | 3 | 4 | void bootloader_jump(void) {} 5 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/mbed/suspend.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | void suspend_power_down(void) {} 5 | bool suspend_wakeup_condition(void) { return true; } 6 | void suspend_wakeup_init(void) {} 7 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/mbed/timer.c: -------------------------------------------------------------------------------- 1 | #include "cmsis.h" 2 | #include "timer.h" 3 | 4 | /* Mill second tick count */ 5 | volatile uint32_t timer_count = 0; 6 | 7 | /* Timer interrupt handler */ 8 | void SysTick_Handler(void) { 9 | timer_count++; 10 | } 11 | 12 | void timer_init(void) 13 | { 14 | timer_count = 0; 15 | SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */ 16 | } 17 | 18 | void timer_clear(void) 19 | { 20 | timer_count = 0; 21 | } 22 | 23 | uint16_t timer_read(void) 24 | { 25 | return (uint16_t)(timer_count & 0xFFFF); 26 | } 27 | 28 | uint32_t timer_read32(void) 29 | { 30 | return timer_count; 31 | } 32 | 33 | uint16_t timer_elapsed(uint16_t last) 34 | { 35 | return TIMER_DIFF_16(timer_read(), last); 36 | } 37 | 38 | uint32_t timer_elapsed32(uint32_t last) 39 | { 40 | return TIMER_DIFF_32(timer_read32(), last); 41 | } 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/mbed/xprintf.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | //#include 3 | #include "mbed.h" 4 | #include "mbed/xprintf.h" 5 | 6 | 7 | #define STRING_STACK_LIMIT 120 8 | 9 | //TODO 10 | int __xprintf(const char* format, ...) { return 0; } 11 | 12 | #if 0 13 | /* mbed Serial */ 14 | Serial ser(UART_TX, UART_RX); 15 | 16 | /* TODO: Need small implementation for embedded */ 17 | int xprintf(const char* format, ...) 18 | { 19 | /* copy from mbed/common/RawSerial.cpp */ 20 | std::va_list arg; 21 | va_start(arg, format); 22 | int len = vsnprintf(NULL, 0, format, arg); 23 | if (len < STRING_STACK_LIMIT) { 24 | char temp[STRING_STACK_LIMIT]; 25 | vsprintf(temp, format, arg); 26 | ser.puts(temp); 27 | } else { 28 | char *temp = new char[len + 1]; 29 | vsprintf(temp, format, arg); 30 | ser.puts(temp); 31 | delete[] temp; 32 | } 33 | va_end(arg); 34 | return len; 35 | 36 | /* Fail: __builtin_va_arg_pack? 37 | * https://gcc.gnu.org/onlinedocs/gcc-4.3.5/gcc/Constructing-Calls.html#Constructing-Calls 38 | void *arg = __builtin_apply_args(); 39 | void *ret = __builtin_apply((void*)(&(ser.printf)), arg, 100); 40 | __builtin_return(ret) 41 | */ 42 | /* Fail: varargs can not be passed to printf 43 | //int r = ser.printf("test %i\r\n", 123); 44 | va_list arg; 45 | va_start(arg, format); 46 | int r = ser.printf(format, arg); 47 | va_end(arg); 48 | return r; 49 | */ 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/mbed/xprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef XPRINTF_H 2 | #define XPRINTF_H 3 | 4 | //#define xprintf(format, ...) __xprintf(format, ##__VA_ARGS__) 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int __xprintf(const char *format, ...); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/nodebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef NODEBUG_H 19 | #define NODEBUG_H 20 | 21 | #ifndef NO_DEBUG 22 | #define NO_DEBUG 23 | #include "debug.h" 24 | #undef NO_DEBUG 25 | #else 26 | #include "debug.h" 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/print.c: -------------------------------------------------------------------------------- 1 | /* Copyright 2012,2013 Jun Wako */ 2 | /* Very basic print functions, intended to be used with usb_debug_only.c 3 | * http://www.pjrc.com/teensy/ 4 | * Copyright (c) 2008 PJRC.COM, LLC 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include 26 | #include "print.h" 27 | 28 | 29 | #ifndef NO_PRINT 30 | 31 | #if defined(__AVR__) 32 | 33 | #define sendchar(c) xputc(c) 34 | 35 | 36 | void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) 37 | { 38 | xdev_out(sendchar_func); 39 | } 40 | 41 | #elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */ 42 | 43 | // don't need anything extra 44 | 45 | #elif defined(__arm__) /* __AVR__ */ 46 | 47 | // TODO 48 | //void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { } 49 | 50 | #endif /* __AVR__ */ 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/progmem.h: -------------------------------------------------------------------------------- 1 | #ifndef PROGMEM_H 2 | #define PROGMEM_H 1 3 | 4 | #if defined(__AVR__) 5 | # include 6 | #elif defined(__arm__) 7 | # define PROGMEM 8 | # define pgm_read_byte(p) *((unsigned char*)p) 9 | # define pgm_read_word(p) *((uint16_t*)p) 10 | #endif 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/raw_hid.h: -------------------------------------------------------------------------------- 1 | #ifndef _RAW_HID_H_ 2 | #define _RAW_HID_H_ 3 | 4 | void raw_hid_receive( uint8_t *data, uint8_t length ); 5 | 6 | void raw_hid_send( uint8_t *data, uint8_t length ); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/sendchar.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef SENDCHAR_H 19 | #define SENDCHAR_H 20 | 21 | #include 22 | 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* transmit a character. return 0 on success, -1 on error. */ 29 | int8_t sendchar(uint8_t c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/sendchar_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | #include "sendchar.h" 18 | 19 | 20 | int8_t sendchar(uint8_t c) 21 | { 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/sendchar_uart.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | #include "uart.h" 18 | #include "sendchar.h" 19 | 20 | 21 | int8_t sendchar(uint8_t c) 22 | { 23 | uart_putchar(c); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/sleep_led.h: -------------------------------------------------------------------------------- 1 | #ifndef SLEEP_LED_H 2 | #define SLEEP_LED_H 3 | 4 | 5 | #ifdef SLEEP_LED_ENABLE 6 | 7 | void sleep_led_init(void); 8 | void sleep_led_enable(void); 9 | void sleep_led_disable(void); 10 | void sleep_led_toggle(void); 11 | 12 | #else 13 | 14 | #define sleep_led_init() 15 | #define sleep_led_enable() 16 | #define sleep_led_disable() 17 | #define sleep_led_toggle() 18 | 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/suspend.h: -------------------------------------------------------------------------------- 1 | #ifndef SUSPEND_H 2 | #define SUSPEND_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | void suspend_idle(uint8_t timeout); 9 | void suspend_power_down(void); 10 | bool suspend_wakeup_condition(void); 11 | void suspend_wakeup_init(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef TIMER_H 19 | #define TIMER_H 1 20 | 21 | #include 22 | 23 | #if defined(__AVR__) 24 | #include "avr/timer_avr.h" 25 | #endif 26 | 27 | 28 | #define TIMER_DIFF(a, b, max) ((a) >= (b) ? (a) - (b) : (max) - (b) + (a)) 29 | #define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX) 30 | #define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX) 31 | #define TIMER_DIFF_32(a, b) TIMER_DIFF(a, b, UINT32_MAX) 32 | #define TIMER_DIFF_RAW(a, b) TIMER_DIFF_8(a, b) 33 | 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | extern volatile uint32_t timer_count; 40 | 41 | 42 | void timer_init(void); 43 | void timer_clear(void); 44 | uint16_t timer_read(void); 45 | uint32_t timer_read32(void); 46 | uint16_t timer_elapsed(uint16_t last); 47 | uint32_t timer_elapsed32(uint32_t last); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/uart.h: -------------------------------------------------------------------------------- 1 | #ifndef _uart_included_h_ 2 | #define _uart_included_h_ 3 | 4 | #include 5 | 6 | void uart_init(uint32_t baud); 7 | void uart_putchar(uint8_t c); 8 | uint8_t uart_getchar(void); 9 | uint8_t uart_available(void); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Jun Wako 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef UTIL_H 19 | #define UTIL_H 20 | 21 | #include 22 | 23 | // convert to L string 24 | #define LSTR(s) XLSTR(s) 25 | #define XLSTR(s) L ## #s 26 | // convert to string 27 | #define STR(s) XSTR(s) 28 | #define XSTR(s) #s 29 | 30 | 31 | uint8_t bitpop(uint8_t bits); 32 | uint8_t bitpop16(uint16_t bits); 33 | uint8_t bitpop32(uint32_t bits); 34 | 35 | uint8_t biton(uint8_t bits); 36 | uint8_t biton16(uint16_t bits); 37 | uint8_t biton32(uint32_t bits); 38 | 39 | uint8_t bitrev(uint8_t bits); 40 | uint16_t bitrev16(uint16_t bits); 41 | uint32_t bitrev32(uint32_t bits); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/virtser.h: -------------------------------------------------------------------------------- 1 | #ifndef _VIRTSER_H_ 2 | #define _VIRTSER_H_ 3 | 4 | /* Define this function in your code to process incoming bytes */ 5 | void virtser_recv(const uint8_t ch); 6 | 7 | /* Call this to send a character over the Virtual Serial Device */ 8 | void virtser_send(const uint8_t byte); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/common/wait.h: -------------------------------------------------------------------------------- 1 | #ifndef WAIT_H 2 | #define WAIT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #if defined(__AVR__) 9 | # include 10 | # define wait_ms(ms) _delay_ms(ms) 11 | # define wait_us(us) _delay_us(us) 12 | #elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */ 13 | # include "ch.h" 14 | # define wait_ms(ms) chThdSleepMilliseconds(ms) 15 | # define wait_us(us) chThdSleepMicroseconds(us) 16 | #elif defined(__arm__) /* __AVR__ */ 17 | # include "wait_api.h" 18 | #endif /* __AVR__ */ 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/native.mk: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | OBJCOPY = 3 | OBJDUMP = 4 | SIZE = 5 | AR = 6 | NM = 7 | HEX = 8 | EEP = 9 | BIN = 10 | 11 | 12 | COMPILEFLAGS += -funsigned-char 13 | COMPILEFLAGS += -funsigned-bitfields 14 | COMPILEFLAGS += -ffunction-sections 15 | COMPILEFLAGS += -fdata-sections 16 | COMPILEFLAGS += -fshort-enums 17 | 18 | CFLAGS += $(COMPILEFLAGS) 19 | CFLAGS += -fno-inline-small-functions 20 | CFLAGS += -fno-strict-aliasing 21 | 22 | CPPFLAGS += $(COMPILEFLAGS) 23 | CPPFLAGS += -fno-exceptions 24 | CPPFLAGS += -std=gnu++11 -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol.mk: -------------------------------------------------------------------------------- 1 | PROTOCOL_DIR = protocol 2 | 3 | 4 | ifdef PS2_MOUSE_ENABLE 5 | SRC += $(PROTOCOL_DIR)/ps2_mouse.c 6 | OPT_DEFS += -DPS2_MOUSE_ENABLE 7 | OPT_DEFS += -DMOUSE_ENABLE 8 | endif 9 | 10 | ifdef PS2_USE_BUSYWAIT 11 | SRC += protocol/ps2_busywait.c 12 | SRC += protocol/ps2_io_avr.c 13 | OPT_DEFS += -DPS2_USE_BUSYWAIT 14 | endif 15 | 16 | ifdef PS2_USE_INT 17 | SRC += protocol/ps2_interrupt.c 18 | SRC += protocol/ps2_io_avr.c 19 | OPT_DEFS += -DPS2_USE_INT 20 | endif 21 | 22 | ifdef PS2_USE_USART 23 | SRC += protocol/ps2_usart.c 24 | SRC += protocol/ps2_io_avr.c 25 | OPT_DEFS += -DPS2_USE_USART 26 | endif 27 | 28 | 29 | ifdef SERIAL_MOUSE_MICROSOFT_ENABLE 30 | SRC += $(PROTOCOL_DIR)/serial_mouse_microsoft.c 31 | OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MICROSOFT \ 32 | -DMOUSE_ENABLE 33 | endif 34 | 35 | ifdef SERIAL_MOUSE_MOUSESYSTEMS_ENABLE 36 | SRC += $(PROTOCOL_DIR)/serial_mouse_mousesystems.c 37 | OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MOUSESYSTEMS \ 38 | -DMOUSE_ENABLE 39 | endif 40 | 41 | ifdef SERIAL_MOUSE_USE_SOFT 42 | SRC += $(PROTOCOL_DIR)/serial_soft.c 43 | endif 44 | 45 | ifdef SERIAL_MOUSE_USE_UART 46 | SRC += $(PROTOCOL_DIR)/serial_uart.c 47 | endif 48 | 49 | ifdef ADB_MOUSE_ENABLE 50 | OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE 51 | endif 52 | 53 | # Search Path 54 | VPATH += $(TMK_DIR)/protocol 55 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa.mk: -------------------------------------------------------------------------------- 1 | LUFA_DIR = protocol/lufa 2 | 3 | # Path to the LUFA library 4 | LUFA_PATH ?= $(LUFA_DIR)/LUFA-git 5 | 6 | 7 | # Create the LUFA source path variables by including the LUFA makefile 8 | ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) 9 | # New build system from 20120730 10 | LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA 11 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk 12 | else 13 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile 14 | endif 15 | 16 | LUFA_SRC = lufa.c \ 17 | descriptor.c \ 18 | $(LUFA_SRC_USB) 19 | 20 | ifeq ($(strip $(MIDI_ENABLE)), yes) 21 | include $(TMK_PATH)/protocol/midi.mk 22 | endif 23 | 24 | ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes) 25 | LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp 26 | endif 27 | 28 | ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) 29 | LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ 30 | $(TMK_DIR)/protocol/serial_uart.c 31 | endif 32 | 33 | ifeq ($(strip $(VIRTSER_ENABLE)), yes) 34 | LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c 35 | endif 36 | 37 | SRC += $(LUFA_SRC) 38 | 39 | # Search Path 40 | VPATH += $(TMK_PATH)/$(LUFA_DIR) 41 | VPATH += $(TMK_PATH)/$(LUFA_PATH) 42 | 43 | # Option modules 44 | #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) 45 | #endif 46 | 47 | #ifdef EXTRAKEY_ENABLE 48 | #endif 49 | 50 | # LUFA library compile-time options and predefined tokens 51 | LUFA_OPTS = -DUSB_DEVICE_ONLY 52 | LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS 53 | LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" 54 | #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT 55 | LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 56 | LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1 57 | 58 | # Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361 59 | ifeq ($(MCU),atmega32u2) 60 | LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT 61 | endif 62 | 63 | OPT_DEFS += -DF_USB=$(F_USB)UL 64 | OPT_DEFS += -DARCH=ARCH_$(ARCH) 65 | OPT_DEFS += $(LUFA_OPTS) 66 | 67 | # This indicates using LUFA stack 68 | OPT_DEFS += -DPROTOCOL_LUFA 69 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Build/HID_EEPROM_Loader/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2014. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # -------------------------------------- 9 | # LUFA Project Makefile. 10 | # -------------------------------------- 11 | 12 | # Run "make help" for target help. 13 | 14 | MCU = at90usb1287 15 | ARCH = AVR8 16 | F_CPU = 1000000 17 | F_USB = $(F_CPU) 18 | OPTIMIZATION = s 19 | TARGET = HID_EEPROM_Loader 20 | SRC = $(TARGET).c 21 | LUFA_PATH = ../../../LUFA 22 | CC_FLAGS = 23 | LD_FLAGS = 24 | OBJECT_FILES = InputEEData.o 25 | 26 | # Default target 27 | all: 28 | 29 | # Determine the AVR sub-architecture of the build main application object file 30 | FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1) 31 | 32 | # Create a linkable object file with the input binary EEPROM data stored in the FLASH section 33 | InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST) 34 | @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\" 35 | avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@ 36 | 37 | # Include LUFA build script makefiles 38 | include $(LUFA_PATH)/Build/lufa_core.mk 39 | include $(LUFA_PATH)/Build/lufa_build.mk 40 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk 41 | include $(LUFA_PATH)/Build/lufa_doxygen.mk 42 | include $(LUFA_PATH)/Build/lufa_hid.mk 43 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for DeviceApplication.c. 34 | */ 35 | 36 | #ifndef _USB_DEVICE_APPLICATION_H_ 37 | #define _USB_DEVICE_APPLICATION_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | 44 | #include 45 | #include 46 | 47 | #include "Descriptors.h" 48 | 49 | /* Function Prototypes: */ 50 | void SetupHardware(void); 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/HostApplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for HostApplication.c. 34 | */ 35 | 36 | #ifndef _USB_HOST_APPLICATION_H_ 37 | #define _USB_HOST_APPLICATION_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | 44 | #include 45 | 46 | /* Macros: */ 47 | #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \ 48 | !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))) 49 | #define HAS_MULTIPLE_DESCRIPTOR_ADDRESS_SPACES 50 | #endif 51 | 52 | /* Function Prototypes: */ 53 | void SetupHardware(void); 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/HostTemplate/asf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Template for a LUFA USB host mode application. 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/CodeTemplates/makefile_template: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2014. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # -------------------------------------- 9 | # LUFA Project Makefile. 10 | # -------------------------------------- 11 | 12 | # Run "make help" for target help. 13 | 14 | MCU = at90usb1287 15 | ARCH = AVR8 16 | BOARD = USBKEY 17 | F_CPU = 8000000 18 | F_USB = $(F_CPU) 19 | OPTIMIZATION = s 20 | TARGET = Target 21 | SRC = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_PLATFORM) 22 | LUFA_PATH = ../../LUFA 23 | CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig 24 | LD_FLAGS = 25 | 26 | # Default target 27 | all: 28 | 29 | # Include LUFA build script makefiles 30 | include $(LUFA_PATH)/Build/lufa_core.mk 31 | include $(LUFA_PATH)/Build/lufa_sources.mk 32 | include $(LUFA_PATH)/Build/lufa_build.mk 33 | include $(LUFA_PATH)/Build/lufa_cppcheck.mk 34 | include $(LUFA_PATH)/Build/lufa_doxygen.mk 35 | include $(LUFA_PATH)/Build/lufa_dfu.mk 36 | include $(LUFA_PATH)/Build/lufa_hid.mk 37 | include $(LUFA_PATH)/Build/lufa_avrdude.mk 38 | include $(LUFA_PATH)/Build/lufa_atprogram.mk 39 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/BuildingLinkableLibraries.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_BuildLibrary Building as a Linkable Library 8 | * 9 | * The LUFA library can be built as a proper linkable library (with the extension .a) under AVR-GCC, so that 10 | * the library does not need to be recompiled with each revision of a user project. Instructions for creating 11 | * a library from a given source tree can be found in the AVR-GCC user manual included in the WinAVR install 12 | * /Docs/ directory. 13 | * 14 | * However, building the library is not recommended, as the static (compile-time) options will be 15 | * unable to be changed without a recompilation of the LUFA code. Therefore, if the library is to be built 16 | * from the LUFA source, it should be made to be application-specific and compiled with the static options 17 | * that are required for each project (which should be recorded along with the library). 18 | * 19 | * Normal library use has the library components compiled in at the same point as the application code, as 20 | * demonstrated in the library demos and applications. This is the preferred method, as the library is recompiled 21 | * each time to ensure that all static options for a particular application are applied. 22 | */ 23 | 24 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/DevelopingWithLUFA.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_DevelopingWithLUFA Developing With LUFA 9 | * 10 | * This section of the manual contains information on LUFA development, such as Getting Started information, 11 | * information on compile-time tuning of the library and other developer-related sections. 12 | * 13 | * Subsections: 14 | * \li \subpage Page_BuildSystem - The LUFA Buildsystem 15 | * \li \subpage Page_TokenSummary - Summary of Compile Time Tokens 16 | * \li \subpage Page_Migration - Migrating from an Older LUFA Version 17 | * \li \subpage Page_VIDPID - Allocated USB VID and PID Values 18 | * \li \subpage Page_OSDrivers - Operating System Driver Information 19 | * \li \subpage Page_BuildLibrary - Building as a Linkable Library 20 | * \li \subpage Page_ExportingLibrary - Exporting LUFA for IDE Use 21 | * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers 22 | * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software 23 | */ 24 | 25 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Donating.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Donating Donating to Support This Project 9 | * 10 | * \image html Images/Author.jpg "Dean Camera, LUFA Developer" 11 | * 12 | * I am a 24 year old Atmel Applications Engineer, living in Trondheim, Norway and working on LUFA in my spare time. 13 | * The development and support of this library requires much effort from myself, as I am the sole developer, maintainer 14 | * and supporter. Please consider donating a small amount to support this and my future Open Source projects - All 15 | * donations are greatly appreciated. 16 | * 17 | * Note that commercial entities can remove the attribution portion of the LUFA license by a one-time fee - see 18 | * \ref Page_LicenseInfo for more details (Note: Please do NOT pay this in advance through the donation link below - 19 | * contact author for payment details.). 20 | * 21 | * \htmlonly 22 | * \image html "http://www.pledgie.com/campaigns/6927.png" 23 | * \endhtmlonly 24 | * Donate to this project via PayPal - Thanks in Advance! 25 | */ 26 | 27 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Groups.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \defgroup Group_BoardDrivers Board Drivers 8 | * 9 | * \brief Functions, macros, variables, enums and types related to the control of physical board hardware. 10 | */ 11 | 12 | /** \defgroup Group_PeripheralDrivers On-chip Peripheral Drivers 13 | * 14 | * \brief Functions, macros, variables, enums and types related to the control of AVR subsystems. 15 | */ 16 | 17 | /** \defgroup Group_MiscDrivers Miscellaneous Drivers 18 | * 19 | * \brief Miscellaneous driver Functions, macros, variables, enums and types. 20 | */ 21 | 22 | /** \defgroup Group_PlatformDrivers_AVR8 AVR8 23 | * \ingroup Group_PlatformDrivers 24 | * 25 | * \brief Drivers relating to the AVR8 architecture platform, such as clock setup and interrupt management. 26 | */ 27 | 28 | /** \defgroup Group_PlatformDrivers_XMEGA XMEGA 29 | * \ingroup Group_PlatformDrivers 30 | * 31 | * \brief Drivers relating to the XMEGA architecture platform, such as clock setup and interrupt management. 32 | */ 33 | 34 | /** \defgroup Group_PlatformDrivers_UC3 UC3 35 | * \ingroup Group_PlatformDrivers 36 | * 37 | * \brief Drivers relating to the UC3 architecture platform, such as clock setup and interrupt management. 38 | */ 39 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/Author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/Author.jpg -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/LUFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/LUFA.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/LUFA_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Images/LUFA_thumb.png -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/LibraryResources.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Resources Library Resources 9 | * 10 | * \section Sec_UnofficialResources Unofficial Resources 11 | * Unofficial Russian LUFA documentation translation: http://microsin.ru/Download.cnt/doc/LUFA/ \n 12 | * Tutorial for LUFA USB Control Transfers: http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/ 13 | * 14 | * \section Sec_ProjectPages LUFA Related Webpages 15 | * Project Homepage: http://www.lufa-lib.org \n 16 | * Commercial Licenses: http://www.lufa-lib.org/license \n 17 | * Author's Website: http://www.fourwalledcubicle.com \n 18 | * Development Blog: http://www.fourwalledcubicle.com/blog \n 19 | * 20 | * \section Sec_ProjectHelp Assistance With LUFA 21 | * Support Mailing List: http://www.lufa-lib.org/support \n 22 | * Author's Email: dean [at] fourwalledcubicle [dot] com \n 23 | * 24 | * \section Sec_InDevelopment Latest In-Development Source Code 25 | * Issue Tracker: http://www.lufa-lib.org/tracker \n 26 | * Public GIT Repository: http://www.lufa-lib.org/git \n 27 | * Latest Repository Source Archive: http://www.lufa-lib.org/latest-archive \n 28 | * Commit RSS Feed: http://www.lufa-lib.org/rss \n 29 | * 30 | * \section Sec_USBResources USB Resources 31 | * USB-IF Website: http://www.usb.org \n 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Style/Footer.htm: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/DoxygenPages/Style/Style.css: -------------------------------------------------------------------------------- 1 | /* ============================= */ 2 | /* Page Header Formattings */ 3 | /* ============================= */ 4 | #titlearea { 5 | background-color:#E1E7F4; 6 | background-image:url('nav_f.png'); 7 | background-repeat:repeat-x; 8 | color:#20335A; 9 | font-weight:bold; 10 | text-shadow:0 1px 1px rgba(255, 255, 255, 0.9); 11 | } 12 | 13 | #projectlogo { 14 | padding-left: 10px; 15 | } 16 | 17 | /* ============================= */ 18 | /* General Text Formattings */ 19 | /* ============================= */ 20 | body,table,div,p,dl { 21 | font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif; 22 | font-size:13px; 23 | line-height:1.3; 24 | } 25 | 26 | div.header, div.contents p { 27 | padding-left:12px; 28 | } 29 | 30 | /* ============================= */ 31 | /* API Documentation Formattings */ 32 | /* ============================= */ 33 | div.contents table.memberdecls, .paramname { 34 | font-family:Consolas, Monaco, courier, sans-serif; 35 | font-size:105%; 36 | padding-right:20px; 37 | } 38 | 39 | /* ============================= */ 40 | /* HTML Heading Formattings */ 41 | /* ============================= */ 42 | h1, h2, h3, h4 { 43 | font-family:Lucida Grande, Verdana, Geneva, Arial, sans-serif; 44 | } 45 | 46 | h1 { 47 | font-size:25px; 48 | margin-bottom:10px; 49 | } 50 | 51 | h2 { 52 | color:#42657B; 53 | font-size:17px; 54 | } 55 | 56 | h3 { 57 | font-size:15px; 58 | } 59 | 60 | h4 { 61 | font-size:13px; 62 | } 63 | 64 | /* ============================= */ 65 | /* Code Snippet Formattings */ 66 | /* ============================= */ 67 | span.keyword { 68 | color:#008000; 69 | } 70 | 71 | span.keywordtype { 72 | color:#604020; 73 | } 74 | 75 | span.keywordflow { 76 | color:#e08000; 77 | } 78 | 79 | span.comment { 80 | color:#008000; 81 | } 82 | 83 | span.preprocessor { 84 | color:#806020; 85 | } 86 | 87 | span.stringliteral { 88 | color:#002080; 89 | } 90 | 91 | span.charliteral { 92 | color:#008080; 93 | } 94 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_AVR8) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | if (!(USB_Options & USB_OPT_MANUAL_PLL)) 44 | { 45 | USB_PLL_On(); 46 | while (!(USB_PLL_IsReady())); 47 | } 48 | 49 | USB_CLK_Unfreeze(); 50 | 51 | UDCON |= (1 << RMWKUP); 52 | while (UDCON & (1 << RMWKUP)); 53 | } 54 | 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/Events.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_EVENTS_C 32 | #define __INCLUDE_FROM_USB_DRIVER 33 | #include "Events.h" 34 | 35 | void USB_Event_Stub(void) 36 | { 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/UC3/Device_UC3.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_UC3) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | USB_CLK_Unfreeze(); 44 | 45 | AVR32_USBB.UDCON.rmwkup = true; 46 | while (AVR32_USBB.UDCON.rmwkup); 47 | } 48 | 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_DEVICE) 38 | 39 | #include "../Device.h" 40 | 41 | void USB_Device_SendRemoteWakeup(void) 42 | { 43 | USB.CTRLB |= USB_RWAKEUP_bm; 44 | } 45 | 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_HOST) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "../../../../Common/Common.h" 32 | #if (ARCH == ARCH_XMEGA) 33 | 34 | #define __INCLUDE_FROM_USB_DRIVER 35 | #include "../USBMode.h" 36 | 37 | #if defined(USB_CAN_BE_HOST) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USB_DRIVER 32 | #include "../USBMode.h" 33 | 34 | #if defined(USB_CAN_BE_HOST) 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/License.txt: -------------------------------------------------------------------------------- 1 | LUFA Library 2 | Copyright (C) Dean Camera, 2014. 3 | 4 | dean [at] fourwalledcubicle [dot] com 5 | www.lufa-lib.org 6 | 7 | 8 | Permission to use, copy, modify, and distribute this software 9 | and its documentation for any purpose is hereby granted without 10 | fee, provided that the above copyright notice appear in all 11 | copies and that both that the copyright notice and this 12 | permission notice and warranty disclaimer appear in supporting 13 | documentation, and that the name of the author not be used in 14 | advertising or publicity pertaining to distribution of the 15 | software without specific, written prior permission. 16 | 17 | The author disclaims all warranties with regard to this 18 | software, including all implied warranties of merchantability 19 | and fitness. In no event shall the author be liable for any 20 | special, indirect or consequential damages or any damages 21 | whatsoever resulting from loss of use, data or profits, whether 22 | in an action of contract, negligence or other tortious action, 23 | arising out of or in connection with the use or performance of 24 | this software. 25 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Platform/UC3/UC3ExperimentalInfo.txt: -------------------------------------------------------------------------------- 1 | Please note that the UC3 architecture support is EXPERIMENTAL at this time, and may be non-functional/incomplete in some areas. Please refer to the Known Issues section of the LUFA manual. -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Platform/XMEGA/XMEGAExperimentalInfo.txt: -------------------------------------------------------------------------------- 1 | Please note that the XMEGA architecture support is EXPERIMENTAL at this time, and may be non-functional/incomplete in some areas. Please refer to the Known Issues section of the LUFA manual. -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/Docbook/mshelp/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the Microsoft HV1 Docbook transform contents into this directory (i.e. with the XSLT files in the current folder). The HV1 transform proposal can be found at http://sourceforge.net/tracker/?func=detail&aid=3610290&group_id=21935&atid=373750 . 2 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/Docbook/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the Docbook XSLT docbook-xsl-1.78.1 release contents into this directory (i.e. with the root Docbook files in the current folder). The Docbook releases can be found at http://sourceforge.net/projects/docbook/files/docbook-xsl/ . 2 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/HV1/helpcontentsetup.msha: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | LUFA Help 12 | 13 | 14 |
15 | FourWalledCubicle 16 | LUFA 17 | LUFA Help 18 | en-us 19 |
20 |
21 |
22 | LUFA 23 | lufa_studio_help.mshc 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/HV1/lufa_helpcontentsetup_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | lufa_help_ 34 | 35 | .mshc 36 | 37 | 38 | lufa_help_ 39 | 40 | .mshc 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/HV1/lufa_hv1_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/HV1/lufa_studio_help_styling.css: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | .programlisting { 10 | display: block; 11 | margin-left: 15px; 12 | padding: 10px; 13 | background-color: #f4f4f4; 14 | border: 1px solid #aaaaaa; 15 | font-family: "Consolas", "Courier New", sans-serif; 16 | } 17 | 18 | code { 19 | background-color: #f4f4f4; 20 | font-family: "Consolas", "Courier New", sans-serif; 21 | } 22 | 23 | .note, .warning, .tip { 24 | display: block; 25 | margin-left: 15px; 26 | padding-left: 10px; 27 | padding-bottom: 5px; 28 | background-color: #f4f4f4; 29 | border: 1px solid #aaaaaa; 30 | } 31 | 32 | table { 33 | border: 1px solid #aaaaaa; 34 | border-collapse: collapse; 35 | margin-left: 15px; 36 | font-size: 10pt; 37 | } 38 | 39 | table thead { 40 | background-color: #f4f4f4; 41 | } 42 | 43 | table thead th { 44 | padding: 5px; 45 | } 46 | 47 | table tbody td { 48 | padding: 5px; 49 | } 50 | 51 | ul { 52 | padding-left: 20px; 53 | } 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/ProjectGenerator/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the ASF Project Generator into this directory (i.e. with the Python scripts in the current folder). The project generator can be extracted from the release versions of Atmel Studio's ASF extension. -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/LUFA.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/LUFA.dll -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/LUFA.pkgdef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/LUFA.pkgdef -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/[Content_Types].xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/asf-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | FourWalledCubicle 4 | LUFA 5 | Dean Camera 6 | 7 | True 8 | 9 | 10 | 11 | 0 12 | 13 | 14 | content.xml.cache 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LUFA Library 6 | Dean Camera 7 | 0 8 | http://www.lufa-lib.org 9 | LUFA, the Lightweight USB Framework for AVRs. 10 | 11 | License.txt 12 | LUFA_thumb.png 13 | LUFA.png 14 | 15 | 16 | AtmelStudio 17 | AtmelStudio 18 | 19 | 20 | 21 | 1033 22 | 23 | false 24 | 25 | 26 | 27 | 28 | 29 | LUFA.pkgdef 30 | helpcontentsetup.msha 31 | asf-manifest.xml 32 | 33 | 34 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/generate_caches.py: -------------------------------------------------------------------------------- 1 | """ 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2013. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | """ 8 | 9 | import sys 10 | sys.path.append("ProjectGenerator") 11 | 12 | 13 | def show_message(message): 14 | print("[Project Generator] %s" % message) 15 | sys.stdout.flush() 16 | 17 | 18 | def main(lufa_root_path): 19 | try: 20 | from asf_avrstudio5_interface import PythonFacade 21 | except ImportError: 22 | print("Fatal Error: The ASF project generator is missing.") 23 | return 1 24 | 25 | p = PythonFacade(lufa_root_path) 26 | 27 | show_message("Checking database sanity...") 28 | p.check_extension_database_sanity(lufa_root_path) 29 | 30 | show_message("Building cache files...") 31 | p.generate_extension_cache_files(lufa_root_path) 32 | 33 | show_message("Cache files created.") 34 | return 0 35 | 36 | 37 | if __name__ == "__main__": 38 | sys.exit(main(sys.argv[1])) 39 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/lufa_asfmanifest_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | . 31 | 32 | . 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/VSIX/lufa_vsmanifest_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | Sourced from 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/XDK/lufa_indent_transform.xslt: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_common.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_drivers_usb.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_drivers_usb_class.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_drivers_usb_core_xmega.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_platform_uc3.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/StudioIntegration/lufa_platform_xmega.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2014. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.lufa-lib.org 7 | */ 8 | 9 | /* 10 | Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaims all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * \brief LUFA library version constants. 34 | * 35 | * Version constants for informational purposes and version-specific macro creation. This header file contains the 36 | * current LUFA version number in several forms, for use in the user-application (for example, for printing out 37 | * whilst debugging, or for testing for version compatibility). 38 | */ 39 | 40 | #ifndef __LUFA_VERSION_H__ 41 | #define __LUFA_VERSION_H__ 42 | 43 | /* Public Interface - May be used in end-application: */ 44 | /* Macros: */ 45 | /** Indicates the version number of the library, as an integer. */ 46 | #define LUFA_VERSION_INTEGER 0x140928 47 | 48 | /** Indicates the version number of the library, as a string. */ 49 | #define LUFA_VERSION_STRING "140928" 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/LUFA-git/LUFA/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # LUFA Library 3 | # Copyright (C) Dean Camera, 2014. 4 | # 5 | # dean [at] fourwalledcubicle [dot] com 6 | # www.lufa-lib.org 7 | # 8 | # --------------------------------------- 9 | # Makefile for the LUFA library itself. 10 | # --------------------------------------- 11 | 12 | LUFA_VERSION_NUM = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2) 13 | EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin 14 | 15 | # Default target - no default action when attempting to build the core directly 16 | all: 17 | 18 | # Export the library core as a TAR archive for importing into an IDE 19 | export_tar: 20 | @echo Exporting LUFA library to a TAR archive... 21 | @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) * 22 | @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates 23 | @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete. 24 | 25 | # Display the LUFA version of this library copy 26 | version: 27 | @echo "LUFA $(LUFA_VERSION_NUM)" 28 | 29 | # Check if this is being included from a legacy or non LUFA build system makefile 30 | ifneq ($(LUFA_PATH),) 31 | LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/ 32 | 33 | include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk 34 | else 35 | LUFA_BUILD_MODULES += MASTER 36 | LUFA_BUILD_TARGETS += export_tar version 37 | 38 | LUFA_PATH = . 39 | ARCH = {AVR8,UC3,XMEGA} 40 | DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM) 41 | 42 | # Remove all object and associated files from the LUFA library core 43 | clean: 44 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o) 45 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d) 46 | rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst) 47 | 48 | include Build/lufa_core.mk 49 | include Build/lufa_sources.mk 50 | include Build/lufa_doxygen.mk 51 | endif 52 | 53 | .PHONY: all export_tar version clean 54 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/bluetooth.c: -------------------------------------------------------------------------------- 1 | /* 2 | Bluefruit Protocol for TMK firmware 3 | Author: Benjamin Gould, 2013 4 | Jack Humbert, 2015 5 | Based on code Copyright 2011 Jun Wako 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include 19 | #include "report.h" 20 | #include "print.h" 21 | #include "debug.h" 22 | #include "bluetooth.h" 23 | 24 | void bluefruit_keyboard_print_report(report_keyboard_t *report) 25 | { 26 | if (!debug_keyboard) return; 27 | dprintf("keys: "); for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { debug_hex8(report->keys[i]); dprintf(" "); } 28 | dprintf(" mods: "); debug_hex8(report->mods); 29 | dprintf(" reserved: "); debug_hex8(report->reserved); 30 | dprintf("\n"); 31 | } 32 | 33 | void bluefruit_serial_send(uint8_t data) 34 | { 35 | serial_send(data); 36 | } -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/protocol/lufa/ringbuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // A simple ringbuffer holding Size elements of type T 3 | template 4 | class RingBuffer { 5 | protected: 6 | T buf_[Size]; 7 | uint8_t head_{0}, tail_{0}; 8 | public: 9 | inline uint8_t nextPosition(uint8_t position) { 10 | return (position + 1) % Size; 11 | } 12 | 13 | inline uint8_t prevPosition(uint8_t position) { 14 | if (position == 0) { 15 | return Size - 1; 16 | } 17 | return position - 1; 18 | } 19 | 20 | inline bool enqueue(const T &item) { 21 | static_assert(Size > 1, "RingBuffer size must be > 1"); 22 | uint8_t next = nextPosition(head_); 23 | if (next == tail_) { 24 | // Full 25 | return false; 26 | } 27 | 28 | buf_[head_] = item; 29 | head_ = next; 30 | return true; 31 | } 32 | 33 | inline bool get(T &dest, bool commit = true) { 34 | auto tail = tail_; 35 | if (tail == head_) { 36 | // No more data 37 | return false; 38 | } 39 | 40 | dest = buf_[tail]; 41 | tail = nextPosition(tail); 42 | 43 | if (commit) { 44 | tail_ = tail; 45 | } 46 | return true; 47 | } 48 | 49 | inline bool empty() const { return head_ == tail_; } 50 | 51 | inline uint8_t size() const { 52 | int diff = head_ - tail_; 53 | if (diff >= 0) { 54 | return diff; 55 | } 56 | return Size + diff; 57 | } 58 | 59 | inline T& front() { 60 | return buf_[tail_]; 61 | } 62 | 63 | inline bool peek(T &item) { 64 | return get(item, false); 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /server/qmk_firmware/tmk_core/ring_buffer.h: -------------------------------------------------------------------------------- 1 | #ifndef RING_BUFFER_H 2 | #define RING_BUFFER_H 3 | /*-------------------------------------------------------------------- 4 | * Ring buffer to store scan codes from keyboard 5 | *------------------------------------------------------------------*/ 6 | #define RBUF_SIZE 32 7 | #include 8 | static uint8_t rbuf[RBUF_SIZE]; 9 | static uint8_t rbuf_head = 0; 10 | static uint8_t rbuf_tail = 0; 11 | static inline void rbuf_enqueue(uint8_t data) 12 | { 13 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { 14 | uint8_t next = (rbuf_head + 1) % RBUF_SIZE; 15 | if (next != rbuf_tail) { 16 | rbuf[rbuf_head] = data; 17 | rbuf_head = next; 18 | } else { 19 | print("rbuf: full\n"); 20 | } 21 | } 22 | } 23 | static inline uint8_t rbuf_dequeue(void) 24 | { 25 | uint8_t val = 0; 26 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { 27 | 28 | if (rbuf_head != rbuf_tail) { 29 | val = rbuf[rbuf_tail]; 30 | rbuf_tail = (rbuf_tail + 1) % RBUF_SIZE; 31 | } 32 | } 33 | 34 | return val; 35 | } 36 | static inline bool rbuf_has_data(void) 37 | { 38 | bool has_data; 39 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { 40 | has_data = (rbuf_head != rbuf_tail); 41 | } 42 | return has_data; 43 | } 44 | static inline void rbuf_clear(void) 45 | { 46 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { 47 | rbuf_head = rbuf_tail = 0; 48 | } 49 | } 50 | 51 | #endif /* RING_BUFFER_H */ 52 | -------------------------------------------------------------------------------- /src/const/presets.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'gh60-ansi': 'GH60 (ANSI)', 3 | 'gh60satan-ansi': 'GH60 Satan (ANSI)', 4 | 'alps64-aek': 'Alps64 (AEK)', 5 | 'minivan-std': 'MiniVan (Standard)', 6 | 'minivan-arrow': 'MiniVan (Arrow)', 7 | '1up-rgb-custom-pcb-full-map': '1Up RGB Custom PCB (Full)', 8 | '1up-rgb-custom-pcb-standard-map': '1Up RGB Custom PCB (Standard)', 9 | '1up-rgb-hse-standard': '1Up RGB HSE PCB (Standard)', 10 | '1up-sweet16': '1Up Sweet16', 11 | 's60x-rgb-ansi': 'S60-X RGB (ANSI)', 12 | 's60x-rgb-iso': 'S60-X RGB (ISO)', 13 | 's60x-rgb-generic': 'S60-X RGB (Generic)', 14 | 'planck': 'Planck', 15 | 'jd45-default': 'JD45', 16 | 'bantam-pcb': 'Bantam44 (PCB)', 17 | 'alps44': 'Alps44', 18 | 'miuni32-rgb-standard': 'Miuni32 RGB (Standard)', 19 | 'treasure-type9-default': 'Treasure Macropad Type-9', 20 | 'zlant-default': 'Zlant' 21 | }; 22 | -------------------------------------------------------------------------------- /src/files/generators/config.h.js: -------------------------------------------------------------------------------- 1 | const Generator = require('./index'); 2 | 3 | const C = require('const'); 4 | 5 | class ConfigH extends Generator { 6 | 7 | loadTemplate() { return require('./templates/config.h'); } 8 | 9 | fillTemplate() { 10 | const keyboard = this.keyboard; 11 | 12 | return { 13 | 'rows': keyboard.rows, 14 | 'cols': keyboard.cols, 15 | 'row_pins': keyboard.pins.row.join(', '), 16 | 'col_pins': keyboard.pins.col.join(', '), 17 | 'diode_direction': (keyboard.settings.diodeDirection === C.DIODE_COL2ROW ? 'COL2ROW' : 'ROW2COL'), 18 | 'backlight_levels': keyboard.settings.backlightLevels, 19 | 'backlight_pin': keyboard.pins.led ? '#define BACKLIGHT_PIN ' + keyboard.pins.led : '', 20 | 'rgb_pin': keyboard.pins.rgb ? '#define RGB_DI_PIN ' + keyboard.pins.rgb : '', 21 | 'num_rgb': keyboard.settings.rgbNum 22 | }; 23 | } 24 | 25 | } 26 | 27 | module.exports = ConfigH; 28 | -------------------------------------------------------------------------------- /src/files/generators/index.js: -------------------------------------------------------------------------------- 1 | class Generator { 2 | 3 | constructor(keyboard) { 4 | this.template = this.loadTemplate(); 5 | this.keyboard = keyboard; 6 | } 7 | 8 | /* 9 | * Generate a file. 10 | */ 11 | generate() { 12 | // Get the fields. 13 | const fields = this.fillTemplate(); 14 | 15 | let result = this.template; 16 | for (const field in fields) { 17 | // Do a search and replace. 18 | result = result.replace(new RegExp('%' + field + '%', 'g'), fields[field]); 19 | } 20 | 21 | // Return the result. 22 | return result; 23 | } 24 | 25 | } 26 | 27 | module.exports = Generator; 28 | -------------------------------------------------------------------------------- /src/files/generators/rules.mk.js: -------------------------------------------------------------------------------- 1 | const Generator = require('./index'); 2 | 3 | const C = require('const'); 4 | 5 | class RulesMK extends Generator { 6 | 7 | loadTemplate() { return require('./templates/rules.mk'); } 8 | 9 | fillTemplate() { 10 | const keyboard = this.keyboard; 11 | 12 | let mcu; 13 | switch (keyboard.controller) { 14 | case C.CONTROLLER_ATMEGA32U2: mcu = 'atmega32u2'; break; 15 | case C.CONTROLLER_ATMEGA32U4: mcu = 'atmega32u4'; break; 16 | case C.CONTROLLER_AT90USB1286: mcu = 'at90usb1286'; break; 17 | } 18 | 19 | let bootloaderSize; 20 | switch (keyboard.settings.bootloaderSize) { 21 | case C.BOOTLOADER_512: bootloaderSize = '512'; break; 22 | case C.BOOTLOADER_2048: bootloaderSize = '2048'; break; 23 | case C.BOOTLOADER_4096: bootloaderSize = '4096'; break; 24 | case C.BOOTLOADER_8192: bootloaderSize = '8192'; break; 25 | } 26 | 27 | return { 28 | 'mcu': mcu, 29 | 'bootloader_size': bootloaderSize, 30 | 'use_backlight': keyboard.pins.led ? 'yes' : 'no', 31 | 'use_rgb': keyboard.pins.rgb ? 'yes' : 'no' 32 | }; 33 | } 34 | 35 | } 36 | 37 | module.exports = RulesMK; 38 | -------------------------------------------------------------------------------- /src/files/generators/templates/config.h.js: -------------------------------------------------------------------------------- 1 | module.exports = ` 2 | 3 | #ifndef CONFIG_H 4 | #define CONFIG_H 5 | 6 | #include "config_common.h" 7 | 8 | /* USB Device descriptor parameter */ 9 | #define VENDOR_ID 0xFEED 10 | #define PRODUCT_ID 0x6060 11 | #define DEVICE_VER 0x0001 12 | #define MANUFACTURER qmkbuilder 13 | #define PRODUCT keyboard 14 | #define DESCRIPTION Keyboard 15 | 16 | /* key matrix size */ 17 | #define MATRIX_ROWS %rows% 18 | #define MATRIX_COLS %cols% 19 | 20 | /* key matrix pins */ 21 | #define MATRIX_ROW_PINS { %row_pins% } 22 | #define MATRIX_COL_PINS { %col_pins% } 23 | #define UNUSED_PINS 24 | 25 | /* COL2ROW or ROW2COL */ 26 | #define DIODE_DIRECTION %diode_direction% 27 | 28 | /* number of backlight levels */ 29 | %backlight_pin% 30 | #ifdef BACKLIGHT_PIN 31 | #define BACKLIGHT_LEVELS %backlight_levels% 32 | #endif 33 | 34 | /* Set 0 if debouncing isn't needed */ 35 | #define DEBOUNCING_DELAY 5 36 | 37 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 38 | #define LOCKING_SUPPORT_ENABLE 39 | 40 | /* Locking resynchronize hack */ 41 | #define LOCKING_RESYNC_ENABLE 42 | 43 | /* key combination for command */ 44 | #define IS_COMMAND() ( \\ 45 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \\ 46 | ) 47 | 48 | /* prevent stuck modifiers */ 49 | #define PREVENT_STUCK_MODIFIERS 50 | 51 | %rgb_pin% 52 | #ifdef RGB_DI_PIN 53 | #define RGBLIGHT_ANIMATIONS 54 | #define RGBLED_NUM %num_rgb% 55 | #define RGBLIGHT_HUE_STEP 8 56 | #define RGBLIGHT_SAT_STEP 8 57 | #define RGBLIGHT_VAL_STEP 8 58 | #endif 59 | 60 | #endif 61 | 62 | `.trim(); 63 | -------------------------------------------------------------------------------- /src/files/generators/templates/kb.h.js: -------------------------------------------------------------------------------- 1 | module.exports = ` 2 | 3 | #ifndef KB_H 4 | #define KB_H 5 | 6 | #include "quantum.h" 7 | 8 | #define KEYMAP( \\ 9 | %keymap_1% 10 | ) { \\ 11 | %keymap_2% 12 | } 13 | 14 | #endif 15 | 16 | `.trim(); 17 | -------------------------------------------------------------------------------- /src/files/generators/templates/keymap.c.js: -------------------------------------------------------------------------------- 1 | module.exports = ` 2 | 3 | #include "kb.h" 4 | 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 6 | 7 | %keymaps% 8 | 9 | }; 10 | 11 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { 12 | keyevent_t event = record->event; 13 | 14 | switch (id) { 15 | %macros% 16 | } 17 | return MACRO_NONE; 18 | } 19 | 20 | %quantum% 21 | 22 | void led_set_user(uint8_t usb_led) { 23 | 24 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { 25 | %led_on_num% 26 | } else { 27 | %led_off_num% 28 | } 29 | 30 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { 31 | %led_on_caps% 32 | } else { 33 | %led_off_caps% 34 | } 35 | 36 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { 37 | %led_on_scroll% 38 | } else { 39 | %led_off_scroll% 40 | } 41 | 42 | if (usb_led & (1 << USB_LED_COMPOSE)) { 43 | %led_on_compose% 44 | } else { 45 | %led_off_compose% 46 | } 47 | 48 | if (usb_led & (1 << USB_LED_KANA)) { 49 | %led_on_kana% 50 | } else { 51 | %led_off_kana% 52 | } 53 | 54 | } 55 | 56 | `.trim(); 57 | -------------------------------------------------------------------------------- /src/files/index.js: -------------------------------------------------------------------------------- 1 | const RulesMKGenerator = require('./generators/rules.mk'); 2 | const ConfigHGenerator = require('./generators/config.h'); 3 | const KbHGenerator = require('./generators/kb.h'); 4 | const KeymapCGenerator = require('./generators/keymap.c'); 5 | 6 | class Files { 7 | 8 | /* 9 | * Generate the set of source files given a Keyboard. 10 | * 11 | * @param {Keyboard} keyboard The keyboard to generate files from. 12 | * 13 | * @return {Object} The generated source files. 14 | */ 15 | static generate(keyboard) { 16 | return { 17 | 'qmk_firmware/keyboards/kb/rules.mk': new RulesMKGenerator(keyboard).generate(), 18 | 'qmk_firmware/keyboards/kb/config.h': new ConfigHGenerator(keyboard).generate(), 19 | 'qmk_firmware/keyboards/kb/kb.h': new KbHGenerator(keyboard).generate(), 20 | 'qmk_firmware/keyboards/kb/keymaps/default/keymap.c': new KeymapCGenerator(keyboard).generate() 21 | }; 22 | } 23 | 24 | } 25 | 26 | module.exports = Files; 27 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | const ReactDOM = require('react-dom'); 3 | 4 | const Index = require('main/index'); 5 | 6 | ReactDOM.render( 7 | , 8 | document.getElementById('content') 9 | ); 10 | -------------------------------------------------------------------------------- /src/main/editor.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Display = require('ui/display'); 4 | const Panes = require('ui/panes'); 5 | 6 | class Editor extends React.Component { 7 | 8 | constructor(props) { 9 | super(props); 10 | 11 | // Initialize notification for leaving page. 12 | window.onbeforeunload = () => { 13 | return 'Are you sure you want to leave the page? You may have unsaved changes.'; 14 | }; 15 | } 16 | 17 | render() { 18 | return
19 | 21 | 23 |
; 24 | } 25 | 26 | } 27 | 28 | module.exports = Editor; 29 | -------------------------------------------------------------------------------- /src/main/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Main = require('main/main'); 4 | const Editor = require('main/editor'); 5 | 6 | const State = require('state'); 7 | 8 | const C = require('const'); 9 | 10 | class Index extends React.Component { 11 | 12 | constructor(props) { 13 | super(props); 14 | 15 | this.state = new State(this); 16 | } 17 | 18 | render() { 19 | // Assign the current screen. 20 | let Screen; 21 | if (this.state.screen === C.SCREEN_MAIN) { 22 | Screen = Main; 23 | } else { 24 | Screen = Editor; 25 | } 26 | 27 | return
28 |
29 | Keyboard Firmware Builder 30 |
31 | 33 |
; 34 | } 35 | 36 | } 37 | 38 | module.exports = Index; 39 | -------------------------------------------------------------------------------- /src/state/index.js: -------------------------------------------------------------------------------- 1 | const UI = require('./ui'); 2 | 3 | const C = require('const'); 4 | 5 | class State { 6 | 7 | constructor(app) { 8 | this.app = app; 9 | 10 | // State fields. 11 | this.ui = new UI(this); // UI state handler. 12 | 13 | this.screen = C.SCREEN_MAIN; // The current screen. 14 | this.keyboard = null; // The current keyboard layout. 15 | 16 | // Bind methods. 17 | this.update = this.update.bind(this); 18 | this.error = this.error.bind(this); 19 | this.message = this.message.bind(this); 20 | } 21 | 22 | /* 23 | * Update the state. 24 | */ 25 | update(t) { 26 | if (t) Object.assign(this, t); 27 | this.app.setState(this); 28 | } 29 | 30 | /* 31 | * Display an error. 32 | * 33 | * @param {String} msg The error message to display. 34 | */ 35 | error(msg) { 36 | alert(msg); 37 | } 38 | 39 | /* 40 | * Display a message. 41 | * 42 | * @param {String} msg The message to display. 43 | */ 44 | message(msg) { 45 | alert(msg); 46 | } 47 | 48 | } 49 | 50 | module.exports = State; 51 | -------------------------------------------------------------------------------- /src/state/ui.js: -------------------------------------------------------------------------------- 1 | class UI { 2 | 3 | constructor(state) { 4 | this.state = state; 5 | 6 | this.fields = {}; // All UI fields and their values. 7 | } 8 | 9 | /* 10 | * Get the value of a field. 11 | * 12 | * @param {String} field The name of the field. 13 | * @param {String} def The default value of the field. 14 | */ 15 | get(field, def) { 16 | if (field in this.fields) return this.fields[field]; // Return the value if it exists. 17 | 18 | this.fields[field] = def; // Otherwise, set the value and return it. 19 | return def; 20 | } 21 | 22 | /* 23 | * Create a function for setting the value of a field. 24 | * 25 | * @param {String} field The name of the field. 26 | * @param {Object} value The value if it is to be set immediately. 27 | */ 28 | set(field, value) { 29 | if (value !== undefined) { 30 | // Set the value immediately. 31 | this.fields[field] = value; 32 | this.state.update(); 33 | 34 | return; 35 | } 36 | 37 | return (evt) => { 38 | this.fields[field] = evt.target.value; 39 | this.state.update(); 40 | }; 41 | } 42 | 43 | } 44 | 45 | module.exports = UI; 46 | -------------------------------------------------------------------------------- /src/ui/display/key.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | const classNames = require('classnames'); 3 | 4 | const C = require('const'); 5 | 6 | class Key extends React.Component { 7 | 8 | render() { 9 | const state = this.props.state; 10 | const data = this.props.data; 11 | const flipped = state.ui.get('display-flip', false); 12 | 13 | const keySize = state.ui.get('keySize', C.KEY_SIZE); 14 | 15 | const className = classNames( 16 | 'display-key', 17 | { 18 | 'select1': data.selected == 1, 19 | 'select2': data.selected == 2 20 | } 21 | ); 22 | 23 | const style = { 24 | top: data.pos.y * keySize, 25 | left: (flipped ? state.keyboard.bounds.max.x - data.pos.x - data.size.w : data.pos.x) * keySize, 26 | }; 27 | 28 | // Only apply rotation if needed. 29 | if (data.angle != 0) { 30 | const rotateString = 'rotate(' + data.angle + 'deg)'; 31 | style.WebkitTransform = rotateString; 32 | style.MozTransform = rotateString; 33 | style.msTransform = rotateString; 34 | style.transform = rotateString; 35 | } 36 | 37 | const block1Style = { 38 | width: data.size.w * keySize, 39 | height: data.size.h * keySize 40 | }; 41 | const block2Style = { 42 | width: data.size2.w * keySize, 43 | height: data.size2.h * keySize, 44 | top: data.offset.y * keySize, 45 | left: (flipped ? data.size.w - data.size2.w - data.offset.x : data.offset.x) * keySize 46 | }; 47 | 48 | return
54 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
; 67 | } 68 | 69 | } 70 | 71 | module.exports = Key; 72 | -------------------------------------------------------------------------------- /src/ui/display/keymap/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const C = require('const'); 4 | 5 | class Keymap extends React.Component { 6 | 7 | render() { 8 | const state = this.props.state; 9 | const keyboard = state.keyboard; 10 | const flipped = state.ui.get('display-flip', false); 11 | 12 | const keySize = state.ui.get('keySize', C.KEY_SIZE); 13 | 14 | const layer = state.ui.get('keymap-layer', 0); 15 | 16 | // Create a list of keycode boxes. 17 | const keys = keyboard.keys.map((key, index) => { 18 | const style = { 19 | top: key.pos.y * keySize, 20 | left: (flipped ? state.keyboard.bounds.max.x - key.pos.x - key.size.w : key.pos.x) * keySize, 21 | }; 22 | 23 | // Only apply rotation if needed. 24 | if (key.angle != 0) { 25 | const rotateString = 'rotate(' + key.angle + 'deg)'; 26 | style.WebkitTransform = rotateString; 27 | style.MozTransform = rotateString; 28 | style.msTransform = rotateString; 29 | style.transform = rotateString; 30 | } 31 | 32 | const blockStyle = { 33 | width: key.size.w * keySize - 20, 34 | height: key.size.h * keySize - 12, 35 | lineHeight: key.size.h * keySize - 9 + 'px' 36 | }; 37 | 38 | return
42 |
45 | { key.keycodes[layer].getName() } 46 |
47 |
; 48 | }); 49 | 50 | return
51 | { keys } 52 |
; 53 | } 54 | 55 | } 56 | 57 | module.exports = Keymap; 58 | -------------------------------------------------------------------------------- /src/ui/display/wiring/wire.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | const classNames = require('classnames'); 3 | 4 | const C = require('const'); 5 | 6 | class Wire extends React.Component { 7 | 8 | render() { 9 | const state = this.props.state; 10 | const flipped = state.ui.get('display-flip', false); 11 | 12 | const p1 = Object.assign({}, this.props.p1); 13 | const p2 = Object.assign({}, this.props.p2); 14 | if (flipped) { 15 | p1.x = state.keyboard.bounds.max.x - p1.x; 16 | p2.x = state.keyboard.bounds.max.x - p2.x; 17 | } 18 | 19 | const keySize = state.ui.get('keySize', C.KEY_SIZE); 20 | 21 | const className = classNames( 22 | 'display-wire', 23 | { 24 | 'display-wire-row': this.props.row, 25 | 'display-wire-col': this.props.col 26 | }); 27 | 28 | // Calculate the angle and length. 29 | const angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI; 30 | const length = Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); 31 | 32 | const rotateString = 'rotate(' + angle + 'deg)'; 33 | const style = { 34 | top: p1.y * keySize, 35 | left: p1.x * keySize, 36 | width: length * keySize, 37 | 38 | WebkitTransform: rotateString, 39 | MozTransform: rotateString, 40 | msTransform: rotateString, 41 | transform: rotateString 42 | }; 43 | 44 | return
; 47 | } 48 | 49 | } 50 | 51 | module.exports = Wire; 52 | -------------------------------------------------------------------------------- /src/ui/elements/help/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | class Help extends React.Component { 4 | 5 | render() { 6 | return
7 |
8 | 9 |
10 |
11 | { this.props.children } 12 |
13 |
; 14 | } 15 | 16 | } 17 | 18 | module.exports = Help; 19 | -------------------------------------------------------------------------------- /src/ui/elements/numberbox/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | class NumberBox extends React.Component { 4 | 5 | constructor(props) { 6 | super(props); 7 | 8 | // Bind functions. 9 | this.onChange = this.onChange.bind(this); 10 | this.changeValue = this.changeValue.bind(this); 11 | } 12 | 13 | /* 14 | * Called when the value of the input changes. 15 | * 16 | * @param {Event} e The event triggered. 17 | */ 18 | onChange(e) { 19 | const target = e.target; 20 | let value = target.value.trim(); 21 | 22 | // Change the value. 23 | if (value === '') value = 0; // Blank is zero. 24 | this.changeValue(parseInt(value)); 25 | } 26 | 27 | /* 28 | * Called to change the value to a certain value. 29 | * 30 | * @param {Number} value The value to change to. 31 | */ 32 | changeValue(value) { 33 | // Make sure there is a function we can call. 34 | if (!this.props.onChange) return; 35 | 36 | // Make sure the vlue is a number. 37 | if (isNaN(value)) return; 38 | 39 | // Check if the value is within limits. 40 | if (this.props.min && value < parseInt(this.props.min)) value = parseInt(this.props.min); 41 | if (this.props.max && value > parseInt(this.props.max)) value = parseInt(this.props.max); 42 | 43 | // Change the value. 44 | this.props.onChange(value); 45 | } 46 | 47 | render() { 48 | return
49 | 54 | 59 | 64 |
; 65 | } 66 | 67 | } 68 | 69 | module.exports = NumberBox; 70 | -------------------------------------------------------------------------------- /src/ui/elements/toggle/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | class Toggle extends React.Component { 4 | 5 | render() { 6 | return
(this.props.onChange && this.props.onChange(!this.props.value)) }> 9 | { this.props.children } 10 |
; 11 | } 12 | 13 | } 14 | 15 | module.exports = Toggle; 16 | -------------------------------------------------------------------------------- /src/ui/panes/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Tabs = require('./tabs'); 4 | const Wiring = require('./wiring'); 5 | const Pins = require('./pins'); 6 | const Keymap = require('./keymap'); 7 | const Macros = require('./macros'); 8 | const Quantum = require('./quantum'); 9 | const Settings = require('./settings'); 10 | const Compile = require('./compile'); 11 | 12 | const C = require('const'); 13 | 14 | class Panes extends React.Component { 15 | 16 | render() { 17 | const state = this.props.state; 18 | 19 | return
20 |
21 | 23 |
24 | { state.screen === C.SCREEN_WIRING && } 25 | { state.screen === C.SCREEN_PINS && } 26 | { state.screen === C.SCREEN_KEYMAP && } 27 | { state.screen === C.SCREEN_MACROS && } 28 | { state.screen === C.SCREEN_QUANTUM && } 29 | { state.screen === C.SCREEN_SETTINGS && } 30 | { state.screen === C.SCREEN_COMPILE && } 31 |
32 |
33 |
; 34 | } 35 | 36 | } 37 | 38 | module.exports = Panes; 39 | -------------------------------------------------------------------------------- /src/ui/panes/keymap/configure/mods/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Toggle = require('ui/elements/toggle'); 4 | 5 | class Mods extends React.Component { 6 | 7 | render() { 8 | const mods = this.props.mods; 9 | 10 | return
11 |   Mods    12 | (this.props.onChange && this.props.onChange(v ? (mods | 0b000001) : (mods & ~0b000001))) }> 15 | CTRL 16 | 17 | (this.props.onChange && this.props.onChange(v ? (mods | 0b000010) : (mods & ~0b000010))) }> 20 | SHIFT 21 | 22 | (this.props.onChange && this.props.onChange(v ? (mods | 0b000100) : (mods & ~0b000100))) }> 25 | ALT 26 | 27 | (this.props.onChange && this.props.onChange(v ? (mods | 0b001000) : (mods & ~0b001000))) }> 30 | GUI 31 | 32 | (this.props.onChange && this.props.onChange(v ? (mods | 0b010000) : (mods & ~0b010000))) }> 35 | HYPER 36 | 37 | (this.props.onChange && this.props.onChange(v ? (mods | 0b100000) : (mods & ~0b100000))) }> 40 | MEH 41 | 42 |
; 43 | } 44 | 45 | } 46 | 47 | module.exports = Mods; 48 | -------------------------------------------------------------------------------- /src/ui/panes/keymap/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const NumberBox = require('ui/elements/numberbox'); 4 | 5 | const Configure = require('./configure'); 6 | 7 | const C = require('const'); 8 | 9 | class Keymap extends React.Component { 10 | 11 | render() { 12 | const state = this.props.state; 13 | const keyboard = state.keyboard; 14 | const selected = keyboard.selected; 15 | 16 | const layer = state.ui.get('keymap-layer', 0); 17 | 18 | return
19 | Select a layer to modify. 20 |
21 | state.ui.set('keymap-layer', v) }/> 29 |
30 | Configure the selected key. 31 |
32 | {(() => { 33 | if (selected) { 34 | return
35 |
36 | { selected.keycodes[layer] = code; keyboard.verify(); state.update(); } } 39 | key={ selected.id }/> 40 |
41 |

42 | Read the QMK Docs for an explanation of all the keycodes. 43 |
; 44 | } else { 45 | return
No key selected
; 46 | } 47 | })()} 48 |
; 49 | } 50 | 51 | } 52 | 53 | module.exports = Keymap; 54 | -------------------------------------------------------------------------------- /src/ui/panes/macros/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Editor = require('./editor'); 4 | 5 | const NumberBox = require('ui/elements/numberbox'); 6 | 7 | const C = require('const'); 8 | 9 | class Macros extends React.Component { 10 | 11 | render() { 12 | const state = this.props.state; 13 | const keyboard = state.keyboard; 14 | 15 | const current = state.ui.get('macros-current', 0); 16 | 17 | return
18 | Select a macro to modify. 19 |
20 | state.ui.set('macros-current', v) }/> 27 |
28 | Edit the macro. 29 |
30 | 33 |
; 34 | } 35 | 36 | } 37 | 38 | module.exports = Macros; 39 | -------------------------------------------------------------------------------- /src/ui/panes/pins/chooser.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const C = require('const'); 4 | 5 | class Chooser extends React.Component { 6 | 7 | render() { 8 | const state = this.props.state; 9 | const keyboard = state.keyboard; 10 | 11 | const pin = this.props.pin || 'N/A'; 12 | 13 | // Get list of available pins. 14 | const pins = this.props.backlight ? ['B5', 'B6', 'B7'] : C.PINS[keyboard.controller].slice(); // B5, B6, and B7 on backlight. 15 | 16 | // Allow for no pin if set. 17 | if (this.props.noPin) pins.splice(0, 0, null); 18 | 19 | return ; 24 | } 25 | 26 | } 27 | 28 | module.exports = Chooser; 29 | -------------------------------------------------------------------------------- /src/ui/panes/quantum/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const CodeMirror = require('react-codemirror'); 4 | require('codemirror/mode/clike/clike'); 5 | 6 | const C = require('const'); 7 | 8 | class Quantum extends React.Component { 9 | 10 | render() { 11 | const state = this.props.state; 12 | const keyboard = state.keyboard; 13 | 14 | return
15 | Do not touch this unless you know what you're doing! 16 |
17 | Edit custom Quantum functions. 18 |
19 | 24 |
25 |
26 | { keyboard.quantum = v; state.update(); } } 29 | options={{ 30 | mode: 'text/x-c', 31 | lineNumbers: true, 32 | indentUnit: 4, 33 | indentWithTabs: true 34 | }}/> 35 |
36 |
; 37 | } 38 | 39 | } 40 | 41 | module.exports = Quantum; 42 | -------------------------------------------------------------------------------- /src/ui/panes/tabs/index.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | 3 | const Tab = require('./tab'); 4 | 5 | const C = require('const'); 6 | 7 | class Tabs extends React.Component { 8 | 9 | constructor(props) { 10 | super(props); 11 | 12 | // Bind functions. 13 | this.switchTab = this.switchTab.bind(this); 14 | } 15 | 16 | /* 17 | * Generate a function for switching tabs. 18 | * 19 | * @param {Number} screen The screen to switch to. 20 | * 21 | * @return {Function} A function used to switch to the specified screen. 22 | */ 23 | switchTab(screen) { 24 | const state = this.props.state; 25 | 26 | return () => { 27 | // Deselect. 28 | state.keyboard.deselect(); 29 | 30 | state.update({ 31 | screen: screen 32 | }); 33 | }; 34 | } 35 | 36 | render() { 37 | const state = this.props.state; 38 | const screen = state.screen; 39 | 40 | return
41 | 44 | Wiring 45 | 46 | 49 | Pins 50 | 51 | 54 | Keymap 55 | 56 | 59 | Macros 60 | 61 | 64 | Quantum 65 | 66 | 69 | Settings 70 | 71 | 74 | Compile 75 | 76 |
; 77 | } 78 | 79 | } 80 | 81 | module.exports = Tabs; 82 | -------------------------------------------------------------------------------- /src/ui/panes/tabs/tab.js: -------------------------------------------------------------------------------- 1 | const React = require('react'); 2 | const classNames = require('classnames'); 3 | 4 | class Tab extends React.Component { 5 | 6 | render() { 7 | const className = classNames( 8 | 'panes-tab', 9 | { 10 | 'selected': this.props.selected 11 | }); 12 | 13 | return
16 | { this.props.children } 17 |
; 18 | } 19 | 20 | } 21 | 22 | module.exports = Tab; 23 | -------------------------------------------------------------------------------- /static/files/firmware.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/files/firmware.zip -------------------------------------------------------------------------------- /static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /static/images/dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/images/dropdown.png -------------------------------------------------------------------------------- /static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruiqimao/qmkbuilder/7645318a4328de839b95a7c2355e9686cba9718f/static/images/favicon.png --------------------------------------------------------------------------------