cmdselect.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Brief: The header file of cmdselect.h.
  3. Get cmd is enable or disable.
  4. * Author: Jimbo_Zhang@outlook.com
  5. * Date: 2019-9-13, the Mid-autumn Festival;
  6. */
  7. #ifndef __CMD_SELECT_H__
  8. #define __CMD_SELECT_H__
  9. #include <stdio.h>
  10. #include <stdint.h>
  11. #define NETFN_SSI 0x2c
  12. #define NETFN_DCMI 0x2c
  13. #define NETFN_HPM 0x2c
  14. #define NETFN_PNM 0x30
  15. #define NETFN_APML 0x36
  16. /*CMM Specific Netfn and GrpExt*/
  17. #define NETFN_CMM 0x38
  18. #define NETFN_OBSM 0x2C
  19. #define GRPEXT_OBSM 0x02
  20. #define GRPEXT_NA 0x00
  21. #define GRPEXT_HPM 0x00
  22. #define GRPEXT_SSI 0x02
  23. #define GRPEXT_DCMI 0xDC
  24. //#define GRPEXT_PICMG 0x00
  25. typedef struct
  26. {
  27. uint8_t CmdNum;
  28. uint8_t Status;
  29. }NetFnCmds_T;
  30. typedef struct
  31. {
  32. uint8_t NetFn;
  33. uint8_t GroupExtCode;
  34. const NetFnCmds_T *NetFunction;
  35. }NETFNTable_T;
  36. /*
  37. *@fn IsCommandEnabled
  38. *@brief This function gives the status of Command
  39. *@param NetFn - Net Function
  40. *@param GroupExtnCode - Group Extension Code
  41. *@param Cmd - Command Number
  42. *@return Returns 0 if the command is Enabled
  43. * Returns -1 if the command is Disabled
  44. */
  45. int IsCommandEnabled(uint8_t NetFn, uint8_t* GroupExtnCode,uint8_t Cmd);
  46. #endif