diff options
author | areviu <areviu.info@gmail.com> | 2018-05-06 14:49:44 +0000 |
---|---|---|
committer | areviu <areviu.info@gmail.com> | 2018-05-06 14:49:44 +0000 |
commit | a0c253d44da778e359c507c529a319f3f4d18b25 (patch) | |
tree | b61931799dd63a4c504278b5570405095e0d9e00 /os/various/reledge_bindings/SAMA5D2x/osoutput.c | |
parent | 7a53508f76c70cd5152bb66f36dbd39f0c7560b1 (diff) | |
download | ChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.tar.gz ChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.tar.bz2 ChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.zip |
moved ff and reliance-edge under binding folder
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12008 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/various/reledge_bindings/SAMA5D2x/osoutput.c')
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osoutput.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/os/various/reledge_bindings/SAMA5D2x/osoutput.c b/os/various/reledge_bindings/SAMA5D2x/osoutput.c new file mode 100644 index 000000000..bff230522 --- /dev/null +++ b/os/various/reledge_bindings/SAMA5D2x/osoutput.c @@ -0,0 +1,76 @@ +/* ----> DO NOT REMOVE THE FOLLOWING NOTICE <---- + + Copyright (c) 2014-2017 Datalight, Inc. + All Rights Reserved Worldwide. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; use version 2 of the License. + + This program is distributed in the hope that it will be useful, + but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +/* Businesses and individuals that for commercial or other reasons cannot + comply with the terms of the GPLv2 license may obtain a commercial license + before incorporating Reliance Edge into proprietary software for + distribution in any form. Visit http://www.datalight.com/reliance-edge for + more information. +*/ +/** @file + @brief Implements outputting a character string. +*/ +#include "hal.h" +#if (HAL_USE_SDMMC == TRUE) +#include "sama_sdmmc_lld.h" +#if SDMMC_USE_RELEDGE_LIB == 1 +#include <redfs.h> + +#if REDCONF_OUTPUT == 1 + +#include <redosdeviations.h> + + +/** @brief Write a string to a user-visible output location. + + Write a null-terminated string to the serial port, console, terminal, or + other display device, such that the text is visible to the user. + + @param pszString A null-terminated string. +*/ +void RedOsOutputString( + const char *pszString) +{ + if(pszString == NULL) + { + REDERROR(); + } + else + { + uint32_t ulIdx = 0U; + + while(pszString[ulIdx] != '\0') + { + OUTPUT_CHARACTER(pszString[ulIdx]); + + /* Serial output often requires a \r to print newlines correctly. + */ + if(pszString[ulIdx] == '\n') + { + OUTPUT_CHARACTER('\r'); + } + + ulIdx++; + } + } +} + +#endif + +#endif +#endif |