Skip to content

Instantly share code, notes, and snippets.

View tuna-f1sh's full-sized avatar

John Whittington tuna-f1sh

View GitHub Profile
@tuna-f1sh
tuna-f1sh / Makefile
Created August 23, 2022 09:54
Module Makefile out of tree
obj-m += gs_usb.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
reload: gs_usb.ko
sudo rmmod gs_usb.ko
sudo insmod gs_usb.ko
@tuna-f1sh
tuna-f1sh / timestamping-comparison.py
Last active January 8, 2023 15:48
Delta time comparison of Socketcan gs_usb hardware and software timestamps
import datetime
import statistics
import plotly.express as px
import pandas as pd
from cantools.logreader import Parser
# path to comparison files
software_file = "/Users/john/Desktop/software-timestamps.log"
hardware_file = "/Users/john/Desktop/hardware-timestamps.log"
@tuna-f1sh
tuna-f1sh / Makefile
Last active October 25, 2023 14:49
arduino-cli Makefile
USER_LIB_PATH = lib
OBJDIR = bin
TARGET = $(firstword $(wildcard *.ino))
BOARD_TAG ?= arduino_zero_native
FQBN ?= adafruit:samd:adafruit_feather_m0
UPLOAD_PORT ?= $(wildcard /dev/tty.usbmodem*)
# just to trigger changes to target bin
CSRC := $(shell find . -type f -name '*.c')