Skip to content

Instantly share code, notes, and snippets.

View mattyoung101's full-sized avatar

Matt Young mattyoung101

View GitHub Profile
@mattyoung101
mattyoung101 / README.md
Last active November 28, 2024 13:21
Yosys eqy reproducer
  1. Download gist
  2. Run eqy -f reproduce_sat.eqy - this should pass
  3. Run eqy -f reproduce_sby.eqy - this will not pass
@mattyoung101
mattyoung101 / Steer.sms
Created October 14, 2022 07:15
Moog firmware
#define SWA IN(3)==1
#define SWB IN(4)==0
EIGN(W,0)
ZS
BAUD(0)=57600
BRKRLS
OFF
s = 1 ' State, 0=Off, 1=On 2=Off Requested
p = PA
r = 20
@mattyoung101
mattyoung101 / movavg.c
Last active December 24, 2020 15:57
Moving average & moving median in C with dynamic sizing.
#include "movavg.h"
#include <string.h>
#include <stdio.h>
#include <math.h>
// Simple moving average in C, v1.3
// Copyright (c) 2019-2020 Matt Young. Licensed into the public domain with the Unlicense.
movavg_t *movavg_create(size_t size){
movavg_t *movavg = calloc(1, sizeof(movavg_t));