Skip to content

Instantly share code, notes, and snippets.

Rick Kimball RickKimball

Block or report user

Report or block RickKimball

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RickKimball
RickKimball / gpioblnk.ino
Last active Jul 24, 2019
c++ template blink using register level gpio access
View gpioblnk.ino
// more fun with c++ classes and templates
// http://www.stm32duino.com/viewtopic.php?f=18&t=303
class GPIOPort :
public gpio_reg_map {
public:
void high(const uint32_t pin) {
BSRR = 1 << pin;
}
void low(const uint32_t pin) {
BRR = 1 << pin;
@RickKimball
RickKimball / lpc1114.cfg
Last active Jul 16, 2019
configuration files for lpc812 using SWD from an stlink-v2 discovery board
View lpc1114.cfg
#-----------------------------------------
# NXP lpc1114fn23 Cortex-M0 32k flash, 4k ram
set CHIPNAME lpc1114
set CPUTAPID 0x0BB11477
set CPUROMSIZE 0x8000
set CPURAMSIZE 0x1000
# After reset the chip is clocked by the ~12MHz internal RC oscillator.
# When board-specific code (reset-init handler or device firmware)
@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
You can’t perform that action at this time.