<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qmk_firmware.git/drivers, branch master</title>
<subtitle>forked from https://github.com/qmk/qmk_firmware</subtitle>
<id>https://git.tsegers.com/qmk_firmware.git/atom?h=master</id>
<link rel='self' href='https://git.tsegers.com/qmk_firmware.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/'/>
<updated>2020-10-03T18:44:19Z</updated>
<entry>
<title>OLED driver fixes (#10377)</title>
<updated>2020-10-03T18:44:19Z</updated>
<author>
<name>Sergey Vlasov</name>
<email>sigprof@gmail.com</email>
</author>
<published>2020-10-03T18:44:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=459ccb681f991d5b39060d25197233ac9c51d8b9'/>
<id>urn:sha1:459ccb681f991d5b39060d25197233ac9c51d8b9</id>
<content type='text'>
* Fix dirtying in oled_write_pixel()

Set the dirty bit for the block only if oled_write_pixel() actually
changed the buffer state.  Without this check oled_write_pixel() could
not be used inside the oled_task_user() code using the “redraw always”
style, because the blocks touched by oled_write_pixel() would always
appear dirty, and oled_render() would not proceed beyond the first such
dirty block.

* Fix oled_write_pixel() with 90/270 degree rotation

Use oled_rotation_width instead of OLED_DISPLAY_WIDTH, so that a rotated
display would be handled correctly.

* Fix compilation with custom OLED_BLOCK_COUNT and OLED_BLOCK_SIZE

Some OLED sizes (e.g., 64×48) may require a nonstandard value of
OLED_BLOCK_COUNT.  The documentation says that this value may be
redefined in config.h, but actually trying to redefine it caused a
compile error, because the macro was redefined in oled_driver.c.
Make the OLED_BLOCK_COUNT definition in oled_driver.c respect any
user override, and do the same for OLED_BLOCK_SIZE just in case.

* Fix handling of out-of-range bits in oled_dirty

If a custom OLED_BLOCK_COUNT value is specified, some bits in oled_dirty
may not correspond to existing blocks; however, if those bits are set
somewhere (e.g., by code with sets oled_dirty to ~0 or even -1),
oled_render() would try to handle them and could access memory beyond
oled_buffer and perform hardware operations with out of range values.
Prevent this by masking off unused bits in oled_render(), and also avoid
setting those bits in other functions.

* Fix potentially wrong dirtying in oled_write_char()

oled_write_char() tried to mark the position just beyond the written
character as dirty; use (OLED_FONT_WIDTH - 1) to dirty the last position
still belonging to the character instead.

* Fix `#define OLED_BLOCK_TYPE uint32_t` on AVR

Using uint32_t as OLED_BLOCK_TYPE did not work properly on AVR, because
some bit shifts were performed using 16-bit int.  Add explicit casts to
OLED_BLOCK_TYPE to those shifts.</content>
</entry>
<entry>
<title>IS31FL3741 driver fixup (#10519)</title>
<updated>2020-10-03T18:15:44Z</updated>
<author>
<name>a_p_u_r_o</name>
<email>applause@elfmimi.jp</email>
</author>
<published>2020-10-03T18:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=1fe7743af88cf0d65800d3ccfc1c59d1c2d65db2'/>
<id>urn:sha1:1fe7743af88cf0d65800d3ccfc1c59d1c2d65db2</id>
<content type='text'>
* Fix issue with data transfer of CS1_SW7 to CS18_SW7.

* Fix issue with handling of scaling register buffer's dirty flag.

* Remove unused extern declaration.

* Compaction of struct is31_led utilizing bit fields.</content>
</entry>
<entry>
<title>Add OLED driver function to determine if the screen is currently on (#10382)</title>
<updated>2020-09-22T01:39:50Z</updated>
<author>
<name>Fred Silberberg</name>
<email>fred@silberberg.xyz</email>
</author>
<published>2020-09-22T01:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=c23667608c6ebb8f6d8a7f9b115144abd8794e00'/>
<id>urn:sha1:c23667608c6ebb8f6d8a7f9b115144abd8794e00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix ssd1306 compilation on avr-gcc 10 (#9267)</title>
<updated>2020-09-17T00:42:24Z</updated>
<author>
<name>Joel Challis</name>
<email>git@zvecr.com</email>
</author>
<published>2020-09-17T00:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=e9b3a12c6e43444f5f6a6e3f63b5e4ece80740eb'/>
<id>urn:sha1:e9b3a12c6e43444f5f6a6e3f63b5e4ece80740eb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>format code according to conventions [skip ci]</title>
<updated>2020-09-03T11:25:14Z</updated>
<author>
<name>QMK Bot</name>
<email>hello@qmk.fm</email>
</author>
<published>2020-09-03T11:25:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=25e93b4b677c85165f6996f3de96f260121f549a'/>
<id>urn:sha1:25e93b4b677c85165f6996f3de96f260121f549a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update ISSI3741 (#9912)</title>
<updated>2020-09-03T10:37:04Z</updated>
<author>
<name>MelGeek</name>
<email>65591833+melgeek001365@users.noreply.github.com</email>
</author>
<published>2020-09-03T10:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=2f26e14dc627592734769424b09007e02ddb3c09'/>
<id>urn:sha1:2f26e14dc627592734769424b09007e02ddb3c09</id>
<content type='text'>
* [Driver] bugfix reset the scaling register flag to FALSE

* Update drivers/issi/is31fl3741.c

Co-authored-by: Ryan &lt;fauxpark@gmail.com&gt;

* Add CS &amp; SW defines for ISSI3741

* Make IS31FL3741 control register update clearer

Co-authored-by: Ryan &lt;fauxpark@gmail.com&gt;
Co-authored-by: Jumail Mundekkat &lt;mundekkat@hotmail.com&gt;</content>
</entry>
<entry>
<title>format code according to conventions [skip ci]</title>
<updated>2020-08-29T22:57:48Z</updated>
<author>
<name>QMK Bot</name>
<email>hello@qmk.fm</email>
</author>
<published>2020-08-29T22:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=a3db72df7299140e52f57d082a3742a8b480a226'/>
<id>urn:sha1:a3db72df7299140e52f57d082a3742a8b480a226</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix DMA stream ID calculation in ws2812_pwm (#10008)</title>
<updated>2020-08-29T21:30:02Z</updated>
<author>
<name>Sergey Vlasov</name>
<email>sigprof@gmail.com</email>
</author>
<published>2020-08-25T09:02:32Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=15df82cdf3f5b5d81af2cc235fbfe7643cd044b9'/>
<id>urn:sha1:15df82cdf3f5b5d81af2cc235fbfe7643cd044b9</id>
<content type='text'>
Some STM32 chips have STM32_DMA1_STREAM1 as the first DMA stream, others
(F4xx, F7xx, H7xx) have STM32_DMA1_STREAM0.  Instead of those names, use
STM32_DMA_STREAM(0), which should always give the first stm32_dma_stream_t
structure in the DMA streams array, so that the stream ID would be
calculated correctly.</content>
</entry>
<entry>
<title>Add a method to read the OLED display buffer from user space (#8777)</title>
<updated>2020-08-29T21:30:02Z</updated>
<author>
<name>Richard</name>
<email>rich@brickbots.com</email>
</author>
<published>2020-08-24T14:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=fa6cf8572736f16d2fe076c21546d08f258e145f'/>
<id>urn:sha1:fa6cf8572736f16d2fe076c21546d08f258e145f</id>
<content type='text'>
* Adding extern and declaration

* Change to mediated buffer read

* Adding raw byte read

* Restore write raw... D'Oh

* Working struct return

* Pack that struct

* Remove conditional packing and add example to docs

* Cleanup tab/spaces

* Update docs/feature_oled_driver.md

Prettify formatting

* Update drivers/oled/oled_driver.h

Prettify formatting
</content>
</entry>
<entry>
<title>Hid joystick interface (#4226)</title>
<updated>2020-08-29T21:30:02Z</updated>
<author>
<name>a-chol</name>
<email>a-chol@users.noreply.github.com</email>
</author>
<published>2020-07-25T12:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/qmk_firmware.git/commit/?id=d4be07dad368c57669c88ead6c093c9e23086855'/>
<id>urn:sha1:d4be07dad368c57669c88ead6c093c9e23086855</id>
<content type='text'>
* add support for hid gamepad interface
add documentation for HID joystick
Add joystick_task to read analog axes values even when no key is pressed or release. update doc
Update docs/feature_joystick.md
Manage pin setup and read to maintain matrix scan after analog read

* Incorporates patches and changes to HID reporting

There are some patches provided by @a-chol incorporated on this commit,
and also some changes I made to the HID Report structure.

The most interesting is the one dealing with number of buttons: Linux
doesn't seem to care, but Windows requires the HID structure to be byte
aligned (that's in the spec). So if one declares 8/16/32... buttons they
should not have any issues, but this is what happens when you have 9
buttons:

```
 bits |0|1|2|3|4|5|6|7|
      |*|*|*|*|*|*|*|*| axis 0 (report size 8)
      |*|*|*|*|*|*|*|*| ...
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*| axis 6
      |*|*|*|*|*|*|*|*| first 8 buttons (report size 1)
      |*| | | | | | | | last of 9 buttons, not aligned
```

So for that I added a conditonal that will add a number of reports with
size 1 to make sure it aligns to the next multiple of 8. Those reports
send dummy inputs that don't do anything aside from aligning the data.

Tested on Linux, Windows 10 and Street Fighter (where the joystick is
recognized as direct-input)

* Add save and restore of each pin used in reading joystick (AVR).
Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc
instead of an output pin from the MCU.

Fix joystick report id

Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes)

Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis.

Documentation fixes

* Fix port addressing for joystick analog read

* The other required set of changes
As per the PR, the changes still holding it up.
Add onekey for testing.
Fix ARM builds.
Fix device descriptor when either axes or buttons is zero.
Add compile-time check for at least one axis or button.
Move definition to try to fix conflict.
PR review comments.
qmk cformat

* avoid float functions to compute range mapping for axis adc reading

* Remove V-USB support for now. Updated docs accordingly.

* Update tmk_core/protocol/lufa/lufa.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios

* Fix HID joystick report sending for ChibiOS.
Add one analog axis to the onekey:joystick keymap.
Fix pin state save and restore during joystick analog read for STM32
MCUs.

* Update tmk_core/protocol/chibios/usb_main.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Update tmk_core/protocol/lufa/lufa.c

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Add missing mcuconf.h and halconf.h to onekey:joystick keymap.
Add suggested fixes from PR.

* Switch saveState and restoreState signature to use pin_t type.
onekey:joystick : add a second axis, virtual and programmatically animated.

* Update docs/feature_joystick.md

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Update docs/feature_joystick.md

Co-Authored-By: Ryan &lt;fauxpark@gmail.com&gt;

* Add PR corrections

* Remove halconf.h and mcuconf.h from onekey keymaps

* Change ADC_PIN to A0

Co-authored-by: achol &lt;allecooll@hotmail.com&gt;
Co-authored-by: José Júnior &lt;jose.junior@gmail.com&gt;
Co-authored-by: a-chol &lt;achol@notamail.com&gt;
Co-authored-by: Nick Brassel &lt;nick@tzarc.org&gt;
Co-authored-by: Ryan &lt;fauxpark@gmail.com&gt;</content>
</entry>
</feed>
