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: Servo mbed-rtos mbed
Diff: driver.cpp
- Revision:
- 3:bfc20ec72b15
- Parent:
- 2:7dfc8dd6aab3
- Child:
- 4:7fa7f78cbb92
--- a/driver.cpp Thu Oct 08 13:36:17 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#include "car_config.hpp"
-#include "can.hpp"
-#include "net.hpp"
-#include "mbed.h"
-#include "rtos.h"
-
-void init_driver () {
-}
-
-void thread_driver (void const *args) {
- while(1) {
- if (can_cmd_driver.flag == CAN_FLAG_RECEIVED) {
- uint16 cmd = can_cmd_driver.payload.msg.cmd;
- uint32 data = can_cmd_driver.payload.msg.data;
- switch(cmd) {
- case CMD_ECHO:
- can_sts_driver.payload.msg.data = data;
- can_sts_driver.flag = CAN_FLAG_SEND;
- break;
- default:
- //ignore it
- break;
- }
- can_cmd_driver.flag = CAN_FLAG_EMPTY;
- }
- Thread::wait(DRIVER_THREAD_PERIOD);
- }
-}