Repair compilability of code

This commit is contained in:
2020-01-17 10:13:01 +01:00
parent a0c215e954
commit a93f257f2e
14 changed files with 73 additions and 33 deletions
+1 -1
View File
@@ -18,6 +18,6 @@
#include <aarch64/aarch64.h>
#define k_arch_init(...) aarch64_init(__VA_ARGS__)
#define Arch_init(...) AArch64_init(__VA_ARGS__)
#endif /* !ARCH_H */
+2 -2
View File
@@ -13,8 +13,8 @@
* @see https://lowenware.com/
*/
#include <aarch64/bcm2837.h>
#include "timer.h"
#include <drivers/soc/bcm2837/bcm2837.h>
#include <drivers/timer/timer.h>
#include "log.h"
#include "task.h"
#include "irq.h"
+2 -2
View File
@@ -16,8 +16,8 @@
#include <leos/log.h>
#include <leos/arch.h>
#include <leos/irq.h>
#include <leos/timer.h>
#include <leos/leos.h>
#include <drivers/timer/timer.h>
void
@@ -29,7 +29,7 @@ Leos_run(void)
Log_putI(AArch64_getEL(), 10);
Log_putS(")\r\n");
Arch_init();
AArch64_init();
Timer_init();
IRQ_init();
+6 -6
View File
@@ -13,7 +13,7 @@
* @see https://lowenware.com/
*/
#include <device/uart/uart.h>
#include <drivers/uart/uart.h>
#include "log.h"
void
@@ -28,7 +28,7 @@ Log_putS(const char *string)
char c;
const char *p = string;
while((c = *p) != 0) {
if (UART_send(c))
if (UART_put(c))
return -1;
p++;
}
@@ -41,14 +41,14 @@ Log_putI(int64_t value, uint8_t base)
int result;
if (value < 0) {
if (UART_send('-'))
if (UART_put('-'))
return -1;
value = -value;
result = 1;
} else {
result = 0;
}
result += k_logu(value, base);
result += Log_putU(value, base);
return (result) ? result : -1;
}
@@ -59,7 +59,7 @@ Log_putU(uint64_t value, uint8_t base)
char buffer[64];
if (!value) {
return (UART_send('0')) ? -1 : 1;
return (UART_put('0')) ? -1 : 1;
}
do {
@@ -75,7 +75,7 @@ Log_putU(uint64_t value, uint8_t base)
result = i;
while (i--) {
if (UART_send(buffer[i]))
if (UART_put(buffer[i]))
return -1;
}
return result;
+1 -1
View File
@@ -16,7 +16,7 @@
#ifndef LOG_H_AE38CD54_2822_47A5_AFB1_E785739FA01D
#define LOG_H_AE38CD54_2822_47A5_AFB1_E785739FA01D
#include <core/types.h>
#include <leos/types.h>
void
Log_init(void);
+1 -1
View File
@@ -15,7 +15,7 @@
*/
#include <stdlib.h>
#include <aarch64/bcm2837.h>
#include <drivers/soc/bcm2837/bcm2837.h>
#include "memory.h"
static unsigned long m_map[MEMORY_PAGE_COUNT / sizeof(unsigned long) / 8] = {0,};
+23
View File
@@ -0,0 +1,23 @@
/******************************************************************************
*
* Copyright (c) 2017-2020 by Löwenware Ltd
* Please, refer LICENSE file for legal information
*
******************************************************************************/
/**
* @file task.c
* @author Ilja Kartašov <ik@lowenware.com>
* @brief
*
* @see https://lowenware.com/
*/
#include "task.h"
unsigned long
Task_scheduleFromISR(void)
{
return 0;
}
+7 -1
View File
@@ -16,7 +16,11 @@
#ifndef TASK_H_AE13C166_79B5_4256_ABF3_74DF04E1CD18
#define TASK_H_AE13C166_79B5_4256_ABF3_74DF04E1CD18
#include <core/types.h>
#include <leos/types.h>
#ifndef CONFIG_TASK_MAX_NAME_LEN
#define CONFIG_TASK_MAX_NAME_LEN 16
#endif
typedef void (*TaskCallback)(void *p_ctx);
@@ -32,5 +36,7 @@ PID
Task_create(struct Task *pTask, TaskCallback callback, uint64_t *stack
, uint32_t stack_size);
unsigned long
Task_scheduleFromISR(void);
#endif /* !TASK_H */