Skip to content

Instantly share code, notes, and snippets.

View jonlidgard's full-sized avatar
🎯
Focusing

Jon Lidgard jonlidgard

🎯
Focusing
View GitHub Profile
@jonlidgard
jonlidgard / wiringpi.md
Last active October 2, 2018 16:25
Cross Compiling wiringPi on Mac OSX using Docker

Cross Compiling wiringPi on OSX using Docker

For a gentle introduction to cross compiling for the pi with Docker try here

First we need a Docker image with the cross compilation tools installed, so we'll grab the one from above:

docker pull mitchallen/pi-cross-compile

Create the build directory & cd into it

git clone git://git.drogon.net/wiringPi

@jonlidgard
jonlidgard / readme.md
Last active January 15, 2022 02:54
PRU's on the Beaglebone Black

PRU’s on the Beaglebone - ( Using UIO with the TI Kernel )

This guide is written for fellow newbies to the BBB as an aid to understanding how to talk to the onboard PRU's. As a newbie some of my terminology and understanding may not be quite correct, however it's hopefully enough to give you an idea what is going on. The whole subject is a bit of a minefield for the beginner; a lot of things have changed over the last few years and most of the guides you come across are only partially correct, you have to pick through the bones to find the nuggets!. If you're using a modern stock debian image then blindly following them will lead to nothing but frustration. This guide will surely become irrelevant with time too but hopefully as of Oct 2017 it will be of some use.

My system

I'm using the stock debian 9.1 IOT image from Beagleboard.org on an old 2GB Beaglebone Black.

rproc & uio, Kernel images, dtb's, uboot overlays, omg wtf?

In the beginning there was the Linux Userspace I/O interface (UIO) for commu

@jonlidgard
jonlidgard / gist:9cd25b87d7e0570daa96d1b008d2084a
Created September 2, 2016 09:55
Sequencing multiple async operations
#From CommandShift - © Richard Turton 2016
-(void)fetchConfigurationWithCompletion:(void (^)(NSError* error))completion
{
// Define errors to be processed when everything is complete.
// One error per service; in this example we'll have two
__block NSError *configError = nil;
__block NSError *preferenceError = nil;
// Create the dispatch group
dispatch_group_t serviceGroup = dispatch_group_create();