From 32ed0f7593b475f7f252628d52e8dcd05e678421 Mon Sep 17 00:00:00 2001 From: TomoYamanaka Date: Fri, 19 Jan 2018 18:46:20 +0900 Subject: [PATCH] Modify the arrangement of "{" that shows the function start Regarding "{" that show the function start, I modified the the arrangement from right of function to new line. --- .../TARGET_GR_LYCHEE/device/cmsis_nvic.c | 6 +++-- .../TARGET_GR_LYCHEE/device/nvic_wrapper.c | 6 +++-- .../TARGET_GR_LYCHEE/device/os_tick_ostm.c | 24 +++++++++++------ .../TARGET_RZ_A1H/device/cmsis_nvic.c | 6 +++-- .../TARGET_RZ_A1H/device/nvic_wrapper.c | 6 +++-- .../TARGET_RZ_A1H/device/os_tick_ostm.c | 27 ++++++++++++------- 6 files changed, 50 insertions(+), 25 deletions(-) diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/cmsis_nvic.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/cmsis_nvic.c index 5e9683da97..7ea837681e 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/cmsis_nvic.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/cmsis_nvic.c @@ -31,11 +31,13 @@ #include "MBRZA1LU.h" #include "irq_ctrl.h" -void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) { +void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ InterruptHandlerRegister(IRQn, (IRQHandler)vector); } -uint32_t NVIC_GetVector(IRQn_Type IRQn) { +uint32_t NVIC_GetVector(IRQn_Type IRQn) +{ uint32_t vectors = (uint32_t)IRQ_GetHandler(IRQn); return vectors; } diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/nvic_wrapper.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/nvic_wrapper.c index 11b3f7bf54..2a0b02f404 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/nvic_wrapper.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/nvic_wrapper.c @@ -213,14 +213,16 @@ uint32_t ITM_SendChar (uint32_t ch) } -int32_t ITM_ReceiveChar (void) { +int32_t ITM_ReceiveChar (void) +{ /* Not support this function */ /* Use mbed Serial */ return (-1); /* no character available */ } -int32_t ITM_CheckChar (void) { +int32_t ITM_CheckChar (void) +{ /* Not support this function */ /* Use mbed Serial */ return (0); /* no character available */ 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 b2d1991027..e28da960e7 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 @@ -47,7 +47,8 @@ static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag // Setup OS Tick. -int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { +int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) +{ uint32_t clock; uint32_t prio; uint32_t bits; @@ -130,7 +131,8 @@ int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { } /// Enable OS Tick. -int32_t OS_Tick_Enable (void) { +int32_t OS_Tick_Enable (void) +{ if (OSTM_PendIRQ != 0U) { OSTM_PendIRQ = 0U; @@ -158,33 +160,39 @@ int32_t OS_Tick_Disable (void) { } // Acknowledge OS Tick IRQ. -int32_t OS_Tick_AcknowledgeIRQ (void) { +int32_t OS_Tick_AcknowledgeIRQ (void) +{ return (IRQ_ClearPending (OSTM_IRQn)); } // Get OS Tick IRQ number. -int32_t OS_Tick_GetIRQn (void) { +int32_t OS_Tick_GetIRQn (void) +{ return (OSTM_IRQn); } // Get OS Tick clock. -uint32_t OS_Tick_GetClock (void) { +uint32_t OS_Tick_GetClock (void) +{ return (OSTM_Clock); } // Get OS Tick interval. -uint32_t OS_Tick_GetInterval (void) { +uint32_t OS_Tick_GetInterval (void) +{ return (OSTM.OSTMnCMP + 1U); } // Get OS Tick count value. -uint32_t OS_Tick_GetCount (void) { +uint32_t OS_Tick_GetCount (void) +{ uint32_t cmp = OSTM.OSTMnCMP; return (cmp - OSTM.OSTMnCNT); } // Get OS Tick overflow status. -uint32_t OS_Tick_GetOverflow (void) { +uint32_t OS_Tick_GetOverflow (void) +{ return (IRQ_GetPending(OSTM_IRQn)); } diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/cmsis_nvic.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/cmsis_nvic.c index 1eec60bca4..ee73257175 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/cmsis_nvic.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/cmsis_nvic.c @@ -31,11 +31,13 @@ #include "MBRZA1H.h" #include "irq_ctrl.h" -void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) { +void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ InterruptHandlerRegister(IRQn, (IRQHandler)vector); } -uint32_t NVIC_GetVector(IRQn_Type IRQn) { +uint32_t NVIC_GetVector(IRQn_Type IRQn) +{ uint32_t vectors = (uint32_t)IRQ_GetHandler(IRQn); return vectors; } diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/nvic_wrapper.c b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/nvic_wrapper.c index 6a8b0fb0d2..b4746ea93a 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/nvic_wrapper.c +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/nvic_wrapper.c @@ -213,14 +213,16 @@ uint32_t ITM_SendChar (uint32_t ch) } -int32_t ITM_ReceiveChar (void) { +int32_t ITM_ReceiveChar (void) +{ /* Not support this function */ /* Use mbed Serial */ return (-1); /* no character available */ } -int32_t ITM_CheckChar (void) { +int32_t ITM_CheckChar (void) +{ /* Not support this function */ /* Use mbed Serial */ return (0); /* no character available */ 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 bebd3e114f..f1983402b7 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 @@ -47,7 +47,8 @@ static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag // Setup OS Tick. -int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { +int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) +{ uint32_t clock; uint32_t prio; uint32_t bits; @@ -130,7 +131,8 @@ int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) { } /// Enable OS Tick. -int32_t OS_Tick_Enable (void) { +int32_t OS_Tick_Enable (void) +{ if (OSTM_PendIRQ != 0U) { OSTM_PendIRQ = 0U; @@ -144,7 +146,8 @@ int32_t OS_Tick_Enable (void) { } /// Disable OS Tick. -int32_t OS_Tick_Disable (void) { +int32_t OS_Tick_Disable (void) +{ // Stop the OSTM counter OSTM.OSTMnTT = 0x01U; @@ -158,33 +161,39 @@ int32_t OS_Tick_Disable (void) { } // Acknowledge OS Tick IRQ. -int32_t OS_Tick_AcknowledgeIRQ (void) { +int32_t OS_Tick_AcknowledgeIRQ (void) +{ return (IRQ_ClearPending (OSTM_IRQn)); } // Get OS Tick IRQ number. -int32_t OS_Tick_GetIRQn (void) { +int32_t OS_Tick_GetIRQn (void) +{ return (OSTM_IRQn); } // Get OS Tick clock. -uint32_t OS_Tick_GetClock (void) { +uint32_t OS_Tick_GetClock (void) +{ return (OSTM_Clock); } // Get OS Tick interval. -uint32_t OS_Tick_GetInterval (void) { +uint32_t OS_Tick_GetInterval (void) +{ return (OSTM.OSTMnCMP + 1U); } // Get OS Tick count value. -uint32_t OS_Tick_GetCount (void) { +uint32_t OS_Tick_GetCount (void) +{ uint32_t cmp = OSTM.OSTMnCMP; return (cmp - OSTM.OSTMnCNT); } // Get OS Tick overflow status. -uint32_t OS_Tick_GetOverflow (void) { +uint32_t OS_Tick_GetOverflow (void) +{ return (IRQ_GetPending(OSTM_IRQn)); }