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
MP | |
4b8101005a7c0100c500468130812781 | |
b0807d7fdb7f3c7f227f6b7eb57e817d | |
3a7eaf7de87c9a7d537d687c887c057d | |
ee7c0a7c657cc97cf37c827bd57bce7c | |
367ceb7cc07cf37cb27c267d817cf87b | |
c07c447c357d2e7d2f7d157d7a7ca57c | |
5d7d767d777d7c7d457d9b7c8a7cd17c | |
fd7ca27dd77dd37dbe7d877dfb7cc57c | |
107d957dbf7df97d387e427e237ef57d |
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
#include "demo.bin.h" | |
void main_thunk(void) | |
{ | |
// WARNING: Subroutine does not return | |
main(); | |
} |
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] | |
const CODE: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/dp32g030-hal-flash.bin")); | |
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] | |
pub struct HeaderFn<F>(*const core::marker::PhantomData<F>); | |
impl<F> HeaderFn<F> { | |
pub const fn from_addr(addr: usize) -> Self { | |
Self(addr as *const core::marker::PhantomData<F>) |
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
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] | |
pub struct HeaderFn<F>(*const core::marker::PhantomData<F>); | |
impl<F> HeaderFn<F> { | |
pub const fn from_addr(addr: usize) -> Self { | |
Self(addr as *const core::marker::PhantomData<F>) | |
} | |
pub fn as_addr(&self) -> usize { | |
self.0 as usize |
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
const INITREGS: &[u16] = &[ | |
0x0008, // 0x00 (r) : unknown 0 | |
0x1080, // 0x01 (r) : chip id | |
// 0x02 (rw): power | |
// [ 15] DSMUTE = 0 (enable soft mute) | |
// [ 14] MUTE = 0 (disable mute) | |
// [ 13] MONO = 0 (stereo) | |
// [ 12] CKSEL = 0 (external clock) | |
// [ 11] reserved = 0 | |
// [ 10] SKMODE = 0 (wrap) |
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 dp32g030_hal as hal; | |
use panic_halt as _; | |
hal::version!(concat!(env!("CARGO_PKG_VERSION"), "-blink")); | |
fn delay_ms(ms: usize) { | |
panic!("don't look in here go away"); |
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
#!/bin/bash | |
set -e | |
# this is mostly copied from arch-chroot | |
BASE="$(realpath $(dirname "$0"))" | |
LFS="$BASE/root" | |
die() { | |
printf "ERROR: " |
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% | ~~~~~ | |
| ~~ | |
| ~ |
NewerOlder