initial commit
This commit is contained in:
42
source/application/test/main.c
Normal file
42
source/application/test/main.c
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "ctx.h"
|
||||
#include "stack.h"
|
||||
#include "queue.h"
|
||||
#include "thread.h"
|
||||
#include "schedule.h"
|
||||
#include "isr.h"
|
||||
#include "sys_tick.h"
|
||||
|
||||
#include "ascii_font.h"
|
||||
#include "bitmap.h"
|
||||
|
||||
#define STACK_SIZE 256
|
||||
stack_t tc_1_stack[STACK_SIZE];
|
||||
struct thread_context tc_1;
|
||||
|
||||
void task1(void *arg)
|
||||
{
|
||||
gpio_open(&led_1);
|
||||
gpio_write(&led_1, 0);
|
||||
while(1) {
|
||||
sleep_ms(1000);
|
||||
gpio_toggle(&led_1);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
board_init();
|
||||
sys_tick_init(&timer_1);
|
||||
thread_create(&tc_1, tc_1_stack, STACK_SIZE, task1, NULL, THREAD_PRIO_LOW);
|
||||
|
||||
schedule_start();
|
||||
|
||||
return 0;
|
||||
}
|
3
source/application/test/test.mk
Executable file
3
source/application/test/test.mk
Executable file
@@ -0,0 +1,3 @@
|
||||
INCLUDES += application/test
|
||||
DOC_SRC += application/test
|
||||
SUB_FOLDER += application/test
|
Reference in New Issue
Block a user