native_posix: Add missing headers and function prototypes
A few function prototypes were missing in the native_posix board and its drivers. Let's add them. Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
304f26c310
commit
00b07615fa
10 changed files with 34 additions and 8 deletions
|
@ -14,14 +14,12 @@
|
||||||
* or all its boards
|
* or all its boards
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "posix_trace.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void posix_print_error_and_exit(const char *format, ...);
|
|
||||||
void posix_print_warning(const char *format, ...);
|
|
||||||
void posix_print_trace(const char *format, ...);
|
|
||||||
|
|
||||||
void posix_halt_cpu(void);
|
void posix_halt_cpu(void);
|
||||||
void posix_atomic_halt_cpu(unsigned int imask);
|
void posix_atomic_halt_cpu(unsigned int imask);
|
||||||
|
|
||||||
|
|
21
arch/posix/include/posix_trace.h
Normal file
21
arch/posix/include/posix_trace.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018 Oticon A/S
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#ifndef _POSIX_TRACE_H
|
||||||
|
#define _POSIX_TRACE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void posix_print_error_and_exit(const char *format, ...);
|
||||||
|
void posix_print_warning(const char *format, ...);
|
||||||
|
void posix_print_trace(const char *format, ...);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -13,6 +13,7 @@
|
||||||
#include "timer_model.h"
|
#include "timer_model.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
#include "toolchain.h"
|
#include "toolchain.h"
|
||||||
|
#include "posix_trace.h"
|
||||||
|
|
||||||
static int s_argc, test_argc;
|
static int s_argc, test_argc;
|
||||||
static char **s_argv, **test_argv;
|
static char **s_argv, **test_argv;
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "posix_soc_if.h"
|
#include "posix_trace.h"
|
||||||
|
#include "posix_board_if.h"
|
||||||
#include "zephyr/types.h"
|
#include "zephyr/types.h"
|
||||||
#include "cmdline_common.h"
|
#include "cmdline_common.h"
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,9 @@ int cmd_is_option(const char *arg, const char *option, int with_value);
|
||||||
int cmd_is_help_option(const char *arg);
|
int cmd_is_help_option(const char *arg);
|
||||||
void cmd_read_option_value(const char *str, void *dest, const char type,
|
void cmd_read_option_value(const char *str, void *dest, const char type,
|
||||||
const char *option);
|
const char *option);
|
||||||
|
void cmd_args_set_defaults(struct args_struct_t args_struct[]);
|
||||||
|
bool cmd_parse_one_arg(char *argv, struct args_struct_t args_struct[]);
|
||||||
|
void cmd_print_switches_help(struct args_struct_t args_struct[]);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "native_rtc.h"
|
#include "native_rtc.h"
|
||||||
#include "hw_models_top.h"
|
#include "hw_models_top.h"
|
||||||
#include "timer_model.h"
|
#include "timer_model.h"
|
||||||
|
#include "posix_trace.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the (simulation) time in microseconds
|
* Return the (simulation) time in microseconds
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "irq_ctrl.h"
|
#include "irq_ctrl.h"
|
||||||
#include "board_soc.h"
|
#include "board_soc.h"
|
||||||
#include "zephyr/types.h"
|
#include "zephyr/types.h"
|
||||||
#include "posix_soc_if.h"
|
#include "posix_trace.h"
|
||||||
#include "misc/util.h"
|
#include "misc/util.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
|
#include "posix_board_if.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "misc/util.h"
|
#include "misc/util.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "posix_soc_if.h"
|
#include "posix_trace.h"
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
#include "cmdline.h" /* native_posix command line options header */
|
#include "cmdline.h" /* native_posix command line options header */
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "sys_clock.h"
|
#include "sys_clock.h"
|
||||||
#include "timer_model.h"
|
#include "timer_model.h"
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
#include "posix_soc_if.h"
|
#include "posix_trace.h"
|
||||||
|
|
||||||
static u64_t tick_period; /* System tick period in number of hw cycles */
|
static u64_t tick_period; /* System tick period in number of hw cycles */
|
||||||
static s64_t silent_ticks;
|
static s64_t silent_ticks;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue