mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
io, signal and IAR-GCC checks have been moved into contiki include file
This commit is contained in:
parent
43e5906129
commit
3661ff242e
@ -41,7 +41,7 @@
|
||||
#ifndef __ADXL345_H__
|
||||
#define __ADXL345_H__
|
||||
#include <stdio.h>
|
||||
#include "i2cmaster.h"
|
||||
#include "dev/i2cmaster.h"
|
||||
|
||||
#define DEBUGLEDS 0
|
||||
#if DEBUGLEDS
|
||||
@ -62,21 +62,6 @@
|
||||
#define L_ON(x) (LEDS_PxOUT &= ~x)
|
||||
#define L_OFF(x) (LEDS_PxOUT |= x)
|
||||
|
||||
//XXX Temporary place for defines that are lacking in mspgcc4's gpio.h
|
||||
#ifdef __GNUC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ 0x0041 /* Port 1 Selection 2*/
|
||||
sfrb(P1SEL2, P1SEL2_);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ (0x0041u) /* Port 1 Selection 2*/
|
||||
DEFC( P1SEL2 , P1SEL2_)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Used in accm_read_axis(), eg accm_read_axis(X_AXIS);*/
|
||||
enum ADXL345_AXIS {
|
||||
X_AXIS = 0,
|
||||
@ -306,4 +291,3 @@ process_event_t int1_event, int2_event; // static ?
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
#endif /* ifndef __ADXL345_H__ */
|
||||
|
||||
|
@ -41,12 +41,7 @@
|
||||
#ifndef __I2CMASTER_H__
|
||||
#define __I2CMASTER_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include "contiki.h"
|
||||
#include <dev/spi.h>
|
||||
#include <dev/leds.h>
|
||||
|
||||
|
||||
|
||||
void i2c_enable(void);
|
||||
|
||||
@ -58,18 +53,6 @@ void i2c_transmit_n(u8_t byte_ctr, u8_t *tx_buf);
|
||||
|
||||
u8_t i2c_busy(void);
|
||||
|
||||
//XXX Temporary place for defines that are lacking in mspgcc4's gpio.h
|
||||
#ifdef __GNUC__
|
||||
#ifndef P5SEL2_
|
||||
#define P5SEL2_ 0x0045 /* Port 5 Selection 2*/
|
||||
sfrb(P5SEL2, P5SEL2_);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#define P5SEL2_ (0x0045u) /* Port 5 Selection 2*/
|
||||
DEFC( P5SEL2 , P5SEL2_)
|
||||
#endif
|
||||
|
||||
//XXX Should these defines be in the contiki-conf.h to make it more platform-independent?
|
||||
#define I2C_PxDIR P5DIR
|
||||
#define I2C_PxIN P5IN
|
||||
@ -97,6 +80,7 @@ DEFC( P5SEL2 , P5SEL2_)
|
||||
|
||||
|
||||
#if 0
|
||||
#include <stdio.h>
|
||||
#define PRINTFDEBUG(...) printf(__VA_ARGS__)
|
||||
#else
|
||||
#define PRINTFDEBUG(...)
|
||||
|
@ -33,12 +33,7 @@
|
||||
|
||||
#include "contiki.h"
|
||||
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#include <msp430.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <signal.h>
|
||||
#include <sys/unistd.h>
|
||||
#ifndef __IAR_SYSTEMS_ICC__
|
||||
#define asmv(arg) __asm__ __volatile__(arg)
|
||||
#endif
|
||||
|
||||
|
@ -60,10 +60,8 @@
|
||||
#define CC_CONF_INLINE inline
|
||||
#endif
|
||||
|
||||
|
||||
/* CPU target speed in Hz */
|
||||
/* CPU target speed in Hz */
|
||||
#define F_CPU 8000000uL // 8MHz by default
|
||||
#define F_CPU 8000000uL /* 8MHz by default */
|
||||
//Enric #define F_CPU 3900000uL /*2457600uL*/
|
||||
|
||||
/* Our clock resolution, this is the same as Unix HZ. */
|
||||
@ -78,6 +76,28 @@
|
||||
#define MSP430_MEMCPY_WORKAROUND 1
|
||||
#include "msp430def.h"
|
||||
|
||||
/* XXX Temporary place for defines that are lacking in mspgcc4's gpio.h */
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ (0x0041u) /* Port 1 Selection 2*/
|
||||
DEFC( P1SEL2 , P1SEL2_)
|
||||
#endif
|
||||
#ifndef P5SEL2_
|
||||
#define P5SEL2_ (0x0045u) /* Port 5 Selection 2*/
|
||||
DEFC( P5SEL2 , P5SEL2_)
|
||||
#endif
|
||||
#else /* __IAR_SYSTEMS_ICC__ */
|
||||
#ifdef __GNUC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ 0x0041 /* Port 1 Selection 2*/
|
||||
sfrb(P1SEL2, P1SEL2_);
|
||||
#endif
|
||||
#ifndef P5SEL2_
|
||||
#define P5SEL2_ 0x0045 /* Port 5 Selection 2*/
|
||||
sfrb(P5SEL2, P5SEL2_);
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* __IAR_SYSTEMS_ICC__ */
|
||||
|
||||
/* Types for clocks and uip_stats */
|
||||
typedef unsigned short uip_stats_t;
|
||||
|
@ -65,6 +65,28 @@
|
||||
#define MSP430_MEMCPY_WORKAROUND 1
|
||||
#include "msp430def.h"
|
||||
|
||||
/* XXX Temporary place for defines that are lacking in mspgcc4's gpio.h */
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ (0x0041u) /* Port 1 Selection 2*/
|
||||
DEFC( P1SEL2 , P1SEL2_)
|
||||
#endif
|
||||
#ifndef P5SEL2_
|
||||
#define P5SEL2_ (0x0045u) /* Port 5 Selection 2*/
|
||||
DEFC( P5SEL2 , P5SEL2_)
|
||||
#endif
|
||||
#else /* __IAR_SYSTEMS_ICC__ */
|
||||
#ifdef __GNUC__
|
||||
#ifndef P1SEL2_
|
||||
#define P1SEL2_ 0x0041 /* Port 1 Selection 2*/
|
||||
sfrb(P1SEL2, P1SEL2_);
|
||||
#endif
|
||||
#ifndef P5SEL2_
|
||||
#define P5SEL2_ 0x0045 /* Port 5 Selection 2*/
|
||||
sfrb(P5SEL2, P5SEL2_);
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* __IAR_SYSTEMS_ICC__ */
|
||||
|
||||
/* Types for clocks and uip_stats */
|
||||
typedef unsigned short uip_stats_t;
|
||||
|
Loading…
Reference in New Issue
Block a user