Skip to content

Instantly share code, notes, and snippets.

View Irdroid's full-sized avatar
🎯
Focusing

Hardware Group LTD Irdroid

🎯
Focusing
View GitHub Profile
@mnalis
mnalis / kludge_cdc_acm_irtoy.sh
Last active March 21, 2024 19:13
RaspberryPI IrToy - restore /dev/ttyACM0 interface in newer kernels
cd /lib/modules/`uname -r`/kernel/drivers && \
mv -n media/rc/ir_toy.ko media/rc/ir_toy.ko.DISABLED && \
mv -n usb/class/cdc-acm.ko usb/class/cdc-acm.ko.DISABLED && \
env -i sed -e 's/\xd8\x04\x08\xfd/\xff\x04\x08\xfd/' < usb/class/cdc-acm.ko.DISABLED > usb/class/cdc-acm.ko && \
depmod -a
# reboot after doing the change.
#
# This changes blacklisting of USB ID `04d8:fd08` in cdc-acm, so IrToy gets recognized
# as it was in previous kernel versions, and `/dev/ttyACM0` gets created for it instead of `/dev/lirc0`
@waveacme
waveacme / example.c
Last active April 12, 2023 12:07
linux list.h for userspace
#include <stdlib.h>
#include <stdio.h>
#include "list.h"
typedef struct episode {
int epid;
struct list_head list;
} episode_t;