diff options
Diffstat (limited to 'module/hello/src')
-rw-r--r-- | module/hello/src/Makefile | 11 | ||||
-rw-r--r-- | module/hello/src/mod_hello.c | 44 |
2 files changed, 55 insertions, 0 deletions
diff --git a/module/hello/src/Makefile b/module/hello/src/Makefile new file mode 100644 index 00000000..8429c746 --- /dev/null +++ b/module/hello/src/Makefile @@ -0,0 +1,11 @@ +# +# Arm SCP/MCP Software +# Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +BS_LIB_NAME := HELLO +BS_LIB_SOURCES += mod_hello.c + +include $(BS_DIR)/lib.mk diff --git a/module/hello/src/mod_hello.c b/module/hello/src/mod_hello.c new file mode 100644 index 00000000..c7fcd805 --- /dev/null +++ b/module/hello/src/mod_hello.c @@ -0,0 +1,44 @@ +#include <fwk_thread.h> +#include <fwk_assert.h> +#include <fwk_macros.h> +#include <fwk_math.h> +#include <fwk_mm.h> +#include <fwk_module.h> +#include <fwk_module_idx.h> +#include <fwk_notification.h> +#include <fwk_status.h> +#include <fwk_id.h> +#include <mod_clock.h> +#include <mod_hello.h> +#include <mod_log.h> +#include <fwk_log.h> + +struct mod_hello_module_config *test_config; + +struct mod_log_api *log_api; + +static int hello_init(fwk_id_t module_id, unsigned int element_count, + const void *config) +{ + test_config = (struct mod_hello_module_config *) config; + return FWK_SUCCESS; +} + +int hello_start(fwk_id_t id) +{ + FWK_LOG_INFO("[HELLO] hello_start\n"); + return FWK_SUCCESS; +} + +static int hello_bind(fwk_id_t id, unsigned int round) +{ + return FWK_SUCCESS; +} + +const struct fwk_module module_hello = { + .name = "HELLO", + .type = FWK_MODULE_TYPE_DRIVER, + .init = hello_init, + .bind = hello_bind, + .start = hello_start, +}; |