Commit Graph

42 Commits (e7affd05417a48b1e5c0948a24034227384a5d13)

Author SHA1 Message Date
Drashna Jaelre 7fd3d76faa
[Split] Ensure SOFT_SERIAL_PIN is defined if USE_I2C isn't defined (#17466) 2022-06-25 12:34:40 -07:00
QMK Bot ce9a5aaef3 Merge remote-tracking branch 'origin/master' into develop 2022-05-18 19:58:37 +00:00
Takeshi ISHII 80405c6d96
Fix platforms/avr/drivers/ws2812.c (#17043)
* Fix platforms/avr/drivers/ws2812.c

`platforms/avr/drivers/ws2812.c` has been changed to use `DDRx_ADDRESS()` and `PORTx_ADDRESS()` instead of `_SFR_IO8()` in #8646.  To use them, `#include <pin_defs.h>` is required.

 ## Error Log
* create new keyboard
```shell
bash-3.2$ qmk new-keyboard
Ψ Generating a new QMK keyboard directory

Name Your Keyboard Project
For more infomation, see:
https://docs.qmk.fm/#/hardware_keyboard_guidelines?id=naming-your-keyboardproject

Keyboard Name? ws2812_test
..................................
     36. WB32F3G71
Please enter your choice:  [12]
Ψ Created a new keyboard called ws2812_test.
Ψ To start working on things, `cd` into keyboards/ws2812_test,
Ψ or open the directory in your preferred text editor.
Ψ And build with qmk compile -kb ws2812_test -km default.
```
* Enable RGBLIGHT.
```shell
bash-3.2$ echo RGBLIGHT_ENABLE=yes >> ./keyboards/ws2812_test/rules.mk
bash-3.2$ echo '#define RGB_DI_PIN B1' >> ./keyboards/ws2812_test/config.h
bash-3.2$ echo '#define RGBLED_NUM 6' >> ./keyboards/ws2812_test/config.h
```
* Compile
```shell
bash-3.2$ make ws2812_test:default

QMK Firmware 0.16.9
Making ws2812_test with keymap default

avr-gcc (Homebrew AVR GCC 8.4.0_2) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

.....................
Compiling: quantum/process_keycode/process_rgb.c                                                    [OK]
Compiling: platforms/avr/drivers/ws2812.c                                                          platforms/avr/drivers/ws2812.c: In function 'ws2812_setleds':
platforms/avr/drivers/ws2812.c:40:5: error: implicit declaration of function 'DDRx_ADDRESS' [-Werror=implicit-function-declaration]
     DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN);
     ^~~~~~~~~~~~
In file included from <command-line>:
./keyboards/ws2812_test/config.h:21:20: error: 'B1' undeclared (first use in this function); did you mean 'PB1'?
 #define RGB_DI_PIN B1
                    ^~
platforms/avr/drivers/ws2812.c:40:18: note: in expansion of macro 'RGB_DI_PIN'
     DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN);
                  ^~~~~~~~~~
./keyboards/ws2812_test/config.h:21:20: note: each undeclared identifier is reported only once for each function it appears in
 #define RGB_DI_PIN B1
                    ^~
platforms/avr/drivers/ws2812.c:40:18: note: in expansion of macro 'RGB_DI_PIN'
     DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN);
                  ^~~~~~~~~~
platforms/avr/drivers/ws2812.c:42:47: error: implicit declaration of function 'PORTx_ADDRESS' [-Werror=implicit-function-declaration]
     uint8_t masklo = ~(pinmask(RGB_DI_PIN)) & PORTx_ADDRESS(RGB_DI_PIN);
                                               ^~~~~~~~~~~~~
In file included from /usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/avr/io.h:99,
                 from /usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/avr/interrupt.h:38,
                 from platforms/avr/drivers/ws2812.c:24:
platforms/avr/drivers/ws2812.c: In function 'ws2812_sendarray_mask':
./keyboards/ws2812_test/config.h:21:20: error: 'B1' undeclared (first use in this function); did you mean 'PB1'?
 #define RGB_DI_PIN B1
                    ^~
platforms/avr/drivers/ws2812.c:167:69: note: in expansion of macro 'RGB_DI_PIN'
                      : "r"(curbyte), "I"(_SFR_IO_ADDR(PORTx_ADDRESS(RGB_DI_PIN))), "r"(maskhi), "r"(masklo));
                                                                     ^~~~~~~~~~
cc1: all warnings being treated as errors
 [ERRORS]
 |
 |
 |
make[1]: *** [.build/obj_ws2812_test_default/ws2812.o] Error 1
make: *** [ws2812_test:default] Error 1
Make finished with errors
```

* change include order
2022-05-18 20:58:03 +01:00
Joel Challis 6503987c84
Workaround for recent -Werror=array-bounds AVR issues (#17136) 2022-05-18 11:06:55 +01:00
Drashna Jaelre 787a68948f
[Core] Add Reboot keycode to core (#15990) 2022-05-14 13:35:49 +10:00
Joel Challis d458d4a596
Move disable_jtag to platforms (#16960) 2022-04-29 01:23:50 +01:00
Stefan Kerkmann b1681fb6a1
[Core] Allow usage of AVRs minimal printf library (#16266)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2022-04-22 18:13:31 +10:00
Nick Brassel f50a623909
Fixup AVR builds. (#16875)
* Fixup AVR builds.

* Update platforms/avr/hardware_id.c

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-04-18 15:39:45 +01:00
Joel Challis b8245a5507
Expose API for hardware unique ID (#16869) 2022-04-18 20:51:40 +10:00
Ryan 9ee2effe8e
HD44780 driver rework (#16370) 2022-03-19 17:57:22 +11:00
Joel Challis 7e6f1c9e08
Force platform pin defs to be included (#16611)
* Force platform pin defs to be included

* Always grab first header
2022-03-10 23:53:16 +00:00
QMK Bot bcd4f34b26 Merge remote-tracking branch 'origin/master' into develop 2022-03-04 03:57:31 +00:00
Ryan d412854e37
analog.[ch]: remove unnecessary includes (#16471) 2022-03-04 14:56:59 +11:00
Stefan Kerkmann 156f0561f2
[Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) 2022-02-26 19:05:03 -08:00
QMK Bot 63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Nick Brassel d31dd6d2a0
Followup to #16220, more test error output. (#16221) 2022-02-05 12:51:23 +11:00
Joel Challis 135c935990
Initial migration of suspend callbacks (#16067)
* Initial migration of suspend logic

* Add header
2022-02-05 05:10:00 +11:00
Nick Brassel 0be2eaf174
Create a build error if no bootloader is specified. (#16181)
* Create a build error if no bootloader is specified.

* Update builddefs/bootloader.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2022-02-03 19:22:49 +11:00
Stefan Kerkmann be59e8af2b
Deprecate split transactions status field (#16023) 2022-01-26 21:13:27 -08:00
Joel Challis 6a9ec74b32
Remove unused suspend_idle (#16063) 2022-01-26 14:57:28 -08:00
QMK Bot be2265d0d1
Format code according to conventions (#15593) 2021-12-27 21:20:52 +11:00
Ryan 6bc870d899
Refactor `bootloader_jump()` implementations (#15450)
* Refactor `bootloader_jump()` implementations

* Fix tests?

* Rename `atmel-samba` to `md-boot`
2021-12-27 21:10:07 +11:00
Nick Brassel 4d96e53222
More GPIO compilation fixes. (#15592) 2021-12-26 21:36:52 -08:00
Nick Brassel 3a3272a3d6
Defer pin operations to gpio.h (#15589) 2021-12-27 13:27:38 +11:00
Nick Brassel 6e40dfa022
Add open-drain GPIO support. (#15282)
* Add open-drain GPIO support.

* `qmk format-c`

* Wording.

* Remove port GPIO implementations as the only board that uses it has its own internal defs anyway. Will wait for first-class handling of ports in core before reimplementing.
2021-12-27 11:52:10 +11:00
Joel Challis 3bf2403244
Tidy up existing i2c_master implementations (#15376)
* Move chibios defines out of header

* Make some avr defines internal
2021-12-02 14:32:31 +00:00
Joel Challis 5e9c29da0d
Tidy up adjustable ws2812 timing (#15299) 2021-11-25 19:35:06 +00:00
Joel Challis 2728603fe6
Move tmk_core/common/<plat> (#13918) 2021-11-19 10:41:02 -08:00
Drashna Jaelre ca4b54bb30
Fix uart function prototypes (#15162) 2021-11-15 20:15:45 +11:00
Ryan 04b51e381e
Update UART driver API (#14839)
* Add uart_puts() and uart_gets()

* Add some docs

* Rework API

* Formatting

* Update docs/uart_driver.md

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>

* Simplify a uart_write() loop

* Update platforms/avr/drivers/uart.c

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
2021-11-13 18:23:14 +00:00
Joel Challis 92385e30cd
Manually format develop (#15003) 2021-11-01 19:18:33 +00:00
Joel Challis 19b9e406dc
Align usbasp flashing behaviour (#14928) 2021-10-24 14:18:57 +01:00
Joel Challis d4be4b67a2
Relocate PS2 code (#14895)
* Relocate ps2 protocol code

* clang

* Move makefile logic
2021-10-20 21:18:49 +01:00
Ryan bc1f5ef381
i2c_master: Add support for reading/writing to 16-bit registers (#14289) 2021-10-07 10:29:35 +11:00
Drashna Jaelre ba8f1454f4
Move Audio drivers from quantum to platform drivers folder (#14308)
* Move Audio drivers from quantum to platform drivers folder

* fix path for audio drivers

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-10-06 12:01:45 +11:00
fauxpark a7c972b329 Merge remote-tracking branch 'upstream/master' into develop 2021-09-10 17:36:17 +10:00
Ryan d5cb7de5e4
Change USBasp and bootloadHID bootloaders to lowercase (#14354) 2021-09-10 17:17:54 +10:00
Ryan d977e5d3e9
Remove Arduino-style `analogRead()` (#14348) 2021-09-08 14:37:59 +01:00
Drashna Jaelre d57d9aec4f
Fix bootloadHID comments breaking :flash (#14133) 2021-08-23 23:46:06 +01:00
ruro 3b28178deb
`--parallel` improvements (#13800)
* improve make parallel jobs support

* document the --parallel option

* disable the output-sync for interactive targets
2021-08-18 08:46:59 +10:00
Joel Challis 1bb7af4d44
Relocate platform specific drivers (#13894)
* Relocate platform specific drivers

* Move stm eeprom

* Tidy up slightly
2021-08-17 23:43:09 +01:00
Joel Challis ab941ce614
Move all the flash logic from tmk_core (#13927) 2021-08-15 21:55:23 +01:00