网上找例子学习
https://github.com/Silencer2K/stm32f10x-ws2812b-lib
试用时报错如下
....Uitmap.c(39): error: #29: expected an expression
int hue =
UE(hsv->h);
....Uitmap.c: 0 warnings, 1 error
compiling ws2812b.c...
....Uws2812b.c(106): error: #18: expected a ")"
(HSV_t *hsv) = *src;
....Uws2812b.c(106): error: #29: expected an expression
(HSV_t *hsv) = *src;
....Uws2812b.c(115): error: #20: identifier "hsv" is undefined
HSV2RGB(hsv++, &rgb);
....Uws2812b.c(119): error: #20: identifier "hsv" is undefined
*src = hsv;
....Uws2812b.c(140): error: #29: expected an expression
DMAFilter(&DMASrc, &pwm, &DMACount,
IN(DMACount, end - pwm));
....Uws2812b.c(174): error: #29: expected an expression
DMAFilter(&DMASrc, &pwm, &DMACount,
IN(DMACount, end - pwm));
....Uws2812b.c: 0 warnings, 6 errors
"....OutputLAB2.axf" - 7 Error(s), 0 Warning(s).
请问是码有问题,还是keil要有特定设定?
感谢帮忙
....Uitmap.c(39): error: #29: expected an expression
int hue =
UE(hsv->h);
跳转过去
bitmap.c中
int hue = HUE(hsv->h);
而HUE(a)则于bitmap.h中
#define HUE(h) ({ typeof(h) h1 = h % 360; h1 < 0 ? 360 + h1 : h1; })
请问如何修订
感谢各位帮忙
一周热门 更多>