資源簡介
最新的DW1000例程,API使用方法。UWB定位很復雜,本例程使用的TOF定位方法,可以實現10CM以內準確定位。實測效果很不錯,希望可以互相交流

代碼片段和文件信息
/*!?------------------------------------------------------------------------------------------------------------------
?*?@file????deca_device.c
?*?@brief???Decawave?device?configuration?and?control?functions
?*
?*?@attention
?*
?*?Copyright?2013?(c)?Decawave?Ltd?Dublin?Ireland.
?*
?*?All?rights?reserved.
?*
?*/
#include?
#include?
#include?“deca_types.h“
#include?“deca_param_types.h“
#include?“deca_regs.h“
#include?“deca_device_api.h“
//?Defines?for?enable_clocks?function
#define?FORCE_SYS_XTI??0
#define?ENABLE_ALL_SEQ?1
#define?FORCE_SYS_PLL??2
#define?READ_ACC_ON????7
#define?READ_ACC_OFF???8
#define?FORCE_OTP_ON???11
#define?FORCE_OTP_OFF??12
#define?FORCE_TX_PLL???13
#define?FORCE_LDE??????14
//?Defines?for?ACK?request?bitmask?in?DATA?and?MAC?COMMAND?frame?control?(first?byte)?-?Used?to?detect?AAT?bit?wrongly?set.
#define?FCTRL_ACK_REQ_MASK?0x20
//?frame?control?maximum?length?in?bytes.
#define?FCTRL_LEN_MAX?2
//?#define?DWT_API_ERROR_CHECK?????//?define?so?API?checks?config?input?parameters
//?-------------------------------------------------------------------------------------------------------------------
//
//?Internal?functions?for?controlling?and?configuring?the?device
//
//?-------------------------------------------------------------------------------------------------------------------
//?Enable?and?Configure?specified?clocks
void?_dwt_enableclocks(int?clocks)?;
//?Configure?the?ucode?(FP?algorithm)?parameters
void?_dwt_configlde(int?prf);
//?Load?ucode?from?OTP/ROM
void?_dwt_loaducodefromrom(void);
//?Read?non-volatile?memory
uint32?_dwt_otpread(uint32?address);
//?Program?the?non-volatile?memory
uint32?_dwt_otpprogword32(uint32?data?uint16?address);
//?Upload?the?device?configuration?into?always?on?memory
void?_dwt_aonarrayupload(void);
//?-------------------------------------------------------------------------------------------------------------------
/*!
?*?Static?data?for?DW1000?DecaWave?Transceiver?control
?*/
//?-------------------------------------------------------------------------------------------------------------------
//?Structure?to?hold?device?data
typedef?struct
{
????uint32??????partID?;????????????//?IC?Part?ID?-?read?during?initialisation
????uint32??????lotID?;?????????????//?IC?Lot?ID?-?read?during?initialisation
????uint8???????longframes?;????????//?Flag?in?non-standard?long?frame?mode
????uint8???????otprev?;????????????//?OTP?revision?number?(read?during?initialisation)
????uint32??????txFCTRL?;???????????//?Keep?TX_FCTRL?register?config
????uint8???????init_xtrim;?????????//?initial?XTAL?trim?value?read?from?OTP?(or?defaulted?to?mid-range?if?OTP?not?programmed)
????uint8???????dblbuffon;??????????//?Double?RX?buffer?mode?flag
????uint32??????sysCFGreg?;?????????//?Local?copy?of?system?config?register
????uint16??????sleep_mode;?????????//?Used?for?automatic?reloading?of?LDO?tune?and?microcode?at?wake
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-01-06?21:05??decadriver\
?????文件??????130360??2017-01-09?18:26??decadriver\deca_device.c
?????文件???????74671??2017-01-09?18:27??decadriver\deca_device_api.h
?????文件????????3322??2017-01-03?19:44??decadriver\deca_params_init.c
?????文件????????1957??2017-01-03?19:44??decadriver\deca_param_types.h
?????文件???????81868??2017-01-03?19:44??decadriver\deca_regs.h
?????文件????????1125??2016-06-22?22:55??decadriver\deca_types.h
?????文件????????1182??2017-01-06?21:06??decadriver\deca_version.h
?????文件????????3468??2016-06-22?22:55??disclaimer.txt
?????文件?????2074416??2017-02-23?17:43??DW1000_Software_API_Guide_rev2p3.pdf
?????目錄???????????0??2017-01-03?19:44??examples\
?????目錄???????????0??2016-06-22?22:55??examples\ex_01a_simple_tx\
?????文件????????6070??2016-06-22?22:55??examples\ex_01a_simple_tx\main.c
?????文件???????14653??2016-06-22?22:55??examples\ex_01a_simple_tx\simple_tx.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_01b_tx_sleep\
?????文件????????7353??2016-06-22?22:55??examples\ex_01b_tx_sleep\main.c
?????文件???????14651??2016-06-22?22:55??examples\ex_01b_tx_sleep\tx_sleep.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_01c_tx_sleep_auto\
?????文件????????7231??2016-06-22?22:55??examples\ex_01c_tx_sleep_auto\main.c
?????文件???????14661??2016-06-22?22:55??examples\ex_01c_tx_sleep_auto\tx_sleep_auto.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_01d_tx_timed_sleep\
?????文件????????8824??2016-06-22?22:55??examples\ex_01d_tx_timed_sleep\main.c
?????文件???????14663??2016-06-22?22:55??examples\ex_01d_tx_timed_sleep\tx_timed_sleep.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_02a_simple_rx\
?????文件????????5908??2016-06-22?22:55??examples\ex_02a_simple_rx\main.c
?????文件???????14653??2016-06-22?22:55??examples\ex_02a_simple_rx\simple_rx.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_02b_rx_preamble_64\
?????文件????????6396??2016-06-22?22:55??examples\ex_02b_rx_preamble_64\main.c
?????文件???????14663??2016-06-22?22:55??examples\ex_02b_rx_preamble_64\rx_preamble_64.coproj
?????目錄???????????0??2016-06-22?22:55??examples\ex_02c_rx_diagnostics\
?????文件????????9145??2016-06-22?22:55??examples\ex_02c_rx_diagnostics\main.c
............此處省略135個文件信息
- 上一篇:基于ssm框架的企業薪資管理系統
- 下一篇:usb-blaster
評論
共有 條評論