Fix missing mbed_get_a9_tick_irq in non-RTOS build

pull/11816/head
d-kato 2019-11-06 13:28:04 +09:00
parent e4164bee51
commit 076bbe9d56
3 changed files with 21 additions and 31 deletions

View File

@ -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

View File

@ -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

View File

@ -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