|
else {// transmit interrupt
TI = 0;
if (bSendCmd) {
if (bSendHighTetra) {
SBUF = Hex2ASCII((txCmd >> 4) & 0x0f);
bSendHighTetra = 0;
}
else {
SBUF = Hex2ASCII(txCmd & 0x0f);
bSendCmd = 0;
bSendHighTetra = 1;
}
}
else if (!bEndPack) {
if (txCount == 0) {
SBUF = 0x0A;
bEndPack = 1;
}
else {
// tx count != 0
if (bSendHighTetra) {
SBUF = Hex2ASCII((*txPtr >> 4) & 0x0f);
bSendHighTetra = 0;
}
else {
SBUF = Hex2ASCII(*txPtr++ & 0x0f);
bSendHighTetra = 1;
txCount--;
}
}
} //if (!bEndPack)
E-mail: info@telesys.ru