Commit Graph

98 Commits

Author SHA1 Message Date
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
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
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
e1d4878627 fl16: Disable unused SW pins in RGB LED controller
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-20 13:43:10 +08:00
Daniel Schaefer
b49c27a492 fl16: Rename remaining gridpad files
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-14 15:42:29 +08:00
Daniel Schaefer
2f5d5d692d fl16: Fix activating virtual numlock layer
Would stay in base layer even when numlock was toggled.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-14 09:42:22 +08:00
Daniel Schaefer
db5b134239 fl16: Release 0.2.0
0.1.10 is not allowed as part of bcdDevice

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-14 09:32:10 +08:00
Daniel Schaefer
88736837b2 fl16: Release v0.1.10
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-13 23:49:51 +08:00
Daniel Schaefer
0bb3443cb5 fl16: Sync numlock with numlock layers
Otherwise we might get stuck in numlock disabled state and wouldn't be
able to type numbers anymore or get out of the mode.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-13 23:36:29 +08:00
Daniel Schaefer
d4005cf3c7 fl16: Change backlight PWM frequency to 24kHz
The default of 2048Hz causes loud audible noise.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-13 20:23:38 +08:00
Daniel Schaefer
c88903142d fl16: Save RGB brightness step level
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 09:56:06 +08:00
Daniel Schaefer
ad0354f638 fl16: Rename gridpad to macropad
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 04:44:44 +08:00
Daniel Schaefer
be3d3eed91 fl16: Add backlight step key to macropad
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 04:44:44 +08:00
Daniel Schaefer
fb43a39886 fl16: Fix missing up-arrow key on gridpad
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 04:26:51 +08:00
Daniel Schaefer
ed8cbb8975 fl16: Implement step brightness for RGB keyboards
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 04:25:55 +08:00
Daniel Schaefer
0f2f4fb052 fl16: Update to 0.1.9
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 03:42:44 +08:00
Daniel Schaefer
9a64719a95 fl16: Add useful default mapping for gridpad
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 03:04:24 +08:00
Daniel Schaefer
99457e8cc7 fl16: Add brightness control to numlock layer
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 02:21:03 +08:00
Daniel Schaefer
f2f4de1429 fl16: Implement virtual numlock
Benefits:

- We can put other useful functions on the unused keys

Drawbacks:

- The OS doesn't know when the user is in numlock mode

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 02:02:13 +08:00
Daniel Schaefer
7d36a7a868 fl16: Temporarily remove dynamic serialnumber reading
Causes slow enumeration and raw HID command interface.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 01:46:46 +08:00
Daniel Schaefer
7efec62552 fl16: Update via design marketing names
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 01:43:16 +08:00
Daniel Schaefer
b0f7bd8c1b fl16: Add lighting keycodes to via design JSON
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-11 01:43:12 +08:00
Daniel Schaefer
f3ab3b3416 fl16: Numpad should have backspace, not delete key
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-07 14:00:49 +08:00
Daniel Schaefer
497b7b903a fl16: Update version to v0.1.8
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-06-26 16:19:34 +08:00
Daniel Schaefer
1bef3185a1 fl16: Update marketing names
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-06-26 15:43:16 +08:00
Kieran Levin
e5d1f3cfd8 implement backlight and lower power matrix scanning
With this change the 3.3V rail gets down to 22mA
The backlight and power led will auto turn off when the keyboard
SLEEP# goes low, and will resume when the sleep pin goes high.

For some reason WFI does not sleep as long as I would expect.
Something is triggering interrupts constantly
that we need to figure out to save power.

Signed-off-by: Kieran Levin <ktl@frame.work>
2023-06-26 14:43:01 +08:00
Kieran Levin
e42ca81a49 add wfi to idle thread
WIth this change power is reduced by 3mA

Signed-off-by: Kieran Levin <ktl@frame.work>
2023-06-26 14:42:50 +08:00
Daniel Schaefer
0c1db9e3cb fl16: Add FN+C hotkey for backlight breathing
C because it's right above the backlight icon on the spacebar.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-06-19 15:43:11 +08:00
Daniel Schaefer
adfef9c2db fl16: Change backlight button to step, not toggle
Just like the 13inch Framework we want FN+Space to step through all
three brightness levels, instead of turning on/off.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-06-19 15:05:26 +08:00
Daniel Schaefer
1506793f38 fl16: Don't periodically print scan rate
Useful for debugging but causes constant USB traffic, preventing the
host from going to sleep.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-06-19 14:16:55 +08:00
Daniel Schaefer
cf7af0f894 framework: Update to 0.1.7
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-10 18:28:05 +08:00
Daniel Schaefer
7cd88457b1 framework/ansi: Fix 0 and equals keys
- Equals key (=) wouldn't do anything
- Zero (0) key would register as equals (=)

Issue: Missing entry in key matrix.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-09 15:25:11 +08:00
Daniel Schaefer
59ecef2f09 Update numpad/gridpad to 0.1.6 as well
Makes it easier to have everything on the same version.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-09 14:07:11 +08:00
Daniel Schaefer
7719f7a1e4 Release 0.1.6
Changes:

- Persist FN lock through powercycle
- Fix display switch button - would sometimes not work, only open
  windows menu

The changes only apply to ANSI/ISO/JIS layouts.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-03 17:16:57 +08:00
Daniel Schaefer
a8269765d7 Implement persistent FN lock
Stays locked even through power-cycle.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-03 17:16:18 +08:00
Daniel Schaefer
da053f2cdc fl16: Fix display switch
Works already but sometimes opens the windows start menu.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-05-03 17:13:22 +08:00
Daniel Schaefer
6c1da1a6ab fl16: Rename ansi via file
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-03-23 14:39:36 +08:00
Daniel Schaefer
373d3fc5ca fl16: Prepare for 0.1.5
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-03-23 13:33:42 +08:00
Daniel Schaefer
966f2e7822 Rename lotus to framework
Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-03-23 13:29:15 +08:00