コード例 #1
0
 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();
     }
 }
コード例 #2
0
        private void onByteWritten(gpSim sender, breakpoint hit)
        {
            _packet[_packetCount++] = (byte) sender.readMemory( hit.location );

            if (_packetCount > networkPacket.lengthInBytes)
                onSendPacket(new networkPacket(_packet));
        }