Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
gpio_sx1509b.h File Reference
#include <device.h>
#include <drivers/gpio.h>

Go to the source code of this file.

Functions

int sx1509b_led_intensity_pin_configure (const struct device *dev, gpio_pin_t pin)
 Configure a pin for LED intensity. More...
 
int sx1509b_led_intensity_pin_set (const struct device *dev, gpio_pin_t pin, uint8_t intensity_val)
 Set LED intensity of selected pin. More...
 

Function Documentation

◆ sx1509b_led_intensity_pin_configure()

int sx1509b_led_intensity_pin_configure ( const struct device dev,
gpio_pin_t  pin 
)

Configure a pin for LED intensity.

Configure a pin to be controlled by SX1509B LED driver using the LED intensity functionality. To get back normal GPIO funcionality, configure the pin using the standard GPIO API.

Parameters
devPointer to the device structure for the driver instance.
pinPin number.
Return values
0If successful.
-EWOULDBLOCKif function is called from an ISR.
-ERANGEif pin number is out of range.
-EIOif I2C fails.

◆ sx1509b_led_intensity_pin_set()

int sx1509b_led_intensity_pin_set ( const struct device dev,
gpio_pin_t  pin,
uint8_t  intensity_val 
)

Set LED intensity of selected pin.

Parameters
devPointer to the device structure for the driver instance.
pinPin number.
intensity_valIntensity value.
Return values
0If successful.
-EIOif I2C fails.