2019-10-07 19:08:44 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Vestas Wind Systems A/S
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_
|
|
|
|
#define ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_
|
|
|
|
|
|
|
|
#include <device.h>
|
2020-01-27 06:13:00 +08:00
|
|
|
#include <drivers/gpio.h>
|
2019-10-07 19:08:44 +08:00
|
|
|
|
|
|
|
/* LMP90xxx supports GPIO D0..D6 */
|
|
|
|
#define LMP90XXX_GPIO_MAX 6
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_set_output(struct device *dev, u8_t pin);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_set_input(struct device *dev, u8_t pin);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_set_pin_value(struct device *dev, u8_t pin, bool value);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_get_pin_value(struct device *dev, u8_t pin, bool *value);
|
|
|
|
|
2020-01-27 06:13:00 +08:00
|
|
|
int lmp90xxx_gpio_port_get_raw(struct device *dev, gpio_port_value_t *value);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_port_set_masked_raw(struct device *dev,
|
|
|
|
gpio_port_pins_t mask,
|
|
|
|
gpio_port_value_t value);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_port_set_bits_raw(struct device *dev, gpio_port_pins_t pins);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_port_clear_bits_raw(struct device *dev,
|
|
|
|
gpio_port_pins_t pins);
|
|
|
|
|
|
|
|
int lmp90xxx_gpio_port_toggle_bits(struct device *dev, gpio_port_pins_t pins);
|
|
|
|
|
2019-10-07 19:08:44 +08:00
|
|
|
#endif /* ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_ */
|