Merge pull request #3016 from gebart/pr/tab-indentation

Inconsistent indentation in some files
This commit is contained in:
Peter Kietzmann 2015-05-18 15:45:15 +02:00
commit b3e78ddc33
26 changed files with 294 additions and 295 deletions

View File

@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA 675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains 0. This License applies to any program or other work which contains
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it possible use to the public, the best way to achieve this is to make it

View File

@ -88,8 +88,8 @@ This software is only provided semi-static binary and source code form.
To use the semi-static binary, simply copy it to a location where you To use the semi-static binary, simply copy it to a location where you
can run it, and change the permissions if necessary: can run it, and change the permissions if necessary:
cp lpc2k_pgm /usr/local/bin cp lpc2k_pgm /usr/local/bin
chmod 755 /usr/local/bin/lpc2k_pgm chmod 755 /usr/local/bin/lpc2k_pgm
The semi-static binary has all of the GTK and X11 libraries statically The semi-static binary has all of the GTK and X11 libraries statically
linked into it, for maximum compatibility with all linux distributions. linked into it, for maximum compatibility with all linux distributions.

View File

@ -3,8 +3,8 @@
$h = '[0-9A-Fa-f]'; $h = '[0-9A-Fa-f]';
$n = 1; $n = 1;
while (<stdin>) { while (<stdin>) {
next unless /^\s*$h+:\s+($h{8})/; next unless /^\s*$h+:\s+($h{8})/;
$data[$n++] = "0x$1"; $data[$n++] = "0x$1";
} }
$data[0] = $n; $data[0] = $n;
#$size = $ARGV[0]; #$size = $ARGV[0];

View File

@ -3,44 +3,44 @@
@arg = split(/\s+/, `gtk-config --libs`); @arg = split(/\s+/, `gtk-config --libs`);
%liblist = ( %liblist = (
'libgtk.a', '/usr/lib/libgtk.a', 'libgtk.a', '/usr/lib/libgtk.a',
'libgdk.a', '/usr/lib/libgdk.a', 'libgdk.a', '/usr/lib/libgdk.a',
'libgmodule.a', '/usr/lib/libgmodule.a', 'libgmodule.a', '/usr/lib/libgmodule.a',
'libglib.a', '/usr/lib/libglib.a', 'libglib.a', '/usr/lib/libglib.a',
'libXi.a', '/usr/X11R6/lib/libXi.a', 'libXi.a', '/usr/X11R6/lib/libXi.a',
'libXext.a', '/usr/X11R6/lib/libXext.a', 'libXext.a', '/usr/X11R6/lib/libXext.a',
'libX11.a', '/usr/X11R6/lib/libX11.a' 'libX11.a', '/usr/X11R6/lib/libX11.a'
); );
for ($i=0; $i<@arg; $i++) { for ($i=0; $i<@arg; $i++) {
$a = $arg[$i]; $a = $arg[$i];
next if $a eq '-rdynamic'; # always delete -rdynamic next if $a eq '-rdynamic'; # always delete -rdynamic
if (($a eq '-lm') || ($a eq '-ldl') || ($a =~ /^-L/)) { if (($a eq '-lm') || ($a eq '-ldl') || ($a =~ /^-L/)) {
# a few things we never change # a few things we never change
print "$a "; print "$a ";
next; next;
} }
if ($a =~ /^-l/) { if ($a =~ /^-l/) {
$lib = $'; $lib = $';
$lib = 'lib' . $lib . '.a'; $lib = 'lib' . $lib . '.a';
# first check if it's in the known location # first check if it's in the known location
if (-f $liblist{$lib}) { if (-f $liblist{$lib}) {
print $liblist{$lib}, " "; print $liblist{$lib}, " ";
next; next;
} }
# resort to trying whereis to find it # resort to trying whereis to find it
@source = split(/\s+/, `whereis $lib`); @source = split(/\s+/, `whereis $lib`);
undef($static); undef($static);
for ($j=0; $j<@source; $j++) { for ($j=0; $j<@source; $j++) {
$static = $source[$j] if $source[$j] =~ /$lib$/; $static = $source[$j] if $source[$j] =~ /$lib$/;
} }
# if we found a static lib, use it. # if we found a static lib, use it.
if ($static) { if ($static) {
print $static, " "; print $static, " ";
} else { } else {
print $a, " "; print $a, " ";
} }
} }
} }
print "\n"; print "\n";

View File

