Skip to content

Instantly share code, notes, and snippets.

Rick Kimball RickKimball

View GitHub Profile
@RickKimball
RickKimball / deploy.sh
Created Mar 11, 2019
compile PRU_gpioToggle and load it into pru using remoteproc
View deploy.sh
#! /bin/bash
##############################################################################
#
# Copyright (C) 2016 Zubeen Tolani <ZeekHuge - zeekhuge@gmail.com>
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@RickKimball
RickKimball / rt.cpp
Last active Feb 26, 2019
raspberry pi 2 toggle using gpiomem
View rt.cpp
#include <stdio.h>#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <sched.h>
@RickKimball
RickKimball / diskio.h
Created Apr 7, 2012
msp430 Petit FatFile System sample
View diskio.h
/*-----------------------------------------------------------------------
/ PFF - Low level disk interface modlue include file (C)ChaN, 2009
/-----------------------------------------------------------------------*/
#ifndef _DISKIO
#include "integer.h"
/* Status of Disk Functions */
typedef BYTE DSTATUS;
@RickKimball
RickKimball / readme.md
Last active Nov 26, 2018
ws281x driver using DMA and MSP430F5529 (tested on ws2811 and ws2812b aka neo pixels)
View readme.md

This code is used to drive a ws281x strip using SPI driven by DMA on an msp430f5529.

View StreamingEx.h
#pragma once
struct _HEXZ {
unsigned value;
unsigned len;
_HEXZ(int i, int l = 2): value(i), len(l) {}
};
inline Print &operator <<(Print &obj, const _HEXZ &arg) {
if ( arg.len > 1 && arg.value < 0x10 ) obj.print('0');
View ringbuffer.h
/*
ringbuffer.h - fabooh version of the ringbuffer_t c++ template
Desc: A c++ template class implementing a lock free fixed sized ringbuffer
with arbitrary types. The push and pop methods implement adding and
removing items. The size and capacity methods return the unread
and max number of items in the buffer.
This version has been optimized for embedded single core 32 bit
mcus. It doesn't disable or enable any interrupts. It is safe
@RickKimball
RickKimball / 910.c
Created Jun 29, 2012
msp430 based avr910 AVR ISP programmer
View 910.c
/*
*
* File : 910.c
* Author : Minifloat
* Project: Launchprog
* Version: 1.2 on 10 May 2012
*
*/
#include <msp430.h>
View example.ino
#ifndef FABOOH
#include <Streaming.h>
#include "ringbuffer_simple.h"
#define sizeofs(a) sizeof((a))/sizeof((a[0]))
#else
serial_usart_isr_t<115200, CPU::frequency, TX1_PIN, RX1_PIN> Serial1;
USART_IRQHandler(1, Serial1)
#endif
View ws281x_dma_timer.ino
/*
ws2812x_dma_timer.ino - DMA/TIMER based ws281x/neopixel routines
Generate a ws281x compatible pulse train using PWM timer and DMA
provided duty cycle data. Connect pin PA1 to the DIN of a ws281x
led strip and watch the animation.
2018-07-07 - RRK simplified using RGB values, compute T0/T1 based on F_CPU
2018-07-05 - RRK reworked to avoid interrupt
*/
@RickKimball
RickKimball / blink.cpp
Last active Apr 21, 2018
fabooh - blink with DWT/ITM debug
View blink.cpp
You can’t perform that action at this time.