//..............................................................................
//
// I2C/SPI Tap log record codes
//

import "log_RecordCode.jnc"

//..............................................................................

enum I2cSpiTapLogRecordCode: uint64_t
{
	DeviceOpened              = 0x01d487bb6423b7fd,
	InterfaceClaimed          = 0x01d487bb6423b7fe,
	InEndpointOpened          = 0x01d487bb6423b7ff,
	OutEndpointOpened         = 0x01d487bb6423b800,
	CaptureStarted            = 0x01d487bb6423b801,
	CaptureStopped            = 0x01d487bb6423b802,
	CaptureError              = 0x01d487bb6423b803,
	UnexpectedCode            = 0x01d487bb6423b804,
	IncompleteByte            = 0x01d487bb6423b805,
	FpgaBufferOverflow        = 0x01d487bb6423b806,
	CypressBufferCleared      = 0x01d487bb6423b81c,

	I2cStart                  = 0x01d487bb6423b80f,
	I2cFinalizeStart7Bit      = 0x01d487bb6423b810,
	I2cFinalizeStart10Bit     = 0x01d487bb6423b811,
	I2cStop                   = 0x01d487bb6423b812,
	I2cStopOutOfTransaction   = 0x01d487bb6423b813,
	I2cTxNack                 = 0x01d487bb6423b814,
	I2cRxNack                 = 0x01d487bb6423b815,

	SpiStart                  = 0x01d487bb6423b816,
	SpiStop                   = 0x01d487bb6423b817,
}

enum I2cSpiTapLogPartCode: uint64_t
{
	I2cStartBegin = I2cSpiTapLogRecordCode.I2cStart | log.PartCodeFlags.MergeableForward,
	I2cStartEnd   = I2cSpiTapLogRecordCode.I2cStart | log.PartCodeFlags.MergeableBackward,
}

//..............................................................................
