1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
<!DOCTYPE html>
<html lang="en">
<head>
m4_include(head.html)
</head>
<body>
<header>
<div>
<h1>Framework is Awesome</h1>
m4_include(nav.html)
</div>
<figure class="quote">
<blockquote>
<p>UNIX was not designed to stop its users from doing stupid
things, as that would also stop them from doing clever
things.</p>
</blockquote>
<figcaption>
Doug Gywn
</figcaption>
</figure>
</header>
<main>
<h2>Framework and the <abbr class="ec">EC</abbr></h2>
<p>
<a href="https://frame.work" target="_blank">
Framework
</a>
— for those unaware — is the coolest laptop manufacturer ever.
Their whole <em>shtick</em> 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!
</p>
<p>
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
<a href="https://github.com/FrameworkComputer/EmbeddedController">
code for the embedded controller
</a>
of their laptops, which offers all sorts of possibilities for
customization of the keyboard,
<abbr class="led">LED</abbr>
lights, and more.
</p>
<h2><abbr class="led">LED</abbr> Fun!</h2>
<p>
This is an area of the
<abbr class="ec">EC</abbr>
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
<abbr class="ec">EC</abbr>
to make the power-button
<abbr class="ec">LED</abbr>
green instead of the normal boring white:
</p>
<aside>
<p>
Just a tip: if you want to try any of these patches out,
simply copy the diffs and paste them
into <code>git apply</code>.
</p>
</aside>
<figure>
<figcaption>
<code>~/board/hx20/led.c</code>
</figcaption>
<pre>m4_include(led.diff.html)</pre>
</figure>
<p>
As you can see, it’s all fairly simple. I just had to change our
<code>EC_LED_COLOR_WHITE</code> for
<code>EC_LED_COLOR_GREEN</code>. The codebase defines a few
colors, but they’re defined as <abbr class="rgb">RGB</abbr>
tuples which is awesome, because it opens the door to
custom <abbr class="rgb">RGB</abbr> effects in the future!
</p>
</main>
<hr>
<footer>
m4_include(footer.html)
</footer>
</body>
</html>
|