This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import struct | |
| import random | |
| # Another day, another hash implementation. I should have been a carpenter. | |
| # If you're reading this, you're probably looking for a bug. Good luck. | |
| class SHA1: | |
| """ | |
| A SHA-1 implementation. It's not secure. It's not fast. | |
| It just exists. Like everything else in this industry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use embassy_sync::pubsub::PubSubBehavior; | |
| use super::music::{music, Music}; | |
| // jingles adapted from | |
| // https://github.com/DavinderHanda/HandaDigitalSpeaker/ | |
| #[derive(Clone, Copy, Debug, defmt::Format)] | |
| #[allow(dead_code)] | |
| pub enum Jingle { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[embassy_executor::task] | |
| pub async fn ui_task() -> ! { | |
| let mut temperature = defmt::unwrap!(RateLimit::new(&TEMPERATURE, TEMP_RATE)); | |
| let intro = Text::from_str("Hello").scroll(); | |
| let duration = intro.scroll_duration(); | |
| TEXT.signal(intro); | |
| Timer::after(duration).await; | |
| loop { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script lang="ts"> | |
| interface Props { | |
| digits: number[], | |
| } | |
| let { digits }: Props = $props(); | |
| // in bitfield order, LSB to MSB | |
| const segments = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'dp']; | |
| // in render order, line by line, as [class, name] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_main] | |
| #![no_std] | |
| use core::fmt::Write; | |
| use panic_halt as _; | |
| use rk3506_m0_pac as pac; | |
| struct Buffer<const N: usize>([u8; N], usize); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Upgrades started January 24, 2026. | |
| [x] babel | |
| [x] bifrost | |
| [x] cartas | |
| [x] erasmus | |
| [ ] hyperion | |
| [x] nara | |
| [ ] zagreus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import dataclasses | |
| import pathlib | |
| import typing | |
| import libfdt # type: ignore | |
| class DeviceTree: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_std] | |
| #![no_main] | |
| use rtt_target::rprintln; | |
| extern crate panic_halt; | |
| #[riscv_rt::entry] | |
| fn main() -> ! { | |
| rtt_target::rtt_init_print!(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main(void) { | |
| //uart->divisor = 234; | |
| *leds = 0x0; | |
| #define SLOTS 6 | |
| uint8_t times[SLOTS] = {0}; | |
| uint8_t subtime = 0; | |
| while (true) { | |
| *leds = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReceiveCode samsung_vol_up("Samsung VOL UP", 'U', SAMSUNG, 0x707, 0x7); | |
| ReceiveCode samsung_vol_down("Samsung VOL DOWN", 'D', SAMSUNG, 0x707, 0xb); | |
| ReceiveCode samsung_mute("Samsung MUTE", 'M', SAMSUNG, 0x707, 0xf); | |
| ReceiveSequence demo_seq("MMMU"); | |
| // Protocol=NEC Address=0xA5 Command=0xA | |
| // Raw-Data=0xF50A5AA5 32 bits LSB first | |
| TransmitRaw pioneer_vol_up("Pioneer VOL UP", {8580,4220, 580,1570, 530,520, 580,1570, 530,520, 580,520, 530,1570, 580,520, 530,1570, 580,520, 530,1570, 580,520, 530,1570, 580,1570, 530,520, 580,1570, 530,520, 580,520, 530,1570, 580,520, 530,1570, 580,520, 530,520, 580,520, 530,520, 580,1570, 530,520, 580,1570, 530,520, 580,1570, 530,1570, 580,1570, 530,1570, 580}); | |
| // Protocol=NEC Address=0xA5 Command=0xB |
NewerOlder