1 /* 2 * Copyright (c) 2017 Oticon A/S 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef ZEPHYR_INCLUDE_ARCH_POSIX_POSIX_SOC_IF_H_ 7 #define ZEPHYR_INCLUDE_ARCH_POSIX_POSIX_SOC_IF_H_ 8 9 /* 10 * This file lists the functions the POSIX architecture core expects the 11 * SOC or board will provide 12 * 13 * All functions listed here must be provided by the implementation of the SOC 14 * or all its boards 15 */ 16 17 #include <zephyr/arch/posix/posix_trace.h> 18 #include "soc_irq.h" /* Must exist and define _ARCH_IRQ/ISR_* macros */ 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 void posix_halt_cpu(void); 25 void posix_atomic_halt_cpu(unsigned int imask); 26 27 void posix_irq_enable(unsigned int irq); 28 void posix_irq_disable(unsigned int irq); 29 int posix_irq_is_enabled(unsigned int irq); 30 unsigned int posix_irq_lock(void); 31 void posix_irq_unlock(unsigned int key); 32 void posix_irq_full_unlock(void); 33 int posix_get_current_irq(void); 34 void posix_sw_set_pending_IRQ(unsigned int IRQn); 35 void posix_sw_clear_pending_IRQ(unsigned int IRQn); 36 #ifdef CONFIG_IRQ_OFFLOAD 37 void posix_irq_offload(void (*routine)(const void *), const void *parameter); 38 #endif 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* ZEPHYR_INCLUDE_ARCH_POSIX_POSIX_SOC_IF_H_ */ 45