Skip to content

Instantly share code, notes, and snippets.

View undefinedbehavior's full-sized avatar

Yirui undefinedbehavior

View GitHub Profile
110010010001001101111100100010101010111100111001001111
011001110111010000100101000010011011111001101101001110
100011111100011111101110001011101000101011010010010101
00110110011100001011011111001011111110110010111011111100
00000100011111100010111110001100010000011011100001110
100011100110010111011101100
- space 00
- i 1100
- c 0101
10010001010010011111100001100010001001000110101101000110100011010010011010001111101111110011110110101001101101010111100000001000111111111001000001110001011110010110100111110110101101110011011011110011101110011100
H 010
E 011
O 001
N 000
I 1001
C 1011
T 1010
A 1100
@undefinedbehavior
undefinedbehavior / rpi3_rust_led.rs
Last active January 17, 2017 06:47
Rust demo for Pi 3 bare metal
#![feature(asm)]
#![feature(lang_items)]
#![crate_type = "staticlib"]
#![no_std]
const GPIO_BASE: u32 = 0x3F200000; // base address for Pi 2 and Pi 3
fn sleep(value: u32){
for _ in 1..value {
unsafe { asm!("");}