diff options
author | Cisco Cervellera <cisco.cervellera@arm.com> | 2021-09-28 18:15:10 +0100 |
---|---|---|
committer | Cisco Cervellera <cisco.cervellera@arm.com> | 2021-09-28 18:15:10 +0100 |
commit | 414b1b9534fcf5d7998035a0de9cf2589a1826c8 (patch) | |
tree | c314d4d77f5e9f9b39e1910838186adb1a594c80 /source | |
parent | 3e2de6721edc46a48dda993706e3e02cbc3b83d4 (diff) | |
download | ml-embedded-evaluation-kit-414b1b9534fcf5d7998035a0de9cf2589a1826c8.tar.gz |
MLECO-2348: Update dependencies to 21.08
* Update all dependancies to 21.08
* Refactoring to fit the new changes
Change-Id: Icc2ae3628ee6e8fbc0af2cd8f91e368c9ccae053
Diffstat (limited to 'source')
-rw-r--r-- | source/application/hal/hal.c | 32 |
1 files changed, 17 insertions, 15 deletions
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; } |