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>
diff --git a/source/use_case/noise_reduction/src/MainLoop.cc b/source/use_case/noise_reduction/src/MainLoop.cc
index c6214e3..bcaff6d 100644
--- a/source/use_case/noise_reduction/src/MainLoop.cc
+++ b/source/use_case/noise_reduction/src/MainLoop.cc
@@ -98,7 +98,7 @@
if (bUseMenu) {
DisplayMenu();
- menuOption = arm::app::ReadUserInputAsInt(platform);
+ menuOption = arm::app::ReadUserInputAsInt();
printf("\n");
}
switch (menuOption) {
@@ -108,7 +108,7 @@
case MENU_OPT_RUN_INF_CHOSEN: {
printf(" Enter the audio clip IFM index [0, %d]: ", NUMBER_OF_FILES-1);
fflush(stdout);
- auto clipIndex = static_cast<uint32_t>(arm::app::ReadUserInputAsInt(platform));
+ auto clipIndex = static_cast<uint32_t>(arm::app::ReadUserInputAsInt());
SetAppCtxClipIdx(caseContext, clipIndex);
executionSuccessful = NoiseReductionHandler(caseContext, false);
break;
diff --git a/source/use_case/noise_reduction/src/UseCaseHandler.cc b/source/use_case/noise_reduction/src/UseCaseHandler.cc
index 792b460..acb8ba7 100644
--- a/source/use_case/noise_reduction/src/UseCaseHandler.cc
+++ b/source/use_case/noise_reduction/src/UseCaseHandler.cc
@@ -64,8 +64,6 @@
pMemDumpBytesWritten = ctx.Get<size_t*>("MEM_DUMP_BYTE_WRITTEN");
}
std::reference_wrapper<size_t> memDumpBytesWritten = std::ref(*pMemDumpBytesWritten);
-
- auto& platform = ctx.Get<hal_platform&>("platform");
auto& profiler = ctx.Get<Profiler&>("profiler");
/* Get model reference. */
@@ -106,7 +104,7 @@
audioFileAccessorFunc = ctx.Get<std::function<const char*(const uint32_t)>>("featureFileNames");
}
do{
- platform.data_psn->clear(COLOR_BLACK);
+ hal_lcd_clear(COLOR_BLACK);
auto startDumpAddress = memDumpBaseAddr + memDumpBytesWritten;
auto currentIndex = ctx.Get<uint32_t>("clipIndex");
@@ -158,7 +156,7 @@
std::string str_inf{"Running inference... "};
/* 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, false);
@@ -191,7 +189,7 @@
/* 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, false);
@@ -218,14 +216,14 @@
IncrementAppCtxClipIdx(ctx);
std::string clearString{' '};
- platform.data_psn->present_data_text(
+ hal_lcd_display_text(
clearString.c_str(), clearString.size(),
dataPsnTxtInfStartX, dataPsnTxtInfStartY, false);
std::string completeMsg{"Inference complete!"};
/* Display message on the LCD - inference complete. */
- platform.data_psn->present_data_text(
+ hal_lcd_display_text(
completeMsg.c_str(), completeMsg.size(),
dataPsnTxtInfStartX, dataPsnTxtInfStartY, false);