From 5b4d4b3400acdace76f5970849fcb7f9cefd2c4d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 30 Jul 2023 04:15:05 +0200 Subject: Genesis commit Not ready for release yet, but I need some commits for M4 to work properly. --- src/srp/fw-ec/index.html | 98 +++++++++++++++++++++++++++++++++++++++++++++ src/srp/fw-ec/led.diff.html | 32 +++++++++++++++ src/srp/index.html | 49 +++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 src/srp/fw-ec/index.html create mode 100644 src/srp/fw-ec/led.diff.html create mode 100644 src/srp/index.html (limited to 'src/srp') diff --git a/src/srp/fw-ec/index.html b/src/srp/fw-ec/index.html new file mode 100644 index 0000000..c04da7f --- /dev/null +++ b/src/srp/fw-ec/index.html @@ -0,0 +1,98 @@ + + + + m4_include(head.html) + + +
+
+

Framework is Awesome

+ m4_include(nav.html) +
+ +
+
+

UNIX was not designed to stop its users from doing stupid + things, as that would also stop them from doing clever + things.

+
+
+ Doug Gywn +
+
+
+ +
+

Framework and the EC

+ +

+ + Framework + + — for those unaware — is the coolest laptop manufacturer ever. + Their whole shtick is producing laptops that give the + user the ability to easily and effortlessly disassemble, repair, + and modify their hardware. I highly suggest checking them out if + you’re interested in computer hardware at all. The laptops even + have hotswappable I/O! +

+ +

+ Anyways getting back on topic, Framework has also been giving + power to the user on the software-side of things too! A good + while ago they open-sourced the + + code for the embedded controller + + of their laptops, which offers all sorts of possibilities for + customization of the keyboard, + LED + lights, and more. +

+ +

LED Fun!

+ +

+ This is an area of the + EC + which I have not really looked at or touched much. I do want to + play around with this a lot more in the coming future though! So + far just for shits-and-giggles, I’ve patched the + EC + to make the power-button + LED + green instead of the normal boring white: +

+ + + +
+
+ ~/board/hx20/led.c +
+
m4_include(led.diff.html)
+
+ +

+ As you can see, it’s all fairly simple. I just had to change our + EC_LED_COLOR_WHITE for + EC_LED_COLOR_GREEN. The codebase defines a few + colors, but they’re defined as RGB + tuples which is awesome, because it opens the door to + custom RGB effects in the future! +

+
+ +
+ + + + diff --git a/src/srp/fw-ec/led.diff.html b/src/srp/fw-ec/led.diff.html new file mode 100644 index 0000000..43f4e4f --- /dev/null +++ b/src/srp/fw-ec/led.diff.html @@ -0,0 +1,32 @@ +diff --git a/board/hx20/led.c b/board/hx20/led.c +index a4dc4564e..dacf73fda 100644 +--- a/board/hx20/led.c ++++ b/board/hx20/led.c +@@ -283,22 +283,22 @@ static void led_set_power(void) + /* don't light up when at lid close */ + if (!lid_is_open()) { + set_pwr_led_color(PWM_LED2, -1); +- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0); ++ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0); + return; + } + + if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) +- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 1); ++ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 1); + else +- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0); ++ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0); + + if (chipset_in_state(CHIPSET_STATE_ON) | power_button_enable) { + if (charge_prevent_power_on(0)) + set_pwr_led_color(PWM_LED2, (power_tick % + LED_TICKS_PER_CYCLE < LED_ON_TICKS) ? +- EC_LED_COLOR_WHITE : -1); ++ EC_LED_COLOR_GREEN : -1); + else +- set_pwr_led_color(PWM_LED2, EC_LED_COLOR_WHITE); ++ set_pwr_led_color(PWM_LED2, EC_LED_COLOR_GREEN); + } else + set_pwr_led_color(PWM_LED2, -1); + } diff --git a/src/srp/index.html b/src/srp/index.html new file mode 100644 index 0000000..aaf72b1 --- /dev/null +++ b/src/srp/index.html @@ -0,0 +1,49 @@ + + + + m4_include(head.html) + + +
+
+

Software-Related Posts

+ m4_include(nav.html) +
+ +
+
+

Object-oriented programming is an exceptionally bad idea + which could only have originated in California.

+
+
+ Edsgar W. Dijkstra +
+
+
+ +
+

+ In this section of the website I cover random software-related + stuff that isn’t related to actual projects of mine. Posts here + could be about anything from a cool program I found, to a patch I + wrote, to me complaining about bad software design. +

+ +

+ Posts: +

+ + +
+ +
+ + + + -- cgit v1.2.3