@@ -28,35 +28,35 @@ static const int SFDP_BASIC_PARAMS_TBL_SIZE = 80; ///< Basic Parameter Table siz
28
28
29
29
/* * SFDP Parameter Table addresses and sizes */
30
30
struct sfdp_hdr_info {
31
- uint32_t basic_table_addr;
32
- size_t basic_table_size;
33
- uint32_t sector_map_table_addr;
34
- size_t sector_map_table_size;
31
+ uint32_t basic_table_addr; // Basic Parameter Table address
32
+ size_t basic_table_size; // Basic Parameter Table size
33
+ uint32_t sector_map_table_addr; // Sector Map Parameter Table address
34
+ size_t sector_map_table_size; // Sector Map Parameter Table size
35
35
};
36
36
37
37
/* * SFDP Header */
38
38
struct sfdp_hdr {
39
- uint8_t SIG_B0;
40
- uint8_t SIG_B1;
41
- uint8_t SIG_B2;
42
- uint8_t SIG_B3;
43
- uint8_t R_MINOR;
44
- uint8_t R_MAJOR;
45
- uint8_t NPH;
46
- uint8_t ACP;
39
+ uint8_t SIG_B0; // SFDP Signature, Byte 0
40
+ uint8_t SIG_B1; // SFDP Signature, Byte 1
41
+ uint8_t SIG_B2; // SFDP Signature, Byte 2
42
+ uint8_t SIG_B3; // SFDP Signature, Byte 3
43
+ uint8_t R_MINOR; // SFDP Minor Revision
44
+ uint8_t R_MAJOR; // SFDP Major Revision
45
+ uint8_t NPH; // Number of parameter headers (0-based, 0 indicates 1 parameter header)
46
+ uint8_t ACP; // SFDP Access Protocol
47
47
};
48
48
49
49
/* * SFDP Parameter header */
50
50
struct sfdp_prm_hdr {
51
51
uint8_t PID_LSB; // Parameter ID LSB
52
52
uint8_t P_MINOR; // Parameter Minor Revision
53
53
uint8_t P_MAJOR; // Parameter Major Revision
54
- uint8_t P_LEN; // Parameter length in DWORDS(64bits)
54
+ uint8_t P_LEN; // Parameter length in DWORDS
55
55
uint32_t DWORD2; // Parameter ID MSB + Parameter Table Pointer
56
56
};
57
57
58
58
/* * Parse SFDP Header
59
- * @param Pointer to memory holding an SFDP header
59
+ * @param sfdp_hdr_ptr Pointer to memory holding an SFDP header
60
60
* @return Number of Parameter Headers on success, -1 on failure
61
61
*/
62
62
int sfdp_parse_sfdp_header (sfdp_hdr *sfdp_hdr_ptr);
0 commit comments