Skip to content

Instantly share code, notes, and snippets.

View romatou18's full-sized avatar

rsacchettini romatou18

View GitHub Profile
@romatou18
romatou18 / Toolchain-Emscripten.cmake
Created June 26, 2020 05:21
Toolchain file to cross-compile an Emscriptem project on linux+GCC x86_64
#
# Toolchain for cross-compiling to JS using Emscripten
#
# Modify EMSCRIPTEN_PREFIX to your liking; use EMSCRIPTEN environment variable
# to point to it or pass it explicitly via -DEMSCRIPTEN_PREFIX=<path>.
#
# mkdir build-emscripten && cd build-emscripten
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/Emscripten.cmake
#
@romatou18
romatou18 / HardwareSerial.cpp
Created March 12, 2020 23:51 — forked from shaielc/HardwareSerial.cpp
interrupt extension for UART
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "HardwareSerial.h"
HardwareSerial Serial(0);
HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {}
void HardwareSerial::setInterrupt(void(*arg)() )