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 |
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
| #include <iostream> | |
| class TransmitEventClass { | |
| public: | |
| size_t val; | |
| TransmitEventClass(size_t val) : val(val) {} | |
| }; | |
| // just to allow << on all TransmitEvent | |
| std::ostream& operator<<(std::ostream& os, const TransmitEventClass& ev) { |
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 os | |
| import subprocess | |
| from amaranth.build import * | |
| from amaranth.vendor import GowinPlatform | |
| from .resources import * | |
| __all__ = [ |
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
| impl StateMachine for Simplex { | |
| type InputAbove = PhysicalIn; | |
| type InputBelow = HardwareOut; | |
| type OutputAbove = PhysicalOut; | |
| type OutputBelow = HardwareIn; | |
| fn reset(&mut self) { | |
| *self = Self::new_with(self.config.clone()); | |
| } |
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 gdb.unwinder import Unwinder | |
| class FrameID: | |
| def __init__(self, sp, pc): | |
| self.sp = sp | |
| self.pc = pc | |
| class no_unwinder(Unwinder): | |
| def __init__(self): | |
| super().__init__("no_unwinder") |
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
| * Install Pi OS lite 64-bit, with hostname, agrif user, locale. | |
| * modify /boot/firmware/config.txt, put the following under [all]: | |
| # serial console (see also cmdline.txt) | |
| enable_uart=1 | |
| # pisugar RTC on i2c address 0x68 | |
| dtoverlay=i2c-rtc,ds3231 | |
| * use serial console for now |
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
| #!/bin/bash | |
| set -eu -o pipefail | |
| # This hook shows the relevant commits and remote and confirms that you want | |
| # to push this before allowing a push to complete. | |
| # Comment to disable colors. | |
| USE_COLOR="1" | |
| remote="$1" |
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
| # !!! THIS FILE IS GENERATED BY generate.py | |
| # !!! DO NOT EDIT THIS FILE DIRECTLY | |
| # !!! generated at 2025-06-21 14:24:19.715388+00:00 | |
| """SpaceTraders API v2.3.0 | |
| SpaceTraders is an open-universe game and learning platform that | |
| offers a set of HTTP endpoints to control a fleet of ships and explore | |
| a multiplayer universe. |
NewerOlder