Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <msp430.h>
- #include "HAL.h"
- #include "BTPSKRNL.h"
- static void WorkerFunction(void *param) {
- HAL_ConsoleWrite(12, "hello world\n");
- }
- static void IdleFunction(void *param) {
- HAL_LedToggle(0);
- }
- void MainThread(void) {
- BTPS_Initialization_t btps_init;
- btps_init.GetTickCountCallback = HAL_GetTickCount;
- BTPS_Init(&btps_init);
- BTPS_AddFunctionToScheduler(WorkerFunction, NULL, 200);
- BTPS_AddFunctionToScheduler(IdleFunction, NULL, 1000);
- BTPS_ExecuteScheduler();
- }
- int main(void) {
- WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
- HAL_ConfigureHardware();
- __enable_interrupt();
- MainThread();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement