aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-28 11:44:42 +0000
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-28 11:44:42 +0000
commitbe0bc4608b91f18fd789d3a6c61191425c2b3459 (patch)
tree55f8b1946abb36c7cc7aee1cc4d8a978c5d3e3fc
parent49a81c148e3c55cf97d7eb79e22a1d1f5504a97d (diff)
downloadethos-u-core-driver-be0bc4608b91f18fd789d3a6c61191425c2b3459.tar.gz
Revert "Remove static inline v2 function"
This reverts commit 49a81c148e3c55cf97d7eb79e22a1d1f5504a97d. Reason for revert: Dependency on other modules. Change-Id: Iac8e63144dce92c4fc07caffcb74b1ce9f26800c
-rw-r--r--include/ethosu_driver.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h
index e40daa0..6f8f201 100644
--- a/include/ethosu_driver.h
+++ b/include/ethosu_driver.h
@@ -186,6 +186,21 @@ enum ethosu_error_codes set_clock_and_power_request(struct ethosu_driver *drv,
enum ethosu_clock_q_request clock_request,
enum ethosu_power_q_request power_request);
+/**
+ * Static inline for backwards-compatibility
+ */
+static inline int ethosu_invoke_v2(const void *custom_data_ptr,
+ const int custom_data_size,
+ const uint64_t *base_addr,
+ const size_t *base_addr_size,
+ const int num_base_addr)
+{
+ struct ethosu_driver *drv = ethosu_reserve_driver();
+ int result = ethosu_invoke(drv, custom_data_ptr, custom_data_size, base_addr, base_addr_size, num_base_addr);
+ ethosu_release_driver(drv);
+ return result;
+}
+
#ifdef __cplusplus
}
#endif