Skip to content

Instantly share code, notes, and snippets.

View tschiemer's full-sized avatar

philip tschiemer

View GitHub Profile
GET ?t=deviceList HTTP/1.1
HTTP/1.1 200 OK
Content-length: 38
["Digiface USB (*SERIAL*)",*SOME-NUMBER*]
GET totalmix/Digiface-USB-(*SERIAL*)?t=all HTTP/1.1
@tschiemer
tschiemer / listhids.c
Created March 17, 2021 14:16
quick and dirty method of listing HID devices through libusb with code excerpts from hidapi
/*
* libusb example program to list devices on the bus
* Copyright © 2007 Daniel Drake <dsd@gentoo.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
@tschiemer
tschiemer / macos-usb-hidmanager.m
Last active August 2, 2023 19:59
Detecting a generic Joystick on MacOS and receiving its reports
//with thanks to https://www.programmersought.com/article/3482617526/
// also see
//https://nachtimwald.com/2020/12/06/macos-usb-enumeration-in-c/
//https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/USBBook/USBDeviceInterfaces/USBDevInterfaces.html
// actually, it'd be much quicker just to use https://github.com/libusb/hidapi
#import <Foundation/Foundation.h>
#include <IOKit/hid/IOHIDManager.h>
@tschiemer
tschiemer / main.cpp
Created October 15, 2020 09:12
nucleo stm32l476 SDIO note
#include "mbed.h"
#include "stm32l4xx_hal_rcc.h"
#include "stm32l4xx_hal_rcc_ex.h"
#include "stm32l4xx_hal_gpio.h"
#include "stm32l4xx_hal_gpio_ex.h"
#include "stm32l4xx_ll_sdmmc.h"
// #include "stm32l4xx_hal_sdmmc.h"
@tschiemer
tschiemer / main.cpp
Created October 2, 2020 08:49
mbed os sd block decive
#include "mbed.h"
#include "SDBlockDevice.h"
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
uint8_t block[512] = "Hello World!\n";
using namespace std::chrono;
Timer t;
@tschiemer
tschiemer / main.cpp
Last active July 9, 2020 09:52
NUCLEO-H743ZI2 multicast test
#include "mbed.h"
#include "stm32h743xx.h"
#include "stm32xx_emac.h"
#include "EthernetInterface.h"
EthernetInterface eth;
UDPSocket udpsock;
@tschiemer
tschiemer / alltogethernow.sh
Created July 28, 2019 16:54
macos multichannel audio streaming (rtmp, ffmpeg)
## rtmp server
https://www.npmjs.com/package/node-media-server
### stream
# https://www.ffmpeg.org/ffmpeg-devices.html#avfoundation
# https://stackoverflow.com/questions/4716203/which-are-the-flv-supported-audio-types
# https://trac.ffmpeg.org/wiki/Encode/AAC
# https://trac.ffmpeg.org/wiki/SupportedMediaTypesInFormats
# https://trac.ffmpeg.org/wiki/AudioChannelManipulation
ffmpeg -f avfoundation -i "none:0" -f flv -c:a aac rtmp://localhost/live/test4ch
@tschiemer
tschiemer / NOTE
Last active February 18, 2016 14:20
HelpDeskZ foldable, responsive menu example
Assumed you have downloaded and installed icons from http://genericons.com/ into css folder
@tschiemer
tschiemer / gist:d30973454467ff08d6dc
Created August 4, 2014 08:34
Integrating angular data handling with framework7 (testing/development code)
To share some example (testing) code for any other developers looking into the same issue (note: using requirejs to load script resources):
1. framework7 app
(function(){
var f7App = null;
define(["framework7"],function(){
if (f7App != null){
return f7App;