Skip to content

Instantly share code, notes, and snippets.

View packysauce's full-sized avatar

Patrick White packysauce

  • Arlington, VA
View GitHub Profile
### Keybase proof
I hereby claim:
* I am packysauce on github.
* I am packysauce (https://keybase.io/packysauce) on keybase.
* I have a public key whose fingerprint is 661A F849 78E6 0646 1251 0736 3CAF 354D C267 478F
To claim this, I am signing this object:
@packysauce
packysauce / mmc.d
Created January 14, 2016 21:39
omap3 sdcard driver written in D using mkregisters
module devices.omap3.mmc;
import core.buffer, core.pack, core.mkregisters;
import devices.blockdevice;
import kernel;
const SDBP = 8;
const PSTATE_BRE = 1 << 11;
const HCTL_CR = 1 << 17;
@packysauce
packysauce / mkregisters.d
Last active January 14, 2016 21:30
mkregisters.d
module core.mkregisters;
template decimalDigit(int n) // [3]
{
const string decimalDigit = "0123456789"[n..n+1];
}
template itoa(long n)
{
static if (n < 0)