/*
 * Copyright (c) 2003 Linuxant inc.
 * Copyright (c) 2001-2003 Conexant Systems, Inc.
 *
 * NOTE: The use and distribution of this software is governed by the terms in
 * the file LICENSE, which is included in the package. You must read this and
 * agree to these terms before using or distributing this software.
 *
 */

/******************************************************************************

File Name:			OsNVM.h	

File Description:	Interface to the Os dependent part of the NVM Manager.	

*******************************************************************************/

#ifndef __OSNVM_H__
#define __OSNVM_H__

#include "osmemory_ex.h"
#include "comtypes.h"

#define NVM_MAGIC_HSF_VERSION	"HSF2"

#define NVM_MAGIC_LENGTH		(sizeof(NVM_MAGIC_HSF_VERSION)-1)

#if ( UK_MODE == UK_KERNEL )

#ifndef __CONFIGCODES_H__
typedef int CFGMGR_CODE;
#endif

HANDLE 		NVM_Open	(UINT32 dwDevNode);
COM_STATUS 	NVM_Close	(HANDLE hNVM);

COM_STATUS	NVM_Read	(HANDLE hNVM, CFGMGR_CODE eCode, PVOID pBuf, PUINT32 pdwSize);
COM_STATUS  NVM_Write 	(HANDLE hNVM, CFGMGR_CODE eCode, PVOID pBuf, PUINT32 pdwSize);

#endif /* __KERNEL__ */

typedef struct NVM_FIRMWARW_MEM_TAG {
	PBYTE  HexData;
	UINT32 DataSize;
} NVM_FIRMWARW_MEM_TAG;

#endif		// #ifndef __OSNVM_H__
