From d50038f9d06903b88d846bd4f2ddcc049816a50c Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Sun, 6 Jan 2019 22:54:44 +0100 Subject: [PATCH] drivers/apa102: do normal assignment instead of memcpy --- drivers/apa102/apa102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/apa102/apa102.c b/drivers/apa102/apa102.c index f9cbacaf6f..1d529e47aa 100644 --- a/drivers/apa102/apa102.c +++ b/drivers/apa102/apa102.c @@ -49,7 +49,7 @@ void apa102_init(apa102_t *dev, const apa102_params_t *params) { assert(dev && params); - memcpy(dev, params, sizeof(apa102_params_t)); + *dev = *params; gpio_init(dev->data_pin, GPIO_OUT); gpio_init(dev->clk_pin, GPIO_OUT);