mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 12:24:07 -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!
|
||||
* ; */
|
||||
|
||||
#include "FreeRTOSConfig.h"
|
||||
|
@ -42,7 +43,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
|
||||
|
@ -50,19 +51,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
|
||||
|
@ -74,13 +75,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
|
||||
|
@ -95,16 +96,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!
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
@ -93,8 +94,8 @@ 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--;
|
||||
|
||||
/* These values are just spacers. The return address of the function
|
||||
|
@ -109,8 +110,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. */
|
||||
|
@ -125,8 +126,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. */
|
||||
|
@ -185,41 +186,41 @@ static void prvSetupTimerInterrupt( void )
|
|||
/* Setup channel 5 of the TAU to generate the tick interrupt. */
|
||||
|
||||
/* First the Timer Array Unit has to be enabled. */
|
||||
TAU0EN = 1;
|
||||
TAU0EN = 1;
|
||||
|
||||
/* To configure the Timer Array Unit all Channels have to first be stopped. */
|
||||
TT0 = 0xff;
|
||||
TT0 = 0xff;
|
||||
|
||||
/* Interrupt of Timer Array Unit Channel 5 is disabled to set the interrupt
|
||||
* priority. */
|
||||
TMMK05 = 1;
|
||||
TMMK05 = 1;
|
||||
|
||||
/* Clear Timer Array Unit Channel 5 interrupt flag. */
|
||||
TMIF05 = 0;
|
||||
TMIF05 = 0;
|
||||
|
||||
/* Set Timer Array Unit Channel 5 interrupt priority */
|
||||
TMPR005 = 0;
|
||||
TMPR105 = 0;
|
||||
|
||||
/* Set Timer Array Unit Channel 5 Mode as interval timer. */
|
||||
TMR05 = 0x0000;
|
||||
TMR05 = 0x0000;
|
||||
|
||||
/* Set the compare match value according to the tick rate we want. */
|
||||
TDR05 = ( TickType_t ) ( configCPU_CLOCK_HZ / configTICK_RATE_HZ );
|
||||
TDR05 = ( TickType_t ) ( configCPU_CLOCK_HZ / configTICK_RATE_HZ );
|
||||
|
||||
/* Set Timer Array Unit Channel 5 output mode */
|
||||
TOM0 &= ~0x0020;
|
||||
TOM0 &= ~0x0020;
|
||||
|
||||
/* Set Timer Array Unit Channel 5 output level */
|
||||
TOL0 &= ~0x0020;
|
||||
TOL0 &= ~0x0020;
|
||||
|
||||
/* Set Timer Array Unit Channel 5 output enable */
|
||||
TOE0 &= ~0x0020;
|
||||
TOE0 &= ~0x0020;
|
||||
|
||||
/* Interrupt of Timer Array Unit Channel 5 enabled */
|
||||
TMMK05 = 0;
|
||||
TMMK05 = 0;
|
||||
|
||||
/* Start Timer Array Unit Channel 5.*/
|
||||
TS0 |= 0x0020;
|
||||
TS0 |= 0x0020;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -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