Skip to content

Instantly share code, notes, and snippets.

@artemist
artemist / zephyr-shell.nix
Created October 15, 2021 01:17
Shell to use the Zephyr SDK on NixOS
with import <nixpkgs> { };
mkShell rec {
packages = [
cmake
ninja
gnumake
dtc
python3
] ++ (with python3.pkgs; [
## Oops Code
```
Oops: 0002 [#1] PREEMPT SMP
```
This is the error code value in hex. Each bit has a significance of its own:
- bit 0 == 0 means no page found, 1 means a protection fault
- bit 1 == 0 means read, 1 means write
- bit 2 == 0 means kernel, 1 means user-mode
@briansorahan
briansorahan / mkcd
Created October 1, 2013 15:08
bash alias for a 'mkcd' command which creates a dir and cd's into it
mkcd() { mkdir -p "$@" && cd "$@"; }
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */
/*
All data are fixed-point short integers, in which -32768
to +32768 represent -1.0 to +1.0 respectively. Integer
arithmetic is used for speed, instead of the more natural
floating-point.
For the forward FFT (time -> freq), fixed scaling is
performed to prevent arithmetic overflow, and to map a 0dB
sine/cosine wave (i.e. amplitude = 32767) to two -6dB freq