Exemple #1
0
void putS(char *str) {
	int i = 0;

	while (str[i]) {
		putC(str[i++]);
	}
}
Exemple #2
0
void dump_config(const T_DDR_CONFIG_PARAMETERS * data)
{
	int i;
	for(i=0; i < sizeof(config_strings)/sizeof(config_strings[0]) ; i++){
		putText(config_strings[i], 40);
		putText(": ",20);
		putHex(*(((unsigned int *) data) +i));
		putC('\n');
	}
}
Exemple #3
0
void putI(int k) {
	int s[10];
	int  sPos = 0;
	div_t out;

	if (k < 0) {
		putC('-');
		k = -k;
	}

	do{
		out = div(k, 10);
		s[sPos++] = out.rem;
		k = out.quot;
	} while( k != 0);

	for (; sPos > 0; ) {
		putC('0' + s[--sPos]);
	}
}
Exemple #4
0
void dump_timing(const T_DDR_TIMING_PARAMETERS * data)
{
	int i;
	unsigned int *val = (unsigned int *) data;
	
	for(i=0; i < sizeof(Timing_strings)/sizeof(Timing_strings[0]) ; i++, ++val){
		putText(Timing_strings[i], 40);
		putText(": ",20);
		putHex(*val);
		putC('\n');
	}
}
Exemple #5
0
// Standard putchar
void putchar(char c) {

	if (c == '\r') {
		backSpace();
	} else if (c == '\n') {
		newLine();
	} else if (c == 0x0f || c == '\t') {
		if (getCursorX() % 4 == 0) {
			int i = 0;
			for (i = 0; i < 4; ++i) {
				putChar(c);
				putC(' ');
			}
		} else
			while (getCursorX() % 4 != 0) {
				putChar(c);
				putC(' ');
			}
	} else if (c != 0) {
		putChar(c);
		putC(c);
	}
}
Exemple #6
0
void video_reload() { 
	int x, y;
	int old_x = getCursorX();
	int old_y = getCursorY();
	setCursor(FALSE);
	for(x = 0; x < current_video_mode->width; ++x)
	{
		for(y = 0; y < current_video_mode->height; ++y)
		{
			setCursorX(x);
			setCursorY(y);
			putC(current_video_mode->screen[x][y]);
		}
	}
	setCursor(TRUE);
	setCursorX(old_x);
	setCursorY(old_y);
}
Exemple #7
0
// Standard putchar
void putchar(char c) {
	putC(c);
}
Exemple #8
0
void putS(char *string){
    while(*string != '\0'){             // Send Each Char Individualy
        putC(*string);
        string++;
    }
}
Exemple #9
0
void sub_putH(unsigned char byte) {
	if (byte > 9) putC(byte + ('A'-10));
	else putC(byte + '0');
}
Exemple #10
0
// Interrupt Handler (UART)
void _int_(_UART1_VECTOR) isr_uart1(void){
    if(IFS0bits.U1RXIF){
        putC(U1RXREG);
        IFS0bits.U1RXIF = 0;            // Clear Receive Interrupt Flag
    }
}