Linux 内核设备驱动之GPIO驱动之GPIO GPIO描述符到GPIO号

    xiaoxiao2021-03-25  90

    /**  * Convert a GPIO descriptor to the integer namespace.  * This should disappear in the future but is needed since we still  * use GPIO numbers for error messages and sysfs nodes  */ int desc_to_gpio(const struct gpio_desc *desc) {  return desc->gdev->base + (desc - &desc->gdev->descs[0]); } EXPORT_SYMBOL_GPL(desc_to_gpio);        
    转载请注明原文地址: https://ju.6miu.com/read-18276.html

    最新回复(0)