main function is now executed as kosmos thread
This commit is contained in:
31
source/firmware/kernel/application.c
Normal file
31
source/firmware/kernel/application.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* application.c
|
||||
*
|
||||
* Created on: Aug 20, 2016
|
||||
* Author: tkl
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "queue.h"
|
||||
#include "stack.h"
|
||||
#include "kernel.h"
|
||||
|
||||
static struct thread_context main_task;
|
||||
static stack_t main_stack[0xFF];
|
||||
|
||||
extern void main(void *arg);
|
||||
|
||||
int start_application (int argc, char* argv[])
|
||||
{
|
||||
board_init();
|
||||
|
||||
thread_create(&main_task, main_stack, 0xFF, main, NULL, THREAD_PRIO_IDLE);
|
||||
schedule_start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user