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:
- 1:fc1836a2b111
- Parent:
- 0:d2cfc47a8e2a
- Child:
- 2:f35bc063e2ed
--- a/main.cpp Sat Apr 14 10:14:16 2018 +0000
+++ b/main.cpp Sat Apr 14 15:33:37 2018 +0000
@@ -1,4 +1,17 @@
#include "mbed.h"
+#include <libuavcan/libuavcan/include.mk> //core
+#include <libuavcan/libuavcan_drivers/stm32/driver/include.mk> //stm32 driver
+//#include <libuavcan/libuavcan/dsdl_compiler/setup.py> //run dsdl compiler?
+
+/**********chip.h**********/
+#include "stm32f103c8t6.h"
+#define UAVCAN_STM32_BAREMETAL 1
+#define UAVCAN_STM32_NUM_IFACES 1
+#define STM32_PCLK1 HAL_RCC_GetPCLK1Freq()
+#define STM32_TIMCLK1 (48000000ul) //48MHz. Is UAVCAN_STM32_TIMER_NUMBER 1?
+#define CAN1_TX_IRQHandler CAN1_TX_IRQHandler
+#define CAN1_RX0_IRQHandler CAN1_RX0_IRQHandler
+#define CAN1_RX1_IRQHandler CAN1_RX1_IRQHandler
int main() {