Commit graph

4 commits

Author SHA1 Message Date
Benjamin Cabé f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Alberto Escolar Piedras b40c052289 samples drivers led: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Mathieu Anquetin 3f2a6ce86b samples: led_lp50xx: fix color mapping and channel test
Some boards may have less LED child nodes in the DT than the maximum
number of LEDs supported by the chipset. For these boards, the channel
test must skip the missing LEDs when preparing the color buffer and not
exit in error due to missing info.

Also, some boards may have a color mapping that is different from RGB
and this mapping should be used when providing the buffer to
led_set_color().

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Mathieu Anquetin 26f4fab391 drivers: led: lp503x: extend driver to all lp50xx devices
Add support for LP5009, LP5012, LP5018 and LP5024 devices which only
differ by the number of LEDs they can control.

Also, update application sample to run on all these new supported
devices.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00