summaryrefslogtreecommitdiff
path: root/source/hal/platform/native/include/platform_drivers.h
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2022-02-23 14:40:45 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2022-02-23 17:34:33 +0000
commita1256e3881d1ec3e77b341dbb0c5c5dbf7ab3247 (patch)
treee0e23355a7bdbf6a62360e5391c2a3bd0763f0e3 /source/hal/platform/native/include/platform_drivers.h
parentfb246a834d4cb9392463f499158ca44f7e443492 (diff)
downloadml-embedded-evaluation-kit-a1256e3881d1ec3e77b341dbb0c5c5dbf7ab3247.tar.gz
MLECO-2948: Minor refactoring for platform modules.
Reducing dependency on cmsis-device sources as these will be removed under MLECO-2944. Also, starting to refactor to allow HAL to drop NPU and TA init routines - this will happen in future CRs. Added platform driver for native, and subsequent patches will attempt to get rid of the HAL "profile" specific sources and allow platform stub implementations at a level below HAL. This will allow platforms drivers to only override the range of functions that they actually want to implement and will fall back on stubs for the rest. In this CR only "utils" have been removed. Change-Id: I09b4a28e20847a07a956c818c6f47c74aab89063
Diffstat (limited to 'source/hal/platform/native/include/platform_drivers.h')
-rw-r--r--source/hal/platform/native/include/platform_drivers.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/source/hal/platform/native/include/platform_drivers.h b/source/hal/platform/native/include/platform_drivers.h
new file mode 100644
index 0000000..ca6b6e0
--- /dev/null
+++ b/source/hal/platform/native/include/platform_drivers.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2022 Arm Limited. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef PLATFORM_DRIVERS_H
+#define PLATFORM_DRIVERS_H
+
+#include "log_macros.h" /* Logging related helpers. */
+
+/**
+ * @brief Initialises the platform components.
+ * @return 0 if successful, error code otherwise.
+ */
+int platform_init(void);
+
+/**
+ * @brief Teardown for platform components.
+ */
+void platform_release(void);
+
+/**
+ * @brief Sets the platform name.
+ * @param[out] name Name of the platform to be set
+ * @param[in] size Size of the input buffer
+ */
+void platform_name(char* name, size_t size);
+
+#endif /* PLATFORM_DRIVERS_H */