mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 04:13:54 -04:00
Style: uncrustify kernel files
This commit is contained in:
parent
66a815653b
commit
587a83d647
385 changed files with 4714 additions and 4338 deletions
|
@ -22,6 +22,7 @@
|
|||
* ; * http://www.FreeRTOS.org
|
||||
* ; * http://aws.amazon.com/freertos
|
||||
* ; *
|
||||
* ; * 1 tab == 4 spaces!
|
||||
* ; */
|
||||
|
||||
|
||||
|
@ -43,7 +44,7 @@ Saves the context of the general purpose registers, CS and ES( only in far
|
|||
;
|
||||
memory mode ) registers the usCriticalNesting Value and the Stack Pointer
|
||||
;
|
||||
of the active Task onto the task stack
|
||||
of the active Task onto the task stack
|
||||
;
|
||||
------------------------------------------------------------------------------
|
||||
portSAVE_CONTEXT MACRO
|
||||
|
@ -51,19 +52,19 @@ portSAVE_CONTEXT MACRO
|
|||
PUSH AX;
|
||||
Save AX Register to stack.
|
||||
PUSH HL
|
||||
MOV A, CS;
|
||||
MOV A, CS;
|
||||
Save CS register.
|
||||
XCH A, X
|
||||
XCH A, X
|
||||
MOV A, ES;
|
||||
Save ES register.
|
||||
PUSH AX
|
||||
PUSH DE;
|
||||
PUSH DE;
|
||||
Save the remaining general purpose registers.
|
||||
PUSH BC
|
||||
MOVW AX, usCriticalNesting;
|
||||
MOVW AX, usCriticalNesting;
|
||||
Save the usCriticalNesting value.
|
||||
PUSH AX
|
||||
MOVW AX, pxCurrentTCB;
|
||||
MOVW AX, pxCurrentTCB;
|
||||
Save the Stack pointer.
|
||||
MOVW HL, AX
|
||||
MOVW AX, SP
|
||||
|
@ -75,13 +76,13 @@ MOVW AX, SP
|
|||
;
|
||||
------------------------------------------------------------------------------
|
||||
;
|
||||
portRESTORE_CONTEXT MACRO
|
||||
portRESTORE_CONTEXT MACRO
|
||||
;
|
||||
Restores the task Stack Pointer then use this to restore usCriticalNesting,
|
||||
;
|
||||
general purpose registers and the CS and ES( only in far memory mode )
|
||||
general purpose registers and the CS and ES( only in far memory mode )
|
||||
;
|
||||
of the selected task from the task stack
|
||||
of the selected task from the task stack
|
||||
;
|
||||
------------------------------------------------------------------------------
|
||||
portRESTORE_CONTEXT MACRO
|
||||
|
@ -96,16 +97,16 @@ Restore usCriticalNesting value.
|
|||
POP BC;
|
||||
Restore the necessary general purpose registers.
|
||||
POP DE
|
||||
POP AX;
|
||||
POP AX;
|
||||
Restore the ES register.
|
||||
MOV ES, A
|
||||
MOV ES, A
|
||||
XCH A, X;
|
||||
Restore the CS register.
|
||||
MOV CS, A
|
||||
MOV CS, A
|
||||
POP HL;
|
||||
Restore general purpose register HL.
|
||||
POP AX;
|
||||
POP AX;
|
||||
Restore AX.
|
||||
ENDM
|
||||
ENDM
|
||||
;
|
||||
------------------------------------------------------------------------------
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
|
@ -112,16 +113,16 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
pxTopOfStack--;
|
||||
|
||||
/* Write in the parameter value. */
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) pvParameters;
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) pvParameters;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* The return address, leaving space for the first two bytes of the
|
||||
* 32-bit value. See the comments above the prvTaskExitError() prototype
|
||||
* at the top of this file. */
|
||||
pxTopOfStack--;
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) prvTaskExitError;
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) prvTaskExitError;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* The start address / PSW value is also written in as a 32-bit value,
|
||||
|
@ -129,8 +130,8 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
pxTopOfStack--;
|
||||
|
||||
/* Task function start address combined with the PSW. */
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
|
||||
pxTopOfStack--;
|
||||
|
||||
/* An initial value for the AX register. */
|
||||
|
@ -143,8 +144,8 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
* 32-bit value. See the comments above the prvTaskExitError() prototype
|
||||
* at the top of this file. */
|
||||
pxTopOfStack--;
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) prvTaskExitError;
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( uint32_t ) prvTaskExitError;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* Task function. Again as it is written as a 32-bit value a space is
|
||||
|
@ -152,8 +153,8 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
pxTopOfStack--;
|
||||
|
||||
/* Task function start address combined with the PSW. */
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
|
||||
pulLocal = ( uint32_t * ) pxTopOfStack;
|
||||
*pulLocal = ( ( ( uint32_t ) pxCode ) | ( portPSW << 24UL ) );
|
||||
pxTopOfStack--;
|
||||
|
||||
/* The parameter is passed in AX. */
|
||||
|
@ -231,7 +232,7 @@ void vPortEndScheduler( void )
|
|||
|
||||
static void prvSetupTimerInterrupt( void )
|
||||
{
|
||||
const uint16_t usClockHz = 15000UL; /* Internal clock. */
|
||||
const uint16_t usClockHz = 15000UL; /* Internal clock. */
|
||||
const uint16_t usCompareMatch = ( usClockHz / configTICK_RATE_HZ ) + 1UL;
|
||||
|
||||
/* Use the internal 15K clock. */
|
||||
|
@ -243,19 +244,19 @@ static void prvSetupTimerInterrupt( void )
|
|||
RTCEN = ( uint8_t ) 1U;
|
||||
|
||||
/* Disable INTIT interrupt. */
|
||||
ITMK = ( uint8_t ) 1;
|
||||
ITMK = ( uint8_t ) 1;
|
||||
|
||||
/* Disable ITMC operation. */
|
||||
ITMC = ( uint8_t ) 0x0000;
|
||||
ITMC = ( uint8_t ) 0x0000;
|
||||
|
||||
/* Clear INIT interrupt. */
|
||||
ITIF = ( uint8_t ) 0;
|
||||
ITIF = ( uint8_t ) 0;
|
||||
|
||||
/* Set interval and enable interrupt operation. */
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
|
||||
/* Enable INTIT interrupt. */
|
||||
ITMK = ( uint8_t ) 0;
|
||||
ITMK = ( uint8_t ) 0;
|
||||
}
|
||||
#endif /* ifdef RTCEN */
|
||||
|
||||
|
@ -268,13 +269,13 @@ static void prvSetupTimerInterrupt( void )
|
|||
TMKAMK = ( uint8_t ) 1;
|
||||
|
||||
/* Disable ITMC operation. */
|
||||
ITMC = ( uint8_t ) 0x0000;
|
||||
ITMC = ( uint8_t ) 0x0000;
|
||||
|
||||
/* Clear INIT interrupt. */
|
||||
TMKAIF = ( uint8_t ) 0;
|
||||
|
||||
/* Set interval and enable interrupt operation. */
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
|
||||
/* Enable INTIT interrupt. */
|
||||
TMKAMK = ( uint8_t ) 0;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue