Skip to content

Instantly share code, notes, and snippets.

@bjornvaktaren
bjornvaktaren / init.el
Last active April 26, 2019 12:15
emacs init file
(setq inhibit-startup-message t) ;; Do not display startup message
(tool-bar-mode -1) ;; Hide toolbar
;; Store backups in ~/.emacs.d/backups
(setq
backup-by-copying t
backup-directory-alist '(("." . "~/.emacs.d/backups"))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
@bjornvaktaren
bjornvaktaren / minimal_spi.cpp
Last active April 27, 2024 14:04
Simple SPI example with libftdi and FTDI UM232H
// Quite minimal example showing how to configure MPSSE for SPI using libftdi
// compile like this: g++ minimal_spi.cpp -o minimal_spi -lftdipp -lftdi
#include <ftdi.hpp>
#include <usb.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
// UM232H development module
#define VENDOR 0x0403