diff options
Diffstat (limited to 'source/hal/platform/simple/include')
-rw-r--r-- | source/hal/platform/simple/include/platform_drivers.h | 36 | ||||
-rw-r--r-- | source/hal/platform/simple/include/stubs/glcd.h | 12 | ||||
-rw-r--r-- | source/hal/platform/simple/include/timer_simple_platform.h | 7 |
3 files changed, 40 insertions, 15 deletions
diff --git a/source/hal/platform/simple/include/platform_drivers.h b/source/hal/platform/simple/include/platform_drivers.h index 0fb092e..c9928c0 100644 --- a/source/hal/platform/simple/include/platform_drivers.h +++ b/source/hal/platform/simple/include/platform_drivers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2021-2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,18 +15,36 @@ * limitations under the License. */ -#ifndef PLATFORM_DRIVER_H -#define PLATFORM_DRIVER_H +#ifndef PLATFORM_DRIVERS_H +#define PLATFORM_DRIVERS_H #include "log_macros.h" /* Logging related helpers. */ /* Platform components */ -#include "uart_stdout.h" /* stdout over UART. */ -#include "stubs/glcd.h" /* LCD stubs to support use cases that use LCD */ +#include "stubs/glcd.h" /* LCD stubs to support use cases that use LCD */ #include "timer_simple_platform.h" /* timer implementation */ +#include "cmsis.h" /* For CPU related defintiions */ -#include "cmsis.h" /* CPU device specific header file */ -#include "peripheral_memmap.h" /* peripheral memory map definitions */ -#include "peripheral_irqs.h" /* IRQ numbers for the platform */ +/** Platform definitions. TODO: These should be removed. */ +#include "peripheral_memmap.h" /* Peripheral memory map definitions. */ +#include "peripheral_irqs.h" /* IRQ numbers for this platform. */ -#endif /* PLATFORM_DRIVER_H */ +/** + * @brief Initialises the platform components. + * @return 0 if successful, error code otherwise. + */ +int platform_init(void); + +/** + * @brief Teardown for platform components. + */ +void platform_release(void); + +/** + * @brief Sets the platform name. + * @param[out] name Name of the platform to be set + * @param[in] size Size of the input buffer + */ +void platform_name(char* name, size_t size); + +#endif /* PLATFORM_DRIVERS_H */ diff --git a/source/hal/platform/simple/include/stubs/glcd.h b/source/hal/platform/simple/include/stubs/glcd.h index 5915f7d..b31938f 100644 --- a/source/hal/platform/simple/include/stubs/glcd.h +++ b/source/hal/platform/simple/include/stubs/glcd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2021-2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +17,8 @@ #ifndef STUBS_SIMPLE_PLATFORM_H #define STUBS_SIMPLE_PLATFORM_H +#include <stdint.h> + /****************************************************************************/ /* Definitions and stub functions for modules currently */ /* unavailable on this target platform */ @@ -58,10 +60,10 @@ void GLCD_Bitmap(unsigned int x, unsigned int y, * @param[in] downsample_factor factor by which the image * is downsampled by. */ -void GLCD_Image(void *data, const unsigned int width, - const unsigned int height, const unsigned int channels, - const unsigned int pos_x, const unsigned int pos_y, - const unsigned int downsample_factor); +void GLCD_Image(const void *data, const uint32_t width, + const uint32_t height, const uint32_t channels, + const uint32_t pos_x, const uint32_t pos_y, + const uint32_t downsample_factor); /** * @brief Clear display diff --git a/source/hal/platform/simple/include/timer_simple_platform.h b/source/hal/platform/simple/include/timer_simple_platform.h index 03d8245..4df22da 100644 --- a/source/hal/platform/simple/include/timer_simple_platform.h +++ b/source/hal/platform/simple/include/timer_simple_platform.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2021-2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -51,4 +51,9 @@ void start_cycle_counter(void); */ void stop_cycle_counter(void); +/** + * @brief System tick interrupt handler. + **/ +void SysTick_Handler(void); + #endif /* TIMER_SIMPLE_PLATFORM_H */ |