blob: 303addeb5666c1fff575d4f595ee8f675588c6e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <stdlib.hch>
#include "pal_master.hch"
#include "debug.hch"
void print_hex_value(unsigned value)
{
unsigned 8 ch;
unsigned 4 i;
unsigned 32 tempvalue;
tempvalue = 0 @ value;
for(i = 0;i < 8;i++)
{
ch = 0 @ (tempvalue\\28);
tempvalue <<= 4;
ch += (ch > 9) ? 0x37 : 0x30;
PalDataPortWrite(PalRS232PortCT(0), ch);
}
}
void print_string(unsigned char *s) {
unsigned 4 i;
i = 0;
for(i = 0;'\0' != s[i];i++)
{
PalDataPortWrite(PalRS232PortCT(0), s[i]);
}
}
void print_eol(void)
{
PalDataPortWrite(PalRS232PortCT(0), 0x0A);
PalDataPortWrite(PalRS232PortCT(0), 0x0D);
}
|