@@ -28,35 +28,35 @@ static const int SFDP_BASIC_PARAMS_TBL_SIZE = 80; ///< Basic Parameter Table siz
2828
2929/* * SFDP Parameter Table addresses and sizes */
3030struct 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
3535};
3636
3737/* * SFDP Header */
3838struct 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
4747};
4848
4949/* * SFDP Parameter header */
5050struct sfdp_prm_hdr {
5151 uint8_t PID_LSB; // Parameter ID LSB
5252 uint8_t P_MINOR; // Parameter Minor Revision
5353 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
5555 uint32_t DWORD2; // Parameter ID MSB + Parameter Table Pointer
5656};
5757
5858/* * Parse SFDP Header
59- * @param Pointer to memory holding an SFDP header
59+ * @param sfdp_hdr_ptr Pointer to memory holding an SFDP header
6060 * @return Number of Parameter Headers on success, -1 on failure
6161 */
6262int sfdp_parse_sfdp_header (sfdp_hdr *sfdp_hdr_ptr);
0 commit comments