Skip to content

Commit

Permalink
testing commit
Browse files Browse the repository at this point in the history
  • Loading branch information
YPAndrew0907 committed Feb 22, 2024
1 parent 56e6ec0 commit 5427ef5
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

144 changes: 144 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions MSB/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions MSB/msb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
#include "api/msb_can.h"
#include "cmsis_os.h"

//Thread ID identifies the thread.
osThreadId_t canTaskHandle;

void init_msb() {
// spawn CAN output thread
start_can_publisher();
// Create a thread to run start_can_publisher
canTaskHandle = osThreadNew(start_can_publisher, NULL, NULL);
if (canTaskHandle == NULL) {
// Handle error, need implementation in the future
}
}

// test
void start_msb() {

init_msb();
Expand All @@ -21,5 +26,9 @@ void start_msb() {
}

void stop_msb() {

if (canTaskHandle != NULL) {
osThreadTerminate(canTaskHandle);
//put Null for now, implementation in the future
canTaskHandle = NULL;
}
}

0 comments on commit 5427ef5

Please sign in to comment.