Revert Portable/WizC Formatting (#888)

* Revert formatting on WizC ports

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
Soren Ptak 2023-11-23 04:04:07 -08:00 committed by GitHub
parent b3febb7416
commit cb196ddbb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 396 additions and 401 deletions

View file

@ -27,14 +27,14 @@
*/ */
/* /*
* Changes from V3.0.0 Changes from V3.0.0
+ ISRcode is pulled inline and portTICKisr() is therefore + ISRcode is pulled inline and portTICKisr() is therefore
+ deleted from this file. deleted from this file.
+
+ Prescaler logic for Timer1 added to allow for a wider + Prescaler logic for Timer1 added to allow for a wider
+ range of TickRates. range of TickRates.
+
+ Changes from V3.0.1 Changes from V3.0.1
*/ */
#include <FreeRTOS.h> #include <FreeRTOS.h>
@ -68,9 +68,9 @@
#define portTIMER_COMPARE_VALUE (portTIMER_COMPARE_BASE / 8) #define portTIMER_COMPARE_VALUE (portTIMER_COMPARE_BASE / 8)
#define portTIMER_COMPARE_PS1 (portBIT_SET) #define portTIMER_COMPARE_PS1 (portBIT_SET)
#define portTIMER_COMPARE_PS0 (portBIT_SET) #define portTIMER_COMPARE_PS0 (portBIT_SET)
#else /* if portTIMER_COMPARE_BASE < 0x10000 */ #else
#error "TickRate out of range" #error "TickRate out of range"
#endif /* if portTIMER_COMPARE_BASE < 0x10000 */ #endif
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -128,12 +128,12 @@ void portSetupTick( void )
/* /*
* Setup the timer * Setup the timer
*/ */
bRD16 = portBIT_SET; /* 16-bit */ bRD16 = portBIT_SET; // 16-bit
bT1CKPS1 = portTIMER_COMPARE_PS1; /* prescaler */ bT1CKPS1 = portTIMER_COMPARE_PS1; // prescaler
bT1CKPS0 = portTIMER_COMPARE_PS0; /* prescaler */ bT1CKPS0 = portTIMER_COMPARE_PS0; // prescaler
bT1OSCEN = portBIT_SET; /* Oscillator enable */ bT1OSCEN = portBIT_SET; // Oscillator enable
bT1SYNC = portBIT_SET; /* No external clock sync */ bT1SYNC = portBIT_SET; // No external clock sync
bTMR1CS = portBIT_CLEAR; /* Internal clock */ bTMR1CS = portBIT_CLEAR; // Internal clock
bTMR1ON = portBIT_SET; /* Start timer1 */ bTMR1ON = portBIT_SET; // Start timer1
} }

View file

