mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 18:18:32 -04:00
CI-CD Updates (#768)
* Use new version of CI-CD Actions * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Format and spell check all files in the portable directory * Remove the https:// from #errors and #warnings as uncrustify attempts to change it to /* * Use checkout@v3 instead of checkout@v2 on all jobs ---------
This commit is contained in:
parent
d6bccb1f4c
commit
5fb9b50da8
485 changed files with 108790 additions and 107581 deletions
|
@ -27,20 +27,21 @@
|
|||
*/
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief System-specific implementation of the \ref __write function used by
|
||||
the standard library.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - Supported devices: All AVR32 devices with a USART module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation (Now Microchip):
|
||||
* https://www.microchip.com \n
|
||||
* Support and FAQ: https://www.microchip.com/support
|
||||
*
|
||||
******************************************************************************/
|
||||
*
|
||||
* \brief System-specific implementation of the \ref __write function used by
|
||||
* the standard library.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - Supported devices: All AVR32 devices with a USART module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation (Now Microchip):
|
||||
* https://www.microchip.com \n
|
||||
* Support and FAQ: https://www.microchip.com/support
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007, Atmel Corporation All rights reserved.
|
||||
|
@ -82,8 +83,8 @@ _STD_BEGIN
|
|||
#pragma module_name = "?__write"
|
||||
|
||||
|
||||
//! Pointer to the base of the USART module instance to use for stdio.
|
||||
__no_init volatile avr32_usart_t *volatile stdio_usart_base;
|
||||
/*! Pointer to the base of the USART module instance to use for stdio. */
|
||||
__no_init volatile avr32_usart_t * volatile stdio_usart_base;
|
||||
|
||||
|
||||
/*! \brief Writes a number of bytes, at most \a size, from the memory area
|
||||
|
@ -99,34 +100,36 @@ __no_init volatile avr32_usart_t *volatile stdio_usart_base;
|
|||
*
|
||||
* \return The number of bytes written, or \c _LLIO_ERROR on failure.
|
||||
*/
|
||||
size_t __write(int handle, const uint8_t *buffer, size_t size)
|
||||
size_t __write( int handle,
|
||||
const uint8_t * buffer,
|
||||
size_t size )
|
||||
{
|
||||
size_t nChars = 0;
|
||||
size_t nChars = 0;
|
||||
|
||||
if (buffer == 0)
|
||||
{
|
||||
// This means that we should flush internal buffers.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This implementation only writes to stdout and stderr.
|
||||
// For all other file handles, it returns failure.
|
||||
if (handle != _LLIO_STDOUT && handle != _LLIO_STDERR)
|
||||
{
|
||||
return _LLIO_ERROR;
|
||||
}
|
||||
|
||||
for (; size != 0; --size)
|
||||
{
|
||||
if (usart_putchar(stdio_usart_base, *buffer++) < 0)
|
||||
if( buffer == 0 )
|
||||
{
|
||||
return _LLIO_ERROR;
|
||||
/* This means that we should flush internal buffers. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
++nChars;
|
||||
}
|
||||
/* This implementation only writes to stdout and stderr. */
|
||||
/* For all other file handles, it returns failure. */
|
||||
if( ( handle != _LLIO_STDOUT ) && ( handle != _LLIO_STDERR ) )
|
||||
{
|
||||
return _LLIO_ERROR;
|
||||
}
|
||||
|
||||
return nChars;
|
||||
for( ; size != 0; --size )
|
||||
{
|
||||
if( usart_putchar( stdio_usart_base, *buffer++ ) < 0 )
|
||||
{
|
||||
return _LLIO_ERROR;
|
||||
}
|
||||
|
||||
++nChars;
|
||||
}
|
||||
|
||||
return nChars;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue