本文共 2516 字,大约阅读时间需要 8 分钟。
gpio_get_value(unsigned int gpio)
gpio_set_value(unsigned int gpio, int value)
gpio_to_irq(unsigned int gpio)
int gpiod_count(struct device *dev, const char *con_id);
/* Acquire and dispose GPIOs */struct gpio_desc *__must_check gpiod_get(struct device *dev, const char *con_id, enum gpiod_flags flags);struct gpio_desc *__must_check gpiod_get_index(struct device *dev, const char *con_id, unsigned int idx, enum gpiod_flags flags);struct gpio_desc *__must_check gpiod_get_optional(struct device *dev, const char *con_id, enum gpiod_flags flags);struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev, const char *con_id, unsigned int index, enum gpiod_flags flags);struct gpio_descs *__must_check gpiod_get_array(struct device *dev, const char *con_id, enum gpiod_flags flags);struct gpio_descs *__must_check gpiod_get_array_optional(struct device *dev, const char *con_id, enum gpiod_flags flags);void gpiod_put(struct gpio_desc *desc);void gpiod_put_array(struct gpio_descs *descs);
void devm_gpiod_put(struct device *dev, struct gpio_desc *desc);void devm_gpiod_put_array(struct device *dev, struct gpio_descs *descs); int gpiod_get_direction(struct gpio_desc *desc);int gpiod_direction_input(struct gpio_desc *desc);int gpiod_direction_output(struct gpio_desc *desc, int value);int gpiod_direction_output_raw(struct gpio_desc *desc, int value); /* Value get/set from non-sleeping context */int gpiod_get_value(const struct gpio_desc *desc);void gpiod_set_value(struct gpio_desc *desc, int value);void gpiod_set_array_value(unsigned int array_size, struct gpio_desc **desc_array, int *value_array);int gpiod_get_raw_value(const struct gpio_desc *desc);void gpiod_set_raw_value(struct gpio_desc *desc, int value);void gpiod_set_raw_array_value(unsigned int array_size, struct gpio_desc **desc_array, int *value_array); /* Value get/set from sleeping context */int gpiod_get_value_cansleep(const struct gpio_desc *desc);void gpiod_set_value_cansleep(struct gpio_desc *desc, int value);void gpiod_set_array_value_cansleep(unsigned int array_size, struct gpio_desc **desc_array, int *value_array);int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc);void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value);void gpiod_set_raw_array_value_cansleep(unsigned int array_size, struct gpio_desc **desc_array, int *value_array);
转载地址:http://xgqti.baihongyu.com/