Specifications

*/
if(tx_ptr == wr_ptr) {
empty = 1;
tx_act = 0;
break;
}
/*
* Stop transfer if the chip is filled up.
*/
if(bit_is_clear(VS_DREQ_PIN, VS_DREQ_BIT)) {
break;
}
}
/*
* If the transfer stopped because the decoder
* clears the DREQ signal, it still has room
* for 32 bytes.
*/
if(tx_act) {
for(yd = 32; yd; yd--) {
sbi(VS_BSYNC_PORT, VS_BSYNC_BIT);
outp(*tx_ptr, SPDR);
asm volatile("nop\n\tnop\n\tnop");
cbi(VS_BSYNC_PORT, VS_BSYNC_BIT);
if(++tx_ptr > mem_flip)
tx_ptr = mem_start;
loop_until_bit_is_set(SPSR, SPIF);
/*
* Stop transfer if our data buffer is empty.
*/
if(tx_ptr == wr_ptr) {
tx_act = 0;
break;
}
}
}
}
NutEventPostAsync(&q_dreq);
}
/*!
* \brief Write a byte to the serial control interface.
*/
static inline void VsSciPutByte(u_char data)
{
u_char mask = 0x80;
/*
* Loop until all 8 bits are processed.
*/
while(mask) {
/*
96