Skip to content

Instantly share code, notes, and snippets.

@RickKimball
RickKimball / gpio.h
Created January 11, 2012 22:45
msp430 template based gpio experiment
/*
* gpio.h - experimental template based c++ gpio abstraction
*
* Created on: Jan 14, 2012
* Author: kimballr
*
* 01/14/2012 - kimballr added volatile to SFR registers and force inline
* 01/16/2012 - kimballr more functions more experimentation
* 01/28/2012 - kimballr more complete implementation dealing with a 28 pin msp430g2553
*/
@RickKimball
RickKimball / build-mspgcc.sh
Created December 28, 2011 20:27
msp430gcc toolchain fetcher/builder script
#!/usr/bin/env bash
# $Id: build-mspgcc 70 2011-11-05 19:40:36Z ice $
# 2012-02-04 kimballr - modified for latest FSF directory and
# sourceforge patch file name changes
# 2012-03-13 kimballr - added patches
#
# download, build and install GCC toolchain for MSP430
#
# prerequisites
# - bash
@mattwilliamson
mattwilliamson / msp430i2c.c
Created December 18, 2010 00:03
MSP430 I2C Slave
//******************************************************************************
// MSP430G2x21/G2x31 Demo - I2C Slave Receiver, single byte
//
// Description: I2C Slave communicates with I2C Master using
// the USI. Master data should increment from 0x00 with each transmitted byte
// which is verified by the slave.
// LED off for address or data Ack; LED on for address or data NAck.d by the slave.
// ACLK = n/a, MCLK = SMCLK = Calibrated 1MHz
//
// ***THIS IS THE SLAVE CODE***