Commit Graph

25731 Commits

Author SHA1 Message Date
Daniel Schaefer
45f8b07d39 fl16: Disable BIOS hotkeys in linux
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-27 13:09:47 +08:00
Daniel Schaefer
c6ba5ad0a2 DEBUG: Working BIOS hotkeys
Works from cold boot and from reboot in windows.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-27 12:55:38 +08:00
Daniel Schaefer
324b8d7736 fl16/DEBUG: Disable NKRO and RGB
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 16:04:43 +08:00
Daniel Schaefer
341fb18199 fl16: Force disable RGB controller if RGB disabled
Helps faster startup

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 15:44:28 +08:00
Daniel Schaefer
5af87007aa fl16: Make sure build without RGB is possible
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 15:32:52 +08:00
Daniel Schaefer
11a70a11ed fixup! fl16: Indicate UEFI hotkey mode by background color 2023-11-24 15:30:55 +08:00
Daniel Schaefer
67be5557fb fl16: Signal bios mode also via capslock LED
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 14:50:42 +08:00
Daniel Schaefer
503255e33c fl16: Indicate UEFI hotkey mode by background color
red: enabled
white: disabled

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 14:50:42 +08:00
Daniel Schaefer
4264f90c84 fl16: Disable selective suspend
Causing too many issues

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 14:48:15 +08:00
Daniel Schaefer
c39ea59510 Revert "fl16: Keep keyboard out of suspend at least 30s"
This reverts commit f449ecc074.
2023-11-24 14:43:01 +08:00
Daniel Schaefer
1e7fc086a1 fl16: Allow next/prev effect keys to turn RGB on
If using VIA the backlight was set to effect 0, the only way to turn it
back on is using VIA or the RGB toggle key. But the user would expect
the next/prev animation key to also work.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-24 14:41:28 +08:00
Daniel Schaefer
2d03f0eabf fl16: Bump version to 0.2.7
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-21 16:11:29 +08:00
Daniel Schaefer
f449ecc074 fl16: Keep keyboard out of suspend at least 30s
With selective suspend windows likes to suspend the keyboard very
eagerly after 5 seconds without activity. So we send keyboard reports
every second for 25 seconds to keep it awake.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-21 16:10:53 +08:00
Daniel Schaefer
daa14d08fd fl16: Bump version to v0.2.6
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-18 01:08:42 +08:00
Daniel Schaefer
cffc704f58 fl16: Keep animating LED/RGB matrix in suspend
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-18 01:07:19 +08:00
Daniel Schaefer
9a6c749a83 fl16: Bump to v0.2.5
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 19:11:13 +08:00
Daniel Schaefer
1e6896999f fl16: Don't turn off LEDs in USB suspend
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 19:04:24 +08:00
Kieran Levin
385ed1a291 fix selective suspend on RP2040
the tmk_core chibios protocol_pre_task does not
process any usb events when the host is in suspend.

