/*
* Brief:	The header file of cmdselect.h.
			Get cmd is enable or disable.
* Author:	Jimbo_Zhang@outlook.com
* Date:		2019-9-13, the Mid-autumn Festival;
*/

#ifndef __CMD_SELECT_H__
#define __CMD_SELECT_H__

#include <stdio.h>
#include <stdint.h>

#define NETFN_SSI       0x2c
#define NETFN_DCMI      0x2c
#define NETFN_HPM       0x2c

#define NETFN_PNM       0x30
#define NETFN_APML      0x36

/*CMM Specific Netfn and GrpExt*/
#define NETFN_CMM		0x38
#define NETFN_OBSM		0x2C
#define GRPEXT_OBSM		0x02

#define GRPEXT_NA       0x00
#define GRPEXT_HPM      0x00
#define GRPEXT_SSI      0x02
#define GRPEXT_DCMI     0xDC
//#define GRPEXT_PICMG		0x00

typedef struct
{
    uint8_t CmdNum;
    uint8_t Status;
}NetFnCmds_T;

typedef struct
{
    uint8_t NetFn;
    uint8_t GroupExtCode;
    const NetFnCmds_T *NetFunction;
}NETFNTable_T;

/*
*@fn IsCommandEnabled
*@brief This function gives the status of Command
*@param NetFn         - Net Function 
*@param GroupExtnCode - Group Extension Code
*@param Cmd           - Command Number
*@return Returns 0 if the command is Enabled
*            Returns -1 if the command is Disabled
*/
int IsCommandEnabled(uint8_t NetFn, uint8_t* GroupExtnCode,uint8_t Cmd);


#endif
