Skip to content
Snippets Groups Projects
  1. Nov 14, 2023
  2. Nov 06, 2023
  3. Oct 30, 2023
  4. Oct 26, 2023
  5. Oct 24, 2023
  6. Oct 23, 2023
  7. Oct 20, 2023
  8. Oct 07, 2023
    • Valtteri Koskivuori's avatar
      Fix bug that causes jumpy keyboard backlight adjustment · 11896702
      Valtteri Koskivuori authored
      Here, I actually adjust the hardware parameters, these settings work the
      best based on my understanding of Atmel docs, and experimentation.
      
      The key change is to set the clock select parameters to choose a
      prescale that divides the IO clock by 8.
      In the original implementation, a comment implied that the intent was to
      set the prescale to /256, but the actual code just sets the first CS00
      bit of TCCR0B, which selects no prescaling.
      Now, we explicitly choose a prescale of clock_io/8, which seems to
      result in the desired behaviour. The brightness increases and decreases
      in equal increments, with no jumps with dead keypresses in between.
      There are now 1+8 brightness levels, that is, 'off' + 8 levels of
      brightness.
      Going any higher than a pwmval of 8 with these settings causes the
      backlight to blink, I believe due to overcurrent protection.
      Unverified
      11896702
    • Valtteri Koskivuori's avatar
      Tidy up backlight.c (No functional changes) · 28f1c2c8
      Valtteri Koskivuori authored
      This first commit just aims to make the keyboard backlight pwm setup
      code a bit more obvious, it's now broken up into sections, but the
      original behaviour is intact.
      The only functional change is, that each bit is now explicitly set to
      the intended value. It's my understanding that clearing a bit like
      this:
      value = (0 << offset);
      does not work. Instead, bitwise AND must be used, along with NOT, like
      so:
      value &= ~(1 << offset);
      
      It may be possible that this functional change affects behaviour, as
      those bits are now explicitly set to the intended value, but the
      behaviour observed is unchanged.
      Unverified
      28f1c2c8
  9. Oct 05, 2023
  10. Oct 03, 2023
  11. Sep 06, 2023
  12. Aug 29, 2023
  13. Aug 04, 2023
  14. Jul 27, 2023
Loading