This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* main.cpp - msp430-elf-gcc ws281x USCI SPI driver using inline asm | |
* | |
* Author: kimballr | |
* Date: Dec 28, 2012 | |
* Version: 0.0002 | |
* | |
* 2014-09-29 rrk - updated for both msp430-elf-gcc and msp430-gcc | |
* P1.0 - CS - N/A not used, however it is still useful as an oscilloscope trigger | |
* P1.7 - MOSI -> WS281x DIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----------------------------------------- | |
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#------------------------------------------------------------------------- | |
# Desc: msp430-stdlst - generate standard asm listings, mixed c++/asm and | |
# instruction cycle counts. This code assumes nake430util is in | |
# your PATH. | |
# | |
# Created: June 12, 2012 | |
# Author: rick@kimballsoftware.com | |
# Date: 03-03-2012 | |
# Version: 1.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 50baud.c - example of sending 50 baud async serial output on P1.1 | |
* code uses timer sourced from VLO and sleeps between reports. | |
* | |
* P1.0 - optionally output ACLK for measurement of VLO | |
* P1.1 - 50 baud async serial output | |
* P1.6 - indicator led, on during serial transmission | |
* | |
* TIMER0 - continuous up mode sourced with ACLK (VLO) | |
* TIMER0_A0 - 50 baud ISR enabled and disable for 8-N-1 transmission |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@------------------------------------------------------------------------------- | |
@ ws2811_utils.S - write pixel data to ws2811 leds | |
@------------------------------------------------------------------------------- | |
@ | |
@ lpc810 cortex-m0+ ARM ASM routine for streaming pixels data | |
@ | |
@ assumes interrupts are disabled when called | |
@ assumes 24MHz system clock, flash wait state set to 0 | |
@ assumes P0_2 configured as OUTPUT connected to ws2811 DIN pin | |
@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* signedtest.c - this fails to output int8_t values properly when optimized with -Os | |
* | |
* Compiled like this: | |
* | |
* $ msp430-gcc -mmcu=msp430g2553 -DF_CPU=16000000 -Os -Wall \ | |
* -Wno-main -g -mdisable-watchdog -fdata-sections -ffunction-sections \ | |
* -Wl,--gc-sections signedtest.c | |
* | |
* $ mspdebug rf2500 "prog a.out" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* aciitable - example of using the blocking sw_serial_t template | |
*/ | |
#include "streaming.h" /* pull in insertion operator overloads */ | |
#include "sw_serial.h" | |
// typedefs for software only rx/tx using software pin settings * J3 default jumper settings | |
// this is a good setting for the g2452 and g2231 | |
sw_serial_t<9600, SS_P1_2, SS_NO_PIN> swserial; // HW jumper version TX=P1.2, RX=NOT CONNECTED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* lp_logo - nokia 5110 style bitmap | |
* | |
* Generated by xbmto5110 on Feb 3 2013 14:19:20 | |
* Note: visualize the '1' and '0's rotated 90 degrees counterclockwise | |
*/ | |
static const unsigned char lp_logo[] = { | |
/* width, height/8 */ | |
56,48/8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32_t max31855::memory_read(void) | |
{ | |
uint32_t mask = 0x80000000; | |
uint32_t data = 0; | |
digitalWrite(_cs,LOW); | |
do { | |
digitalWrite(_sclk, HIGH); | |
if (digitalRead(_so)) { | |
data |= mask; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diff linux/work/hardware/lm4f/cores/lm4f/startup_gcc.c ../hardware/lm4f/cores/lm4f/startup_gcc.c | |
71d70 | |
< __attribute__((weak)) extern void Timer0IntHandler(void) {} | |
123c122 | |
< Timer0IntHandler, // Timer 0 subtimer A | |
--- | |
> IntDefaultHandler, // Timer 0 subtimer A | |
$ |