libnvme(9)
π libnvme(9) β API Manual π
okay bestie, welcome to another episode of "the kernel said what now" β this one's from the libnvme(9) API manual, and it's all about one little enum. yes, just an enum. and honestly? it's giving β¨organizedβ¨. let's go.
π NAME π
enum nvme_voltage_measurement_vsi β the Voltage Measurement log page's Voltage Sensor Info (VSI). that's the whole vibe. no cap, it's literally just a bundle of constants for poking at voltage sensor fields. π
β¨ SYNOPSIS β¨
here's the shape of it, bestie β copy it exactly, don't freestyle:
enum nvme_voltage_measurement_vsi {
NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_SHIFT ,
NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_MASK ,
NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_SHIFT ,
NVME_VOLTAGE_MEASUREMENT_VSI_VSSL_MASK ,
NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_SHIFT ,
NVME_VOLTAGE_MEASUREMENT_VSI_VSSS_MASK
};
six members. that's it. that's the whole enum. she's small but she's doing her job π«Ά
πΈ Constants πΈ
okay so literally every member is a constant, and each one is either a shift or a mask. shift = move the bits over, mask = grab just those bits. classic bit-twiddling duo, they ate π₯
NVME_VOLTAGE_MEASUREMENT_VSI_VSSV_SHIFTβ the shift amount you use to get the Voltage Sensor Supply Value (VSSV), and heads up, it's in units of0.05 V. so don't go reading it like it's plain volts, bestie πNVME_VOLTAGE_MEASUREMENT_VSI_VSSV_MASKβ the mask to get VSSV, that's it, that's her whole personalityNVME_VOLTAGE_MEASUREMENT_VSI_VSSL_SHIFTβ the shift amount to get the Voltage Sensor Supply Label (VSSL) πNVME_VOLTAGE_MEASUREMENT_VSI_VSSL_MASKβ the mask to get VSSLNVME_VOLTAGE_MEASUREMENT_VSI_VSSS_SHIFTβ the shift amount to get the Voltage Sensor Sample Scale (VSSS) βNVME_VOLTAGE_MEASUREMENT_VSI_VSSS_MASKβ the mask to get VSSS
fr fr: shift first, then mask β that's the pattern across all three pairs. VSSV, VSSL, VSSS. say it with me. main character energy π
and that's the page, bestie π this was libnvme(9), part of the API Manual, dated October 2026 β mwah, go read some registers, ily, bye π§π
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms