MetaWear C++ API  0.18.0
C++ implementation of the MetaWear protocol
neopixel.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "peripheral_common.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
17 typedef enum {
23 
27 typedef enum {
31 
40 METAWEAR_API void mbl_mw_neopixel_init_slow_strand(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t gpio_pin, uint8_t n_pixels,
50 METAWEAR_API void mbl_mw_neopixel_init_fast_strand(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t gpio_pin, uint8_t n_pixels,
57 METAWEAR_API void mbl_mw_neopixel_free_strand(const MblMwMetaWearBoard *board, uint8_t strand);
58 
65 METAWEAR_API void mbl_mw_neopixel_enable_hold(const MblMwMetaWearBoard *board, uint8_t strand);
72 METAWEAR_API void mbl_mw_neopixel_disable_hold(const MblMwMetaWearBoard *board, uint8_t strand);
80 METAWEAR_API void mbl_mw_neopixel_clear(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t start, uint8_t end);
90 METAWEAR_API void mbl_mw_neopixel_set_color(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t pixel, uint8_t red, uint8_t green, uint8_t blue);
91 
100 METAWEAR_API void mbl_mw_neopixel_rotate(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t count, uint16_t period_ms, MblMwNeoPixelRotDirection direction);
108 METAWEAR_API void mbl_mw_neopixel_rotate_indefinitely(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t period_ms, MblMwNeoPixelRotDirection direction);
114 METAWEAR_API void mbl_mw_neopixel_stop_rotation(const MblMwMetaWearBoard *board, uint8_t strand);
115 
116 #ifdef __cplusplus
117 }
118 #endif
METAWEAR_API void mbl_mw_neopixel_rotate(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t count, uint16_t period_ms, MblMwNeoPixelRotDirection direction)
Rotates the pixels on a strand.
METAWEAR_API void mbl_mw_neopixel_free_strand(const MblMwMetaWearBoard *board, uint8_t strand)
Frees NeoPixel resources on the MetaWeard board for a specific strand.
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
MblMwNeoPixelColorOrdering
Color ordering for the NeoPixel color values.
Definition: neopixel.h:17
METAWEAR_API void mbl_mw_neopixel_init_slow_strand(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t gpio_pin, uint8_t n_pixels, MblMwNeoPixelColorOrdering ordering)
Initializes memory on the MetaWear board for a NeoPixel strand with a slow operating speed (400 KHz) ...
Pixels move away from the board.
Definition: neopixel.h:29
Red, green, blue order.
Definition: neopixel.h:18
Red, blue, green order.
Definition: neopixel.h:19
METAWEAR_API void mbl_mw_neopixel_clear(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t start, uint8_t end)
Clears pixel states on a strand.
METAWEAR_API void mbl_mw_neopixel_enable_hold(const MblMwMetaWearBoard *board, uint8_t strand)
Enables strand holding which will not refresh with any LED changes until the hold is disabled...
METAWEAR_API void mbl_mw_neopixel_stop_rotation(const MblMwMetaWearBoard *board, uint8_t strand)
Stops the pixel rotation.
Green, blue, red order.
Definition: neopixel.h:21
Pixels move towards the board.
Definition: neopixel.h:28
METAWEAR_API void mbl_mw_neopixel_rotate_indefinitely(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t period_ms, MblMwNeoPixelRotDirection direction)
Rotates the pixels on a strand indefinitely.
METAWEAR_API void mbl_mw_neopixel_init_fast_strand(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t gpio_pin, uint8_t n_pixels, MblMwNeoPixelColorOrdering ordering)
Initializes memory on the MetaWear board for a NeoPixel strand with a fast operating speed (800 KHz) ...
METAWEAR_API void mbl_mw_neopixel_set_color(const MblMwMetaWearBoard *board, uint8_t strand, uint8_t pixel, uint8_t red, uint8_t green, uint8_t blue)
Sets pixel color.
METAWEAR_API void mbl_mw_neopixel_disable_hold(const MblMwMetaWearBoard *board, uint8_t strand)
Disables strand holding.
Green, red, blue order.
Definition: neopixel.h:20
#define METAWEAR_API
Indicates the function should be exported to the symbol table.
Definition: dllmarker.h:27
MblMwNeoPixelRotDirection
Enumeration of rotation directions.
Definition: neopixel.h:27