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
/* | |
* 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 | |
*/ |
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
/* Default linker script, for normal executables */ | |
OUTPUT_FORMAT("elf32-msp430") | |
OUTPUT_ARCH("msp430") | |
INCLUDE memory.x | |
INCLUDE periph.x | |
SECTIONS | |
{ | |
/* Read-only sections, merged into text segment. */ | |
.hash : { *(.hash) } | |
.dynsym : { *(.dynsym) } |
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
/** | |
* tlv_data dumper - msp430-gcc port | |
* | |
* see: http://www.43oh.com/forum/viewtopic.php?f=10&t=2547 | |
* | |
*/ | |
#include <msp430.h> | |
#include <stdint.h> | |
volatile unsigned ta0txbuf = 0; // Timer0_A0 Transmit buffer pseudo register |
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
/* | |
* pcmplayer.c - play the apple startup sound | |
* | |
* P1.2 - pwm output should be run through low pass filter. | |
* | |
* Like this one: | |
* | |
* http://www.arduino.cc/playground/Code/PCMAudio | |
*/ |
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.c | |
* | |
* MSP-EXP430G2-LaunchPad User Experience Application | |
* | |
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | |
* | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions |
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.c | |
*/ | |
#include "inc\hw_types.h" | |
#include "inc\hw_memmap.h" | |
#include "driverlib\pin_map.h" | |
#include "inc\lm4f120h5qr.h" | |
#include "driverlib\sysctl.h" | |
#include "driverlib\ssi.h" | |
#include "driverlib\gpio.h" |
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
/* | |
* 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
/* | |
* 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
/** | |
* 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" |