void sc_begin(t_sc *sc) /* * Send a BEGIN message */ { sc_send(sc, SC_BEGIN, 0); /* Highest priority */ } /* sc_begin() */
void sc_ready(t_sc *sc) /* * Send a READY message */ { sc_send(sc, SC_READY, 1); /* Lower priority than BEGIN */ } /* sc_ready() */
/* ************************************************ */ void sc_sendLine(char* cBuf) { int i=0; while (cBuf[i] != '\0') { TXBuffer[TXBufferI++] = cBuf[i]; i++; } TXSendEnabled = TRUE; sc_send(); }
void sc_reset(t_sc *sc) /* * Reset the given syhcronisation controller so that it resets the * count and waits for the first message to come in * We make this a low priority mesage so that if there are any * messages in the queue then they will be processed first, ensuring * the queue is empty before we do the reset. Of course - this should * never happen! */ { sc_send(sc, SC_RESET, 2); } /* sc_reset() */