Lucky Resistors AS1130 Library
This is a library to access the functionality of the AS1130 chip.
|
One single bitmap in 12x11 layout for manual modification or storage. More...
#include <LRAS1130Picture12x11.h>
Public Member Functions | |
AS1130Picture12x11 () | |
Create a empty bitmap. | |
AS1130Picture12x11 (const uint8_t *data) | |
Create a bitmap using an existing bitmask. More... | |
void | setPixel (uint8_t x, uint8_t y, bool enabled) |
Set a pixel in this bitmap. More... | |
bool | getPixel (uint8_t x, uint8_t y) |
Get the state of a single pixel. More... | |
const uint8_t * | getData () const |
Access the raw bit data. More... | |
Static Public Member Functions | |
static uint8_t | getWidth () |
Get the width of this bitmap. More... | |
static uint8_t | getHeight () |
Get the height of this bitmap. More... | |
static uint8_t | getDataByteCount () |
Get the number of raw byte for this bitmap. More... | |
static uint8_t | getDataBit (uint8_t x, uint8_t y) |
Get the bitmask for a given coordinate. More... | |
static uint8_t | getDataIndex (uint8_t x, uint8_t y) |
Get the data index for a given coordinate. More... | |
static void | writeRegisters (uint8_t *registerData, const uint8_t *rawData, uint8_t pwmSetIndex) |
Write the registers for this bitmap data. More... | |
One single bitmap in 12x11 layout for manual modification or storage.
Definition at line 34 of file LRAS1130Picture12x11.h.
lr::AS1130Picture12x11::AS1130Picture12x11 | ( | const uint8_t * | data | ) |
Create a bitmap using an existing bitmask.
The bits from the data are copied to the local structure. All bits in this bitmask has to be in high to low order.
Bits: 01234567 89AB0123 456789AB ...
The last 4 bits are ignored.
data | A bitmask with 17 bytes. |
Definition at line 44 of file LRAS1130Picture12x11.cpp.
|
inline |
Access the raw bit data.
Definition at line 94 of file LRAS1130Picture12x11.h.
|
inlinestatic |
Get the bitmask for a given coordinate.
x | The X coordinate of the pixel. |
y | The Y coordinate of the pixel. |
Definition at line 102 of file LRAS1130Picture12x11.h.
|
inlinestatic |
Get the number of raw byte for this bitmap.
Definition at line 88 of file LRAS1130Picture12x11.h.
|
inlinestatic |
Get the data index for a given coordinate.
x | The X coordinate of the pixel. |
y | The Y coordinate of the pixel. |
Definition at line 115 of file LRAS1130Picture12x11.h.
|
inlinestatic |
Get the height of this bitmap.
Definition at line 82 of file LRAS1130Picture12x11.h.
bool lr::AS1130Picture12x11::getPixel | ( | uint8_t | x, |
uint8_t | y | ||
) |
Get the state of a single pixel.
x | The X coordinate of the pixel. |
y | The Y coordinate of the pixel. |
Definition at line 63 of file LRAS1130Picture12x11.cpp.
|
inlinestatic |
Get the width of this bitmap.
Definition at line 76 of file LRAS1130Picture12x11.h.
void lr::AS1130Picture12x11::setPixel | ( | uint8_t | x, |
uint8_t | y, | ||
bool | enabled | ||
) |
Set a pixel in this bitmap.
The coordinates are bounds checked.
x | The X coordinate of the pixel. |
y | The Y coordinate of the pixel. |
enabled | true to set the pixel and false to clear it. |
Definition at line 50 of file LRAS1130Picture12x11.cpp.
|
static |
Write the registers for this bitmap data.
registerData | A pointer to an array of 24 bytes for all frame registers. |
rawData | A pointer to the raw bit data. |
pwmSetIndex | The PWM index to write to the register data. |
Definition at line 74 of file LRAS1130Picture12x11.cpp.