 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		| 
/*
 * __sys_write is overridden here. It is part of the RedLib "C"
 * library and used by printf() and related functions to write
 * to some output. We send everything to the console, provided
 * that it has been enabled with DEBUG_CONSOLE.
 * Note that this trick requires the -Xlinker --allow-multiple-definition
 * flag when linking the binary.
 * If the debug console is disabled, __sys_write defaults to a
 * stub (inside the nohost RedLib library version) that does very little.
 */
#ifdef DEBUG_CONSOLE
int __sys_write(int iFileHandle, char *pcBuffer, int iLength)
{
if (iLength > 0)
{
serialChannelWrite(DEBUG_CHANNEL, (uint8_t*)pcBuffer, iLength);
if ((pcBuffer[iLength - 1] != '\r') && (pcBuffer[iLength - 1] != '\n'))
{
serialChannelWrite(DEBUG_CHANNEL, (uint8_t*)"\n\r", 2);
}
}
return (iLength);
}
#endif
 | 
 
					
				
		
 lpcware
		
			lpcware
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		