examples/pca9635/pca9635_main.c: The brightness struct name was changed
in the OS driver, thus this example needs to follow suit.
This commit is contained in:
parent
83324b68f9
commit
6fd57ba071
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
{
|
{
|
||||||
struct pca9635pw_setled_brightness_arg_s ledbright;
|
struct pca9635pw_brightness_s ledbright;
|
||||||
int led;
|
int led;
|
||||||
int bright;
|
int bright;
|
||||||
int fd;
|
int fd;
|
||||||
@ -91,10 +91,12 @@ int main(int argc, FAR char *argv[])
|
|||||||
ledbright.led = led;
|
ledbright.led = led;
|
||||||
ledbright.brightness = bright;
|
ledbright.brightness = bright;
|
||||||
|
|
||||||
ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS, (unsigned long)&ledbright);
|
ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS,
|
||||||
|
(unsigned long)&ledbright);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
_err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno);
|
_err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n",
|
||||||
|
errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user