MWCapture SDK Linux  3.3.1.LAST_SVN_COMMIT_NUM
MWCommon.h
1 // CONFIDENTIAL and PROPRIETARY software of Magewell Electronics Co., Ltd.
3 // Copyright (c) 2011-2014 Magewell Electronics Co., Ltd. (Nanjing)
4 // All rights reserved.
5 // This copyright notice MUST be reproduced on all authorized copies.
7 
8 #pragma once
9 
10 #pragma pack(push)
11 #pragma pack(1)
12 
13 // Firmware header
14 #define MW_SERIAL_NO_LEN 16
15 #define MW_FAMILY_NAME_LEN 64
16 #define MW_PRODUCT_NAME_LEN 64
17 
18 enum _MW_FAMILY_ID {
22 };
23 
24 typedef int32_t MW_FAMILY_ID;
25 
26 typedef struct _MW_DATE_TIME {
27  uint16_t wYear;
28  uint8_t byMonth;
29  uint8_t byDay;
30  uint8_t byHour;
31  uint8_t byMinute;
32  uint8_t bySecond;
33  uint8_t byReserved;
34 } MW_DATE_TIME;
35 
36 #define MW_FIRMWARE_HEADER_MAGIC 'HFWM'
37 #define MW_FIRMWARE_HEADER_VERSION 1
38 #define MW_FIRMWARE_NAME_LEN 64
39 #define MW_FIRMWARE_SECTION_NAME_LEN 16
40 
41 #define MW_MAX_NUM_FIRMWARE_SECTIONS 16
42 
43 // Compatible ID: wProductID, chHardwareVersion and byFirmwareID
44 typedef struct _MW_FIRMWARE_INFO_HEADER {
45  uint32_t dwMagic;
46  uint32_t dwCheckSum;
47  uint16_t wVersion;
48  uint16_t cbHeader;
49  uint16_t wProductID;
50  char chHardwareVersion;
51  uint8_t byFirmwareID;
52  uint32_t dwFirmwareVersion;
53  char szProductName[MW_PRODUCT_NAME_LEN];
54  char szFirmwareName[MW_FIRMWARE_NAME_LEN];
55  MW_DATE_TIME dtBuild;
56  uint8_t cSections;
58 
60  int8_t szName[MW_FIRMWARE_SECTION_NAME_LEN];
61  uint32_t cbOffset;
62  uint32_t cbSection;
63  uint32_t dwCheckSum;
65 
66 typedef struct _MW_FIRMWARE_HEADER {
67  MW_FIRMWARE_INFO_HEADER infoHeader;
68  MW_FIRMWARE_SECTION_HEADER aSectionHeaders[MW_MAX_NUM_FIRMWARE_SECTIONS];
70 
71 #pragma pack(pop)
Definition: MWCommon.h:26
Definition: MWCommon.h:44
Pro Capture family.
Definition: MWCommon.h:30
Eco Capture family.
Definition: MWCommon.h:31
#define MW_FIRMWARE_NAME_LEN
MW_FIRMWARE_NAME_LEN.
Definition: MWCommon.h:54
enum _MW_FAMILY_ID MW_FAMILY_ID
MW_FAMILY_ID.
Definition: MWCommon.h:66
Definition: MWCommon.h:59
USB Capture family.
Definition: MWCommon.h:32