\doxysection{SEGGER\+\_\+\+RTT\+\_\+printf.\+c}
\hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source}{}\label{_s_e_g_g_e_r___r_t_t__printf_8c_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_ExtendedLibs/RTT/SEGGER\_RTT\_printf.c@{E:/.WORK/STM32/STM\_Libs/STM32\_ExtendedLibs/RTT/SEGGER\_RTT\_printf.c}}

\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00001}00001\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00002}00002\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SEGGER\ Microcontroller\ GmbH\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00003}00003\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ Embedded\ Experts\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00004}00004\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00005}00005\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00006}00006\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ (c)\ 1995\ -\/\ 2021\ SEGGER\ Microcontroller\ GmbH\ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00007}00007\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00008}00008\ \textcolor{comment}{*\ \ \ \ \ \ \ www.segger.com\ \ \ \ \ Support:\ support@segger.com\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00009}00009\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00010}00010\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00011}00011\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00012}00012\ \textcolor{comment}{*\ \ \ \ \ \ \ SEGGER\ RTT\ *\ Real\ Time\ Transfer\ for\ embedded\ targets\ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00013}00013\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00014}00014\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00015}00015\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00016}00016\ \textcolor{comment}{*\ All\ rights\ reserved.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00017}00017\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00018}00018\ \textcolor{comment}{*\ SEGGER\ strongly\ recommends\ to\ not\ make\ any\ changes\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00019}00019\ \textcolor{comment}{*\ to\ or\ modify\ the\ source\ code\ of\ this\ software\ in\ order\ to\ stay\ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00020}00020\ \textcolor{comment}{*\ compatible\ with\ the\ RTT\ protocol\ and\ J-\/Link.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00021}00021\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00022}00022\ \textcolor{comment}{*\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00023}00023\ \textcolor{comment}{*\ without\ modification,\ are\ permitted\ provided\ that\ the\ following\ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00024}00024\ \textcolor{comment}{*\ condition\ is\ met:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00025}00025\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00026}00026\ \textcolor{comment}{*\ o\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright\ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00027}00027\ \textcolor{comment}{*\ \ \ notice,\ this\ condition\ and\ the\ following\ disclaimer.\ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00028}00028\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00029}00029\ \textcolor{comment}{*\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ THE\ COPYRIGHT\ HOLDERS\ AND\ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00030}00030\ \textcolor{comment}{*\ CONTRIBUTORS\ "{}AS\ IS"{}\ AND\ ANY\ EXPRESS\ OR\ IMPLIED\ WARRANTIES,\ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00031}00031\ \textcolor{comment}{*\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ THE\ IMPLIED\ WARRANTIES\ OF\ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00032}00032\ \textcolor{comment}{*\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE\ ARE\ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00033}00033\ \textcolor{comment}{*\ DISCLAIMED.\ IN\ NO\ EVENT\ SHALL\ SEGGER\ Microcontroller\ BE\ LIABLE\ FOR\ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00034}00034\ \textcolor{comment}{*\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,\ SPECIAL,\ EXEMPLARY,\ OR\ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00035}00035\ \textcolor{comment}{*\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ PROCUREMENT\ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00036}00036\ \textcolor{comment}{*\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ DATA,\ OR\ PROFITS;\ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00037}00037\ \textcolor{comment}{*\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ THEORY\ OF\ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00038}00038\ \textcolor{comment}{*\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00039}00039\ \textcolor{comment}{*\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00040}00040\ \textcolor{comment}{*\ USE\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00041}00041\ \textcolor{comment}{*\ DAMAGE.\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00042}00042\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00043}00043\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00044}00044\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00045}00045\ \textcolor{comment}{*\ \ \ \ \ \ \ RTT\ version:\ 8.10g\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00046}00046\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00047}00047\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00048}00048\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00049}00049\ \textcolor{comment}{-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/END-\/OF-\/HEADER-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00050}00050\ \textcolor{comment}{File\ \ \ \ :\ SEGGER\_RTT\_printf.c}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00051}00051\ \textcolor{comment}{Purpose\ :\ Replacement\ for\ printf\ to\ write\ formatted\ data\ via\ RTT}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00052}00052\ \textcolor{comment}{Revision:\ \$Rev:\ 17697\ \$}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00053}00053\ \textcolor{comment}{-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00054}00054\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00055}00055\ \textcolor{preprocessor}{\#include\ "{}SEGGER\_RTT.h"{}}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00056}00056\ \textcolor{preprocessor}{\#include\ "{}SEGGER\_RTT\_Conf.h"{}}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00057}00057\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00058}00058\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00059}00059\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00060}00060\ \textcolor{comment}{*\ \ \ \ \ \ \ Defines,\ configurable}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00061}00061\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00062}00062\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00063}00063\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00064}00064\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00065}00065\ \textcolor{preprocessor}{\#ifndef\ SEGGER\_RTT\_PRINTF\_BUFFER\_SIZE}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00066}00066\ \textcolor{preprocessor}{\ \ \#define\ SEGGER\_RTT\_PRINTF\_BUFFER\_SIZE\ (64)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00067}00067\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00068}00068\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00069}00069\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00070}00070\ \textcolor{preprocessor}{\#include\ <stdarg.h>}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00071}00071\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00072}00072\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00073}00073\ \textcolor{preprocessor}{\#define\ FORMAT\_FLAG\_LEFT\_JUSTIFY\ \ \ (1u\ <<\ 0)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00074}00074\ \textcolor{preprocessor}{\#define\ FORMAT\_FLAG\_PAD\_ZERO\ \ \ \ \ \ \ (1u\ <<\ 1)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00075}00075\ \textcolor{preprocessor}{\#define\ FORMAT\_FLAG\_PRINT\_SIGN\ \ \ \ \ (1u\ <<\ 2)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00076}00076\ \textcolor{preprocessor}{\#define\ FORMAT\_FLAG\_ALTERNATE\ \ \ \ \ \ (1u\ <<\ 3)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00077}00077\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00078}00078\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00079}00079\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00080}00080\ \textcolor{comment}{*\ \ \ \ \ \ \ Types}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00081}00081\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00082}00082\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00083}00083\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00084}00084\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00085}\mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{00085}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00086}00086\ \ \ \textcolor{keywordtype}{char}*\ \ \ \ \ pBuffer;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00087}00087\ \ \ \textcolor{keywordtype}{unsigned}\ \ BufferSize;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00088}00088\ \ \ \textcolor{keywordtype}{unsigned}\ \ Cnt;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00089}00089\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00090}00090\ \ \ \textcolor{keywordtype}{int}\ \ \ ReturnValue;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00091}00091\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00092}00092\ \ \ \textcolor{keywordtype}{unsigned}\ RTTBufferIndex;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00093}00093\ \}\ \mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{SEGGER\_RTT\_PRINTF\_DESC}};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00094}00094\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00095}00095\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00096}00096\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00097}00097\ \textcolor{comment}{*\ \ \ \ \ \ \ Function\ prototypes}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00098}00098\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00099}00099\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00100}00100\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00101}00101\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00102}00102\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00103}00103\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00104}00104\ \textcolor{comment}{*\ \ \ \ \ \ \ Static\ code}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00105}00105\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00106}00106\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00107}00107\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00108}00108\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00109}00109\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00110}00110\ \textcolor{comment}{*\ \ \ \ \ \ \ \_StoreChar}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00111}00111\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00112}00112\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \_StoreChar(\mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{SEGGER\_RTT\_PRINTF\_DESC}}\ *\ p,\ \textcolor{keywordtype}{char}\ c)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00113}00113\ \ \ \textcolor{keywordtype}{unsigned}\ Cnt;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00114}00114\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00115}00115\ \ \ Cnt\ =\ p-\/>Cnt;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00116}00116\ \ \ \textcolor{keywordflow}{if}\ ((Cnt\ +\ 1u)\ <=\ p-\/>BufferSize)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00117}00117\ \ \ \ \ *(p-\/>pBuffer\ +\ Cnt)\ =\ c;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00118}00118\ \ \ \ \ p-\/>Cnt\ =\ Cnt\ +\ 1u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00119}00119\ \ \ \ \ p-\/>ReturnValue++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00120}00120\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00121}00121\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00122}00122\ \ \ \textcolor{comment}{//\ Write\ part\ of\ string,\ when\ the\ buffer\ is\ full}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00123}00123\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00124}00124\ \ \ \textcolor{keywordflow}{if}\ (p-\/>Cnt\ ==\ p-\/>BufferSize)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00125}00125\ \ \ \ \ \textcolor{keywordflow}{if}\ (SEGGER\_RTT\_Write(p-\/>RTTBufferIndex,\ p-\/>pBuffer,\ p-\/>Cnt)\ !=\ p-\/>Cnt)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00126}00126\ \ \ \ \ \ \ p-\/>ReturnValue\ =\ -\/1;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00127}00127\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00128}00128\ \ \ \ \ \ \ p-\/>Cnt\ =\ 0u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00129}00129\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00130}00130\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00131}00131\ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00132}00132\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00133}00133\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00134}00134\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00135}00135\ \textcolor{comment}{*\ \ \ \ \ \ \ \_PrintUnsigned}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00136}00136\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00137}00137\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \_PrintUnsigned(\mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{SEGGER\_RTT\_PRINTF\_DESC}}\ *\ pBufferDesc,\ \textcolor{keywordtype}{unsigned}\ v,\ \textcolor{keywordtype}{unsigned}\ Base,\ \textcolor{keywordtype}{unsigned}\ NumDigits,\ \textcolor{keywordtype}{unsigned}\ FieldWidth,\ \textcolor{keywordtype}{unsigned}\ FormatFlags)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00138}00138\ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \_aV2C[16]\ =\ \{\textcolor{charliteral}{'0'},\ \textcolor{charliteral}{'1'},\ \textcolor{charliteral}{'2'},\ \textcolor{charliteral}{'3'},\ \textcolor{charliteral}{'4'},\ \textcolor{charliteral}{'5'},\ \textcolor{charliteral}{'6'},\ \textcolor{charliteral}{'7'},\ \textcolor{charliteral}{'8'},\ \textcolor{charliteral}{'9'},\ \textcolor{charliteral}{'A'},\ \textcolor{charliteral}{'B'},\ \textcolor{charliteral}{'C'},\ \textcolor{charliteral}{'D'},\ \textcolor{charliteral}{'E'},\ \textcolor{charliteral}{'F'}\ \};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00139}00139\ \ \ \textcolor{keywordtype}{unsigned}\ Div;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00140}00140\ \ \ \textcolor{keywordtype}{unsigned}\ Digit;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00141}00141\ \ \ \textcolor{keywordtype}{unsigned}\ Number;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00142}00142\ \ \ \textcolor{keywordtype}{unsigned}\ Width;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00143}00143\ \ \ \textcolor{keywordtype}{char}\ c;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00144}00144\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00145}00145\ \ \ Number\ =\ v;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00146}00146\ \ \ Digit\ =\ 1u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00147}00147\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00148}00148\ \ \ \textcolor{comment}{//\ Get\ actual\ field\ width}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00149}00149\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00150}00150\ \ \ Width\ =\ 1u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00151}00151\ \ \ \textcolor{keywordflow}{while}\ (Number\ >=\ Base)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00152}00152\ \ \ \ \ Number\ =\ (Number\ /\ Base);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00153}00153\ \ \ \ \ Width++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00154}00154\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00155}00155\ \ \ \textcolor{keywordflow}{if}\ (NumDigits\ >\ Width)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00156}00156\ \ \ \ \ Width\ =\ NumDigits;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00157}00157\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00158}00158\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00159}00159\ \ \ \textcolor{comment}{//\ Print\ leading\ chars\ if\ necessary}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00160}00160\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00161}00161\ \ \ \textcolor{keywordflow}{if}\ ((FormatFlags\ \&\ FORMAT\_FLAG\_LEFT\_JUSTIFY)\ ==\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00162}00162\ \ \ \ \ \textcolor{keywordflow}{if}\ (FieldWidth\ !=\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00163}00163\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (((FormatFlags\ \&\ FORMAT\_FLAG\_PAD\_ZERO)\ ==\ FORMAT\_FLAG\_PAD\_ZERO)\ \&\&\ (NumDigits\ ==\ 0u))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00164}00164\ \ \ \ \ \ \ \ \ c\ =\ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00165}00165\ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00166}00166\ \ \ \ \ \ \ \ \ c\ =\ \textcolor{charliteral}{'\ '};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00167}00167\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00168}00168\ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ ((FieldWidth\ !=\ 0u)\ \&\&\ (Width\ <\ FieldWidth))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00169}00169\ \ \ \ \ \ \ \ \ FieldWidth-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00170}00170\ \ \ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ c);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00171}00171\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00172}00172\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00173}00173\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00174}00174\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00175}00175\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00176}00176\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00177}00177\ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ >=\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00178}00178\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00179}00179\ \ \ \ \ \textcolor{comment}{//\ Compute\ Digit.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00180}00180\ \ \ \ \ \textcolor{comment}{//\ Loop\ until\ Digit\ has\ the\ value\ of\ the\ highest\ digit\ required.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00181}00181\ \ \ \ \ \textcolor{comment}{//\ Example:\ If\ the\ output\ is\ 345\ (Base\ 10),\ loop\ 2\ times\ until\ Digit\ is\ 100.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00182}00182\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00183}00183\ \ \ \ \ \textcolor{keywordflow}{while}\ (1)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00184}00184\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (NumDigits\ >\ 1u)\ \{\ \ \ \ \ \ \ \textcolor{comment}{//\ User\ specified\ a\ min\ number\ of\ digits\ to\ print?\ =>\ Make\ sure\ we\ loop\ at\ least\ that\ often,\ before\ checking\ anything\ else\ (>\ 1\ check\ avoids\ problems\ with\ NumDigits\ being\ signed\ /\ unsigned)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00185}00185\ \ \ \ \ \ \ \ \ NumDigits-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00186}00186\ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00187}00187\ \ \ \ \ \ \ \ \ Div\ =\ v\ /\ Digit;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00188}00188\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (Div\ <\ Base)\ \{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Is\ our\ divider\ big\ enough\ to\ extract\ the\ highest\ digit\ from\ value?\ =>\ Done}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00189}00189\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00190}00190\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00191}00191\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00192}00192\ \ \ \ \ \ \ Digit\ *=\ Base;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00193}00193\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00194}00194\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00195}00195\ \ \ \ \ \textcolor{comment}{//\ Output\ digits}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00196}00196\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00197}00197\ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00198}00198\ \ \ \ \ \ \ Div\ =\ v\ /\ Digit;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00199}00199\ \ \ \ \ \ \ v\ -\/=\ Div\ *\ Digit;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00200}00200\ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \_aV2C[Div]);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00201}00201\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00202}00202\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00203}00203\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00204}00204\ \ \ \ \ \ \ Digit\ /=\ Base;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00205}00205\ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (Digit);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00206}00206\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00207}00207\ \ \ \ \ \textcolor{comment}{//\ Print\ trailing\ spaces\ if\ necessary}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00208}00208\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00209}00209\ \ \ \ \ \textcolor{keywordflow}{if}\ ((FormatFlags\ \&\ FORMAT\_FLAG\_LEFT\_JUSTIFY)\ ==\ FORMAT\_FLAG\_LEFT\_JUSTIFY)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00210}00210\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (FieldWidth\ !=\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00211}00211\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ ((FieldWidth\ !=\ 0u)\ \&\&\ (Width\ <\ FieldWidth))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00212}00212\ \ \ \ \ \ \ \ \ \ \ FieldWidth-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00213}00213\ \ \ \ \ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \textcolor{charliteral}{'\ '});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00214}00214\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00215}00215\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00216}00216\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00217}00217\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00218}00218\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00219}00219\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00220}00220\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00221}00221\ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00222}00222\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00223}00223\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00224}00224\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00225}00225\ \textcolor{comment}{*\ \ \ \ \ \ \ \_PrintInt}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00226}00226\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00227}00227\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ \_PrintInt(\mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{SEGGER\_RTT\_PRINTF\_DESC}}\ *\ pBufferDesc,\ \textcolor{keywordtype}{int}\ v,\ \textcolor{keywordtype}{unsigned}\ Base,\ \textcolor{keywordtype}{unsigned}\ NumDigits,\ \textcolor{keywordtype}{unsigned}\ FieldWidth,\ \textcolor{keywordtype}{unsigned}\ FormatFlags)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00228}00228\ \ \ \textcolor{keywordtype}{unsigned}\ Width;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00229}00229\ \ \ \textcolor{keywordtype}{int}\ Number;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00230}00230\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00231}00231\ \ \ Number\ =\ (v\ <\ 0)\ ?\ -\/v\ :\ v;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00232}00232\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00233}00233\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00234}00234\ \ \ \textcolor{comment}{//\ Get\ actual\ field\ width}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00235}00235\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00236}00236\ \ \ Width\ =\ 1u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00237}00237\ \ \ \textcolor{keywordflow}{while}\ (Number\ >=\ (\textcolor{keywordtype}{int})Base)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00238}00238\ \ \ \ \ Number\ =\ (Number\ /\ (int)Base);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00239}00239\ \ \ \ \ Width++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00240}00240\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00241}00241\ \ \ \textcolor{keywordflow}{if}\ (NumDigits\ >\ Width)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00242}00242\ \ \ \ \ Width\ =\ NumDigits;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00243}00243\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00244}00244\ \ \ \textcolor{keywordflow}{if}\ ((FieldWidth\ >\ 0u)\ \&\&\ ((v\ <\ 0)\ ||\ ((FormatFlags\ \&\ FORMAT\_FLAG\_PRINT\_SIGN)\ ==\ FORMAT\_FLAG\_PRINT\_SIGN)))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00245}00245\ \ \ \ \ FieldWidth-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00246}00246\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00247}00247\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00248}00248\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00249}00249\ \ \ \textcolor{comment}{//\ Print\ leading\ spaces\ if\ necessary}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00250}00250\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00251}00251\ \ \ \textcolor{keywordflow}{if}\ ((((FormatFlags\ \&\ FORMAT\_FLAG\_PAD\_ZERO)\ ==\ 0u)\ ||\ (NumDigits\ !=\ 0u))\ \&\&\ ((FormatFlags\ \&\ FORMAT\_FLAG\_LEFT\_JUSTIFY)\ ==\ 0u))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00252}00252\ \ \ \ \ \textcolor{keywordflow}{if}\ (FieldWidth\ !=\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00253}00253\ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ ((FieldWidth\ !=\ 0u)\ \&\&\ (Width\ <\ FieldWidth))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00254}00254\ \ \ \ \ \ \ \ \ FieldWidth-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00255}00255\ \ \ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \textcolor{charliteral}{'\ '});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00256}00256\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00257}00257\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00258}00258\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00259}00259\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00260}00260\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00261}00261\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00262}00262\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00263}00263\ \ \ \textcolor{comment}{//\ Print\ sign\ if\ necessary}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00264}00264\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00265}00265\ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ >=\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00266}00266\ \ \ \ \ \textcolor{keywordflow}{if}\ (v\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00267}00267\ \ \ \ \ \ \ v\ =\ -\/v;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00268}00268\ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00269}00269\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ ((FormatFlags\ \&\ FORMAT\_FLAG\_PRINT\_SIGN)\ ==\ FORMAT\_FLAG\_PRINT\_SIGN)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00270}00270\ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \textcolor{charliteral}{'+'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00271}00271\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00272}00272\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00273}00273\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00274}00274\ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ >=\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00275}00275\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00276}00276\ \ \ \ \ \ \ \textcolor{comment}{//\ Print\ leading\ zeros\ if\ necessary}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00277}00277\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00278}00278\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (((FormatFlags\ \&\ FORMAT\_FLAG\_PAD\_ZERO)\ ==\ FORMAT\_FLAG\_PAD\_ZERO)\ \&\&\ ((FormatFlags\ \&\ FORMAT\_FLAG\_LEFT\_JUSTIFY)\ ==\ 0u)\ \&\&\ (NumDigits\ ==\ 0u))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00279}00279\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (FieldWidth\ !=\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00280}00280\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ ((FieldWidth\ !=\ 0u)\ \&\&\ (Width\ <\ FieldWidth))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00281}00281\ \ \ \ \ \ \ \ \ \ \ \ \ FieldWidth-\/-\/;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00282}00282\ \ \ \ \ \ \ \ \ \ \ \ \ \_StoreChar(pBufferDesc,\ \textcolor{charliteral}{'0'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00283}00283\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ <\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00284}00284\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00285}00285\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00286}00286\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00287}00287\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00288}00288\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00289}00289\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pBufferDesc-\/>ReturnValue\ >=\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00290}00290\ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00291}00291\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Print\ number\ without\ sign}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00292}00292\ \ \ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00293}00293\ \ \ \ \ \ \ \ \ \_PrintUnsigned(pBufferDesc,\ (\textcolor{keywordtype}{unsigned})v,\ Base,\ NumDigits,\ FieldWidth,\ FormatFlags);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00294}00294\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00295}00295\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00296}00296\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00297}00297\ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00298}00298\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00299}00299\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00300}00300\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00301}00301\ \textcolor{comment}{*\ \ \ \ \ \ \ Public\ code}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00302}00302\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00303}00303\ \textcolor{comment}{**********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00304}00304\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00305}00305\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00306}00306\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00307}00307\ \textcolor{comment}{*\ \ \ \ \ \ \ SEGGER\_RTT\_vprintf}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00308}00308\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00309}00309\ \textcolor{comment}{*\ \ Function\ description}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00310}00310\ \textcolor{comment}{*\ \ \ \ Stores\ a\ formatted\ string\ in\ SEGGER\ RTT\ control\ block.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00311}00311\ \textcolor{comment}{*\ \ \ \ This\ data\ is\ read\ by\ the\ host.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00312}00312\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00313}00313\ \textcolor{comment}{*\ \ Parameters}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00314}00314\ \textcolor{comment}{*\ \ \ \ BufferIndex\ \ Index\ of\ "{}Up"{}-\/buffer\ to\ be\ used.\ (e.g.\ 0\ for\ "{}Terminal"{})}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00315}00315\ \textcolor{comment}{*\ \ \ \ sFormat\ \ \ \ \ \ Pointer\ to\ format\ string}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00316}00316\ \textcolor{comment}{*\ \ \ \ pParamList\ \ \ Pointer\ to\ the\ list\ of\ arguments\ for\ the\ format\ string}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00317}00317\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00318}00318\ \textcolor{comment}{*\ \ Return\ values}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00319}00319\ \textcolor{comment}{*\ \ \ \ >=\ 0:\ \ Number\ of\ bytes\ which\ have\ been\ stored\ in\ the\ "{}Up"{}-\/buffer.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00320}00320\ \textcolor{comment}{*\ \ \ \ \ <\ 0:\ \ Error}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00321}00321\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00322}00322\ \textcolor{keywordtype}{int}\ SEGGER\_RTT\_vprintf(\textcolor{keywordtype}{unsigned}\ BufferIndex,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ sFormat,\ va\_list\ *\ pParamList)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00323}00323\ \ \ \textcolor{keywordtype}{char}\ c;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00324}00324\ \ \ \mbox{\hyperlink{struct_s_e_g_g_e_r___r_t_t___p_r_i_n_t_f___d_e_s_c}{SEGGER\_RTT\_PRINTF\_DESC}}\ BufferDesc;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00325}00325\ \ \ \textcolor{keywordtype}{int}\ v;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00326}00326\ \ \ \textcolor{keywordtype}{unsigned}\ NumDigits;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00327}00327\ \ \ \textcolor{keywordtype}{unsigned}\ FormatFlags;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00328}00328\ \ \ \textcolor{keywordtype}{unsigned}\ FieldWidth;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00329}00329\ \ \ \textcolor{keywordtype}{char}\ acBuffer[SEGGER\_RTT\_PRINTF\_BUFFER\_SIZE];}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00330}00330\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00331}00331\ \ \ BufferDesc.pBuffer\ \ \ \ \ \ \ \ =\ acBuffer;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00332}00332\ \ \ BufferDesc.BufferSize\ \ \ \ \ =\ SEGGER\_RTT\_PRINTF\_BUFFER\_SIZE;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00333}00333\ \ \ BufferDesc.Cnt\ \ \ \ \ \ \ \ \ \ \ \ =\ 0u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00334}00334\ \ \ BufferDesc.RTTBufferIndex\ =\ BufferIndex;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00335}00335\ \ \ BufferDesc.ReturnValue\ \ \ \ =\ 0;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00336}00336\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00337}00337\ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00338}00338\ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00339}00339\ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00340}00340\ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00341}00341\ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00342}00342\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00343}00343\ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{'\%'})\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00344}00344\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00345}00345\ \ \ \ \ \ \ \textcolor{comment}{//\ Filter\ out\ flags}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00346}00346\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00347}00347\ \ \ \ \ \ \ FormatFlags\ =\ 0u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00348}00348\ \ \ \ \ \ \ v\ =\ 1;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00349}00349\ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00350}00350\ \ \ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00351}00351\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{switch}\ (c)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00352}00352\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'-\/'}:\ FormatFlags\ |=\ FORMAT\_FLAG\_LEFT\_JUSTIFY;\ sFormat++;\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00353}00353\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'0'}:\ FormatFlags\ |=\ FORMAT\_FLAG\_PAD\_ZERO;\ \ \ \ \ sFormat++;\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00354}00354\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'+'}:\ FormatFlags\ |=\ FORMAT\_FLAG\_PRINT\_SIGN;\ \ \ sFormat++;\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00355}00355\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'\#'}:\ FormatFlags\ |=\ FORMAT\_FLAG\_ALTERNATE;\ \ \ \ sFormat++;\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00356}00356\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{default}:\ \ v\ =\ 0;\ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00357}00357\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00358}00358\ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (v);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00359}00359\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00360}00360\ \ \ \ \ \ \ \textcolor{comment}{//\ filter\ out\ field\ with}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00361}00361\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00362}00362\ \ \ \ \ \ \ FieldWidth\ =\ 0u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00363}00363\ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00364}00364\ \ \ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00365}00365\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((c\ <\ \textcolor{charliteral}{'0'})\ ||\ (c\ >\ \textcolor{charliteral}{'9'}))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00366}00366\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00367}00367\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00368}00368\ \ \ \ \ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00369}00369\ \ \ \ \ \ \ \ \ FieldWidth\ =\ (FieldWidth\ *\ 10u)\ +\ ((\textcolor{keywordtype}{unsigned})c\ -\/\ \textcolor{charliteral}{'0'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00370}00370\ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (1);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00371}00371\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00372}00372\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00373}00373\ \ \ \ \ \ \ \textcolor{comment}{//\ Filter\ out\ precision\ (number\ of\ digits\ to\ display)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00374}00374\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00375}00375\ \ \ \ \ \ \ NumDigits\ =\ 0u;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00376}00376\ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00377}00377\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{'.'})\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00378}00378\ \ \ \ \ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00379}00379\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00380}00380\ \ \ \ \ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00381}00381\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((c\ <\ \textcolor{charliteral}{'0'})\ ||\ (c\ >\ \textcolor{charliteral}{'9'}))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00382}00382\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00383}00383\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00384}00384\ \ \ \ \ \ \ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00385}00385\ \ \ \ \ \ \ \ \ \ \ NumDigits\ =\ NumDigits\ *\ 10u\ +\ ((unsigned)c\ -\/\ \textcolor{charliteral}{'0'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00386}00386\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (1);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00387}00387\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00388}00388\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00389}00389\ \ \ \ \ \ \ \textcolor{comment}{//\ Filter\ out\ length\ modifier}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00390}00390\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00391}00391\ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00392}00392\ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00393}00393\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((c\ ==\ \textcolor{charliteral}{'l'})\ ||\ (c\ ==\ \textcolor{charliteral}{'h'}))\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00394}00394\ \ \ \ \ \ \ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00395}00395\ \ \ \ \ \ \ \ \ \ \ c\ =\ *sFormat;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00396}00396\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00397}00397\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00398}00398\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00399}00399\ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (1);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00400}00400\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00401}00401\ \ \ \ \ \ \ \textcolor{comment}{//\ Handle\ specifiers}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00402}00402\ \ \ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00403}00403\ \ \ \ \ \ \ \textcolor{keywordflow}{switch}\ (c)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00404}00404\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'c'}:\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00405}00405\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ c0;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00406}00406\ \ \ \ \ \ \ \ \ v\ =\ va\_arg(*pParamList,\ \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00407}00407\ \ \ \ \ \ \ \ \ c0\ =\ (char)v;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00408}00408\ \ \ \ \ \ \ \ \ \_StoreChar(\&BufferDesc,\ c0);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00409}00409\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00410}00410\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00411}00411\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'d'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00412}00412\ \ \ \ \ \ \ \ \ v\ =\ va\_arg(*pParamList,\ \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00413}00413\ \ \ \ \ \ \ \ \ \_PrintInt(\&BufferDesc,\ v,\ 10u,\ NumDigits,\ FieldWidth,\ FormatFlags);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00414}00414\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00415}00415\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'u'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00416}00416\ \ \ \ \ \ \ \ \ v\ =\ va\_arg(*pParamList,\ \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00417}00417\ \ \ \ \ \ \ \ \ \_PrintUnsigned(\&BufferDesc,\ (\textcolor{keywordtype}{unsigned})v,\ 10u,\ NumDigits,\ FieldWidth,\ FormatFlags);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00418}00418\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00419}00419\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'x'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00420}00420\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'X'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00421}00421\ \ \ \ \ \ \ \ \ v\ =\ va\_arg(*pParamList,\ \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00422}00422\ \ \ \ \ \ \ \ \ \_PrintUnsigned(\&BufferDesc,\ (\textcolor{keywordtype}{unsigned})v,\ 16u,\ NumDigits,\ FieldWidth,\ FormatFlags);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00423}00423\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00424}00424\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'s'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00425}00425\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00426}00426\ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ s\ =\ va\_arg(*pParamList,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00427}00427\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (s\ ==\ NULL)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00428}00428\ \ \ \ \ \ \ \ \ \ \ \ \ s\ =\ \textcolor{stringliteral}{"{}(NULL)"{}};\ \ \textcolor{comment}{//\ Print\ (NULL)\ instead\ of\ crashing\ or\ breaking,\ as\ it\ is\ more\ informative\ to\ the\ user.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00429}00429\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00430}00430\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00431}00431\ \ \ \ \ \ \ \ \ \ \ \ \ c\ =\ *s;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00432}00432\ \ \ \ \ \ \ \ \ \ \ \ \ s++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00433}00433\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{'\(\backslash\)0'})\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00434}00434\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00435}00435\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00436}00436\ \ \ \ \ \ \ \ \ \ \ \ \_StoreChar(\&BufferDesc,\ c);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00437}00437\ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (BufferDesc.ReturnValue\ >=\ 0);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00438}00438\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00439}00439\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00440}00440\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'p'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00441}00441\ \ \ \ \ \ \ \ \ v\ =\ va\_arg(*pParamList,\ \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00442}00442\ \ \ \ \ \ \ \ \ \_PrintUnsigned(\&BufferDesc,\ (\textcolor{keywordtype}{unsigned})v,\ 16u,\ 8u,\ 8u,\ 0u);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00443}00443\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00444}00444\ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'\%'}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00445}00445\ \ \ \ \ \ \ \ \ \_StoreChar(\&BufferDesc,\ \textcolor{charliteral}{'\%'});}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00446}00446\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00447}00447\ \ \ \ \ \ \ \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00448}00448\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00449}00449\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00450}00450\ \ \ \ \ \ \ sFormat++;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00451}00451\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00452}00452\ \ \ \ \ \ \ \_StoreChar(\&BufferDesc,\ c);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00453}00453\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00454}00454\ \ \ \}\ \textcolor{keywordflow}{while}\ (BufferDesc.ReturnValue\ >=\ 0);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00455}00455\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00456}00456\ \ \ \textcolor{keywordflow}{if}\ (BufferDesc.ReturnValue\ >\ 0)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00457}00457\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00458}00458\ \ \ \ \ \textcolor{comment}{//\ Write\ remaining\ data,\ if\ any}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00459}00459\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00460}00460\ \ \ \ \ \textcolor{keywordflow}{if}\ (BufferDesc.Cnt\ !=\ 0u)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00461}00461\ \ \ \ \ \ \ SEGGER\_RTT\_Write(BufferIndex,\ acBuffer,\ BufferDesc.Cnt);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00462}00462\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00463}00463\ \ \ \ \ BufferDesc.ReturnValue\ +=\ (int)BufferDesc.Cnt;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00464}00464\ \ \ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00465}00465\ \ \ \textcolor{keywordflow}{return}\ BufferDesc.ReturnValue;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00466}00466\ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00467}00467\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00468}00468\ \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00469}00469\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00470}00470\ \textcolor{comment}{*\ \ \ \ \ \ \ SEGGER\_RTT\_printf}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00471}00471\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00472}00472\ \textcolor{comment}{*\ \ Function\ description}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00473}00473\ \textcolor{comment}{*\ \ \ \ Stores\ a\ formatted\ string\ in\ SEGGER\ RTT\ control\ block.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00474}00474\ \textcolor{comment}{*\ \ \ \ This\ data\ is\ read\ by\ the\ host.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00475}00475\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00476}00476\ \textcolor{comment}{*\ \ Parameters}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00477}00477\ \textcolor{comment}{*\ \ \ \ BufferIndex\ \ Index\ of\ "{}Up"{}-\/buffer\ to\ be\ used.\ (e.g.\ 0\ for\ "{}Terminal"{})}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00478}00478\ \textcolor{comment}{*\ \ \ \ sFormat\ \ \ \ \ \ Pointer\ to\ format\ string,\ followed\ by\ the\ arguments\ for\ conversion}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00479}00479\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00480}00480\ \textcolor{comment}{*\ \ Return\ values}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00481}00481\ \textcolor{comment}{*\ \ \ \ >=\ 0:\ \ Number\ of\ bytes\ which\ have\ been\ stored\ in\ the\ "{}Up"{}-\/buffer.}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00482}00482\ \textcolor{comment}{*\ \ \ \ \ <\ 0:\ \ Error}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00483}00483\ \textcolor{comment}{*}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00484}00484\ \textcolor{comment}{*\ \ Notes}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00485}00485\ \textcolor{comment}{*\ \ \ \ (1)\ Conversion\ specifications\ have\ following\ syntax:}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00486}00486\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ \%[flags][FieldWidth][.Precision]ConversionSpecifier}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00487}00487\ \textcolor{comment}{*\ \ \ \ (2)\ Supported\ flags:}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00488}00488\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ -\/:\ Left\ justify\ within\ the\ field\ width}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00489}00489\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ +:\ Always\ print\ sign\ extension\ for\ signed\ conversions}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00490}00490\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ 0:\ Pad\ with\ 0\ instead\ of\ spaces.\ Ignored\ when\ using\ '-\/'-\/flag\ or\ precision}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00491}00491\ \textcolor{comment}{*\ \ \ \ \ \ \ \ Supported\ conversion\ specifiers:}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00492}00492\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ c:\ Print\ the\ argument\ as\ one\ char}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00493}00493\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ d:\ Print\ the\ argument\ as\ a\ signed\ integer}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00494}00494\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ u:\ Print\ the\ argument\ as\ an\ unsigned\ integer}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00495}00495\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ x:\ Print\ the\ argument\ as\ an\ hexadecimal\ integer}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00496}00496\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ s:\ Print\ the\ string\ pointed\ to\ by\ the\ argument}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00497}00497\ \textcolor{comment}{*\ \ \ \ \ \ \ \ \ \ p:\ Print\ the\ argument\ as\ an\ 8-\/digit\ hexadecimal\ integer.\ (Argument\ shall\ be\ a\ pointer\ to\ void.)}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00498}00498\ \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00499}00499\ \textcolor{keywordtype}{int}\ SEGGER\_RTT\_printf(\textcolor{keywordtype}{unsigned}\ BufferIndex,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ sFormat,\ ...)\ \{}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00500}00500\ \ \ \textcolor{keywordtype}{int}\ r;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00501}00501\ \ \ va\_list\ ParamList;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00502}00502\ }
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00503}00503\ \ \ va\_start(ParamList,\ sFormat);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00504}00504\ \ \ r\ =\ SEGGER\_RTT\_vprintf(BufferIndex,\ sFormat,\ \&ParamList);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00505}00505\ \ \ va\_end(ParamList);}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00506}00506\ \ \ \textcolor{keywordflow}{return}\ r;}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00507}00507\ \}}
\DoxyCodeLine{\Hypertarget{_s_e_g_g_e_r___r_t_t__printf_8c_source_l00508}00508\ \textcolor{comment}{/***************************\ End\ of\ file\ ****************************/}}

\end{DoxyCode}
