You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2019/01/03 15:07:56 UTC

[mynewt-core] branch master updated: hw/drivers/lp5523: Fix write payload length

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new bbcb9f8  hw/drivers/lp5523: Fix write payload length
bbcb9f8 is described below

commit bbcb9f80bf1dea3c38565a2aedf073c443682be4
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Dec 21 09:46:07 2018 +0100

    hw/drivers/lp5523: Fix write payload length
---
 hw/drivers/led/lp5523/src/lp5523.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/drivers/led/lp5523/src/lp5523.c b/hw/drivers/led/lp5523/src/lp5523.c
index a9b7a17..847bb1a 100644
--- a/hw/drivers/led/lp5523/src/lp5523.c
+++ b/hw/drivers/led/lp5523/src/lp5523.c
@@ -152,7 +152,7 @@ lp5523_set_n_regs(struct led_itf *itf, enum lp5523_registers addr,
     memcpy(&payload[1], vals, len);
 
 #if MYNEWT_VAL(BUS_DRIVER_PRESENT)
-    rc = bus_node_simple_write(itf->li_dev, payload, sizeof(payload));
+    rc = bus_node_simple_write(itf->li_dev, payload, len + 1);
 #else
     struct hal_i2c_master_data data_struct = {
         .address = itf->li_addr,