I think there is a race condition where the usb_event_queue_task
will not be processed depending on when usb goes to sleep.
so we may fall into the
while (USB_DRIVER.state == USB_SUSPENDED) {
which comes directly from the hardware interrupt.
and never process pending events in
usb_event_queue_task();

Signed-off-by: Kieran Levin <ktl@frame.work>
2023-11-17 19:04:24 +08:00
Daniel Schaefer
0c31aa0d00 Add SelectiveSuspend MSOS2.0 descriptor
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 19:04:24 +08:00
Daniel Schaefer
8fa6c6a564 Add Microsoft OS 2.0 capability descrciptor
Doesn't work yet, on Windows, because Windows will make a special
control request if it sees this.

On Linux lsusb shows it like this:

```
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0048
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000000
      (Missing must-be-set LPM bit!)
  Platform Device Capability:
    bLength                28
    bDescriptorType        16
    bDevCapabilityType      5
    bReserved               0
    PlatformCapabilityUUID    {d8dd60df-4589-4cc7-9cd2-659d9e648a9f}
    CapabilityData[0]    0x00
    CapabilityData[1]    0x00
    CapabilityData[2]    0x03
    CapabilityData[3]    0x06
    CapabilityData[4]    0x48
    CapabilityData[5]    0x00
    CapabilityData[6]    0x01
    CapabilityData[7]    0x00
```

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 19:04:24 +08:00
Daniel Schaefer
d25bf039cc Add BOS Descriptor (USB 2.0 Extended Dev Capability)
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 19:04:24 +08:00
Daniel Schaefer
302011713d fl16: Make media keys default instead of F1-F12
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 18:49:22 +08:00
Daniel Schaefer
64d541cc0c fl16/macropad: Make numpad layout the default
And put RGB controls on the numlock layer.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-17 18:13:56 +08:00
Daniel Schaefer
dae3cbe572 fl16: Bump to v0.2.4
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-15 09:03:38 +08:00
Daniel Schaefer
771d183c1a fl16: Dynamic threshold
based on keys pressed in one row of the matrix

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-11-10 12:48:41 +08:00
Daniel Schaefer
ff5e181afd fl16: Enable higher pwm frequency on RGB keyboard
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-10-30 09:26:33 +08:00
Daniel Schaefer
af4f40ddf6 is32flcommon: Allow custom PWM frequency config
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-10-30 09:25:46 +08:00
Daniel Schaefer
f30e12adcf framework: Increase to 10 layers in VIA
Allow more flexibilty and some layers can't be used because they're
needed for FN and FN lock.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-10-26 13:57:06 +08:00
Daniel Schaefer
ae20af46ce fl16: Update version to 0.2.3
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-30 15:09:19 +08:00
Daniel Schaefer
b71e202389 fl16: Extend UEFI hotkey mode to all F keys
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-30 14:48:14 +08:00
Daniel Schaefer
bc80535a49 keyboards/framework/ansi: Move LEDs under artwork
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-30 14:48:14 +08:00
Daniel Schaefer
6ea4debb40 framework: Update debug to print voltage
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-30 14:48:13 +08:00
Daniel Schaefer
d7e315241c fixup! fl16/macropad: Add factory mode 2023-08-08 20:36:31 +08:00
Daniel Schaefer
a7e5bc820d fl16: Update to v0.2.2
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-08 20:35:43 +08:00
Daniel Schaefer
436a9cc02c fl16: Refactor factory mode
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-08 20:32:22 +08:00
Daniel Schaefer
ddfb8f4934 fl16/macropad: Add factory mode
Factory mode enables layer 2 which has a regular keycode mapped to every
key. This way the factory can easily test whether the keys are working
or not.
It can either be disabled again or it'll turn of itself when the
keyboard resets.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-08 20:21:32 +08:00
Daniel Schaefer
9c752c120e fl16: Fix white backlight not recovering after reset
If the backlight brightness was changed and the keyboard unplugged and
replugged, the lights would stay off. They should come back to the
previous value, which will happen automatically but the code would
override.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-07 19:42:18 +08:00
Daniel Schaefer
ca08e9373a fl16: Validate serial number with CRC32B checksum
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-07 19:42:18 +08:00
Daniel Schaefer
8093dfeb18 fl16: Increase EEPROM size and reserve last 4K sector
More space, more wear leveling and don't use sector that's reserved for
the serial number.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-08-07 19:42:18 +08:00
Daniel Schaefer
7c2001a515 fl16: Add advanced layout
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 16:21:25 +08:00
Daniel Schaefer
21fd6d199c fl16: Implement BIOS mode
When enabled, overrides whatever keyboard layout and always makes the
keys in the physical location of F2, F10 and F12 send the keycodes for
F2/F10/F12.
BIOS is supposed to enable this right after USB enumeration, so that the
BIOS hot keys always work, even if FN-lock is enabled or the user has
remapped their keyboard.
BIOS mode is exited either by the keyboard resetting or by sending the
disable message.

How to send:

1. Find USB devices with Framework VID 0x32AC
2. Filter by interface number == 0x01 and usage page == 0xFF60
3. Set HID report with the following body:

Enable:  0x00 0x0B 0x05 0x01 0xFE 0xFE ... pad the 32 byte buffer with 0xFE
Disable: 0x00 0x0B 0x05 0x00 0xFE 0xFE ... pad the 32 byte buffer with 0xFE
Where the first byte is the report ID 0x00

TODO:

- [ ] Test on ANSI keyboard
- [x] Test on ISO keyboard
- [ ] Test on JIS keyboard
- [ ] Add method to get current status

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 15:56:46 +08:00
Daniel Schaefer
4e2e213040 fixup! fl16: On sleep pin only turn off backlight 2023-07-21 15:49:14 +08:00
Daniel Schaefer
1de95cd8af fl16: Enable and force NKRO for all keyboards
Seems to work fine on our UEFI.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 15:13:59 +08:00
Daniel Schaefer
cf07d6f01f fl16: Add custom layout for Esther
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 15:12:35 +08:00
Daniel Schaefer
2ab88a90f4 fl16: Upstream merge fix
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 10:10:08 +08:00
Daniel Schaefer
27f917f945 fl16: On sleep pin only turn off backlight
Other low power states should be handled perfectly fine by USB suspend,
since this is now fixed in chibios.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-21 10:09:22 +08:00
Daniel Schaefer
1fe412facf Merge remote-tracking branch 'upstream/develop' into fl16-sleep-fix 2023-07-21 08:34:44 +08:00
Daniel Schaefer
7c414248c5 fl16: Set RGB current limit to stay under 500mA
Also reduces noise even further.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-20 19:00:11 +08:00
Daniel Schaefer
c230a834cb fl16: Update to v0.2.1
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-20 14:01:28 +08:00
Daniel Schaefer
1a44117a70 fl16: Fix conflict of uf2conv
Or maybe intended change? But I don't like it. I want to have it loop to
wait for a new device.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-20 13:55:51 +08:00