Merge pull request #3016 from gebart/pr/tab-indentation
Inconsistent indentation in some files
This commit is contained in:
commit
b3e78ddc33
@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
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
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
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 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
|
||||
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
|
||||
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
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
||||
@ -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
|
||||
can run it, and change the permissions if necessary:
|
||||
|
||||
cp lpc2k_pgm /usr/local/bin
|
||||
chmod 755 /usr/local/bin/lpc2k_pgm
|
||||
cp lpc2k_pgm /usr/local/bin
|
||||
chmod 755 /usr/local/bin/lpc2k_pgm
|
||||
|
||||
The semi-static binary has all of the GTK and X11 libraries statically
|
||||
linked into it, for maximum compatibility with all linux distributions.
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
$h = '[0-9A-Fa-f]';
|
||||
$n = 1;
|
||||
while (<stdin>) {
|
||||
next unless /^\s*$h+:\s+($h{8})/;
|
||||
$data[$n++] = "0x$1";
|
||||
next unless /^\s*$h+:\s+($h{8})/;
|
||||
$data[$n++] = "0x$1";
|
||||
}
|
||||
$data[0] = $n;
|
||||
#$size = $ARGV[0];
|
||||
|
||||
@ -3,44 +3,44 @@
|
||||
@arg = split(/\s+/, `gtk-config --libs`);
|
||||
|
||||
%liblist = (
|
||||
'libgtk.a', '/usr/lib/libgtk.a',
|
||||
'libgdk.a', '/usr/lib/libgdk.a',
|
||||
'libgmodule.a', '/usr/lib/libgmodule.a',
|
||||
'libglib.a', '/usr/lib/libglib.a',
|
||||
'libXi.a', '/usr/X11R6/lib/libXi.a',
|
||||
'libXext.a', '/usr/X11R6/lib/libXext.a',
|
||||
'libX11.a', '/usr/X11R6/lib/libX11.a'
|
||||
'libgtk.a', '/usr/lib/libgtk.a',
|
||||
'libgdk.a', '/usr/lib/libgdk.a',
|
||||
'libgmodule.a', '/usr/lib/libgmodule.a',
|
||||
'libglib.a', '/usr/lib/libglib.a',
|
||||
'libXi.a', '/usr/X11R6/lib/libXi.a',
|
||||
'libXext.a', '/usr/X11R6/lib/libXext.a',
|
||||
'libX11.a', '/usr/X11R6/lib/libX11.a'
|
||||
);
|
||||
|
||||
|
||||
for ($i=0; $i<@arg; $i++) {
|
||||
$a = $arg[$i];
|
||||
next if $a eq '-rdynamic'; # always delete -rdynamic
|
||||
if (($a eq '-lm') || ($a eq '-ldl') || ($a =~ /^-L/)) {
|
||||
# a few things we never change
|
||||
print "$a ";
|
||||
next;
|
||||
}
|
||||
if ($a =~ /^-l/) {
|
||||
$lib = $';
|
||||
$lib = 'lib' . $lib . '.a';
|
||||
# first check if it's in the known location
|
||||
if (-f $liblist{$lib}) {
|
||||
print $liblist{$lib}, " ";
|
||||
next;
|
||||
}
|
||||
# resort to trying whereis to find it
|
||||
@source = split(/\s+/, `whereis $lib`);
|
||||
undef($static);
|
||||
for ($j=0; $j<@source; $j++) {
|
||||
$static = $source[$j] if $source[$j] =~ /$lib$/;
|
||||
}
|
||||
# if we found a static lib, use it.
|
||||
if ($static) {
|
||||
print $static, " ";
|
||||
} else {
|
||||
print $a, " ";
|
||||
}
|
||||
}
|
||||
$a = $arg[$i];
|
||||
next if $a eq '-rdynamic'; # always delete -rdynamic
|
||||
if (($a eq '-lm') || ($a eq '-ldl') || ($a =~ /^-L/)) {
|
||||
# a few things we never change
|
||||
print "$a ";
|
||||
next;
|
||||
}
|
||||
if ($a =~ /^-l/) {
|
||||
$lib = $';
|
||||
$lib = 'lib' . $lib . '.a';
|
||||
# first check if it's in the known location
|
||||
if (-f $liblist{$lib}) {
|
||||
print $liblist{$lib}, " ";
|
||||
next;
|
||||
}
|
||||
# resort to trying whereis to find it
|
||||
@source = split(/\s+/, `whereis $lib`);
|
||||
undef($static);
|
||||
for ($j=0; $j<@source; $j++) {
|
||||
$static = $source[$j] if $source[$j] =~ /$lib$/;
|
||||
}
|
||||
# if we found a static lib, use it.
|
||||
if ($static) {
|
||||
print $static, " ";
|
||||
} else {
|
||||
print $a, " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
@ -1,30 +1,30 @@
|
||||
/* ARM code to run user code */
|
||||
/* on the LPC23xx chips, the bootloader defaults to using the RC */
|
||||
/* 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 */
|
||||
/* the user's code, their startup routine may (incorrectly) assume */
|
||||
/* 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 */
|
||||
/* PLL so the user's startup code sees the same conditions as it */
|
||||
/* would following a hard reset */
|
||||
/* ARM code to run user code */
|
||||
/* on the LPC23xx chips, the bootloader defaults to using the RC */
|
||||
/* 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 */
|
||||
/* the user's code, their startup routine may (incorrectly) assume */
|
||||
/* 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 */
|
||||
/* PLL so the user's startup code sees the same conditions as it */
|
||||
/* would following a hard reset */
|
||||
begin:
|
||||
adr r0, const
|
||||
ldr r1, [r0] /* r1 points to MEMMAP register */
|
||||
ldr r2, [r0,#4] /* r2 points to PLLCON */
|
||||
ldr r3, [r0,#8] /* r3 points to PLLFEED */
|
||||
mov r0, #1
|
||||
str r0, [r1] /* remap interrupt vectors to flash */
|
||||
mov r4, #0xAA
|
||||
mov r5, #0x55
|
||||
str r0, [r2] /* disconnect the PLL, PLLCON = 1 */
|
||||
str r4, [r3]
|
||||
str r5, [r3]
|
||||
mov r0, #0
|
||||
str r0, [r2] /* disable the PLL, PLLCON = 0 */
|
||||
str r4, [r3]
|
||||
str r5, [r3]
|
||||
mov pc, #0 /* and then jump to the user's code */
|
||||
adr r0, const
|
||||
ldr r1, [r0] /* r1 points to MEMMAP register */
|
||||
ldr r2, [r0,#4] /* r2 points to PLLCON */
|
||||
ldr r3, [r0,#8] /* r3 points to PLLFEED */
|
||||
mov r0, #1
|
||||
str r0, [r1] /* remap interrupt vectors to flash */
|
||||
mov r4, #0xAA
|
||||
mov r5, #0x55
|
||||
str r0, [r2] /* disconnect the PLL, PLLCON = 1 */
|
||||
str r4, [r3]
|
||||
str r5, [r3]
|
||||
mov r0, #0
|
||||
str r0, [r2] /* disable the PLL, PLLCON = 0 */
|
||||
str r4, [r3]
|
||||
str r5, [r3]
|
||||
mov pc, #0 /* and then jump to the user's code */
|
||||
const:
|
||||
.int 0xE01FC040 /* MEMMAP register */
|
||||
.int 0xE01FC080 /* PLLCON */
|
||||
.int 0xE01FC08C /* PLLFEED */
|
||||
.int 0xE01FC040 /* MEMMAP register */
|
||||
.int 0xE01FC080 /* PLLCON */
|
||||
.int 0xE01FC08C /* PLLFEED */
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/* ARM code to run user code */
|
||||
/* This allows us to jump to the user's code in flash. We have */
|
||||
/* to remap the flash before jumping. */
|
||||
/* ARM code to run user code */
|
||||
/* This allows us to jump to the user's code in flash. We have */
|
||||
/* to remap the flash before jumping. */
|
||||
begin:
|
||||
adr r0, const
|
||||
ldr r1, [r0] /* r1 points to MEMMAP register */
|
||||
mov r0, #1
|
||||
str r0, [r1] /* remap interrupt vectors to flash */
|
||||
mov pc, #0 /* and then jump to the user's code */
|
||||
adr r0, const
|
||||
ldr r1, [r0] /* r1 points to MEMMAP register */
|
||||
mov r0, #1
|
||||
str r0, [r1] /* remap interrupt vectors to flash */
|
||||
mov pc, #0 /* and then jump to the user's code */
|
||||
const:
|
||||
.int 0xE01FC040 /* MEMMAP register */
|
||||
.int 0xE01FC040 /* MEMMAP register */
|
||||
|
||||
@ -4,19 +4,19 @@ pid=`pgrep pseudoterm`
|
||||
|
||||
if test "$pid" = "" ; then
|
||||
|
||||
echo " Pseudoterm not running."
|
||||
echo " Pseudoterm not running."
|
||||
|
||||
else
|
||||
|
||||
if test "$1" = "continue" ; then
|
||||
kill -s USR1 $pid;
|
||||
elif test "$1" = "pause" ; then
|
||||
kill -s USR2 $pid ;
|
||||
elif test "$1" = "stop" ; then
|
||||
kill $pid ;
|
||||
else
|
||||
echo "Usage:";
|
||||
echo "termctrl.sh continue/pause/stop";
|
||||
fi
|
||||
if test "$1" = "continue" ; then
|
||||
kill -s USR1 $pid;
|
||||
elif test "$1" = "pause" ; then
|
||||
kill -s USR2 $pid ;
|
||||
elif test "$1" = "stop" ; then
|
||||
kill $pid ;
|
||||
else
|
||||
echo "Usage:";
|
||||
echo "termctrl.sh continue/pause/stop";
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
@ -138,8 +138,8 @@
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) // FPU present for parser
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) /* FPU present for parser */
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -138,8 +138,8 @@
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) // FPU present for parser
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) /* FPU present for parser */
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -138,8 +138,8 @@
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) // FPU present for parser
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) /* FPU present for parser */
|
||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -171,8 +171,8 @@
|
||||
#define __FPU_USED 0
|
||||
#endif
|
||||
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) // FPU present for parser
|
||||
#elif defined ( __CSMC__ ) /* Cosmic */
|
||||
#if ( __CSMC__ & 0x400) /* FPU present for parser */
|
||||
#if (__FPU_PRESENT == 1)
|
||||
#define __FPU_USED 1
|
||||
#else
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include <stdint.h>
|
||||
#include "cpu-conf.h"
|
||||
|
||||
#define FLASH_BASE (0x00000000)
|
||||
#define FLASH_BASE (0x00000000)
|
||||
|
||||
static void cpu_clock_init(void);
|
||||
|
||||
|
||||
@ -127,71 +127,71 @@ const void *interrupt_vector[] = {
|
||||
(void *) isr_pendsv, /* pendSV interrupt, used for task switching in RIOT */
|
||||
(void *) isr_systick, /* SysTick interrupt, not used in RIOT */
|
||||
/* MKW22D512 specific peripheral handlers */
|
||||
(void *) isr_dma0, /* DMA channel 0 transfer complete */
|
||||
(void *) isr_dma1, /* DMA channel 1 transfer complete */
|
||||
(void *) isr_dma2, /* DMA channel 2 transfer complete */
|
||||
(void *) isr_dma3, /* DMA channel 3 transfer complete */
|
||||
(void *) isr_dma4, /* DMA channel 4 transfer complete */
|
||||
(void *) isr_dma5, /* DMA channel 5 transfer complete */
|
||||
(void *) isr_dma6, /* DMA channel 6 transfer complete */
|
||||
(void *) isr_dma7, /* DMA channel 7 transfer complete */
|
||||
(void *) isr_dma8, /* DMA channel 8 transfer complete */
|
||||
(void *) isr_dma9, /* DMA channel 9 transfer complete */
|
||||
(void *) isr_dma10, /* DMA channel 10 transfer complete */
|
||||
(void *) isr_dma11, /* DMA channel 11 transfer complete */
|
||||
(void *) isr_dma12, /* DMA channel 12 transfer complete */
|
||||
(void *) isr_dma13, /* DMA channel 13 transfer complete */
|
||||
(void *) isr_dma14, /* DMA channel 14 transfer complete */
|
||||
(void *) isr_dma15, /* DMA channel 15 transfer complete */
|
||||
(void *) isr_dma_error, /* DMA channel 0 - 15 error */
|
||||
(void *) isr_mcm, /* MCM normal interrupt */
|
||||
(void *) isr_ftfl, /* FTFL command complete */
|
||||
(void *) isr_ftfl_collision, /* FTFL read collision */
|
||||
(void *) isr_pmc, /* PMC controller low-voltage detect low-voltage warning */
|
||||
(void *) isr_llwu, /* Low leakage wakeup */
|
||||
(void *) isr_wdog_ewm, /* Single interrupt vector for WDOG and EWM */
|
||||
(void *) isr_rng, /* Randon number generator */
|
||||
(void *) isr_i2c0, /* Inter-integrated circuit 0 */
|
||||
(void *) isr_i2c1, /* Inter-integrated circuit 1 */
|
||||
(void *) isr_spi0, /* Serial peripheral Interface 0 */
|
||||
(void *) isr_spi1, /* Serial peripheral Interface 1 */
|
||||
(void *) isr_i2s0_tx, /* Integrated interchip sound 0 transmit 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 *) isr_dma0, /* DMA channel 0 transfer complete */
|
||||
(void *) isr_dma1, /* DMA channel 1 transfer complete */
|
||||
(void *) isr_dma2, /* DMA channel 2 transfer complete */
|
||||
(void *) isr_dma3, /* DMA channel 3 transfer complete */
|
||||
(void *) isr_dma4, /* DMA channel 4 transfer complete */
|
||||
(void *) isr_dma5, /* DMA channel 5 transfer complete */
|
||||
(void *) isr_dma6, /* DMA channel 6 transfer complete */
|
||||
(void *) isr_dma7, /* DMA channel 7 transfer complete */
|
||||
(void *) isr_dma8, /* DMA channel 8 transfer complete */
|
||||
(void *) isr_dma9, /* DMA channel 9 transfer complete */
|
||||
(void *) isr_dma10, /* DMA channel 10 transfer complete */
|
||||
(void *) isr_dma11, /* DMA channel 11 transfer complete */
|
||||
(void *) isr_dma12, /* DMA channel 12 transfer complete */
|
||||
(void *) isr_dma13, /* DMA channel 13 transfer complete */
|
||||
(void *) isr_dma14, /* DMA channel 14 transfer complete */
|
||||
(void *) isr_dma15, /* DMA channel 15 transfer complete */
|
||||
(void *) isr_dma_error, /* DMA channel 0 - 15 error */
|
||||
(void *) isr_mcm, /* MCM normal interrupt */
|
||||
(void *) isr_ftfl, /* FTFL command complete */
|
||||
(void *) isr_ftfl_collision, /* FTFL read collision */
|
||||
(void *) isr_pmc, /* PMC controller low-voltage detect low-voltage warning */
|
||||
(void *) isr_llwu, /* Low leakage wakeup */
|
||||
(void *) isr_wdog_ewm, /* Single interrupt vector for WDOG and EWM */
|
||||
(void *) isr_rng, /* Randon number generator */
|
||||
(void *) isr_i2c0, /* Inter-integrated circuit 0 */
|
||||
(void *) isr_i2c1, /* Inter-integrated circuit 1 */
|
||||
(void *) isr_spi0, /* Serial peripheral Interface 0 */
|
||||
(void *) isr_spi1, /* Serial peripheral Interface 1 */
|
||||
(void *) isr_i2s0_tx, /* Integrated interchip sound 0 transmit interrupt */
|
||||
(void *) isr_i2s0_rx, /* Integrated interchip sound 0 receive interrupt */
|
||||
(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 *) 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 *) 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 82 */
|
||||
(void *) dummy_handler, /* reserved 83 */
|
||||
|
||||
@ -44,8 +44,8 @@
|
||||
/**
|
||||
* manage the heap
|
||||
*/
|
||||
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_start; /* start of heap memory space */
|
||||
extern uintptr_t __heap_max; /* maximum for end of heap memory space */
|
||||
|
||||
/* current position in heap */
|
||||
static caddr_t heap = {(caddr_t) &__heap_start};
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
set _CHIPNAME lpc2378
|
||||
set _CHIPNAME lpc2378
|
||||
}
|
||||
|
||||
if { [info exists ENDIAN] } {
|
||||
set _ENDIAN $ENDIAN
|
||||
set _ENDIAN $ENDIAN
|
||||
} else {
|
||||
set _ENDIAN little
|
||||
set _ENDIAN little
|
||||
}
|
||||
|
||||
if { [info exists CPUTAPID ] } {
|
||||
set _CPUTAPID $CPUTAPID
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
# force an error till we get a good number
|
||||
set _CPUTAPID 0xffffffff
|
||||
# force an error till we get a good number
|
||||
set _CPUTAPID 0xffffffff
|
||||
}
|
||||
|
||||
#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
|
||||
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0
|
||||
$_TARGETNAME configure -event reset-init {
|
||||
# Force target into ARM state
|
||||
soft_reset_halt
|
||||
#do not remap 0x0000-0x0020 to anything but the flash
|
||||
mwb 0xE01FC040 0x01
|
||||
# Force target into ARM state
|
||||
soft_reset_halt
|
||||
#do not remap 0x0000-0x0020 to anything but the flash
|
||||
mwb 0xE01FC040 0x01
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
/* vim: set syntax=rpcgen : */
|
||||
/* Script for -z combreloc: combine and sort reloc sections */
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
|
||||
"elf32-littlearm")
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
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(4);
|
||||
. = DATA_SEGMENT_ALIGN(4,4);
|
||||
. = ALIGN(4);
|
||||
. = DATA_SEGMENT_ALIGN(4,4);
|
||||
|
||||
/* Exception handling */
|
||||
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
||||
/* Thread Local Storage sections */
|
||||
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
@ -168,35 +167,35 @@ HEAP_SIZE = 4096;
|
||||
.data1 : { *(.data1) }
|
||||
_edata = .; PROVIDE (edata = .);
|
||||
|
||||
.stack : {
|
||||
__stack_start__ = . ;
|
||||
.stack : {
|
||||
__stack_start__ = . ;
|
||||
|
||||
. += IRQ_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__irq_stack_top__ = . ;
|
||||
. += IRQ_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__irq_stack_top__ = . ;
|
||||
|
||||
. += FIQ_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__fiq_stack_top__ = . ;
|
||||
. += FIQ_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__fiq_stack_top__ = . ;
|
||||
|
||||
. += SVC_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__svc_stack_top__ = . ;
|
||||
. += SVC_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__svc_stack_top__ = . ;
|
||||
|
||||
. += ABT_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__abt_stack_top__ = . ;
|
||||
. += ABT_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__abt_stack_top__ = . ;
|
||||
|
||||
. += UND_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__und_stack_top__ = . ;
|
||||
. += UND_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__und_stack_top__ = . ;
|
||||
|
||||
. += SYS_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__sys_stack_top__ = . ;
|
||||
. += SYS_STACK_SIZE;
|
||||
. = ALIGN (4);
|
||||
__sys_stack_top__ = . ;
|
||||
|
||||
__stack_end__ = .;
|
||||
}
|
||||
__stack_end__ = .;
|
||||
}
|
||||
|
||||
|
||||
__bss_start = .;
|
||||
|
||||
@ -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_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_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_HM ((uint32_t)0x00000004) /* Hash multicast */
|
||||
#define ETH_MACFFR_HU ((uint32_t)0x00000002) /* Hash unicast */
|
||||
|
||||
@ -176,7 +176,7 @@ int _kill_r(struct _reent *r, int pid, int sig)
|
||||
__attribute__ ((weak))
|
||||
int _kill(int pid, int sig)
|
||||
{
|
||||
errno = ESRCH; /* not implemented yet */
|
||||
errno = ESRCH; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -6497,7 +6497,7 @@ USB_OTG_HostChannelTypeDef;
|
||||
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* USB_OTG */
|
||||
/* USB_OTG */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
/******************** Bit definition forUSB_OTG_GOTGCTL register ********************/
|
||||
|
||||
@ -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)
|
||||
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 */
|
||||
gpio_config[GPIO_IRQ_10].cb(gpio_config[GPIO_IRQ_10].arg);
|
||||
}
|
||||
|
||||
42
dist/tools/toolchains/build_gnuarm.sh
vendored
42
dist/tools/toolchains/build_gnuarm.sh
vendored
@ -47,24 +47,24 @@ build_binutils() {
|
||||
else
|
||||
CFLAGS="-Wno-error=unused"
|
||||
fi
|
||||
rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build &&
|
||||
../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
|
||||
rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build &&
|
||||
../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
|
||||
make ${MAKE_THREADS} all CFLAGS="${CFLAGS}" &&
|
||||
make install &&
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
make install &&
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
|
||||
build_gcc() {
|
||||
echo "Building gcc..."
|
||||
if [ ! -e .gcc_extracted ] ; then
|
||||
tar -xjf ${FILES}/gcc-${GCC_VER}.tar.bz2 &&
|
||||
tar -xjf ${FILES}/gcc-${GCC_VER}.tar.bz2 &&
|
||||
touch .gcc_extracted
|
||||
fi
|
||||
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 install &&
|
||||
make install &&
|
||||
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
@ -79,20 +79,20 @@ extract_newlib() {
|
||||
}
|
||||
|
||||
build_newlib() {
|
||||
cd ${GNUARM_BUILDDIR} &&
|
||||
cd ${GNUARM_BUILDDIR} &&
|
||||
|
||||
if [ ! -e .newlib_extracted ] ; then
|
||||
extract_newlib
|
||||
fi
|
||||
|
||||
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 &&
|
||||
#--enable-newlib-supplied-syscalls &&
|
||||
# options to try: --enable-newlib-reent-small
|
||||
../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 &&
|
||||
# options to try: --enable-newlib-reent-small
|
||||
make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all &&
|
||||
make install &&
|
||||
|
||||
# generate zip-file to provide binary download
|
||||
# generate zip-file to provide binary download
|
||||
cd ${PREFIX}/arm-elf &&
|
||||
|
||||
#
|
||||
@ -107,14 +107,14 @@ build_newlib() {
|
||||
build_gdb() {
|
||||
echo "Building gdb..."
|
||||
if [ ! -e .gdb_extracted ] ; then
|
||||
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
|
||||
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
|
||||
touch .gdb_extracted
|
||||
fi
|
||||
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
|
||||
../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
|
||||
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
|
||||
../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 install &&
|
||||
make install &&
|
||||
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
@ -155,13 +155,13 @@ build_all() {
|
||||
echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}."
|
||||
check_space &&
|
||||
download &&
|
||||
build_binutils &&
|
||||
build_binutils &&
|
||||
extract_newlib &&
|
||||
build_gcc &&
|
||||
build_newlib &&
|
||||
build_gdb &&
|
||||
build_gcc &&
|
||||
build_newlib &&
|
||||
build_gdb &&
|
||||
|
||||
echo "Build complete."
|
||||
echo "Build complete."
|
||||
}
|
||||
|
||||
usage() {
|
||||
|
||||
42
dist/tools/toolchains/build_gnuarm_naked.sh
vendored
42
dist/tools/toolchains/build_gnuarm_naked.sh
vendored
@ -37,24 +37,24 @@ build_binutils() {
|
||||
tar -xjf ${FILES}/binutils-${BINUTILS_VER}.tar.bz2
|
||||
touch .binutils_extracted
|
||||
fi
|
||||
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 &&
|
||||
make ${MAKE_THREADS} all CFLAGS=-Wformat=0 &&
|
||||
make install &&
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
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 &&
|
||||
make ${MAKE_THREADS} all CFLAGS=-Wformat=0 &&
|
||||
make install &&
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
|
||||
build_gcc() {
|
||||
echo "Building gcc..."
|
||||
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
|
||||
fi
|
||||
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 install &&
|
||||
make install &&
|
||||
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
@ -69,20 +69,20 @@ extract_newlib() {
|
||||
}
|
||||
|
||||
build_newlib() {
|
||||
cd ${GNUARM_BUILDDIR} &&
|
||||
cd ${GNUARM_BUILDDIR} &&
|
||||
|
||||
if [ ! -e .newlib_extracted ] ; then
|
||||
extract_newlib
|
||||
fi
|
||||
|
||||
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 &&
|
||||
#--enable-newlib-supplied-syscalls &&
|
||||
# options to try: --enable-newlib-reent-small
|
||||
../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 &&
|
||||
# options to try: --enable-newlib-reent-small
|
||||
make ${MAKE_THREADS} TARGET_CFLAGS=-DREENTRANT_SYSCALLS_PROVIDED all &&
|
||||
make install &&
|
||||
|
||||
# generate zip-file to provide binary download
|
||||
# generate zip-file to provide binary download
|
||||
cd ${PREFIX}/arm-elf &&
|
||||
|
||||
#
|
||||
@ -97,14 +97,14 @@ build_newlib() {
|
||||
build_gdb() {
|
||||
echo "Building gdb..."
|
||||
if [ ! -e .gdb_extracted ] ; then
|
||||
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
|
||||
tar -xjf ${FILES}/gdb-${GDB_VER}.tar.bz2 &&
|
||||
touch .gdb_extracted
|
||||
fi
|
||||
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
|
||||
../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
|
||||
rm -rf gdb-build && mkdir -p gdb-build && cd gdb-build &&
|
||||
../gdb-${GDB_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilib &&
|
||||
|
||||
make ${MAKE_THREADS} all CFLAGS=-D_FORTIFY_SOURCE=0 &&
|
||||
make install &&
|
||||
make install &&
|
||||
|
||||
cd ${GNUARM_BUILDDIR}
|
||||
}
|
||||
@ -134,11 +134,11 @@ download_file() {
|
||||
build_all() {
|
||||
echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}."
|
||||
download &&
|
||||
build_binutils &&
|
||||
build_gcc &&
|
||||
build_gdb &&
|
||||
build_binutils &&
|
||||
build_gcc &&
|
||||
build_gdb &&
|
||||
|
||||
echo "Build complete."
|
||||
echo "Build complete."
|
||||
}
|
||||
|
||||
usage() {
|
||||
|
||||
@ -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 */
|
||||
if (packetLength <= length) {
|
||||
uint8_t crc_ok = 0;
|
||||
uint8_t crc_ok = 0;
|
||||
|
||||
/* Put length byte at first position in RX Buffer */
|
||||
rxBuffer[0] = packetLength;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
* @brief Access to CC110X registers
|
||||
*
|
||||
* @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
|
||||
|
||||
@ -43,39 +43,39 @@ extern "C"
|
||||
#define MAG3110_I2C_ADDRESS 0x0E /**< Magnetometer Default Address */
|
||||
#endif
|
||||
|
||||
#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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_DEFAULT MAG3110_DROS_0125_128 /**< Default Setting for testing */
|
||||
#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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_DEFAULT MAG3110_DROS_0125_128 /**< Default Setting for testing */
|
||||
|
||||
/**
|
||||
* @brief Device descriptor for MAG3110 magnetometer.
|
||||
|
||||
@ -97,12 +97,12 @@ extern "C" {
|
||||
#define PRIM_RX 0x01
|
||||
|
||||
/* Bits in STATUS register */
|
||||
#define RX_DR 0x40
|
||||
#define TX_DS 0x20
|
||||
#define MAX_RT 0x10
|
||||
#define RX_P_NO 0x0e
|
||||
#define TX_FULL 0x01
|
||||
#define ALL_INT_MASK 0x70
|
||||
#define RX_DR 0x40
|
||||
#define TX_DS 0x20
|
||||
#define MAX_RT 0x10
|
||||
#define RX_P_NO 0x0e
|
||||
#define TX_FULL 0x01
|
||||
#define ALL_INT_MASK 0x70
|
||||
|
||||
#define RF_SETUP_CONT_WAVE (1 << 7)
|
||||
#define RF_SETUP_RF_DR_LOW (1 << 5)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user