#pragma once

#include <WINDOWS.h>
#include <I2CHwCtxt.h>
#include <I2CEmulCtxt.h>
#include <BSP.h>
#include <iic.h>

typedef struct _I2C_PRIVATE_CONTXT *PI2C_PRIVATE_CONTEXT;

typedef struct _I2C_PUBLIC_CONTEXT {
    volatile PSXXXXXX_I2C_REG 			pI2CReg;
    volatile PSXXXXXX_GPIO_REG 			pGPIOReg;
	volatile PSXXXXXX_SYSCLK_REG 		pSYSCLKReg;
	PSXXXXXX_BSP_ARG					pBSPArgs;

	DWORD								dwChannel;
	
	pI2CCtrlContext 					pI2CCtrlCtxt;

	PI2C_PRIVATE_CONTEXT				pHead;
	PI2C_PRIVATE_CONTEXT				pTail;
} I2C_PUBLIC_CONTEXT, *PI2C_PUBLIC_CONTEXT;


typedef struct _I2C_PRIVATE_CONTXT
{
	_I2C_PRIVATE_CONTXT					*pNext;
	_I2C_PRIVATE_CONTXT					*pPrev;
    PI2C_PUBLIC_CONTEXT					pPublicCtxt;
    PI2CObject							pI2CObj;
} I2C_PRIVATE_CONTEXT, *PI2C_PRIVATE_CONTEXT;

