TSTM32F103C

Dependencies:   CANnucleo mbed-STM32F103C8T6 mbed-dev

Files at this revision

API Documentation at this revision

Comitter:
schnf30
Date:
Wed Jun 06 10:41:08 2018 +0000
Commit message:
Help for studient bus can

Changed in this revision

CANnucleo.lib Show annotated file Show diff for this revision Revisions of this file
device.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-STM32F103C8T6.lib Show annotated file Show diff for this revision Revisions of this file
mbed-dev.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 64efd79cec7a CANnucleo.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CANnucleo.lib	Wed Jun 06 10:41:08 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hudakz/code/CANnucleo/#cebc6f21046e
diff -r 000000000000 -r 64efd79cec7a device.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/device.h	Wed Jun 06 10:41:08 2018 +0000
@@ -0,0 +1,11 @@
+#ifndef MBED_DEVICE_H
+#define MBED_DEVICE_H
+ 
+//=======================================
+#define DEVICE_ID_LENGTH       24
+ 
+#undef DEVICE_CAN
+ 
+#include "objects.h"
+ 
+#endif
\ No newline at end of file
diff -r 000000000000 -r 64efd79cec7a main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 06 10:41:08 2018 +0000
@@ -0,0 +1,23 @@
+
+#include "stm32f103c8t6.h"
+#include "CANnucleo.h"
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+CAN *can;
+// CANMsg txMsg;
+int main()
+{
+    confSysClock();
+    can = new CAN(PB_8, PB_9);        // CAN Rx pin name, CAN Tx pin name    
+
+    can->frequency(500000);
+    while(1) {
+        //     txMsg.
+        can->write(CANMessage(0x23,"Data",4));
+        myled = 1; // LED is ON
+        wait(0.02); // 200 ms
+        myled = 0; // LED is OFF
+        wait(0.08); // 1 sec
+    }
+}
diff -r 000000000000 -r 64efd79cec7a mbed-STM32F103C8T6.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-STM32F103C8T6.lib	Wed Jun 06 10:41:08 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#727468adfd1d
diff -r 000000000000 -r 64efd79cec7a mbed-dev.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-dev.lib	Wed Jun 06 10:41:08 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/schnf30/code/mbed-dev/#86ae4501203c