Skip to content

Instantly share code, notes, and snippets.

View Simon-L's full-sized avatar
😠
Leaving Github!

FergusL Simon-L

😠
Leaving Github!
  • Not Microsoft
  • Paris, France
View GitHub Profile
@Simon-L
Simon-L / user_main.c
Last active November 9, 2015 15:54
ESP8266 HSPI
void ICACHE_FLASH_ATTR
spi_mast_2bytes_write(uint8 spi_no,uint16 data)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MOSI|SPI_USR_MISO);
@Simon-L
Simon-L / Result
Created June 25, 2016 03:08
First step at a Go frontend to Musicbrainz PostgreSQL db
main.Release{ID:1059919, GID:"6a52e0ec-80c3-4d76-85c2-a759ccf6e9ce", Name:"3D", ArtistID:384446, ReleaseGroup:1083136}
@Simon-L
Simon-L / results1.md
Created July 2, 2016 01:31
Cyclictest Results #1

Cyclictest results

On LinkIt Smart 7688 running OpenWRT.

2 minutes, not playing sound, watching using ssh

# ./cyclictest -t5 -p 80 -n -i 1000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.23 0.30 0.18 1/46 2363
@Simon-L
Simon-L / audio-add-driver-for-pcm5102a.patch
Created February 20, 2017 02:17
PCM5102a patches for Armbian on nanopiair
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 7a974e5..3176ced 100755
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -474,3 +474,10 @@ config SND_SOC_TAS5731_CODEC
default n
help
Say Y or M if you want to add support for tas5731.
+
+config SND_SOC_PCM5102A
@Simon-L
Simon-L / linux-sun8i-default.config
Created February 20, 2017 02:27
PCM5102a kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.4.113 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
CONFIG_GENERIC_CLOCKEVENTS=y
@Simon-L
Simon-L / custom.fex
Created February 20, 2017 02:31
PCM5102a fex file for nanopiair
[product]
version = "100"
machine = "FriendlyARM NanoPi NEO Air"
[platform]
debug_mode = 1
eraseflag = 1
next_work = 2
[target]
@Simon-L
Simon-L / Heavy_reverb.cpp
Created February 22, 2017 19:42
Heavy generated file example
/**
* Copyright (c) 2017 Enzien Audio, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, and/or
* sublicense copies of the Software, strictly on a non-commercial basis,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@Simon-L
Simon-L / index.js
Last active March 6, 2017 11:04
What are the pd objects supported by Heavy right now...? And is that patch supported?!
const fs = require('fs')
var $ = require('cheerio')
var request = require('request')
var pdfu = require('pd-fileutils')
var file_pd = fs.readFileSync(process.argv[2]).toString()
var nodes = pdfu.parse(file_pd).nodes
function gotHTML(err, resp, html) {
@Simon-L
Simon-L / index.html
Created March 7, 2017 14:34 — forked from martinsik/index.html
Simple WebSocket server based on libwebsockets. For full description read http://martinsikora.com/libwebsockets-simple-websocket-server
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
window.WebSocket = window.WebSocket || window.MozWebSocket;
var websocket = new WebSocket('ws://127.0.0.1:9000',
@Simon-L
Simon-L / Bitwig_TempoBeatLED_ESP8266.ino
Last active November 19, 2017 15:26
Tempo and time signature indicator with RGB LED for Bitwig Studio using Wemos D1 mini (esp8266) and Neopixel led strip.
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCBundle.h>
#include <OSCData.h>
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 8
#define DATA_PIN 2