@ -1,30 +1,30 @@
/* ARM code to run user code */ /* ARM code to run user code */
/* on the LPC23xx chips, the bootloader defaults to using the RC */ /* on the LPC23xx chips, the bootloader defaults to using the RC */
/* osciallator and it activates the PLL to create 14.78 MHz, even */ /* osciallator and it activates the PLL to create 14.78 MHz, even */
/* if there is no crystal. However, when we use try to jump to */ /* if there is no crystal. However, when we use try to jump to */
/* the user's code, their startup routine may (incorrectly) assume */ /* the user's code, their startup routine may (incorrectly) assume */
/* the PLL is not enabled and crash if it is. So in addition to */ /* the PLL is not enabled and crash if it is. So in addition to */
/* remapping the reset vector to flash, we have to shut off the */ /* remapping the reset vector to flash, we have to shut off the */
/* PLL so the user's startup code sees the same conditions as it */ /* PLL so the user's startup code sees the same conditions as it */
/* would following a hard reset */ /* would following a hard reset */
begin: begin:
adr r0, const adr r0, const
ldr r1, [r0] /* r1 points to MEMMAP register */ ldr r1, [r0] /* r1 points to MEMMAP register */
ldr r2, [r0,#4] /* r2 points to PLLCON */ ldr r2, [r0,#4] /* r2 points to PLLCON */
ldr r3, [r0,#8] /* r3 points to PLLFEED */ ldr r3, [r0,#8] /* r3 points to PLLFEED */
mov r0, #1 mov r0, #1
str r0, [r1] /* remap interrupt vectors to flash */ str r0, [r1] /* remap interrupt vectors to flash */
mov r4, #0xAA mov r4, #0xAA
mov r5, #0x55 mov r5, #0x55
str r0, [r2] /* disconnect the PLL, PLLCON = 1 */ str r0, [r2] /* disconnect the PLL, PLLCON = 1 */
str r4, [r3] str r4, [r3]
str r5, [r3] str r5, [r3]
mov r0, #0 mov r0, #0
str r0, [r2] /* disable the PLL, PLLCON = 0 */ str r0, [r2] /* disable the PLL, PLLCON = 0 */
str r4, [r3] str r4, [r3]
str r5, [r3] str r5, [r3]
mov pc, #0 /* and then jump to the user's code */ mov pc, #0 /* and then jump to the user's code */
const: const:
.int 0xE01FC040 /* MEMMAP register */ .int 0xE01FC040 /* MEMMAP register */
.int 0xE01FC080 /* PLLCON */ .int 0xE01FC080 /* PLLCON */
.int 0xE01FC08C /* PLLFEED */ .int 0xE01FC08C /* PLLFEED */

View File

@ -1,11 +1,11 @@
/* ARM code to run user code */ /* ARM code to run user code */
/* This allows us to jump to the user's code in flash. We have */ /* This allows us to jump to the user's code in flash. We have */
/* to remap the flash before jumping. */ /* to remap the flash before jumping. */
begin: begin:
adr r0, const adr r0, const
ldr r1, [r0] /* r1 points to MEMMAP register */ ldr r1, [r0] /* r1 points to MEMMAP register */
mov r0, #1 mov r0, #1
str r0, [r1] /* remap interrupt vectors to flash */ str r0, [r1] /* remap interrupt vectors to flash */
mov pc, #0 /* and then jump to the user's code */ mov pc, #0 /* and then jump to the user's code */
const: const:
.int 0xE01FC040 /* MEMMAP register */ .int 0xE01FC040 /* MEMMAP register */

View File

@ -4,19 +4,19 @@ pid=`pgrep pseudoterm`
if test "$pid" = "" ; then if test "$pid" = "" ; then
echo " Pseudoterm not running." echo " Pseudoterm not running."
else else
if test "$1" = "continue" ; then if test "$1" = "continue" ; then
kill -s USR1 $pid; kill -s USR1 $pid;
elif test "$1" = "pause" ; then elif test "$1" = "pause" ; then
kill -s USR2 $pid ; kill -s USR2 $pid ;
elif test "$1" = "stop" ; then elif test "$1" = "stop" ; then
kill $pid ; kill $pid ;
else else
echo "Usage:"; echo "Usage:";
echo "termctrl.sh continue/pause/stop"; echo "termctrl.sh continue/pause/stop";
fi fi
fi fi

View File

@ -138,8 +138,8 @@
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#elif defined ( __CSMC__ ) /* Cosmic */ #elif defined ( __CSMC__ ) /* Cosmic */
#if ( __CSMC__ & 0x400) // FPU present for parser #if ( __CSMC__ & 0x400) /* FPU present for parser */
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#endif #endif

View File

@ -138,8 +138,8 @@
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#elif defined ( __CSMC__ ) /* Cosmic */ #elif defined ( __CSMC__ ) /* Cosmic */
#if ( __CSMC__ & 0x400) // FPU present for parser #if ( __CSMC__ & 0x400) /* FPU present for parser */
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#endif #endif

View File

@ -138,8 +138,8 @@
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#elif defined ( __CSMC__ ) /* Cosmic */ #elif defined ( __CSMC__ ) /* Cosmic */
#if ( __CSMC__ & 0x400) // FPU present for parser #if ( __CSMC__ & 0x400) /* FPU present for parser */
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif #endif
#endif #endif

View File

@ -171,8 +171,8 @@
#define __FPU_USED 0 #define __FPU_USED 0
#endif #endif
#elif defined ( __CSMC__ ) /* Cosmic */ #elif defined ( __CSMC__ ) /* Cosmic */
#if ( __CSMC__ & 0x400) // FPU present for parser #if ( __CSMC__ & 0x400) /* FPU present for parser */
#if (__FPU_PRESENT == 1) #if (__FPU_PRESENT == 1)
#define __FPU_USED 1 #define __FPU_USED 1
#else #else

View File

@ -22,7 +22,7 @@
#include <stdint.h> #include <stdint.h>
#include "cpu-conf.h" #include "cpu-conf.h"
#define FLASH_BASE (0x00000000) #define FLASH_BASE (0x00000000)
static void cpu_clock_init(void); static void cpu_clock_init(void);

View File

@ -127,71 +127,71 @@ const void *interrupt_vector[] = {
(void *) isr_pendsv, /* pendSV interrupt, used for task switching in RIOT */ (void *) isr_pendsv, /* pendSV interrupt, used for task switching in RIOT */
(void *) isr_systick, /* SysTick interrupt, not used in RIOT */ (void *) isr_systick, /* SysTick interrupt, not used in RIOT */
/* MKW22D512 specific peripheral handlers */ /* MKW22D512 specific peripheral handlers */
(void *) isr_dma0, /* DMA channel 0 transfer complete */ (void *) isr_dma0, /* DMA channel 0 transfer complete */
(void *) isr_dma1, /* DMA channel 1 transfer complete */ (void *) isr_dma1, /* DMA channel 1 transfer complete */
(void *) isr_dma2, /* DMA channel 2 transfer complete */ (void *) isr_dma2, /* DMA channel 2 transfer complete */
(void *) isr_dma3, /* DMA channel 3 transfer complete */ (void *) isr_dma3, /* DMA channel 3 transfer complete */
(void *) isr_dma4, /* DMA channel 4 transfer complete */ (void *) isr_dma4, /* DMA channel 4 transfer complete */
(void *) isr_dma5, /* DMA channel 5 transfer complete */ (void *) isr_dma5, /* DMA channel 5 transfer complete */
(void *) isr_dma6, /* DMA channel 6 transfer complete */ (void *) isr_dma6, /* DMA channel 6 transfer complete */
(void *) isr_dma7, /* DMA channel 7 transfer complete */ (void *) isr_dma7, /* DMA channel 7 transfer complete */
(void *) isr_dma8, /* DMA channel 8 transfer complete */ (void *) isr_dma8, /* DMA channel 8 transfer complete */
(void *) isr_dma9, /* DMA channel 9 transfer complete */ (void *) isr_dma9, /* DMA channel 9 transfer complete */
(void *) isr_dma10, /* DMA channel 10 transfer complete */ (void *) isr_dma10, /* DMA channel 10 transfer complete */
(void *) isr_dma11, /* DMA channel 11 transfer complete */ (void *) isr_dma11, /* DMA channel 11 transfer complete */
(void *) isr_dma12, /* DMA channel 12 transfer complete */ (void *) isr_dma12, /* DMA channel 12 transfer complete */
(void *) isr_dma13, /* DMA channel 13 transfer complete */ (void *) isr_dma13, /* DMA channel 13 transfer complete */
(void *) isr_dma14, /* DMA channel 14 transfer complete */ (void *) isr_dma14, /* DMA channel 14 transfer complete */
(void *) isr_dma15, /* DMA channel 15 transfer complete */ (void *) isr_dma15, /* DMA channel 15 transfer complete */
(void *) isr_dma_error, /* DMA channel 0 - 15 error */ (void *) isr_dma_error, /* DMA channel 0 - 15 error */
(void *) isr_mcm, /* MCM normal interrupt */ (void *) isr_mcm, /* MCM normal interrupt */
(void *) isr_ftfl, /* FTFL command complete */ (void *) isr_ftfl, /* FTFL command complete */
(void *) isr_ftfl_collision, /* FTFL read collision */ (void *) isr_ftfl_collision, /* FTFL read collision */
(void *) isr_pmc, /* PMC controller low-voltage detect low-voltage warning */ (void *) isr_pmc, /* PMC controller low-voltage detect low-voltage warning */
(void *) isr_llwu, /* Low leakage wakeup */ (void *) isr_llwu, /* Low leakage wakeup */
(void *) isr_wdog_ewm, /* Single interrupt vector for WDOG and EWM */ (void *) isr_wdog_ewm, /* Single interrupt vector for WDOG and EWM */
(void *) isr_rng, /* Randon number generator */ (void *) isr_rng, /* Randon number generator */
(void *) isr_i2c0, /* Inter-integrated circuit 0 */ (void *) isr_i2c0, /* Inter-integrated circuit 0 */
(void *) isr_i2c1, /* Inter-integrated circuit 1 */ (void *) isr_i2c1, /* Inter-integrated circuit 1 */
(void *) isr_spi0, /* Serial peripheral Interface 0 */ (void *) isr_spi0, /* Serial peripheral Interface 0 */
(void *) isr_spi1, /* Serial peripheral Interface 1 */ (void *) isr_spi1, /* Serial peripheral Interface 1 */
(void *) isr_i2s0_tx, /* Integrated interchip sound 0 transmit interrupt */ (void *) isr_i2s0_tx, /* Integrated interchip sound 0 transmit interrupt */
(void *) isr_i2s0_rx, /* Integrated interchip sound 0 receive interrupt */ (void *) isr_i2s0_rx, /* Integrated interchip sound 0 receive interrupt */
(void *) dummy_handler, /* Reserved interrupt */
(void *) isr_uart0_rx_tx, /* UART0 receive/transmit interrupt */
(void *) isr_uart0_err, /* UART0 error interrupt */
(void *) isr_uart1_rx_tx, /* UART1 receive/transmit interrupt */
(void *) isr_uart1_err, /* UART1 error interrupt */
(void *) isr_uart2_rx_tx, /* UART2 receive/transmit interrupt */
(void *) isr_uart2_err, /* UART2 error interrupt */
(void *) dummy_handler, /* Reserved interrupt */
(void *) dummy_handler, /* Reserved interrupt */
(void *) isr_adc0, /* Analog-to-digital converter 0 */
(void *) isr_cmp0, /* Comparator 0 */
(void *) isr_cmp1, /* Comparator 1 */
(void *) isr_ftm0, /* FlexTimer module 0 fault overflow and channels interrupt */
(void *) isr_ftm1, /* FlexTimer module 1 fault overflow and channels interrupt */
(void *) isr_ftm2, /* FlexTimer module 2 fault overflow and channels interrupt */
(void *) isr_cmt, /* Carrier modulator transmitter */
(void *) isr_rtc, /* Real time clock */
(void *) isr_rtc_seconds, /* Real time clock seconds */
(void *) isr_pit0, /* Periodic interrupt timer channel 0 */
(void *) isr_pit1, /* Periodic interrupt timer channel 1 */
(void *) isr_pit2, /* Periodic interrupt timer channel 2 */
(void *) isr_pit3, /* Periodic interrupt timer channel 3 */
(void *) isr_pdb0, /* Programmable delay block */
(void *) isr_usb0, /* USB OTG interrupt */
(void *) isr_usbdcd, /* USB charger detect */
(void *) dummy_handler, /* Reserved interrupt */ (void *) dummy_handler, /* Reserved interrupt */
(void *) isr_dac0, /* Digital-to-analog converter 0 */ (void *) isr_uart0_rx_tx, /* UART0 receive/transmit interrupt */
(void *) isr_mcg, /* Multipurpose clock generator */ (void *) isr_uart0_err, /* UART0 error interrupt */
(void *) isr_lptmr0, /* Low power timer interrupt */ (void *) isr_uart1_rx_tx, /* UART1 receive/transmit interrupt */
(void *) isr_porta, /* Port A pin detect interrupt */ (void *) isr_uart1_err, /* UART1 error interrupt */
(void *) isr_portb, /* Port B pin detect interrupt */ (void *) isr_uart2_rx_tx, /* UART2 receive/transmit interrupt */
(void *) isr_portc, /* Port C pin detect interrupt */ (void *) isr_uart2_err, /* UART2 error interrupt */
(void *) isr_portd, /* Port D pin detect interrupt */ (void *) dummy_handler, /* Reserved interrupt */
(void *) isr_porte, /* Port E pin detect interrupt */ (void *) dummy_handler, /* Reserved interrupt */
(void *) isr_swi, /* Software interrupt */ (void *) isr_adc0, /* Analog-to-digital converter 0 */
(void *) isr_cmp0, /* Comparator 0 */
(void *) isr_cmp1, /* Comparator 1 */
(void *) isr_ftm0, /* FlexTimer module 0 fault overflow and channels interrupt */
(void *) isr_ftm1, /* FlexTimer module 1 fault overflow and channels interrupt */
(void *) isr_ftm2, /* FlexTimer module 2 fault overflow and channels interrupt */
(void *) isr_cmt, /* Carrier modulator transmitter */
(void *) isr_rtc, /* Real time clock */
(void *) isr_rtc_seconds, /* Real time clock seconds */
(void *) isr_pit0, /* Periodic interrupt timer channel 0 */
(void *) isr_pit1, /* Periodic interrupt timer channel 1 */
(void *) isr_pit2, /* Periodic interrupt timer channel 2 */
(void *) isr_pit3, /* Periodic interrupt timer channel 3 */
(void *) isr_pdb0, /* Programmable delay block */
(void *) isr_usb0, /* USB OTG interrupt */
(void *) isr_usbdcd, /* USB charger detect */
(void *) dummy_handler, /* Reserved interrupt */
(void *) isr_dac0, /* Digital-to-analog converter 0 */
(void *) isr_mcg, /* Multipurpose clock generator */
(void *) isr_lptmr0, /* Low power timer interrupt */
(void *) isr_porta, /* Port A pin detect interrupt */
(void *) isr_portb, /* Port B pin detect interrupt */
(void *) isr_portc, /* Port C pin detect interrupt */
(void *) isr_portd, /* Port D pin detect interrupt */
(void *) isr_porte, /* Port E pin detect interrupt */
(void *) isr_swi, /* Software interrupt */
(void *) dummy_handler, /* reserved 81 */ (void *) dummy_handler, /* reserved 81 */
(void *) dummy_handler, /* reserved 82 */ (void *) dummy_handler, /* reserved 82 */
(void *) dummy_handler, /* reserved 83 */ (void *) dummy_handler, /* reserved 83 */

View File

@ -44,8 +44,8 @@
/** /**
* manage the heap * manage the heap
*/ */
extern uintptr_t __heap_start; /* start of heap memory space */ extern uintptr_t __heap_start; /* start of heap memory space */
extern uintptr_t __heap_max; /* maximum for end of heap memory space */ extern uintptr_t __heap_max; /* maximum for end of heap memory space */
/* current position in heap */ /* current position in heap */
static caddr_t heap = {(caddr_t) &__heap_start}; static caddr_t heap = {(caddr_t) &__heap_start};

View File

@ -1,21 +1,21 @@
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME
} else { } else {
set _CHIPNAME lpc2378 set _CHIPNAME lpc2378
} }
if { [info exists ENDIAN] } { if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN set _ENDIAN $ENDIAN
} else { } else {
set _ENDIAN little set _ENDIAN little
} }
if { [info exists CPUTAPID ] } { if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID set _CPUTAPID $CPUTAPID
} else { } else {
# force an error till we get a good number # force an error till we get a good number
set _CPUTAPID 0xffffffff set _CPUTAPID 0xffffffff
} }
#delays on reset lines #delays on reset lines
@ -37,10 +37,10 @@ set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0
$_TARGETNAME configure -event reset-init { $_TARGETNAME configure -event reset-init {
# Force target into ARM state # Force target into ARM state
soft_reset_halt soft_reset_halt
#do not remap 0x0000-0x0020 to anything but the flash #do not remap 0x0000-0x0020 to anything but the flash
mwb 0xE01FC040 0x01 mwb 0xE01FC040 0x01
} }

