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.
pull/6056/head
TomoYamanaka 2018-01-19 18:46:20 +09:00 committed by adbridge
parent 856737cb74
commit 32ed0f7593
6 changed files with 50 additions and 25 deletions

View File

@ -31,11 +31,13 @@
#include "MBRZA1LU.h" #include "MBRZA1LU.h"
#include "irq_ctrl.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); 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); uint32_t vectors = (uint32_t)IRQ_GetHandler(IRQn);
return vectors; return vectors;
} }

View File

@ -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 */ /* Not support this function */
/* Use mbed Serial */ /* Use mbed Serial */
return (-1); /* no character available */ return (-1); /* no character available */
} }
int32_t ITM_CheckChar (void) { int32_t ITM_CheckChar (void)
{
/* Not support this function */ /* Not support this function */
/* Use mbed Serial */ /* Use mbed Serial */
return (0); /* no character available */ return (0); /* no character available */

View File

@ -47,7 +47,8 @@ static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag
// Setup OS Tick. // 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 clock;
uint32_t prio; uint32_t prio;
uint32_t bits; uint32_t bits;
@ -130,7 +131,8 @@ int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) {
} }
/// Enable OS Tick. /// Enable OS Tick.
int32_t OS_Tick_Enable (void) { int32_t OS_Tick_Enable (void)
{
if (OSTM_PendIRQ != 0U) { if (OSTM_PendIRQ != 0U) {
OSTM_PendIRQ = 0U; OSTM_PendIRQ = 0U;
@ -158,33 +160,39 @@ int32_t OS_Tick_Disable (void) {
} }
// Acknowledge OS Tick IRQ. // Acknowledge OS Tick IRQ.
int32_t OS_Tick_AcknowledgeIRQ (void) { int32_t OS_Tick_AcknowledgeIRQ (void)
{
return (IRQ_ClearPending (OSTM_IRQn)); return (IRQ_ClearPending (OSTM_IRQn));
} }
// Get OS Tick IRQ number. // Get OS Tick IRQ number.
int32_t OS_Tick_GetIRQn (void) { int32_t OS_Tick_GetIRQn (void)
{
return (OSTM_IRQn); return (OSTM_IRQn);
} }
// Get OS Tick clock. // Get OS Tick clock.
uint32_t OS_Tick_GetClock (void) { uint32_t OS_Tick_GetClock (void)
{
return (OSTM_Clock); return (OSTM_Clock);
} }
// Get OS Tick interval. // Get OS Tick interval.
uint32_t OS_Tick_GetInterval (void) { uint32_t OS_Tick_GetInterval (void)
{
return (OSTM.OSTMnCMP + 1U); return (OSTM.OSTMnCMP + 1U);
} }
// Get OS Tick count value. // Get OS Tick count value.
uint32_t OS_Tick_GetCount (void) { uint32_t OS_Tick_GetCount (void)
{
uint32_t cmp = OSTM.OSTMnCMP; uint32_t cmp = OSTM.OSTMnCMP;
return (cmp - OSTM.OSTMnCNT); return (cmp - OSTM.OSTMnCNT);
} }
// Get OS Tick overflow status. // Get OS Tick overflow status.
uint32_t OS_Tick_GetOverflow (void) { uint32_t OS_Tick_GetOverflow (void)
{
return (IRQ_GetPending(OSTM_IRQn)); return (IRQ_GetPending(OSTM_IRQn));
} }

View File

@ -31,11 +31,13 @@
#include "MBRZA1H.h" #include "MBRZA1H.h"
#include "irq_ctrl.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); 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); uint32_t vectors = (uint32_t)IRQ_GetHandler(IRQn);
return vectors; return vectors;
} }

View File

@ -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 */ /* Not support this function */
/* Use mbed Serial */ /* Use mbed Serial */
return (-1); /* no character available */ return (-1); /* no character available */
} }
int32_t ITM_CheckChar (void) { int32_t ITM_CheckChar (void)
{
/* Not support this function */ /* Not support this function */
/* Use mbed Serial */ /* Use mbed Serial */
return (0); /* no character available */ return (0); /* no character available */

View File

@ -47,7 +47,8 @@ static uint8_t OSTM_PendIRQ; // Timer interrupt pending flag
// Setup OS Tick. // 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 clock;
uint32_t prio; uint32_t prio;
uint32_t bits; uint32_t bits;
@ -130,7 +131,8 @@ int32_t OS_Tick_Setup (uint32_t freq, IRQHandler_t handler) {
} }
/// Enable OS Tick. /// Enable OS Tick.
int32_t OS_Tick_Enable (void) { int32_t OS_Tick_Enable (void)
{
if (OSTM_PendIRQ != 0U) { if (OSTM_PendIRQ != 0U) {
OSTM_PendIRQ = 0U; OSTM_PendIRQ = 0U;
@ -144,7 +146,8 @@ int32_t OS_Tick_Enable (void) {
} }
/// Disable OS Tick. /// Disable OS Tick.
int32_t OS_Tick_Disable (void) { int32_t OS_Tick_Disable (void)
{
// Stop the OSTM counter // Stop the OSTM counter
OSTM.OSTMnTT = 0x01U; OSTM.OSTMnTT = 0x01U;
@ -158,33 +161,39 @@ int32_t OS_Tick_Disable (void) {
} }
// Acknowledge OS Tick IRQ. // Acknowledge OS Tick IRQ.
int32_t OS_Tick_AcknowledgeIRQ (void) { int32_t OS_Tick_AcknowledgeIRQ (void)
{
return (IRQ_ClearPending (OSTM_IRQn)); return (IRQ_ClearPending (OSTM_IRQn));
} }
// Get OS Tick IRQ number. // Get OS Tick IRQ number.
int32_t OS_Tick_GetIRQn (void) { int32_t OS_Tick_GetIRQn (void)
{
return (OSTM_IRQn); return (OSTM_IRQn);
} }
// Get OS Tick clock. // Get OS Tick clock.
uint32_t OS_Tick_GetClock (void) { uint32_t OS_Tick_GetClock (void)
{
return (OSTM_Clock); return (OSTM_Clock);
} }
// Get OS Tick interval. // Get OS Tick interval.
uint32_t OS_Tick_GetInterval (void) { uint32_t OS_Tick_GetInterval (void)
{
return (OSTM.OSTMnCMP + 1U); return (OSTM.OSTMnCMP + 1U);
} }
// Get OS Tick count value. // Get OS Tick count value.
uint32_t OS_Tick_GetCount (void) { uint32_t OS_Tick_GetCount (void)
{
uint32_t cmp = OSTM.OSTMnCMP; uint32_t cmp = OSTM.OSTMnCMP;
return (cmp - OSTM.OSTMnCNT); return (cmp - OSTM.OSTMnCNT);
} }
// Get OS Tick overflow status. // Get OS Tick overflow status.
uint32_t OS_Tick_GetOverflow (void) { uint32_t OS_Tick_GetOverflow (void)
{
return (IRQ_GetPending(OSTM_IRQn)); return (IRQ_GetPending(OSTM_IRQn));
} }