dev: Pile of updates and formatting fixes.

This commit is contained in:
A.M. Rowsell 2025-08-25 16:04:25 -04:00
commit 68ed9ce922
Signed by untrusted user who does not match committer: amr
GPG key ID: E0879EDBDB0CA7B1
9 changed files with 182 additions and 166 deletions

View file

@ -1,25 +1,29 @@
// © 2025 A.M. Rowsell <amr@frzn.dev>
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as
// defined by the Mozilla Public License, v. 2.0.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as
// defined by the Mozilla Public License, v. 2.0.
#ifndef NEOPIXEL_HPP
#define NEOPIXEL_HPP
#include <cstdint>
#include <xc.h>
class NeoPixel {
public:
NeoPixel(uint8_t stringLength) : length(stringLength) {};
uint8_t setNeoPixel(uint8_t index, uint8_t red, uint8_t green, uint8_t blue);
void allPixelsOff(void);
public:
NeoPixel(uint8_t stringLength) : length(stringLength) {
gpioPin = LATBbits.LATB9;
};
uint8_t setNeoPixel(uint8_t index, uint8_t red, uint8_t green, uint8_t blue);
void allPixelsOff(void);
private:
uint8_t sendPixelData(uint8_t count, uint8_t *data);
uint8_t PixelArray[64][3] = {{0}};
uint8_t length;
private:
uint8_t sendPixelData(uint8_t count, uint8_t *data);
uint8_t PixelArray[64][3] = {{0}};
uint8_t length;
volatile uint32_t gpioPin;
};
#endif // NEOPIXEL_HPP