实验环境
The active low and open drain semantics
As a consumer should not have to care about the physical line level, all of the gpiod_set_value_xxx() or gpiod_set_array_value_xxx() functions operate with the logical value. With this they take the active low property into account. This means that they check whether the GPIO is configured to be active low, and if so, they manipulate the passed value before the physical line level is driven.
作为使用者(驱动),你不应关心物理电平。所有 gpiod_set_value_xxx() 函数操作的都是 逻辑值,并会自动考虑 active low 属性。这意味着:如果 GPIO 被配置为 active low,函数会在驱动物理电平前 自动反转你传入的值。