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
// vim: set ts=2 sw=2 expandtab list | |
/* | |
* File: nco.cpp | |
* Description: NCO c++ template and testdriver | |
* | |
* Author: rick kimball | |
* | |
* g++ -DDEBUG -Wall -Os -g nco.cpp -o nco | |
*/ |
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
/*----------------------------------------------------------------------- | |
/ PFF - Low level disk interface modlue include file (C)ChaN, 2009 | |
/-----------------------------------------------------------------------*/ | |
#ifndef _DISKIO | |
#include "integer.h" | |
/* Status of Disk Functions */ | |
typedef BYTE DSTATUS; |
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 - really simple USCI hardware UART code | |
*/ | |
#include <msp430.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#if !defined(__MSP430_HAS_USCI__) | |
#error "This code written for the 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
// 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
#----------------------------------------- | |
# 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 | |
############################################################################## | |
# | |
# 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: |
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
#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> |
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
#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'); |
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
/* | |
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 |
NewerOlder