Skip to content

Commit

Permalink
[Docs] Random Fixes (#8340)
Browse files Browse the repository at this point in the history
* fix CLI section links in the Summary

* fix heading in Pointing Device doc

* fix headings in PS/2 Mouse Support doc

* add explicit section ids to I2C Master Driver doc

* reformat GPIO Controls table

Much like the I2C Master Driver doc, I found this a bit less than ideal to read. (The table was actually wider than the space available for it.)

Reformatted so each GPIO function is an H3 heading, followed by a paragraph and a table of each architecture's old-style function.

* migrate changes from I2C Master Driver doc to Japanese translation

* add explicit anchors to I2C Master Driver docs

* fix code block language markers

The language markers are case-sensitive; using the wrong case means the syntax highlighting doesn't work.

Good: ```c
Bad: ```C

* restore Japanese I2C Master Driver doc to current master

Can't update the internal tracking references accurately until the changes to the English doc are committed to master.

* add explicit anchors to edited files

* change ChibiOS/ARM to ARM/ChibiOS

Because ARM/ATSAM is also a thing that exists.

* fix code block language markers again

Used the wrong markers in a few spots. Also these are apparently always supposed to be lowercase.

* add section anchors to cli.md

* restore table formatting on GPIO Control doc

* remove changes to _summary.md
  • Loading branch information
noroadsleft authored Mar 16, 2020
1 parent 5f1f370 commit b272c03
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 105 deletions.
12 changes: 6 additions & 6 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# QMK CLI
# QMK CLI :id=qmk-cli

## Overview
## Overview :id=overview

The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.

### Requirements
### Requirements :id=requirements

The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.

### Install Using Homebrew (macOS, some Linux)
### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew

If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:

Expand All @@ -19,7 +19,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```

### Install Using easy_install or pip
### Install Using easy_install or pip :id=install-using-easy_install-or-pip

If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:

Expand All @@ -29,7 +29,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```

### Packaging For Other Operating Systems
### Packaging For Other Operating Systems :id=packaging-for-other-operating-systems

We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:

Expand Down
6 changes: 3 additions & 3 deletions docs/feature_pointing_device.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Pointing Device
# Pointing Device :id=pointing-device

Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you.

To enable Pointing Device, uncomment the following line in your rules.mk:

```
```makefile
POINTING_DEVICE_ENABLE = yes
```

Expand All @@ -25,7 +25,7 @@ When the mouse report is sent, the x, y, v, and h values are set to 0 (this is d

In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example:

```
```c
case MS_SPECIAL:
report_mouse_t currentReport = pointing_device_get_report();
if (record->event.pressed)
Expand Down
59 changes: 30 additions & 29 deletions docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## PS/2 Mouse Support
# PS/2 Mouse Support :id=ps2-mouse-support

Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.

To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.

There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).

### The Cirtuitry between Trackpoint and Controller
## The Circuitry between Trackpoint and Controller :id=the-circuitry-between-trackpoint-and-controller

To get the things working, a 4.7K drag is needed between the two lines DATA and CLK and the line 5+.

Expand All @@ -24,20 +24,20 @@ MODULE 5+ --------+--+--------- PWR CONTROLLER
```


### Busywait Version
## Busywait Version :id=busywait-version

Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.

In rules.mk:

```
```makefile
PS2_MOUSE_ENABLE = yes
PS2_USE_BUSYWAIT = yes
```

In your keyboard config.h:

```
```c
#ifdef PS2_USE_BUSYWAIT
# define PS2_CLOCK_PORT PORTD
# define PS2_CLOCK_PIN PIND
Expand All @@ -50,20 +50,20 @@ In your keyboard config.h:
#endif
```

### Interrupt Version
## Interrupt Version :id=interrupt-version

The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.

In rules.mk:

```
```makefile
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
```

In your keyboard config.h:

```
```c
#ifdef PS2_USE_INT
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
Expand All @@ -88,20 +88,20 @@ In your keyboard config.h:
#endif
```

### USART Version
## USART Version :id=usart-version

To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.

In rules.mk:

```
```makefile
PS2_MOUSE_ENABLE = yes
PS2_USE_USART = yes
```

In your keyboard config.h:

```
```c
#ifdef PS2_USE_USART
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
Expand Down Expand Up @@ -145,13 +145,13 @@ In your keyboard config.h:
#endif
```

### Additional Settings
## Additional Settings :id=additional-settings

#### PS/2 Mouse Features
### PS/2 Mouse Features :id=ps2-mouse-features

These enable settings supported by the PS/2 mouse protocol.

```
```c
/* Use remote mode instead of the default stream mode (see link) */
#define PS2_MOUSE_USE_REMOTE_MODE

Expand All @@ -170,7 +170,7 @@ These enable settings supported by the PS/2 mouse protocol.
You can also call the following functions from ps2_mouse.h
```
```c
void ps2_mouse_disable_data_reporting(void);
void ps2_mouse_enable_data_reporting(void);
Expand All @@ -188,36 +188,36 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
```

#### Fine Control
### Fine Control :id=fine-control

Use the following defines to change the sensitivity and speed of the mouse.
Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).

```
```c
#define PS2_MOUSE_X_MULTIPLIER 3
#define PS2_MOUSE_Y_MULTIPLIER 3
#define PS2_MOUSE_V_MULTIPLIER 1
```
#### Scroll Button
### Scroll Button :id=scroll-button
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
To enable the feature, you must set a scroll button mask as follows:
```
```c
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
```

To disable the scroll button feature:

```
```c
#define PS2_MOUSE_SCROLL_BTN_MASK 0
```
The available buttons are:
```
```c
#define PS2_MOUSE_BTN_LEFT 0
#define PS2_MOUSE_BTN_RIGHT 1
#define PS2_MOUSE_BTN_MIDDLE 2
Expand All @@ -229,27 +229,28 @@ Once you've configured your scroll button mask, you must configure the scroll bu
This is the interval before which if the scroll buttons were released they would be sent to the host.
After this interval, they will cause the mouse to scroll and will not be sent.
```
```c
#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
```
To disable sending the scroll buttons:
```
```c
#define PS2_MOUSE_SCROLL_BTN_SEND 0
```
Fine control over the scrolling is supported with the following defines:
```
```c
#define PS2_MOUSE_SCROLL_DIVISOR_H 2
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
```
#### Invert Mouse and Scroll Axes
### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes
To invert the X and Y axes you can put:
```
```c
#define PS2_MOUSE_INVERT_X
#define PS2_MOUSE_INVERT_Y
```
Expand All @@ -258,18 +259,18 @@ into config.h.
To reverse the scroll axes you can put:
```
```c
#define PS2_MOUSE_INVERT_H
#define PS2_MOUSE_INVERT_V
```
into config.h.
#### Debug Settings
### Debug Settings :id=debug-settings
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
```
```c
/* To debug the mouse reports */
#define PS2_MOUSE_DEBUG_HID
#define PS2_MOUSE_DEBUG_RAW
Expand Down
Loading

0 comments on commit b272c03

Please sign in to comment.