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
Revision 12:152a51255a28, committed 2016-04-13
- Comitter:
- bhepp
- Date:
- Wed Apr 13 12:23:53 2016 +0000
- Parent:
- 11:f8b58aca0332
- Commit message:
- Removed test-code for UWBLink
Changed in this revision
| main_multi_range.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main_multi_range.cpp Wed Apr 06 08:27:45 2016 +0000
+++ b/main_multi_range.cpp Wed Apr 13 12:23:53 2016 +0000
@@ -166,22 +166,14 @@
int main()
{
while (true) {
-
- const PinName CS_PINS[5] = {D8, D9, D10, D14, D15};
- for (int i = 0; i < sizeof(CS_PINS) / sizeof(PinName); ++i) {
- DigitalOut out(CS_PINS[i]);
+ // Ensure that all DW units are deactiviated at the beginning
+ for (int i = 0; i < NUM_OF_DW_UNITS; ++i) {
+ DigitalOut out(DW_CS_PINS[i]);
out = 1;
}
UWBLinkMbed ul(&pc, MAX_UWB_LINK_FRAME_LENGTH);
-// while (true) {
-// UWBMessage msg(UWBMessage::UWB_MESSAGE_TYPE_NOP);
-// if (!ul.sendMessage(msg)) {
-// ERROR_PRINTF("\r\nSending UWBLink message failed\r\n");
-// }
-// }
-
SPI spi(DW_MOSI_PIN, DW_MISO_PIN, DW_SCLK_PIN);
spi.format(8, 0); // Setup the spi for standard 8 bit data and SPI-Mode 0 (GPIO5, GPIO6 open circuit or ground on DW1000)
// NOTE: Minimum Frequency 1MHz. Below it is now working. Could be something with the activation and deactivation of interrupts.