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: mbed-STM32F103C8T6 mbed libuavcan
Diff: main.cpp
- Revision:
- 3:44c673ad1b8d
- Parent:
- 2:f35bc063e2ed
- Child:
- 4:05f811770392
diff -r f35bc063e2ed -r 44c673ad1b8d main.cpp
--- a/main.cpp Tue Apr 17 14:15:31 2018 +0000
+++ b/main.cpp Thu Apr 19 20:27:01 2018 +0000
@@ -3,7 +3,19 @@
#include <libuavcan/libuavcan_drivers/stm32/driver/include.mk> //stm32 driver
//#include <libuavcan/libuavcan/dsdl_compiler/setup.py> //run dsdl compiler?
#include "chip.h" //build configuration
+#include "libuavcan/libuavcan/include/uavcan/build_config.hpp" //All default configuration options
+#include "libuavcan/libuavcan_drivers/stm32/driver/include/uavcan_stm32/build_config.hpp" //OS detection; Any General-Purpose timer
+extern uavcan::ICanDriver& getCanDriver();
+extern uavcan::ISystemClock& getSystemClock();
+
+const unsigned NodeMemoryPoolSize = 16384; // Need calulate (tutorial 2).
+typedef uavcan::Node<NodeMemoryPoolSize> Node;
+
+static Node& getNode() {
+ static Node node(getCanDriver(), getSystemClock());
+ return node;
+}
int main() {