Skip to content

Instantly share code, notes, and snippets.

@csdexter
csdexter / fbtft-cansleep-no-warn-flood_5.11.14.patch
Created May 11, 2021 15:20
Kernel patch for FBTFT to make it cansleep-compatible
--- drivers/staging/fbtft/fbtft-bus.c.orig 2021-05-11 17:36:24.279207628 +0300
+++ drivers/staging/fbtft/fbtft-bus.c 2021-05-11 17:57:04.815205526 +0300
@@ -135,8 +135,13 @@
remain = len / 2;
vmem16 = (u16 *)(par->info->screen_buffer + offset);
- if (par->gpio.dc)
- gpiod_set_value(par->gpio.dc, 1);
+ if (par->gpio.dc) {
+ if (gpiod_cansleep(par->gpio.dc)) {
@csdexter
csdexter / SpeakerTestC6DHW1TWav.txt
Created October 1, 2017 15:50
Hercules Muse Pocket speaker-test data
$ speaker-test -c 6 -D hw:1 -t wav
speaker-test 1.1.3
Playback device is hw:1
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 87381
Period size range from 48 to 43690
@csdexter
csdexter / LsUsbVD06f8.txt
Created September 30, 2017 09:07
Hercules Muse Pocket USB data
$ sudo lsusb -v -d 06f8:
Bus 001 Device 014: ID 06f8:c000 Guillemot Corp. Hercules Muse Pocket
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
@csdexter
csdexter / PaCmdListCards.txt
Created September 29, 2017 19:30
Hercules Muse Pocket PulseAudio data
$ pacmd list-cards
2 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_1b.0>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe2e60000 irq 31"
@csdexter
csdexter / ProcAsoundCard1Stream0.txt
Created September 29, 2017 19:22
Hercules Muse Pocket ALSA Data
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xe2e60000 irq 31
1 [Audio ]: USB-Audio - USB Audio
USB Audio at usb-0000:00:1a.0-1.1.3.1, full speed
$ ll /proc/asound/card1
total 0
-r--r--r--. 1 root root 0 Sep 29 20:20 id
-r--r--r--. 1 root root 0 Sep 29 20:20 stream0
-r--r--r--. 1 root root 0 Sep 29 20:20 usbbus
@csdexter
csdexter / 01-madcatz-rat7.conf
Created August 23, 2014 21:26
Xorg configuration to make a Mad Catz R.A.T.7's thumbwheel work
Section "InputClass"
Identifier "madcatz-rat7"
Driver "evdev"
MatchUSBID "0738:1708"
MatchIsPointer "true"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 13 14 15 16 17"
Option "EmulateWheel" "false"
EndSection
@csdexter
csdexter / CNCWatchDogDS.ino
Last active March 23, 2024 00:16
DigiSpark (Arduino) code for an externally controlled 12.5kHz CNC WatchDog signal generator
// Watchdog signal generator for ... pretty much anyone stuck with
// LinuxCNC and its demented charge pump design.
// PB2 goes to the parallel port's Amplifier Enable output pin,
// PB1 goes to the on-board LED which turns on when we're active,
// PB0 goes to the parallel cable's Charge Pump input wire.
#include <avr/sleep.h>
// Set our electrical interface up.