From 547ca53bb26a705cfceb1348373dd628eada2422 Mon Sep 17 00:00:00 2001 From: Anton Moberg Date: Mon, 14 Jun 2021 09:43:53 +0200 Subject: Add ethosu_deinit() Added ethosu_deinit method which calls ethosu_deregister_driver(). Change-Id: I12cb1b07169c06c011a80f66d26451431db3948a --- include/ethosu_driver.h | 5 +++++ src/ethosu_driver.c | 5 +++++ 2 files changed, 10 insertions(+) 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 @@ -133,6 +133,11 @@ int ethosu_init(struct ethosu_driver *drv, uint32_t secure_enable, uint32_t privilege_enable); +/** + * Deinitialize the Ethos-U driver. + */ +void ethosu_deinit(struct ethosu_driver *drv); + /** * Get Ethos-U driver version. */ 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); -- cgit v1.2.1