From 1fb394b2d32f26a2d962737aa15c6baae2c013b8 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 14 Aug 2019 11:52:35 +0200 Subject: [PATCH] fwk_interrupt: add missing declaration of exported functions Add missing declaration of exported functions fwk_interrupt_init() and fwk_interrupt_set_isr_fault(). fwk_interrupt_init() is an effective exported API hence declared from fwk_interrupt.h. fwk_interrupt_set_isr_fault() is a test only API hence declared from internal/fwk_interrupt.h. Signed-off-by: Etienne Carriere --- framework/include/fwk_interrupt.h | 11 ++++++ framework/include/internal/fwk_interrupt.h | 44 ++++++++++++++++++++++ framework/src/fwk_interrupt.c | 1 + framework/test/test_fwk_interrupt.c | 4 +- 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 framework/include/internal/fwk_interrupt.h diff --git a/framework/include/fwk_interrupt.h b/framework/include/fwk_interrupt.h index a6ecfb7ce..448baec27 100644 --- a/framework/include/fwk_interrupt.h +++ b/framework/include/fwk_interrupt.h @@ -11,6 +11,7 @@ #ifndef FWK_INTERRUPT_H #define FWK_INTERRUPT_H +#include #include #include #include @@ -56,6 +57,16 @@ */ #define FWK_INTERRUPT_EXCEPTION (UINT_MAX - 2) +/*! + * \brief Register interrupt driver in the framework. + * + * \param driver Interrupt driver instance to register + * + * \retval FWK_SUCCESS Operation succeeded. + * \retval FWK_E_PARAM One or more parameters were invalid. + */ +int fwk_interrupt_init(const struct fwk_arch_interrupt_driver *driver); + /*! * \brief Enable interrupts. * diff --git a/framework/include/internal/fwk_interrupt.h b/framework/include/internal/fwk_interrupt.h new file mode 100644 index 000000000..921abdfdd --- /dev/null +++ b/framework/include/internal/fwk_interrupt.h @@ -0,0 +1,44 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Description: + * Interrupt management internal resources. + */ + +#ifndef INTERNAL_FWK_INTERRUPT_H +#define INTERNAL_FWK_INTERRUPT_H + +/*! + * \addtogroup GroupLibFramework Framework + * @{ + */ + +/*! + * \defgroup GroupInterrupt Interrupt Management + * @{ + */ + +/*! + * \brief Set the fault interrupt service routine. This is used internally by + * the framework for test purposes. + * + * \param isr Pointer to the fault interrupt service routine function. + * + * \retval FWK_SUCCESS Operation succeeded. + * \retval FWK_E_PARAM One or more parameters were invalid. + * \retval FWK_E_INIT The component has not been initialized. + */ +int fwk_interrupt_set_isr_fault(void (*isr)(void)); + +/*! + * @} + */ + +/*! + * @} + */ + +#endif /* INTERNAL_FWK_INTERRUPT_H */ diff --git a/framework/src/fwk_interrupt.c b/framework/src/fwk_interrupt.c index 82a692d39..7d315a82a 100644 --- a/framework/src/fwk_interrupt.c +++ b/framework/src/fwk_interrupt.c @@ -14,6 +14,7 @@ #include #include #include +#include static bool initialized; static const struct fwk_arch_interrupt_driver *driver; diff --git a/framework/test/test_fwk_interrupt.c b/framework/test/test_fwk_interrupt.c index 5a2d98044..9ae43aff5 100644 --- a/framework/test/test_fwk_interrupt.c +++ b/framework/test/test_fwk_interrupt.c @@ -12,12 +12,10 @@ #include #include #include +#include #define INTERRUPT_ID 42 -extern int fwk_interrupt_init(const struct fwk_arch_interrupt_driver *_driver); -extern int fwk_interrupt_set_isr_fault(void (*isr)(void)); - /* * Variables for the mock functions */ -- GitLab