Last active
February 8, 2017 20:07
-
-
Save ateska/58245d8a2b7e4721ea442a2eef5ff614 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bc_common.h> | |
#include <bc_scheduler.h> | |
#include <bc_usb_cdc.h> | |
void application_on_tick(void *event_param) | |
{ | |
// Send 'Hello world!' string to USB | |
char buffer[] = "Hello world!\r\n"; | |
bc_usb_cdc_write(buffer, strlen(buffer)); | |
// Reschedule this task to execute again (and again ...) | |
bc_scheduler_plan_current_relative(1000); | |
} | |
void application_init(void) | |
{ | |
// Initialise USB subsystem | |
bc_usb_cdc_init(); | |
// Schedule print to USB task | |
bc_scheduler_register(application_on_tick, NULL, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment