From 414b1b9534fcf5d7998035a0de9cf2589a1826c8 Mon Sep 17 00:00:00 2001 From: Cisco Cervellera Date: Tue, 28 Sep 2021 18:15:10 +0100 Subject: MLECO-2348: Update dependencies to 21.08 * Update all dependancies to 21.08 * Refactoring to fit the new changes Change-Id: Icc2ae3628ee6e8fbc0af2cd8f91e368c9ccae053 --- source/application/hal/hal.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'source/application') diff --git a/source/application/hal/hal.c b/source/application/hal/hal.c index 1515697..12bb7ef 100644 --- a/source/application/hal/hal.c +++ b/source/application/hal/hal.c @@ -28,7 +28,7 @@ #include "timing_adapter.h" /* Arm Ethos-U timing adapter driver header */ #include "timing_adapter_settings.h" /* Arm Ethos-U timing adapter settings */ -extern struct ethosu_driver ethosu_drv; /* Default Ethos-U device driver */ +struct ethosu_driver ethosu_drv; /* Default Ethos-U device driver */ /** * @brief Initialises the Arm Ethos-U NPU @@ -245,22 +245,24 @@ static int arm_npu_init(void) info("Ethos-U device initialised\n"); /* Get Ethos-U version */ - struct ethosu_version version; - if (0 != (err = ethosu_get_version(ðosu_drv, &version))) { - printf_err("failed to fetch Ethos-U version info\n"); - return err; - } + struct ethosu_driver_version driver_version; + struct ethosu_hw_info hw_info; + + ethosu_get_driver_version(&driver_version); + ethosu_get_hw_info(ðosu_drv, &hw_info); info("Ethos-U version info:\n"); - info("\tArch: v%u.%u.%u\n", version.id.arch_major_rev, - version.id.arch_minor_rev, - version.id.arch_patch_rev); - info("\tDriver: v%u.%u.%u\n", version.id.driver_major_rev, - version.id.driver_minor_rev, - version.id.driver_patch_rev); - info("\tMACs/cc: %u\n", (1 << version.cfg.macs_per_cc)); - info("\tCmd stream: v%u\n", version.cfg.cmd_stream_version); - info("\tSHRAM size: %u\n", version.cfg.shram_size); + info("\tArch: v%"PRIu32".%"PRIu32".%"PRIu32"\n", + hw_info.version.arch_major_rev, + hw_info.version.arch_minor_rev, + hw_info.version.arch_patch_rev); + info("\tDriver: v%"PRIu8".%"PRIu8".%"PRIu8"\n", + driver_version.major, + driver_version.minor, + driver_version.patch); + info("\tMACs/cc: %"PRIu32"\n", (uint32_t)(1 << hw_info.cfg.macs_per_cc)); + info("\tCmd stream: v%"PRIu32"\n", hw_info.cfg.cmd_stream_version); + info("\tSHRAM size: %"PRIu32"\n", hw_info.cfg.shram_size); return 0; } -- cgit v1.2.1