Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gpio_sx1509b.h File Reference
#include <zephyr/device.h>
#include <zephyr/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.
 
int sx1509b_led_intensity_pin_set (const struct device *dev, gpio_pin_t pin, uint8_t intensity_val)
 Set LED intensity of selected pin.
 

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 functionality, 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.