Skip to content
Snippets Groups Projects
Commit 77990ec7 authored by Ludwig Knüpfer's avatar Ludwig Knüpfer
Browse files

Merge pull request #327 from LudwigOrtmann/msb430-fix-clean

MSB-430 and related fix and clean
parents 2532dda8 ea672a45
No related branches found
No related tags found
No related merge requests found
...@@ -23,5 +23,5 @@ export HEXFILE = bin/$(PROJECT).hex ...@@ -23,5 +23,5 @@ export HEXFILE = bin/$(PROJECT).hex
export FFLAGS = -j olimex "prog $(HEXFILE)" export FFLAGS = -j olimex "prog $(HEXFILE)"
export USEMODULE += msp430_common export USEMODULE += msp430_common
export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBOARD)/msb-430-common/include
export OFLAGS = -O ihex export OFLAGS = -O ihex
...@@ -153,14 +153,10 @@ void msp430_init_dco(void) ...@@ -153,14 +153,10 @@ void msp430_init_dco(void)
BCSCTL2 = SELM_2 + SELS; /* MCLK und SMCLK = XT2 (safe) */ BCSCTL2 = SELM_2 + SELS; /* MCLK und SMCLK = XT2 (safe) */
#else #else
/* Thdeltais code taken from the FU Berlin sources and reformatted. */
int delta = __msp430_cpu_speed >> 12; int delta = __msp430_cpu_speed >> 12;
//#define DELTA 600
unsigned int compare, oldcapture = 0; unsigned int compare, oldcapture = 0;
unsigned int i; unsigned int i;
BCSCTL1 = 0xa4; /* ACLK is devided by 4. RSEL=6 no division for MCLK BCSCTL1 = 0xa4; /* ACLK is devided by 4. RSEL=6 no division for MCLK
and SSMCLK. XT2 is off. */ and SSMCLK. XT2 is off. */
...@@ -181,7 +177,6 @@ void msp430_init_dco(void) ...@@ -181,7 +177,6 @@ void msp430_init_dco(void)
while (1) { while (1) {
while ((CCTL2 & CCIFG) != CCIFG); /* Wait until capture occured! */ while ((CCTL2 & CCIFG) != CCIFG); /* Wait until capture occured! */
CCTL2 &= ~CCIFG; /* Capture occured, clear flag */ CCTL2 &= ~CCIFG; /* Capture occured, clear flag */
......
...@@ -39,8 +39,8 @@ and the mailinglist (subscription via web site) ...@@ -39,8 +39,8 @@ and the mailinglist (subscription via web site)
* @author Freie Universität Berlin, Computer Systems & Telematics, RIOT * @author Freie Universität Berlin, Computer Systems & Telematics, RIOT
* *
*/ */
#include <msp430x16x.h> #include "msp430x16x.h"
#include <bitarithm.h> #include "bitarithm.h"
/* SCK = P3B5 /* SCK = P3B5
* DATA = P3B4 * DATA = P3B4
......
export INCLUDES += -I$(RIOTBOARD)/msb-430h/include -I$(RIOTBOARD)/msb-430-common/include export INCLUDES += -I$(RIOTBOARD)/msb-430/include
include $(RIOTBOARD)/msb-430-common/Makefile.include include $(RIOTBOARD)/msb-430-common/Makefile.include
...@@ -13,6 +13,8 @@ License. See the file LICENSE in the top level directory for more details. ...@@ -13,6 +13,8 @@ License. See the file LICENSE in the top level directory for more details.
#ifndef __HWTIMER_CPU_H #ifndef __HWTIMER_CPU_H
#define __HWTIMER_CPU_H #define __HWTIMER_CPU_H
#include "cpu.h"
#ifdef CC430 #ifdef CC430
#include <cc430f6137.h> #include <cc430f6137.h>
#else #else
......
...@@ -30,11 +30,11 @@ and Telematics group (http://cst.mi.fu-berlin.de). ...@@ -30,11 +30,11 @@ and Telematics group (http://cst.mi.fu-berlin.de).
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <hwtimer.h> #include "hwtimer.h"
#include <mutex.h> #include "mutex.h"
#include <sht11.h> #include "sht11.h"
#include <sht11-board.h> #include "sht11-board.h"
#include <bitarithm.h> #include "bitarithm.h"
float sht11_temperature_offset; float sht11_temperature_offset;
......
...@@ -15,18 +15,20 @@ ...@@ -15,18 +15,20 @@
* @} * @}
*/ */
#include <thread.h>
#include <kernel.h>
#include <msg.h>
#include <ringbuffer.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <irq.h>
#include <posix_io.h> #include "kernel.h"
#include "irq.h"
#include "thread.h"
#include "msg.h"
#include "ringbuffer.h"
#include "posix_io.h"
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#include <debug.h> #include "debug.h"
static int min(int a, int b) static int min(int a, int b)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment