MoreTag
所属分类:通讯编程
开发工具:C/C++
文件大小:9154KB
下载次数:1
上传日期:2017-12-07 14:06:42
上 传 者:
Zeus_123
说明: TOA算法Keil程序 多标签版
(TOA)
文件列表:
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\.mxproject (5650, 2016-06-10)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xc.h (354569, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xe.h (354571, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f405xx.h (584373, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h (629236, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410cx.h (289656, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410rx.h (289854, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410tx.h (287356, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f411xe.h (356218, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f415xx.h (597922, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f417xx.h (642426, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f427xx.h (685187, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f429xx.h (700257, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f437xx.h (698781, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f439xx.h (713581, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f446xx.h (653373, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f469xx.h (788737, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f479xx.h (802061, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h (9590, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h (3685, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c (27916, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_abs_f32.c (5114, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_abs_q15.c (5458, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_abs_q31.c (4431, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_abs_q7.c (5090, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_add_f32.c (4891, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_add_q15.c (4423, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_add_q31.c (4553, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_add_q7.c (4226, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_dot_prod_f32.c (4613, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_dot_prod_q15.c (4912, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_dot_prod_q31.c (5000, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_dot_prod_q7.c (5408, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_mult_f32.c (5582, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_mult_q15.c (5306, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_mult_q31.c (5201, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_mult_q7.c (4530, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_negate_f32.c (4574, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_negate_q15.c (4621, 2016-06-03)
DWM1000TRACER_PeripheralSTD_DWM1000_Range1ms_OLED_MoreTag\Drivers\CMSIS\DSP_Lib\Source\BasicMathFunctions\arm_negate_q31.c (4178, 2016-06-03)
... ...
# Libdw1000 [![Build Status](https://api.travis-ci.org/bitcraze/libdw1000.svg)](https://travis-ci.org/bitcraze/libdw1000)
Open source driver implementation for the Decawave DW1000 UWB radio chip
This driver is mainly a port of the [Arduino DW1000 driver][1]. As such is is
licensed under the same license, Apache2.
## Usage
### Initialize
All functions of the lib takes a ```dwDevice_t *``` as first argument. The struct
contains the state of the driver, and the purpose is to enable the driver could be used
to control more than one dw1000 radio in the same system.
Example of libdw initialization:
``` c
dwDevice_t dwm_device;
dwDevice_t *dwm = &dwm_device;
// (...)
printf("TEST\t: Initialize DWM1000 ... ");
dwInit(dwm, &dwOps); // Init libdw
dwOpsInit(dwm);
result = dwConfigure(dwm); // Configure the dw1000 chip
if (result == 0) {
printf("[OK]\r\n");
dwEnableAllLeds(dwm);
} else {
printf("[ERROR]: %s\r\n", dwStrError(result));
selftestPasses = false;
}
// (...)
dwTime_t delay = {.full = ANTENNA_DELAY/2};
dwSetAntenaDelay(dwm, delay);
dwAttachSentHandler(dwm, txcallback);
dwAttachReceivedHandler(dwm, rxcallback);
dwNewConfiguration(dwm);
dwSetDefaults(dwm);
dwEnableMode(dwm, MODE_SHORTDATA_FAST_ACCURACY);
dwSetChannel(dwm, CHANNEL_2);
dwSetPreambleCode(dwm, PREAMBLE_CODE_***MHZ_9);
dwCommitConfiguration(dwm);
```
The ```txcallback``` and ```rxcallback``` function are defined that way:
``` c
void txcallback(dwDevice_t *dev);
void rxcallback(dwDevice_t *dev);
```
They are called when a packet has been received or sent.
### Ops
The driver is platform independent and so you need to provide platform-specific
function. This is done by instanciating a dwOps_t structure:
``` c
/**
* DW operation type. Constains function pointer to all hardware-dependent
* operation required to access the DW1000 device.
*/
typedef struct dwOps_s {
/**
* Function that activates the chip-select, sends header, read data and
* disable the chip-select.
*/
void (*spiRead)(dwDevice_t* dev, const void *header, size_t headerLength,
void* data, size_t dataLength);
/**
* Function that activates the chip-select, sends header, sends data and
* disable the chip-select.
*/
void (*spiWrite)(dwDevice_t* dev, const void *header, size_t headerLength,
const void* data, size_t dataLength);
/**
* Sets the SPI bus speed. Take as argument:
* - dwSpiSpeedLow: <= 4MHz
* - dwSpiSpeedHigh: <= 20MHz
*/
void (*spiSetSpeed)(dwDevice_t* dev, dwSpiSpeed_t speed);
/**
* Waits at least 'delay' miliseconds.
*/
void (*delayms)(dwDevice_t* dev, unsigned int delay);
/**
* Resets the DW1000 by pulling the reset pin low and then releasing it.
* This function is optional, if not set softreset via SPI will be used.
*/
void (*reset)(dwDevice_t *dev);
} dwOps_t;
```
### Send and receive
To send a packet:
``` c
dwNewTransmit(dev);
dwSetDefaults(dev);
dwSetData(dev, (uint8_t*)&txPacket, MAC802154_HEADER_LENGTH+2);
dwStartTransmit(dev);
```
To receive a packet:
``` c
dwNewReceive(dev);
dwSetDefaults(dev);
dwStartReceive(dev);
```
To put the radio in IDLE mode (cancel current send/receive)
``` c
dwIdle(dev);
```
## Testing
### Dependencies
Frameworks for unit testing are pulled in as git submodules. To get them when cloning
```bash
git clone --recursive https://github.com/bitcraze/lps-node-firmware.git
```
or if you already have a cloned repo and want the submodules
```bash
git submodule init
git submodule update
```
The testing framework uses ruby and rake to generate and run code.
To minimize the need for installations and configuration, use the docker builder
image (bitcraze/builder) that contains all tools needed. All scripts in the
tools/build directory are intended to be run in the image. You may use the
utility script tools/do to start the docker container. For instance
tools/do build
### Running unit tests
With the environment set up locally
rake
with the docker builder image
tools/do test
[1]: https://github.com/thotro/arduino-dw1000
近期下载者:
相关文件:
收藏者: