Add uncrustify github workflow (#659)

* Add uncrustify github workflow

* Fix exclusion pattern

* fix find expression

* exclude uncrustify files

* Uncrustify common demo and test files

* exlude white space checking files

* Fix EOL whitespace checker

* Remove whitespaces from EOL

* Fix space at EOL

* Fix find spaces at EOL

Co-authored-by: Archit Aggarwal <architag@amazon.com>
This commit is contained in:
alfred gedeon 2021-07-22 14:23:48 -07:00 committed by GitHub
parent dd80d615b5
commit ae92d8c6ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
191 changed files with 17540 additions and 17102 deletions

View file

@ -39,10 +39,10 @@
#include "flash_timer.h"
/* The toggle rates are all a multple of ledFLASH_RATE_BASE. */
#define ledFLASH_RATE_BASE ( ( ( TickType_t ) 333 ) / portTICK_PERIOD_MS )
#define ledFLASH_RATE_BASE ( ( ( TickType_t ) 333 ) / portTICK_PERIOD_MS )
/* A block time of zero simple means "don't block". */
#define ledDONT_BLOCK ( ( TickType_t ) 0 )
#define ledDONT_BLOCK ( ( TickType_t ) 0 )
/*-----------------------------------------------------------*/
@ -57,42 +57,40 @@ static void prvLEDTimerCallback( TimerHandle_t xTimer );
void vStartLEDFlashTimers( UBaseType_t uxNumberOfLEDs )
{
UBaseType_t uxLEDTimer;
TimerHandle_t xTimer;
UBaseType_t uxLEDTimer;
TimerHandle_t xTimer;
/* Create and start the requested number of timers. */
for( uxLEDTimer = 0; uxLEDTimer < uxNumberOfLEDs; ++uxLEDTimer )
{
/* Create the timer. */
xTimer = xTimerCreate( "Flasher", /* A text name, purely to help debugging. */
ledFLASH_RATE_BASE * ( uxLEDTimer + 1 ),/* The timer period, which is a multiple of ledFLASH_RATE_BASE. */
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
( void * ) uxLEDTimer, /* The ID is used to identify the timer within the timer callback function, as each timer uses the same callback. */
prvLEDTimerCallback /* Each timer uses the same callback. */
);
/* Create and start the requested number of timers. */
for( uxLEDTimer = 0; uxLEDTimer < uxNumberOfLEDs; ++uxLEDTimer )
{
/* Create the timer. */
xTimer = xTimerCreate( "Flasher", /* A text name, purely to help debugging. */
ledFLASH_RATE_BASE * ( uxLEDTimer + 1 ), /* The timer period, which is a multiple of ledFLASH_RATE_BASE. */
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
( void * ) uxLEDTimer, /* The ID is used to identify the timer within the timer callback function, as each timer uses the same callback. */
prvLEDTimerCallback /* Each timer uses the same callback. */
);
/* If the timer was created successfully, attempt to start it. If the
scheduler has not yet been started then the timer command queue must
be long enough to hold each command sent to it until such time that the
scheduler is started. The timer command queue length is set by
configTIMER_QUEUE_LENGTH in FreeRTOSConfig.h. */
if( xTimer != NULL )
{
xTimerStart( xTimer, ledDONT_BLOCK );
}
}
/* If the timer was created successfully, attempt to start it. If the
* scheduler has not yet been started then the timer command queue must
* be long enough to hold each command sent to it until such time that the
* scheduler is started. The timer command queue length is set by
* configTIMER_QUEUE_LENGTH in FreeRTOSConfig.h. */
if( xTimer != NULL )
{
xTimerStart( xTimer, ledDONT_BLOCK );
}
}
}
/*-----------------------------------------------------------*/
static void prvLEDTimerCallback( TimerHandle_t xTimer )
{
BaseType_t xTimerID;
BaseType_t xTimerID;
/* The timer ID is used to identify the timer that has actually expired as
each timer uses the same callback. The ID is then also used as the number
of the LED that is to be toggled. */
xTimerID = ( BaseType_t ) pvTimerGetTimerID( xTimer );
vParTestToggleLED( xTimerID );
/* The timer ID is used to identify the timer that has actually expired as
* each timer uses the same callback. The ID is then also used as the number
* of the LED that is to be toggled. */
xTimerID = ( BaseType_t ) pvTimerGetTimerID( xTimer );
vParTestToggleLED( xTimerID );
}