zephyr/soc/native/inf_clock/soc.h
Alberto Escolar Piedras 5efe751240 boards native: Add function to remap embedded address
Add a function which can be used to remap embedded device address,
into addresses which can be used in the simulated native boards.

For the nrf_bsim boards we provide an actual implementation.
For other boards, we provide an optional dummy version which does
nothing.
It is up to each board implementation to decide if they want to
provide one or use the dummy.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00

41 lines
976 B
C

/*
* Copyright (c) 2017 Oticon A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _POSIX_SOC_INF_CLOCK_SOC_H
#define _POSIX_SOC_INF_CLOCK_SOC_H
#include <stdbool.h>
#include <zephyr/toolchain.h>
#include "board_soc.h"
#include "posix_soc.h"
#include "posix_native_task.h"
#ifdef __cplusplus
extern "C" {
#endif
void posix_soc_clean_up(void);
/**
* Remap an embedded device address, into an address which can be used in the simulated native
* board.
*
* If the provided address is not in a range known to this function it will not be modified and the
* function will return false.
* Otherwise the provided address pointer will be modified, and true returned.
*
* Note: The SOC provides a dummy version of this function which does nothing,
* so all boards will have an implementation.
* It is optional for boards to provide one if desired.
*/
bool native_emb_addr_remap(void **addr);
#ifdef __cplusplus
}
#endif
#endif /* _POSIX_SOC_INF_CLOCK_SOC_H */