Skip to content

Instantly share code, notes, and snippets.

@tonywallace64
tonywallace64 / gist:225822523f7255205a17ed2e59ea0996
Last active November 27, 2017 22:02
Multithreaded erlang port drivers
/* This is a skeleton to show how to make multithreaded erlang port drivers */
/* This programme requires erl_comm.c from the standard erlang distribution */
/* setup, shutdown and handle_port_messages are device specific */
/* setup is expected to open device file for reading */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>