View File

@ -1,7 +1,6 @@
/* vim: set syntax=rpcgen : */ /* vim: set syntax=rpcgen : */
/* Script for -z combreloc: combine and sort reloc sections */ /* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
"elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(_startup) ENTRY(_startup)
@ -95,15 +94,15 @@ HEAP_SIZE = 4096;
/* . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); */ /* . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); */
. = ALIGN(4); . = ALIGN(4);
. = DATA_SEGMENT_ALIGN(4,4); . = DATA_SEGMENT_ALIGN(4,4);
/* Exception handling */ /* Exception handling */
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
/* Thread Local Storage sections */ /* Thread Local Storage sections */
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
.preinit_array : .preinit_array :
{ {
PROVIDE_HIDDEN (__preinit_array_start = .); PROVIDE_HIDDEN (__preinit_array_start = .);
@ -168,35 +167,35 @@ HEAP_SIZE = 4096;
.data1 : { *(.data1) } .data1 : { *(.data1) }
_edata = .; PROVIDE (edata = .); _edata = .; PROVIDE (edata = .);
.stack : { .stack : {
__stack_start__ = . ; __stack_start__ = . ;
. += IRQ_STACK_SIZE; . += IRQ_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__irq_stack_top__ = . ; __irq_stack_top__ = . ;
. += FIQ_STACK_SIZE; . += FIQ_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__fiq_stack_top__ = . ; __fiq_stack_top__ = . ;
. += SVC_STACK_SIZE; . += SVC_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__svc_stack_top__ = . ; __svc_stack_top__ = . ;
. += ABT_STACK_SIZE; . += ABT_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__abt_stack_top__ = . ; __abt_stack_top__ = . ;
. += UND_STACK_SIZE; . += UND_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__und_stack_top__ = . ; __und_stack_top__ = . ;
. += SYS_STACK_SIZE; . += SYS_STACK_SIZE;
. = ALIGN (4); . = ALIGN (4);
__sys_stack_top__ = . ; __sys_stack_top__ = . ;
__stack_end__ = .; __stack_end__ = .;
} }
__bss_start = .; __bss_start = .;

View File

@ -7924,7 +7924,7 @@ typedef struct
#define ETH_MACFFR_PCF_ForwardAll ((uint32_t)0x00000080) /* MAC forwards all control frames to application even if they fail the Address Filter */ #define ETH_MACFFR_PCF_ForwardAll ((uint32_t)0x00000080) /* MAC forwards all control frames to application even if they fail the Address Filter */
#define ETH_MACFFR_PCF_ForwardPassedAddrFilter ((uint32_t)0x000000C0) /* MAC forwards control frames that pass the Address Filter. */ #define ETH_MACFFR_PCF_ForwardPassedAddrFilter ((uint32_t)0x000000C0) /* MAC forwards control frames that pass the Address Filter. */
#define ETH_MACFFR_BFD ((uint32_t)0x00000020) /* Broadcast frame disable */ #define ETH_MACFFR_BFD ((uint32_t)0x00000020) /* Broadcast frame disable */
#define ETH_MACFFR_PAM ((uint32_t)0x00000010) /* Pass all mutlicast */ #define ETH_MACFFR_PAM ((uint32_t)0x00000010) /* Pass all mutlicast */
#define ETH_MACFFR_DAIF ((uint32_t)0x00000008) /* DA Inverse filtering */ #define ETH_MACFFR_DAIF ((uint32_t)0x00000008) /* DA Inverse filtering */
#define ETH_MACFFR_HM ((uint32_t)0x00000004) /* Hash multicast */ #define ETH_MACFFR_HM ((uint32_t)0x00000004) /* Hash multicast */
#define ETH_MACFFR_HU ((uint32_t)0x00000002) /* Hash unicast */ #define ETH_MACFFR_HU ((uint32_t)0x00000002) /* Hash unicast */

View File

@ -176,7 +176,7 @@ int _kill_r(struct _reent *r, int pid, int sig)
__attribute__ ((weak)) __attribute__ ((weak))
int _kill(int pid, int sig) int _kill(int pid, int sig)
{ {
errno = ESRCH; /* not implemented yet */ errno = ESRCH; /* not implemented yet */
return -1; return -1;
} }

View File

@ -6497,7 +6497,7 @@ USB_OTG_HostChannelTypeDef;
/******************************************************************************/ /******************************************************************************/
/* */ /* */
/* USB_OTG */ /* USB_OTG */
/* */ /* */
/******************************************************************************/ /******************************************************************************/
/******************** Bit definition forUSB_OTG_GOTGCTL register ********************/ /******************** Bit definition forUSB_OTG_GOTGCTL register ********************/

View File

@ -554,7 +554,7 @@ void isr_exti9_5(void)
#if defined(GPIO_IRQ_10) || defined(GPIO_IRQ_11) || defined(GPIO_IRQ_12) || defined(GPIO_IRQ_13) || defined(GPIO_IRQ_14) || defined(GPIO_IRQ_15) #if defined(GPIO_IRQ_10) || defined(GPIO_IRQ_11) || defined(GPIO_IRQ_12) || defined(GPIO_IRQ_13) || defined(GPIO_IRQ_14) || defined(GPIO_IRQ_15)
void isr_exti15_10(void) void isr_exti15_10(void)
{ {
if (EXTI->PR & EXTI_PR_PR10) { if (EXTI->PR & EXTI_PR_PR10) {
EXTI->PR |= EXTI_PR_PR10; /* clear status bit by writing a 1 to it */ EXTI->PR |= EXTI_PR_PR10; /* clear status bit by writing a 1 to it */
gpio_config[GPIO_IRQ_10].cb(gpio_config[GPIO_IRQ_10].arg); gpio_config[GPIO_IRQ_10].cb(gpio_config[GPIO_IRQ_10].arg);
} }

View File

@ -47,24 +47,24 @@ build_binutils() {
else else
CFLAGS="-Wno-error=unused" CFLAGS="-Wno-error=unused"
fi fi
rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build && rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build &&
../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib && ../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
make ${MAKE_THREADS} all CFLAGS="${CFLAGS}" && make ${MAKE_THREADS} all CFLAGS="${CFLAGS}" &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
build_gcc() { build_gcc() {
echo "Building gcc..." echo "Building gcc..."
if [ ! -e .gcc_extracted ] ; then if [ ! -e .gcc_extracted ] ; then
tar -xjf ${FILES}/gcc-${GCC_VER}.tar.bz2 && tar -xjf ${FILES}/gcc-${GCC_VER}.tar.bz2 &&
touch .gcc_extracted touch .gcc_extracted
fi fi
rm -rf gcc-build && mkdir -p gcc-build && cd gcc-build && rm -rf gcc-build && mkdir -p gcc-build && cd gcc-build &&
../gcc-${GCC_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib --enable-lto --disable-libssp --with-headers=${GNUARM_BUILDDIR}/newlib-${NEWLIB_VER}/newlib/libc/include --enable-obsolete && ../gcc-${GCC_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib --enable-lto --disable-libssp --with-headers=${GNUARM_BUILDDIR}/newlib-${NEWLIB_VER}/newlib/libc/include --enable-obsolete &&
make ${MAKE_THREADS} all && make ${MAKE_THREADS} all &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
@ -79,20 +79,20 @@ extract_newlib() {
} }
build_newlib() { build_newlib() {
cd ${GNUARM_BUILDDIR} && cd ${GNUARM_BUILDDIR} &&
if [ ! -e .newlib_extracted ] ; then if [ ! -e .newlib_extracted ] ; then
extract_newlib extract_newlib
fi fi
rm -rf newlib-build && mkdir -p newlib-build && cd newlib-build && rm -rf newlib-build && mkdir -p newlib-build && cd newlib-build &&
../newlib-${NEWLIB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --disable-newlib-supplied-syscalls --enable-newlib-reent-small --enable-newlib-io-long-long --enable-newlib-io-float && ../newlib-${NEWLIB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --disable-newlib-supplied-syscalls --enable-newlib-reent-small --enable-newlib-io-long-long --enable-newlib-io-float &&
#--enable-newlib-supplied-syscalls && #--enable-newlib-supplied-syscalls &&
# options to try: --enable-newlib-reent-small # options to try: --enable-newlib-reent-small
make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all && make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all &&
make install && make install &&
# generate zip-file to provide binary download # generate zip-file to provide binary download
cd ${PREFIX}/arm-elf && cd ${PREFIX}/arm-elf &&
# #
@ -107,14 +107,14 @@ build_newlib() {
build_gdb() { build_gdb() {
echo "Building gdb..." echo "Building gdb..."
if [ ! -e .gdb_extracted ] ; then if [ ! -e .gdb_extracted ] ; then
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 && tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
touch .gdb_extracted touch .gdb_extracted
fi fi
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build && rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib && ../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
make ${MAKE_THREADS} all CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" && make ${MAKE_THREADS} all CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
@ -155,13 +155,13 @@ build_all() {
echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}." echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}."
check_space && check_space &&
download && download &&
build_binutils && build_binutils &&
extract_newlib && extract_newlib &&
build_gcc && build_gcc &&
build_newlib && build_newlib &&
build_gdb && build_gdb &&
echo "Build complete." echo "Build complete."
} }
usage() { usage() {

View File

@ -37,24 +37,24 @@ build_binutils() {
tar -xjf ${FILES}/binutils-${BINUTILS_VER}.tar.bz2 tar -xjf ${FILES}/binutils-${BINUTILS_VER}.tar.bz2
touch .binutils_extracted touch .binutils_extracted
fi fi
rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build && rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build &&
../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilibi --with-float=soft --with-fpu=vfp && ../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilibi --with-float=soft --with-fpu=vfp &&
make ${MAKE_THREADS} all CFLAGS=-Wformat=0 && make ${MAKE_THREADS} all CFLAGS=-Wformat=0 &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
build_gcc() { build_gcc() {
echo "Building gcc..." echo "Building gcc..."
if [ ! -e .gcc_extracted ] ; then if [ ! -e .gcc_extracted ] ; then
tar -xjf ${FILES}/gcc-core-${GCC_VER}.tar.bz2 && tar -xjf ${FILES}/gcc-core-${GCC_VER}.tar.bz2 &&
touch .gcc_extracted touch .gcc_extracted
fi fi
rm -rf gcc-build && mkdir -p gcc-build && cd gcc-build && rm -rf gcc-build && mkdir -p gcc-build && cd gcc-build &&
../gcc-${GCC_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --enable-languages="c" --enable-lto --disable-libssp --disable-hardfloat --with-float=soft --with-fpu=vfp --without-headers && ../gcc-${GCC_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --enable-languages="c" --enable-lto --disable-libssp --disable-hardfloat --with-float=soft --with-fpu=vfp --without-headers &&
make ${MAKE_THREADS} all && make ${MAKE_THREADS} all &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
@ -69,20 +69,20 @@ extract_newlib() {
} }
build_newlib() { build_newlib() {
cd ${GNUARM_BUILDDIR} && cd ${GNUARM_BUILDDIR} &&
if [ ! -e .newlib_extracted ] ; then if [ ! -e .newlib_extracted ] ; then
extract_newlib extract_newlib
fi fi
rm -rf newlib-build && mkdir -p newlib-build && cd newlib-build && rm -rf newlib-build && mkdir -p newlib-build && cd newlib-build &&
../newlib-${NEWLIB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --disable-newlib-supplied-syscalls --enable-newlib-reent-small --enable-newlib-io-long-long --enable-newlib-io-float --with-float=soft --with-fpu=vfp && ../newlib-${NEWLIB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib --disable-newlib-supplied-syscalls --enable-newlib-reent-small --enable-newlib-io-long-long --enable-newlib-io-float --with-float=soft --with-fpu=vfp &&
#--enable-newlib-supplied-syscalls && #--enable-newlib-supplied-syscalls &&
# options to try: --enable-newlib-reent-small # options to try: --enable-newlib-reent-small
make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all && make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all &&
make install && make install &&
# generate zip-file to provide binary download # generate zip-file to provide binary download
cd ${PREFIX}/arm-elf && cd ${PREFIX}/arm-elf &&
# #
@ -97,14 +97,14 @@ build_newlib() {
build_gdb() { build_gdb() {
echo "Building gdb..." echo "Building gdb..."
if [ ! -e .gdb_extracted ] ; then if [ ! -e .gdb_extracted ] ; then
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 && tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
touch .gdb_extracted touch .gdb_extracted
fi fi
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build && rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib && ../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
make ${MAKE_THREADS} all CFLAGS=-D_FORTIFY_SOURCE=0 && make ${MAKE_THREADS} all CFLAGS=-D_FORTIFY_SOURCE=0 &&
make install && make install &&
cd ${GNUARM_BUILDDIR} cd ${GNUARM_BUILDDIR}
} }
@ -134,11 +134,11 @@ download_file() {
build_all() { build_all() {
echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}." echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}."
download && download &&
build_binutils && build_binutils &&
build_gcc && build_gcc &&
build_gdb && build_gdb &&
echo "Build complete." echo "Build complete."
} }
usage() { usage() {

View File

@ -132,7 +132,7 @@ static uint8_t receive_packet_variable(uint8_t *rxBuffer, radio_packet_length_t
/* Read data from RX FIFO and store in rxBuffer */ /* Read data from RX FIFO and store in rxBuffer */
if (packetLength <= length) { if (packetLength <= length) {
uint8_t crc_ok = 0; uint8_t crc_ok = 0;
/* Put length byte at first position in RX Buffer */ /* Put length byte at first position in RX Buffer */
rxBuffer[0] = packetLength; rxBuffer[0] = packetLength;

View File

@ -15,7 +15,7 @@
* @brief Access to CC110X registers * @brief Access to CC110X registers
* *
* @author Oliver Hahm <oliver.hahm@inria.fr> * @author Oliver Hahm <oliver.hahm@inria.fr>
* @author Fabian Nack <nack@inf.fu-berlin.de> * @author Fabian Nack <nack@inf.fu-berlin.de>
*/ */
#ifndef CC110X_REG_H #ifndef CC110X_REG_H

View File

@ -43,39 +43,39 @@ extern "C"
#define MAG3110_I2C_ADDRESS 0x0E /**< Magnetometer Default Address */ #define MAG3110_I2C_ADDRESS 0x0E /**< Magnetometer Default Address */
#endif #endif
#define MAG3110_DROS_8000_16 0 /**< Output Rate 80 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_8000_16 0 /**< Output Rate 80 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_4000_32 1 /**< Output Rate 40 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_4000_32 1 /**< Output Rate 40 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_2000_64 2 /**< Output Rate 20 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_2000_64 2 /**< Output Rate 20 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_1000_128 3 /**< Output Rate 10 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_1000_128 3 /**< Output Rate 10 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_4000_16 4 /**< Output Rate 40 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_4000_16 4 /**< Output Rate 40 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_2000_32 5 /**< Output Rate 20 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_2000_32 5 /**< Output Rate 20 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_1000_64 6 /**< Output Rate 10 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_1000_64 6 /**< Output Rate 10 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0500_128 7 /**< Output Rate 5 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0500_128 7 /**< Output Rate 5 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_2000_16 8 /**< Output Rate 20 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_2000_16 8 /**< Output Rate 20 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_1000_32 9 /**< Output Rate 10 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_1000_32 9 /**< Output Rate 10 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0500_64 10 /**< Output Rate 5 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0500_64 10 /**< Output Rate 5 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0250_128 11 /**< Output Rate 2.5 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0250_128 11 /**< Output Rate 2.5 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_1000_16 12 /**< Output Rate 10 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_1000_16 12 /**< Output Rate 10 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_0500_32 13 /**< Output Rate 5 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_0500_32 13 /**< Output Rate 5 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0250_64 14 /**< Output Rate 2.5 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0250_64 14 /**< Output Rate 2.5 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0125_128 15 /**< Output Rate 1.25 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0125_128 15 /**< Output Rate 1.25 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_0500_16 16 /**< Output Rate 5 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_0500_16 16 /**< Output Rate 5 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_0250_32 17 /**< Output Rate 2.5 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_0250_32 17 /**< Output Rate 2.5 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0125_64 18 /**< Output Rate 1.25 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0125_64 18 /**< Output Rate 1.25 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0063_128 19 /**< Output Rate 0.63 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0063_128 19 /**< Output Rate 0.63 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_0250_16 20 /**< Output Rate 2.5 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_0250_16 20 /**< Output Rate 2.5 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_0125_32 21 /**< Output Rate 1.25 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_0125_32 21 /**< Output Rate 1.25 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0063_64 22 /**< Output Rate 0.63 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0063_64 22 /**< Output Rate 0.63 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0031_128 23 /**< Output Rate 0.31 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0031_128 23 /**< Output Rate 0.31 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_0125_16 24 /**< Output Rate 1.25 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_0125_16 24 /**< Output Rate 1.25 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_0063_32 25 /**< Output Rate 0.63 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_0063_32 25 /**< Output Rate 0.63 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0031_64 26 /**< Output Rate 0.31 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0031_64 26 /**< Output Rate 0.31 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0016_128 27 /**< Output Rate 0.16 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0016_128 27 /**< Output Rate 0.16 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_0063_16 28 /**< Output Rate 0.63 Hz, Over Sample Ratio 16 */ #define MAG3110_DROS_0063_16 28 /**< Output Rate 0.63 Hz, Over Sample Ratio 16 */
#define MAG3110_DROS_0031_32 29 /**< Output Rate 0.31 Hz, Over Sample Ratio 32 */ #define MAG3110_DROS_0031_32 29 /**< Output Rate 0.31 Hz, Over Sample Ratio 32 */
#define MAG3110_DROS_0016_64 30 /**< Output Rate 0.16 Hz, Over Sample Ratio 64 */ #define MAG3110_DROS_0016_64 30 /**< Output Rate 0.16 Hz, Over Sample Ratio 64 */
#define MAG3110_DROS_0008_128 31 /**< Output Rate 0.08 Hz, Over Sample Ratio 128 */ #define MAG3110_DROS_0008_128 31 /**< Output Rate 0.08 Hz, Over Sample Ratio 128 */
#define MAG3110_DROS_DEFAULT MAG3110_DROS_0125_128 /**< Default Setting for testing */ #define MAG3110_DROS_DEFAULT MAG3110_DROS_0125_128 /**< Default Setting for testing */
/** /**
* @brief Device descriptor for MAG3110 magnetometer. * @brief Device descriptor for MAG3110 magnetometer.

View File

@ -97,12 +97,12 @@ extern "C" {
#define PRIM_RX 0x01 #define PRIM_RX 0x01
/* Bits in STATUS register */ /* Bits in STATUS register */
#define RX_DR 0x40 #define RX_DR 0x40
#define TX_DS 0x20 #define TX_DS 0x20
#define MAX_RT 0x10 #define MAX_RT 0x10
#define RX_P_NO 0x0e #define RX_P_NO 0x0e
#define TX_FULL 0x01 #define TX_FULL 0x01
#define ALL_INT_MASK 0x70 #define ALL_INT_MASK 0x70
#define RF_SETUP_CONT_WAVE (1 << 7) #define RF_SETUP_CONT_WAVE (1 << 7)
#define RF_SETUP_RF_DR_LOW (1 << 5) #define RF_SETUP_RF_DR_LOW (1 << 5)