private void onPortBChange(gpSim sender, breakpoint hit) { // OK, a pin has changed in PORTB. We should examine portb and discover if any interesting bits // are now set. sfrPORTB portb = sender.readMemory<sfrPORTB>(sfrPORTB.name); if (portb.hasBit(0)) { // A sync packet is being reported by the debug interface. Fire the appropriate event. syncPacket(); } }
private void onByteWritten(gpSim sender, breakpoint hit) { _packet[_packetCount++] = (byte) sender.readMemory( hit.location ); if (_packetCount > networkPacket.lengthInBytes) onSendPacket(new networkPacket(_packet)); }