Skip to content

Commit

Permalink
Merge branch 'master' into messingabout
Browse files Browse the repository at this point in the history
* master: (56 commits)
  Keyboard: Initial i75 port (qmk#4553)
  Keyboard: Fixes for superseded audio and default layer functionality (qmk#4557)
  Changed location of mouse 3, and arrow keys (qmk#4556)
  Re-order feature list in sidebar (qmk#4555)
  Keyboard: Refactor lets split to use split common code (qmk#4536)
  Keyboard: Updated sixshooter keyboard to move LED macros into the default keymap. (qmk#4428)
  Keymap: Preonic kuatsure updates 2018-Nov (qmk#4500)
  Keyboard: Add dz60 tsangan hhkb (qmk#4529)
  Only try to read the report ID from SetReport when the keyboard is part of the shared EP
  Keymap: Wanleg layout updates (qmk#4550)
  Keyboard: Initial nori port (qmk#4542)
  Major revisions, focused on streamlining and useability (qmk#4554)
  Keymap: Hacker Dvorak (qmk#4514)
  Keyboard: Add new keyboard "Sol" from RGBKB (qmk#4497)
  Rework drashna userspace to be more modular (qmk#4544)
  Invalid JSON (qmk#4547)
  Keymap: Ergodox EZ: Clean Up Keymap Array Alignment (qmk#4545)
  adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (qmk#4462)
  Keymap: adding my keymap primarily to iris (qmk#4541)
  Keymap: Fixed include statement in my Let's Split keymap. (qmk#4543)
  ...
  • Loading branch information
WarmCatUK committed Dec 5, 2018
2 parents d5e1ab7 + 368de26 commit 22413b0
Show file tree
Hide file tree
Showing 350 changed files with 17,367 additions and 2,406 deletions.
9 changes: 9 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
OPT_DEFS += -DENCODER_ENABLE
endif

ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
COMMON_VPATH += $(DRIVER_PATH)/haptic
SRC += DRV2605L.c
SRC += i2c_master.c
OPT_DEFS += -DDRV2605L
endif

ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += drivers/avr/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
Expand All @@ -240,6 +247,8 @@ ifeq ($(strip $(LEADER_ENABLE)), yes)
OPT_DEFS += -DLEADER_ENABLE
endif

include $(DRIVER_PATH)/qwiic/qwiic.mk

QUANTUM_SRC:= \
$(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \
Expand Down
4 changes: 4 additions & 0 deletions docs/LANGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Languages

* [English](/)
* [Chinese](zh/)
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

* [Features](features.md)
* [Basic Keycodes](keycodes_basic.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
* [Quantum Keycodes](quantum_keycodes.md)
* [Advanced Keycodes](feature_advanced_keycodes.md)
* [Audio](feature_audio.md)
Expand Down Expand Up @@ -74,7 +75,6 @@
* [Thermal Printer](feature_thermal_printer.md)
* [Unicode](feature_unicode.md)
* [Userspace](feature_userspace.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)

* For Makers and Modders
* [Hand Wiring Guide](hand_wire.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

* [Features](features.md)
* [Basic Keycodes](keycodes_basic.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
* [Quantum Keycodes](quantum_keycodes.md)
* [Advanced Keycodes](feature_advanced_keycodes.md)
* [Audio](feature_audio.md)
Expand Down Expand Up @@ -74,7 +75,6 @@
* [Thermal Printer](feature_thermal_printer.md)
* [Unicode](feature_unicode.md)
* [Userspace](feature_userspace.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)

* For Makers and Modders
* [Hand Wiring Guide](hand_wire.md)
Expand Down
17 changes: 0 additions & 17 deletions docs/faq_keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,3 @@ here real_mods lost state for 'physical left shift'.

weak_mods is ORed with real_mods when keyboard report is sent.
https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57

## Timer Functionality

It's possible to start timers and read values for time-specific events - here's an example:

```c
static uint16_t key_timer;
key_timer = timer_read();

if (timer_elapsed(key_timer) < 100) {
// do something if less than 100ms have passed
} else {
// do something if 100ms or more have passed
}
```

It's best to declare the `static uint16_t key_timer;` at the top of the file, outside of any code blocks you're using it in.
7 changes: 7 additions & 0 deletions docs/feature_audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ The available keycodes for audio are:
* `AU_OFF` - Turn audio mode off
* `AU_TOG` - Toggle audio mode

## ARM Audio Volume

For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `DAC_SAMPLE_MAX` in your `config.h`:

```c
#define DAC_SAMPLE_MAX 65535U
```
## Music Mode
Expand Down
2 changes: 0 additions & 2 deletions docs/feature_rgblight.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ Changing the **Value** sets the overall brightness.
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |

?> For backwards compatibility, `RGB_SMOD` is another alias of `RGB_MOD`.

## Configuration

Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_unicode.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Make sure that the order for both matches.

## UCIS_ENABLE

Supports Unicode up to 0xFFFFFFFF. As with `UNICODE_MAP`, you may want to main a mapping table in your keymap file. However, there is no keycodes for this feature, you will have to add a keycode or function to call `qk_ucis_start()`. Once you've run that, you can just type the text for your unicode, and then hit space or enter to complete it, or ESC to cancel it. And if it matches an entry in your table, it will automatically "backspace" the trigger word (from your table) and then will input the unicode sequence.
Supports Unicode up to 0xFFFFFFFF. As with `UNICODE_MAP`, you may want to maintain a mapping table in your keymap file. However, there is no keycodes for this feature, you will have to add a keycode or function to call `qk_ucis_start()`. Once you've run that, you can just type the text for your unicode, and then hit space or enter to complete it, or ESC to cancel it. And if it matches an entry in your table, it will automatically "backspace" the trigger word (from your table) and then will input the unicode sequence.

For instance, you would need to have a table like this in your keymap:

Expand Down
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
placeholder: 'Search Documentation...',
noData: 'We could not find any documents matching your search.',
depth: 6
}
},
fallbackLanguages: ['zh']
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions docs/keycode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ KC_WWW_FORWARD KC_WFWD
KC_WWW_STOP KC_WSTP
KC_WWW_REFRESH KC_WREF
KC_WWW_FAVORITES KC_WFAV
KC_BRIGHTNESS_UP KC_BRIU
KC_BRIGHTNESS_DOWN KC_BRID
/* Mousekey */
KC_MS_UP KC_MS_U Mouse Cursor Up
KC_MS_DOWN KC_MS_D Mouse Cursor Down
Expand Down
2 changes: 2 additions & 0 deletions docs/keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ This is a reference only. Each group of keys links to the page documenting their
|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |

## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)

Expand Down
2 changes: 2 additions & 0 deletions docs/keycodes_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ Windows and macOS use different keycodes for "next track" and "previous track".
|`KC_WWW_FAVORITES` |`KC_WFAV`|Browser Favorites (Windows) |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS) |
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track (macOS) |
|`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |

## Number Pad

Expand Down
2 changes: 1 addition & 1 deletion docs/newbs_testing_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus
After that you can use a few different print functions:

* `print("string")`: Print a simple string.
* `sprintf("%s string", var)`: Print a formatted string
* `uprintf("%s string", var)`: Print a formatted string
* `dprint("string")` Print a simple string, but only when debug mode is enabled
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
21 changes: 21 additions & 0 deletions docs/ref_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,24 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.

To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.

## Tap random key

If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A``Z`, 26–51 is `a``z`, 52–61 is `0``9`, 62 is `+` and 63 is `/`).

?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords.

## Software Timers

It's possible to start timers and read values for time-specific events. Here's an example:

```c
static uint16_t key_timer;
key_timer = timer_read();

if (timer_elapsed(key_timer) < 100) {
// do something if less than 100ms have passed
} else {
// do something if 100ms or more have passed
}
```
32 changes: 32 additions & 0 deletions docs/zh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# QMK鍵盤固件

[![當前版本](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
[![築邦](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![不和諧](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
[![文檔狀態](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![GitHub的貢獻者](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![GitHub的叉](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)

## 什麼是QMK固件?

QMK是一個由社群維護的開源鍵盤韌體,其中包含了QMK Toolbox、qmk.fm和其它文件。QMK韌體是以[tmk\_keyboard](http://github.com/tmk/tmk_keyboard)為基礎,讓一些有用的功能在Atmel AVR控制器實現,使用於[OLKB](https://olkb.com)[ergodox EZ](http://www.ergodox-ez.com),和[Clueboard](http://clueboard.co/)的產品中。它也被移植到使用ChibiOS的ARM晶片上。你也可以用它來讓你徒手佈線,或是客製的鍵盤PCB發揮功能。

## 如何得到QMK

如果你打算貢獻鍵盤佈局,鍵盤或功能QMK,最容易做的事情是[叉通過Github上爬行](https://github.com/qmk/qmk_firmware#fork-destination-box),和克隆你爬在本地進行更改,推動他們,然後打開從你的叉子[拉請求](https://github.com/qmk/qmk_firmware/pulls)

否則,您可以直接下載([拉鍊](https://github.com/qmk/qmk_firmware/zipball/master) [焦油](https://github.com/qmk/qmk_firmware/tarball/master)),或者通過GIT中克隆它(`[email protected]:qmk/qmk_firmware.git`)或HTTP(`https://github.com/qmk/qmk_firmware.git`)。

## 如何編譯

你可以編譯之前,你需要[安裝環境](getting_started_build_tools.md)用於AVR或/和ARM開發。一旦完成,你會使用`make`命令建立一個鍵盤並用以下符號鍵盤佈局

make planck/rev4:default

這將建立`rev4` `planck`的修訂與`default`鍵盤映射。並非所有鍵盤有一個修訂版(也稱為子項目或文件夾),在這種情況下,它可以被省略:

make preonic:default

## 如何赶近

QMK有很多[特點](features.md)探索和很好的協議[參考文獻](http://docs.qmk.fm)挖通的。大部分功能通過修改[鍵盤映射(keymap.md),並改變[鍵碼](keycodes.md)冤大頭。
99 changes: 99 additions & 0 deletions docs/zh/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
* [完全指南菜鳥](zh/newbs.md)
* [入門](zh/newbs_getting_started.md)
* [構建第一個固件](zh/newbs_building_firmware.md)
* [刷新固件](zh/newbs_flashing.md)
* [測試和調試](zh/newbs_testing_debugging.md)
* [最佳實踐](zh/newbs_best_practices.md)
* [學習資源](zh/newbs_learn_more_resources.md)

* [QMK基礎](zh/README.md)
* [QMK簡介](zh/getting_started_introduction.md)
* [特約QMK](zh/contributing.md)
* [如何使用Github上](zh/getting_started_github.md)
* [獲得幫助](zh/getting_started_getting_help.md)

* [常問問題](zh/faq.md)
* [常問問題](zh/faq_general.md)
* [構建/編譯QMK](zh/faq_build.md)
* [調試/故障排除QMK](zh/faq_debug.md)
* [鍵盤佈局](zh/faq_keymap.md)

* 詳細指南
* [安裝編譯工具](zh/getting_started_build_tools.md)
* [流浪漢指南](zh/getting_started_vagrant.md)
* [構建/編譯器指令](zh/getting_started_make_guide.md)
* [刷新固件](zh/flashing.md)
* [定制功能](zh/custom_quantum_functions.md)
* [鍵盤映射概述](zh/keymap.md)

* [硬件](zh/hardware.md)
* [AVR處理器](zh/hardware_avr.md)
* [司機](zh/hardware_drivers.md)

* 參考
* [Keyboard Guidelines](zh/hardware_keyboard_guidelines.md)
* [Config Options](zh/config_options.md)
* [Keycodes](zh/keycodes.md)
* [Documentation Best Practices](zh/documentation_best_practices.md)
* [Documentation Templates](zh/documentation_templates.md)
* [Glossary](zh/reference_glossary.md)
* [Unit Testing](zh/unit_testing.md)
* [Useful Functions](zh/ref_functions.md)
* [Configurator Support](zh/reference_configurator_support.md)

* [特點](zh/features.md)
* [Basic Keycodes](zh/keycodes_basic.md)
* [Quantum Keycodes](zh/quantum_keycodes.md)
* [Advanced Keycodes](zh/feature_advanced_keycodes.md)
* [Audio](zh/feature_audio.md)
* [Auto Shift](zh/feature_auto_shift.md)
* [Backlight](zh/feature_backlight.md)
* [Bluetooth](zh/feature_bluetooth.md)
* [Bootmagic](zh/feature_bootmagic.md)
* [Combos](zh/feature_combo)
* [Command](zh/feature_command.md)
* [Dynamic Macros](zh/feature_dynamic_macros.md)
* [Encoders](zh/feature_encoders.md)
* [Grave Escape](zh/feature_grave_esc.md)
* [Key Lock](zh/feature_key_lock.md)
* [Layouts](zh/feature_layouts.md)
* [Leader Key](zh/feature_leader_key.md)
* [Macros](zh/feature_macros.md)
* [Mouse Keys](zh/feature_mouse_keys.md)
* [One Shot Keys](zh/feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](zh/feature_pointing_device.md)
* [PS/2 Mouse](zh/feature_ps2_mouse.md)
* [RGB Lighting](zh/feature_rgblight.md)
* [RGB Matrix](zh/feature_rgb_matrix.md)
* [Space Cadet Shift](zh/feature_space_cadet_shift.md)
* [Space Cadet Shift Enter](zh/feature_space_cadet_shift_enter.md)
* [Stenography](zh/feature_stenography.md)
* [Swap Hands](zh/feature_swap_hands.md)
* [Tap Dance](zh/feature_tap_dance.md)
* [Terminal](zh/feature_terminal.md)
* [Thermal Printer](zh/feature_thermal_printer.md)
* [Unicode](zh/feature_unicode.md)
* [Userspace](zh/feature_userspace.md)
* [US ANSI Shifted Keys](zh/keycodes_us_ansi_shifted.md)

* 對於製造商和遊戲模組
* [Hand Wiring Guide](zh/hand_wire.md)
* [ISP Flashing Guide](zh/isp_flashing_guide.md)
* [ARM Debugging Guide](zh/arm_debugging.md)
* [I2C Driver](zh/i2c_driver.md)

* 為了更深入的了解
* [How Keyboards Work](zh/how_keyboards_work.md)
* [Understanding QMK](zh/understanding_qmk.md)

* 其它主題
* [Using Eclipse with QMK](zh/eclipse.md)

* QMK內部(進行中)
* [Defines](zh/internals_defines.md)
* [Input Callback Reg](zh/internals_input_callback_reg.md)
* [Midi Device](zh/internals_midi_device.md)
* [Midi Device Setup Process](zh/internals_midi_device_setup_process.md)
* [Midi Util](zh/internals_midi_util.md)
* [Send Functions](zh/internals_send_functions.md)
* [Sysex Tools](zh/internals_sysex_tools.md)
12 changes: 8 additions & 4 deletions drivers/arm/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

static uint8_t i2c_address;

// This configures the I2C clock to 400Mhz assuming a 72Mhz clock
// This configures the I2C clock to 400khz assuming a 72Mhz clock
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
static const I2CConfig i2cconfig = {
STM32_TIMINGR_PRESC(15U) |
Expand All @@ -45,10 +45,14 @@ static const I2CConfig i2cconfig = {
__attribute__ ((weak))
void i2c_init(void)
{
setPinInput(B6); // Try releasing special pins for a short time
setPinInput(B7);
chThdSleepMilliseconds(10);
//palSetGroupMode(GPIOB, GPIOB_PIN6 | GPIOB_PIN7, 0, PAL_MODE_INPUT);

// Try releasing special pins for a short time
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT);
palSetPadMode(GPIOB, 7, PAL_MODE_INPUT);

chThdSleepMilliseconds(10);

palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);

Expand Down
1 change: 1 addition & 0 deletions drivers/arm/i2c_master.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void i2c_init(void);
uint8_t i2c_start(uint8_t address);
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
uint8_t i2c_stop(uint16_t timeout);
Loading

0 comments on commit 22413b0

Please sign in to comment.