Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DW1000 ait_link BufferedSerial mbed
Diff: settings.h
- Revision:
- 2:5af0f0006f40
- Parent:
- 1:c070ca30da80
- Child:
- 4:1a2c1e5e5516
--- a/settings.h Thu Feb 11 10:49:49 2016 +0000
+++ b/settings.h Sat Feb 13 17:11:04 2016 +0000
@@ -1,18 +1,25 @@
#pragma once
#include "DW1000Utils.h"
+#include "BufferedSerial.h"
+
+extern BufferedSerial pc;
// Global settings
const DW1000Utils::PrfSetting PRF_SETTING = DW1000Utils::PRF_16_MHz;
-const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps;
+//const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps;
//const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_256;
-//#define ANSWER_DELAY_US_OVERWRITE 1500;
+//#define ANSWER_DELAY_US_OVERWRITE 1500
+
+//const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps;
//const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_512;
-//#define ANSWER_DELAY_US_OVERWRITE 2000;
+//#define ANSWER_DELAY_US_OVERWRITE 2000
+
+const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps;
const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_1024;
-#define ANSWER_DELAY_US_OVERWRITE 2500;
+#define ANSWER_DELAY_US_OVERWRITE 2500
//#undef _DEBUG
#define _DEBUG 0
@@ -23,11 +30,10 @@
#if _DEBUG
#ifndef _DEBUG_PC_DEFINED
#define _DEBUG_PC_DEFINED
- #include "PC.h"
- static PC _pc_debug(USBTX, USBRX, 115200);
+ #define _pc_debug pc
#endif
- #define DEBUG_PRINTF(x_) _pc_debug.printf((x_));
- #define DEBUG_PRINTF_VA(x_, ...) _pc_debug.printf((x_), __VA_ARGS__);
+ #define DEBUG_PRINTF(x_) _pc_debug.printf((x_))
+ #define DEBUG_PRINTF_VA(x_, ...) _pc_debug.printf((x_), __VA_ARGS__)
#else
#define DEBUG_PRINTF(x_)
#define DEBUG_PRINTF_VA(x_, ...)
@@ -36,11 +42,10 @@
#if PRINT_ERRORS
#ifndef _ERROR_PC_DEFINED
#define _ERROR_PC_DEFINED
- #include "PC.h"
- static PC _pc_error(USBTX, USBRX, 115200);
+ #define _pc_error pc
#endif
- #define ERROR_PRINTF(x_) _pc_error.printf((x_));
- #define ERROR_PRINTF_VA(x_, ...) _pc_error.printf((x_), __VA_ARGS__);
+ #define ERROR_PRINTF(x_) _pc_error.printf((x_))
+ #define ERROR_PRINTF_VA(x_, ...) _pc_error.printf((x_), __VA_ARGS__)
#else
#define ERROR_PRINTF(x_)
#define ERROR_PRINTF_VA(x_, ...)