main.c 710 B

123456789101112131415161718192021
  1. /*----------------------------------------------------------------------------
  2. * CMSIS-RTOS 'main' function template
  3. *---------------------------------------------------------------------------*/
  4. #define osObjectsPublic // define objects in main module
  5. #include "osObjects.h" // RTOS object definitions
  6. /*
  7. * main: initialize and start the system
  8. */
  9. int main (void) {
  10. osKernelInitialize (); // initialize CMSIS-RTOS
  11. // initialize peripherals here
  12. // create 'thread' functions that start executing,
  13. // example: tid_name = osThreadCreate (osThread(name), NULL);
  14. osKernelStart (); // start thread execution
  15. }