Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: ws2812B.cpp
- Revision:
- 3:e09aafc9cabe
- Parent:
- 2:2d4f2cc38f87
- Child:
- 4:874beb47b375
diff -r 2d4f2cc38f87 -r e09aafc9cabe ws2812B.cpp
--- a/ws2812B.cpp Sun Sep 25 10:01:11 2016 +0000
+++ b/ws2812B.cpp Mon Sep 26 02:05:50 2016 +0000
@@ -1,8 +1,9 @@
-//----------------------------------------------------
+//--------------------------------------------------------
// SPI を使って WS2812B を点灯するためのクラス
+// サポートするボード: Nucleo-F401RE, Nucleo-F446RE
//
-// 2016/09/25, Copyright (c) 2016 MIKAMI, Naoki
-//----------------------------------------------------
+// 2016/09/26, Copyright (c) 2016 MIKAMI, Naoki
+//--------------------------------------------------------
#include "ws2812B.hpp"
@@ -32,6 +33,11 @@
}
}
+ void WS2812B::Write(uint32_t x, int k)
+ {
+ for (int n=0; n<k; n++) Write(x);
+ }
+
void WS2812B::Clear(int k)
{
for (int n=0; n<k; n++) Write(0x000000);