diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-04-06 13:03:20 +0100 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-04-06 16:03:23 +0100 |
commit | 68fdd119f38c37ab28066474086b0e352d991baf (patch) | |
tree | cedb897ff9128f7d07e54c5c53ff8eb6be6b2bb1 /source/hal/include/hal.h | |
parent | da2ec067da418d3d80b2829b111df25bd901eb5c (diff) | |
download | ml-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/hal/include/hal.h')
-rw-r--r-- | source/hal/include/hal.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/source/hal/include/hal.h b/source/hal/include/hal.h index 6335e6d..25ea1e2 100644 --- a/source/hal/include/hal.h +++ b/source/hal/include/hal.h @@ -28,20 +28,18 @@ extern "C" { #endif -#include "platform_drivers.h" /* Platform drivers */ -#include "data_acq.h" /* Data acquisition abstraction */ -#include "data_psn.h" /* Data presentation abstraction */ -#include "timer.h" /* Timer/profiler API */ +#include "platform_drivers.h" /* Platform drivers */ +#include "timer.h" /* Timer/profiler API */ +#include "hal_lcd.h" /* LCD functions */ #include <inttypes.h> +#include <stdbool.h> /* Structure to define a platform context to be used by the application */ typedef struct hal_platform_context { int inited; /**< initialised */ char plat_name[64]; /**< name of this platform */ - data_acq_module * data_acq; /**< data acquisition module pointer */ - data_psn_module * data_psn; /**< data presentation module pointer */ - platform_timer * timer; /**< timer */ + platform_timer* timer; /**< timer */ int (* platform_init)(); /**< pointer to platform initialisation function */ void (* platform_release)(); /**< pointer to platform release function */ } hal_platform; @@ -50,13 +48,10 @@ typedef struct hal_platform_context { * @brief Initialise the HAL structure based on compile time config. This * should be called before any other function in this API. * @param[in,out] platform Pointer to a pre-allocated platform struct. - * @param[in,out] data_acq Pointer to a pre-allocated data acquisition module. - * @param[in,out] data_psn Pointer to a pre-allocated data presentation module. * @param[in,out] timer Pointer to a pre-allocated timer module. * @return 0 if successful, error code otherwise. **/ -int hal_init(hal_platform *platform, data_acq_module *data_acq, - data_psn_module *data_psn, platform_timer *timer); +int hal_init(hal_platform* platform, platform_timer* timer); /** @@ -66,7 +61,7 @@ int hal_init(hal_platform *platform, data_acq_module *data_acq, * platform structure. * @return 0 if successful, error code otherwise. **/ -int hal_platform_init(hal_platform *platform); +int hal_platform_init(hal_platform* platform); /** @@ -74,7 +69,15 @@ int hal_platform_init(hal_platform *platform); * @param[in] platform pointer to a pre-allocated and initialised * platform structure. **/ -void hal_platform_release(hal_platform *platform); +void hal_platform_release(hal_platform* platform); + +/** + * @brief Gets user input from the stdin interface. + * @param[out] user_input Pointer to a buffer where the input will be stored. + * @param[in] size Buffer size in bytes. + * @return True if successful, false otherwise. + */ +bool hal_get_user_input(char* user_input, int size); #ifdef __cplusplus } |