This file contains 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 panic_halt as _; | |
use stm32f1xx_hal::{pac, prelude::*, rcc, usb}; | |
use usb_device::prelude::*; | |
use usbd_serial::{SerialPort, USB_CLASS_CDC}; | |
#[cortex_m_rt::entry] |
This file contains 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
Bluegrass Kitchen Sink | |
Run `help` to list commands. | |
> help | |
Main | |
==== | |
help show this help text | |
test run the built-in test | |
EEMBC CoreMark |
This file contains 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
/* calibration table generated 2022-03-21T15:12:26.123655 | |
table represented within tolerance 0.1% by 46 points | |
capacity: 12.57 Ah | |
138.89 Wh | |
100% | ~~~~~ | |
| ~~ | |
| ~ |
This file contains 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
// find the segmented address of STAGE3_ENTRY | |
// be careful: rust *really* wants to optimize STAGE3_ENTRY into a u16 | |
// in the resulting binary | |
let mut buf_address: u32; | |
unsafe { | |
core::arch::asm!( | |
"mov {1}, {0}", | |
in(reg) STAGE3_ENTRY, | |
out(reg) buf_address, | |
); |
This file contains 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] | |
#![feature(asm_sym)] | |
#![feature(naked_functions)] | |
use blue_loader_stage3::{realmode, realmode_asm}; | |
extern "sysv64" { | |
static REALMODE_IMAGE: &'static [u8]; | |
static mut REALMODE: &'static mut [u8]; |
This file contains 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 angle::Rad; | |
use wasm_bindgen::prelude::*; | |
use wasm_bindgen::JsCast; | |
macro_rules! log { | |
( $( $t:tt )* ) => { | |
web_sys::console::log_1(&format!( $( $t )* ).into()); | |
} | |
} |
This file contains 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
#!/usr/bin/env python3 | |
import argparse | |
import io | |
import os.path | |
import shutil | |
import zipfile | |
from PIL import Image |
This file contains 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 carbide | |
import numpy as np | |
s = carbide.scene.Scene() | |
s.camera.resolution.modify(1920, 1080) | |
s.renderer.spp = 64 | |
s.renderer.spp_step = 4 | |
for _ in range(100): | |
c = carbide.scene.Cube() |
This file contains 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 carbide | |
import numpy as np | |
s = carbide.scene.Scene() | |
s.camera.resolution.modify(1920, 1080) | |
s.renderer.spp = 64 | |
a = carbide.scene.Sphere() | |
a.translate(-2, 0, 5) | |
a.emission = carbide.scene.ConstantTexture.grey(2.0) |
This file contains 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
connected. | |
>>> GetProperties { | |
version: Version( | |
"1.7", | |
), | |
device: None, | |
name: None, | |
} | |
<<< DefSwitchVector { | |
device: "Telescope Simulator", |