aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Moberg <anton.moberg@arm.com>2021-06-14 09:43:53 +0200
committerAnton Moberg <anton.moberg@arm.com>2021-06-14 09:43:53 +0200
commit547ca53bb26a705cfceb1348373dd628eada2422 (patch)
tree55f8b1946abb36c7cc7aee1cc4d8a978c5d3e3fc
parenta830f17656ee3a8bcb72483886da562d69245c39 (diff)
downloadethos-u-core-driver-547ca53bb26a705cfceb1348373dd628eada2422.tar.gz
Add ethosu_deinit()
Added ethosu_deinit method which calls ethosu_deregister_driver(). Change-Id: I12cb1b07169c06c011a80f66d26451431db3948a
-rw-r--r--include/ethosu_driver.h5
-rw-r--r--src/ethosu_driver.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h
index 30d707f..6f8f201 100644
--- a/include/ethosu_driver.h
+++ b/include/ethosu_driver.h
@@ -134,6 +134,11 @@ int ethosu_init(struct ethosu_driver *drv,
uint32_t privilege_enable);
/**
+ * Deinitialize the Ethos-U driver.
+ */
+void ethosu_deinit(struct ethosu_driver *drv);
+
+/**
* Get Ethos-U driver version.
*/
void ethosu_get_driver_version(struct ethosu_driver_version *ver);
diff --git a/src/ethosu_driver.c b/src/ethosu_driver.c
index 84488e5..2be18af 100644
--- a/src/ethosu_driver.c
+++ b/src/ethosu_driver.c
@@ -696,6 +696,11 @@ int ethosu_init(struct ethosu_driver *drv,
return return_code;
}
+void ethosu_deinit(struct ethosu_driver *drv)
+{
+ ethosu_deregister_driver(drv);
+}
+
void ethosu_get_driver_version(struct ethosu_driver_version *ver)
{
assert(ver != NULL);