summaryrefslogtreecommitdiff
path: root/source/use_case/vww/src/UseCaseHandler.cc
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2022-04-06 13:03:20 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2022-04-06 16:03:23 +0100
commit68fdd119f38c37ab28066474086b0e352d991baf (patch)
treecedb897ff9128f7d07e54c5c53ff8eb6be6b2bb1 /source/use_case/vww/src/UseCaseHandler.cc
parentda2ec067da418d3d80b2829b111df25bd901eb5c (diff)
downloadml-embedded-evaluation-kit-68fdd119f38c37ab28066474086b0e352d991baf.tar.gz
MLECO-3096: Removing data_acq and data_psn
Further to the HAL refactoring done in previous commits, this CR simpifies HAL by removing data_acq and data_psn "modules". The associated function pointers have been removed. Change-Id: I04c194c08dfe0aff98ce4e0f0f056bac254c137d Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'source/use_case/vww/src/UseCaseHandler.cc')
-rw-r--r--source/use_case/vww/src/UseCaseHandler.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/use_case/vww/src/UseCaseHandler.cc b/source/use_case/vww/src/UseCaseHandler.cc
index a47f191..56ba2b5 100644
--- a/source/use_case/vww/src/UseCaseHandler.cc
+++ b/source/use_case/vww/src/UseCaseHandler.cc
@@ -42,7 +42,6 @@ namespace app {
/* Image inference classification handler. */
bool ClassifyImageHandler(ApplicationContext &ctx, uint32_t imgIndex, bool runAll)
{
- auto& platform = ctx.Get<hal_platform &>("platform");
auto& profiler = ctx.Get<Profiler&>("profiler");
constexpr uint32_t dataPsnImgDownscaleFactor = 1;
@@ -89,7 +88,7 @@ namespace app {
std::vector<ClassificationResult> results;
do {
- platform.data_psn->clear(COLOR_BLACK);
+ hal_lcd_clear(COLOR_BLACK);
/* Strings for presentation/logging. */
std::string str_inf{"Running inference... "};
@@ -98,7 +97,7 @@ namespace app {
LoadImageIntoTensor(ctx.Get<uint32_t>("imgIndex"), inputTensor);
/* Display this image on the LCD. */
- platform.data_psn->present_data_image(
+ hal_lcd_display_image(
static_cast<uint8_t *>(inputTensor->data.data),
nCols, nRows, nChannels,
dataPsnImgStartX, dataPsnImgStartY, dataPsnImgDownscaleFactor);
@@ -115,7 +114,7 @@ namespace app {
}
/* Display message on the LCD - inference running. */
- platform.data_psn->present_data_text(
+ hal_lcd_display_text(
str_inf.c_str(), str_inf.size(),
dataPsnTxtInfStartX, dataPsnTxtInfStartY, 0);
@@ -129,7 +128,7 @@ namespace app {
/* Erase. */
str_inf = std::string(str_inf.size(), ' ');
- platform.data_psn->present_data_text(
+ hal_lcd_display_text(
str_inf.c_str(), str_inf.size(),
dataPsnTxtInfStartX, dataPsnTxtInfStartY, 0);
@@ -145,7 +144,7 @@ namespace app {
arm::app::DumpTensor(outputTensor);
#endif /* VERIFY_TEST_OUTPUT */
- if (!PresentInferenceResult(platform, results)) {
+ if (!PresentInferenceResult(results)) {
return false;
}