File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ define CODAL_PATCH
19
19
cat codal.patch | git -C $(CODAL_DIR ) apply -
20
20
endef
21
21
22
+ define CODAL_LIBRARIES_CODAL_NRF52_CLEAN
23
+ git -C $(CODAL_DIR ) /libraries/codal-nrf52 checkout inc
24
+ endef
25
+
26
+ define CODAL_LIBRARIES_CODAL_NRF52_PATCH
27
+ $(call CODAL_LIBRARIES_CODAL_NRF52_CLEAN)
28
+ cat neopixel_ws2812b_timing.patch | git -C $(CODAL_DIR ) /libraries/codal-nrf52 apply -
29
+ endef
30
+
22
31
.PHONY : all codal_cmake codal_build libmicropython clean
23
32
24
33
all : codal_build
@@ -33,7 +42,9 @@ codal_cmake:
33
42
# Build the codal app and make the final HEX file
34
43
codal_build : libmicropython
35
44
$(call CODAL_PATCH)
45
+ $(call CODAL_LIBRARIES_CODAL_NRF52_PATCH)
36
46
make -C $(BUILD )
47
+ $(call CODAL_LIBRARIES_CODAL_NRF52_CLEAN)
37
48
$(call CODAL_CLEAN)
38
49
arm-none-eabi-size $(CODAL_BUILD ) /MICROBIT
39
50
$(PYTHON ) addlayouttable.py $(SRC_HEX ) $(SRC_MAP ) -o $(DEST_HEX )
Original file line number Diff line number Diff line change
1
+ diff --git a/inc/WS2812B.h b/inc/WS2812B.h
2
+ index 3a6deb6..a24967b 100644
3
+ --- a/inc/WS2812B.h
4
+ +++ b/inc/WS2812B.h
5
+ @@ -32,9 +32,9 @@ DEALINGS IN THE SOFTWARE.
6
+
7
+ #define WS2812B_BUFFER_SIZE 256
8
+ #define WS2812B_PAD (0x8000)
9
+ - #define WS2812B_LOW (0x8000 | 6)
10
+ - #define WS2812B_HIGH (0x8000 | 10)
11
+ - #define WS2812B_PWM_FREQ 500000
12
+ + #define WS2812B_LOW (0x8000 | 5) // 320ns
13
+ + #define WS2812B_HIGH (0x8000 | 12) // 760ns
14
+ + #define WS2812B_PWM_FREQ 800000
15
+ #define WS2812B_ZERO_PADDING 50
16
+
17
+ /**
You can’t perform that action at this time.
0 commit comments