@ -27,16 +27,16 @@
*/ */
/* /*
* Changes from V3.0.0 Changes from V3.0.0
+ ISRcode pulled inline to reduce stack-usage. + ISRcode pulled inline to reduce stack-usage.
+
+ Added functionality to only call vTaskSwitchContext() once + Added functionality to only call vTaskSwitchContext() once
+ when handling multiple interruptsources in a single interruptcall. when handling multiple interruptsources in a single interruptcall.
+
+ Filename changed to a .c extension to allow stepping through code + Filename changed to a .c extension to allow stepping through code
+ using F7. using F7.
+
+ Changes from V3.0.1 Changes from V3.0.1
*/ */
/* /*

View file

@ -27,12 +27,12 @@
*/ */
/* /*
* Changes from V3.0.0 Changes from V3.0.0
*
* Changes from V3.0.1 Changes from V3.0.1
*
* Changes from V4.0.1 Changes from V4.0.1
* Uselib pragma added for Croutine.c Uselib pragma added for Croutine.c
*/ */
/* /*

View file

@ -27,18 +27,18 @@
*/ */
/* /*
* Changes from V3.2.1 Changes from V3.2.1
+ CallReturn Depth increased from 8 to 10 levels to accommodate wizC/fedC V12. + CallReturn Depth increased from 8 to 10 levels to accommodate wizC/fedC V12.
+
+ Changes from V3.2.0 Changes from V3.2.0
+ TBLPTRU is now initialised to zero during the initial stack creation of a new task. This solves + TBLPTRU is now initialised to zero during the initial stack creation of a new task. This solves
+ an error on devices with more than 64kB ROM. an error on devices with more than 64kB ROM.
+
+ Changes from V3.0.0 Changes from V3.0.0
+ ucCriticalNesting is now initialised to 0x7F to prevent interrupts from being + ucCriticalNesting is now initialised to 0x7F to prevent interrupts from being
+ handled before the scheduler is started. handled before the scheduler is started.
+
+ Changes from V3.0.1 Changes from V3.0.1
*/ */
/* Scheduler include files. */ /* Scheduler include files. */
@ -106,20 +106,16 @@ register uint8_t ucCriticalNesting = 0x7F;
* Initialise the stack of a new task. * Initialise the stack of a new task.
* See portSAVE_CONTEXT macro for description. * See portSAVE_CONTEXT macro for description.
*/ */
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack, StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
TaskFunction_t pxCode,
void * pvParameters )
{ {
uint8_t ucScratch; uint8_t ucScratch;
/* /*
* Get the size of the RAMarea in page 0 used by the compiler * Get the size of the RAMarea in page 0 used by the compiler
* We do this here already to avoid W-register conflicts. * We do this here already to avoid W-register conflicts.
*/ */
_Pragma("asm") _Pragma("asm")
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movwf PRODL, ACCESS; movwf PRODL,ACCESS ; PRODL is used as temp register
PRODL is used as temp register
_Pragma("asmend") _Pragma("asmend")
ucScratch = PRODL; ucScratch = PRODL;
@ -127,9 +123,9 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
* Place a few bytes of known values on the bottom of the stack. * Place a few bytes of known values on the bottom of the stack.
* This is just useful for debugging. * This is just useful for debugging.
*/ */
/* *pxTopOfStack-- = 0x11; */ // *pxTopOfStack-- = 0x11;
/* *pxTopOfStack-- = 0x22; */ // *pxTopOfStack-- = 0x22;
/* *pxTopOfStack-- = 0x33; */ // *pxTopOfStack-- = 0x33;
/* /*
* Simulate how the stack would look after a call to vPortYield() * Simulate how the stack would look after a call to vPortYield()

View file

@ -27,9 +27,9 @@
*/ */
/* /*
* Changes from V3.0.0 Changes from V3.0.0
*
* Changes from V3.0.1 Changes from V3.0.1
*/ */
#ifndef PORTMACRO_H #ifndef PORTMACRO_H
#define PORTMACRO_H #define PORTMACRO_H
@ -96,7 +96,7 @@ typedef unsigned char UBaseType_t;
do \ do \
{ \ { \
bGIE=0; \ bGIE=0; \
} while( bGIE ) /* MicroChip recommends this check! */ } while(bGIE) // MicroChip recommends this check!
#define portENABLE_INTERRUPTS() \ #define portENABLE_INTERRUPTS() \
do \ do \
@ -318,7 +318,7 @@ extern uint16_t usCalcMinStackSize;
; and store them on the hardwarestack. \ ; and store them on the hardwarestack. \
; The datasheets say we can't use movff here... \ ; The datasheets say we can't use movff here... \
; \ ; \
movff PREINC2,PRODL /* Use PRODL as tempregister */ \ movff PREINC2,PRODL // Use PRODL as tempregister \
clrf STKPTR,ACCESS \ clrf STKPTR,ACCESS \
_rtos_R1: \ _rtos_R1: \
push \ push \
@ -405,8 +405,7 @@ extern uint16_t usCalcMinStackSize;
extern void vPortYield( void ); extern void vPortYield( void );
#define portYIELD() vPortYield() #define portYIELD() vPortYield()
#define portNOP() \ #define portNOP() _Pragma("asm") \
_Pragma("asm") \
nop \ nop \
_Pragma("asmend") _Pragma("asmend")