summaryrefslogtreecommitdiff
path: root/source/use_case/noise_reduction/src
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/noise_reduction/src
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/noise_reduction/src')
-rw-r--r--source/use_case/noise_reduction/src/MainLoop.cc4
-rw-r--r--source/use_case/noise_reduction/src/UseCaseHandler.cc12
2 files changed, 7 insertions, 9 deletions
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 @@ void main_loop(hal_platform& platform)
if (bUseMenu) {
DisplayMenu();
- menuOption = arm::app::ReadUserInputAsInt(platform);
+ menuOption = arm::app::ReadUserInputAsInt();
printf("\n");
}
switch (menuOption) {
@@ -108,7 +108,7 @@ void main_loop(hal_platform& platform)
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 @@ namespace app {
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 @@ namespace app {
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 @@ namespace app {
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 @@ 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, false);
@@ -218,14 +216,14 @@ namespace app {
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);