/****************************************************************************** * * Copyright (c) 2017-2019 by Löwenware Ltd * Please, refer LICENSE file for legal information * ******************************************************************************/ /** * @file main.c * @author Ilja Kartašov * @brief * * @see https://lowenware.com/ */ #include #include #include #include #include void Leos_demoTask(void *arg); void Leos_run(void) { Log_init(); Log_putS("Starting LEOS (EL"); Log_putI(AArch64_getEL(), 10); Log_putS(")\r\n"); AArch64_init(); IRQ_init(); Timer_init(); IRQ_enable(); Task_initSheduler(); if (Task_create(Leos_demoTask, "Task 1") == -1) Log_putS("Task 1 was not created\r\n"); for (;;) { Log_putU(Timer_getTicks(), 10); Log_putS(". Idle Task\r\n"); Task_yield(); } } void Leos_demoTask(void *arg) { for (;;) { Log_putU(Timer_getTicks(), 10); Log_putS(". "); Log_putS((const char *)arg); Log_putS("\r\n"); Task_yield(); } }