This code is used to drive a ws281x strip using SPI driven by DMA on an msp430f5529.
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
/* | |
* dwt_timer.h | |
* | |
* Created on: Jun 15, 2015 | |
* Author: kimballr | |
*/ | |
#ifndef DWT_TIMER_H_ | |
#define DWT_TIMER_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
// 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; |
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 --git a/STM32F1/cores/maple/ext_interrupts.h b/STM32F1/cores/maple/ext_interrupts.h | |
index ce1ca03..a406868 100644 | |
--- a/STM32F1/cores/maple/ext_interrupts.h | |
+++ b/STM32F1/cores/maple/ext_interrupts.h | |
@@ -106,7 +106,7 @@ void detachInterrupt(uint8 pin); | |
* | |
* @see noInterrupts() | |
*/ | |
-static __always_inline void interrupts() { | |
+static inline __always_inline void interrupts() { |
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
/* | |
* ActiveLowLED - class for leds that light up when they are grounded | |
*/ | |
#include <Arduino.h> | |
#pragma once | |
class ActiveLowLED { | |
private: | |
const int _pin; | |
int _initialized; |
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
/* This is the code that gets called when the processor first starts execution */ | |
/* following a reset event. Only the absolutely necessary set is performed, */ | |
/* after which the application supplied entry() routine is called. Any fancy */ | |
/* actions (such as making decisions based on the reset cause register, and */ | |
/* resetting the bits in that register) are left solely in the hands of the */ | |
/* application. */ | |
void resetISR(void) { | |
#ifdef WDTHOLD | |
WDTCTL = WDTPW + WDTHOLD; |
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
/******************************************************************************* | |
* iomacros.h - hacked version to work with .S files properly | |
* | |
* Copyright (C) 2003-2013 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 | |
* are met: | |
* | |
* Redistributions of source code must retain the above copyright |
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
all: main | |
main: main.cpp | |
gcc -std=c++0x -Os -g -Wall -o $@ $< | |
clean: | |
rm -f main | |
test: | |
./main |
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 | |
set -x | |
set -e | |
#export LU="-Wl,-uTimer0_A0_Handler -Wl,-umain" | |
export CFLAGS="-I. -mmcu=msp430f5529 -Os -fdata-sections -ffunction-sections" | |
export LU="-Wl,-uTimer0_A0_Handler,-umain,--gc-section" | |
export LDFLAGS="-L . -lintr" |