void DownstreamSerialStreamSet(BYTE_FIFO_STORAGE * txBuffer) { SetColor(0, 1, 0); LoadCorePacket(&downstreamPacketTemp); downstreamPacketTemp.use.head.RPC = GetRPCValue("strm"); downstreamPacketTemp.use.head.MessageID = 3; downstreamPacketTemp.use.head.Method = BOWLER_POST; downstreamPacketTemp.use.data[0] = 16; //the serial rx pin downstreamPacketTemp.use.data[1] = FifoGetByteCount(txBuffer); FifoGetByteStream(txBuffer, &downstreamPacketTemp.use.data[2], downstreamPacketTemp.use.data[1]); downstreamPacketTemp.use.head.DataLegnth = 4 + 1 + 1 + downstreamPacketTemp.use.data[1]; SendPacketToCoProc(&downstreamPacketTemp); }
/** * get a stream of this length from the connection */ uint16_t getStream(uint8_t *packet,uint16_t size,BYTE_FIFO_STORAGE * fifo){ return FifoGetByteStream(fifo,packet,size); }
uint8_t TXget(){ uint8_t b=0xff; if(getTXcount()>0) FifoGetByteStream(&storeTX,&b,1); return b; }