Updated NeoPixelBus object API (markdown)

Michael Miller
2023-03-30 14:04:14 -07:00
parent a05685800c
commit 5776234c66

@@ -1,16 +1,24 @@
# Constructors
### NeoPixelBus\<FEATURE, METHOD\>(uint16_t countPixels, uint8_t pin)
# Construction and Template Arguments
The constructor will require the declaration of several template arguments that specialize the class to the sketch writer's needs. These class types are provided for the author and there is no need to implement them.
## NeoPixelBus\<T_COLOR_FEATURE, T_METHOD\>(...)
[_T_COLOR_FEATURE_](https://github.com/Makuna/NeoPixelBus/wiki/T_COLOR_FEATURE) - the specialization class for the color feature.
[_T_METHOD_](https://github.com/Makuna/NeoPixelBus/wiki/T_METHOD) - the specialization class for the method.
### NeoPixelBus\<T_COLOR_FEATURE, T_METHOD\>(uint16_t countPixels, uint8_t pin)
This will define the object with the given Feature and Method, and construct it to handle the countPixels on the given pin.
> * _countPixels_ - The number of pixels on the physical bus. This is limited primarily by memory to contain a buffer for them.
> * _pin_ - The output pin to use. Note that some platforms and Methods restrict the Pin and thus this constructor should not be used on them. On Esp8266 use the constructor that omits the pin.
### NeoPixelBus\<FEATURE, METHOD\>(uint16_t countPixels)
### NeoPixelBus\<T_COLOR_FEATURE, T_METHOD\>(uint16_t countPixels)
This will define the object with the given Feature and Method, and construct it to handle the countPixels using a hardware defined pin.
For Esp8266 this is the constructor to use.
For DotStar using SPI this is the constructor to use.
> * _countPixels_ - The number of pixels on the physical bus. This is limited primarily by memory to contain a buffer for them. Some Methods (ex. NeoEsp8266Dma800KbpsMethod) require more buffer than others and you should refer to their documentation.
### NeoPixelBus\<FEATURE, METHOD\>(uint16_t countPixels, uint8_t pinClock, uint8_t pinData)
### NeoPixelBus\<T_COLOR_FEATURE, T_METHOD\>(uint16_t countPixels, uint8_t pinClock, uint8_t pinData)
This will define the object with the given Feature and Method, and construct it to handle the countPixels on the given clock and data pins. This is used with DotStars only.
> * _countPixels_ - The number of pixels on the physical bus. This is limited primarily by memory to contain a buffer for them.
> * _pinClock_ - The clock output pin to use.