diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/os_tick_ostm.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/os_tick_ostm.c index 0e4023b806..435531a3f3 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/os_tick_ostm.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/os_tick_ostm.c @@ -22,28 +22,25 @@ * limitations under the License. */ -#ifdef MBED_CONF_RTOS_PRESENT - -#include "os_tick.h" #include "irq_ctrl.h" #include "cmsis.h" #include "mbed_drv_cfg.h" +// Define OS Timer channel and interrupt number +#define OSTM (OSTM0) +#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) + +#ifdef MBED_CONF_RTOS_PRESENT +#include "os_tick.h" // Define OS TImer interrupt priority #ifndef OSTM_IRQ_PRIORITY #define OSTM_IRQ_PRIORITY 0xFFU #endif -// Define OS Timer channel and interrupt number -#define OSTM (OSTM0) -#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) - - static uint32_t OSTM_Clock; // Timer tick frequency static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag - // Setup OS Tick. int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { @@ -190,10 +187,10 @@ uint32_t OS_Tick_GetOverflow (void) { return (IRQ_GetPending(OSTM_IRQn)); } +#endif // Get Cortex-A9 OS Timer interrupt number IRQn_ID_t mbed_get_a9_tick_irqn(){ return OSTM_IRQn; } -#endif diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/os_tick_ostm.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/os_tick_ostm.c index 0e4023b806..435531a3f3 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/os_tick_ostm.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/os_tick_ostm.c @@ -22,28 +22,25 @@ * limitations under the License. */ -#ifdef MBED_CONF_RTOS_PRESENT - -#include "os_tick.h" #include "irq_ctrl.h" #include "cmsis.h" #include "mbed_drv_cfg.h" +// Define OS Timer channel and interrupt number +#define OSTM (OSTM0) +#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) + +#ifdef MBED_CONF_RTOS_PRESENT +#include "os_tick.h" // Define OS TImer interrupt priority #ifndef OSTM_IRQ_PRIORITY #define OSTM_IRQ_PRIORITY 0xFFU #endif -// Define OS Timer channel and interrupt number -#define OSTM (OSTM0) -#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) - - static uint32_t OSTM_Clock; // Timer tick frequency static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag - // Setup OS Tick. int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { @@ -190,10 +187,10 @@ uint32_t OS_Tick_GetOverflow (void) { return (IRQ_GetPending(OSTM_IRQn)); } +#endif // Get Cortex-A9 OS Timer interrupt number IRQn_ID_t mbed_get_a9_tick_irqn(){ return OSTM_IRQn; } -#endif diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/device/os_tick_ostm.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/device/os_tick_ostm.c index e974310cea..435531a3f3 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/device/os_tick_ostm.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/device/os_tick_ostm.c @@ -22,28 +22,25 @@ * limitations under the License. */ -#ifdef MBED_CONF_RTOS_PRESENT - -#include "os_tick.h" #include "irq_ctrl.h" #include "cmsis.h" #include "mbed_drv_cfg.h" +// Define OS Timer channel and interrupt number +#define OSTM (OSTM0) +#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) + +#ifdef MBED_CONF_RTOS_PRESENT +#include "os_tick.h" // Define OS TImer interrupt priority #ifndef OSTM_IRQ_PRIORITY #define OSTM_IRQ_PRIORITY 0xFFU #endif -// Define OS Timer channel and interrupt number -#define OSTM (OSTM0) -#define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn) - - static uint32_t OSTM_Clock; // Timer tick frequency static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag - // Setup OS Tick. int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { @@ -190,11 +187,10 @@ uint32_t OS_Tick_GetOverflow (void) { return (IRQ_GetPending(OSTM_IRQn)); } +#endif // Get Cortex-A9 OS Timer interrupt number IRQn_ID_t mbed_get_a9_tick_irqn(){ return OSTM_IRQn; } -#endif -