From 1c893b540454ffd46e72cf0fce9e7e6d962195b5 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Wed, 26 May 2021 12:06:14 +0200 Subject: Optimizations Removing the ASSERT() makro using assert() instead. assert() is better controlled with the NDEBUG define. Using uintptr_t instead of uint32_t * for the NPU base address. This saves a division by 4 in the register read and write functions. Change-Id: I65a91fe35dc63666e50bdf7a756ad15b56dc66e9 --- include/ethosu_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ethosu_device.h b/include/ethosu_device.h index 35f7924..0221ad1 100644 --- a/include/ethosu_device.h +++ b/include/ethosu_device.h @@ -56,7 +56,7 @@ enum ethosu_error_codes struct ethosu_device { - volatile uint32_t *base_address; + volatile uintptr_t base_address; uint32_t proto; uint32_t pmcr; uint32_t pmccntr[2]; -- cgit v1.2.1