void zbus_core_periodic(void) { if(bus_blocked) if(--bus_blocked == 0 && zbus_txlen > 0) __zbus_txstart(); }
void zbus_txstart(zbus_index_t size) { // FIXME // if(zbus_txlen != 0 || zbus_rxlen != 0 || bus_blocked) // return; /* rx or tx in action or // new packet left in buffer // or somebody is talking on the line */ #ifdef ZBUS_RAW_SUPPORT if (!zbus_raw_conn->rport) #endif { #ifdef SKIPJACK_SUPPORT zbus_encrypt (zbus_buf, &size); if (!size){ uip_buf_unlock (); // FIXME zbus_rxstart (); /* destroy the packet and restart rx */ return; } #endif } zbus_txlen = size; if(bus_blocked) return; __zbus_txstart(); }
void zbus_txstart(zbus_index_t size) { // FIXME if(zbus_txlen != 0 || zbus_rxlen != 0 || bus_blocked) return; /* rx or tx in action or new packet left in buffer or somebody is talking on the line */ zbus_index = 0; zbus_txlen = size; if(bus_blocked) return; __zbus_txstart(); }