|
static void | setupForPads () |
| Change the UART baud rate to the output speed safe for rapid pad updates.
|
|
static void | setColourForTwoColumns (size_t idx, const std::array< RGB, kDisplayHeight *2 > &colours) |
| Set the Colour for two columns of leds.
|
|
static void | setDebounce (uint8_t time_ms) |
| Set the PIC's debounce time in milliseconds. This prevents extra keypresses from happening when the switch is not fully closed.
|
|
static void | setGoldKnobIndicator (bool which, const std::array< uint8_t, kNumGoldKnobIndicatorLEDs > &indicator) |
| This sets the indicator for the gold knobs,.
|
|
static void | setLEDOff (size_t idx) |
|
static void | setLEDOn (size_t idx) |
|
static void | resendButtonStates () |
| Request that the PIC resend all button states.
|
|
static void | setMinInterruptInterval (uint8_t time_ms) |
|
static void | setFlashLength (uint8_t time_ms) |
|
static void | setUARTSpeed () |
|
static void | flashMainPad (size_t idx) |
|
static void | flashMainPadWithColourIdx (size_t idx, int32_t colour_idx) |
| Flash a pad using the PIC's built-in timer and colour system.
|
|
static void | update7SEG (const std::array< uint8_t, kNumericDisplayLength > &display) |
|
static void | enableOLED () |
|
static void | selectOLED () |
|
static void | deselectOLED () |
|
static void | setDCLow () |
|
static void | setDCHigh () |
|
static void | requestFirmwareVersion () |
|
static void | sendColour (const RGB &colour) |
|
static void | setRefreshTime (uint8_t time_ms) |
|
static void | setDimmerInterval (uint8_t interval) |
|
static void | sendScrollRow (size_t idx, RGB colour) |
| This is used to make smooth scrolling on the horizontal axis, by filling up an 8-pixel framebuffer on the PIC that it can then provide an animation to smear across the axis to give a sensation of motion See (scrolling between clip pages)
|
|
static void | setupHorizontalScroll (uint8_t bitflags) |
|
static void | doVerticalScroll (bool direction, const std::array< RGB, kDisplayWidth+kSideBarWidth > &colours) |
|
static void | doneSendingRows () |
|
static void | flush () |
| Flush the UART buffer if it's not already being done.
|
|
static void | waitForFlush () |
| Wait for the last flush() operation to complete (blocking)
|
|
static Response | read () |
| Read a single response from the PIC.
|
|
static Response | read (uint32_t timeout) |
| Fetch a response from the PIC (blocking)
|
|
static int32_t | read (uint32_t timeout, std::function< int32_t(Response)> handler) |
| Fetch a response from the PIC, using a callback handler.
|
|
|
enum class | Message : uint8_t {
NONE = 0
, SET_COLOUR_FOR_TWO_COLUMNS = 1
, SET_FLASH_COLOR = 10
, SET_DEBOUNCE_TIME = 18
,
SET_REFRESH_TIME = 19
, SET_GOLD_KNOB_0_INDICATORS = 20
, SET_GOLD_KNOB_1_INDICATORS = 21
, RESEND_BUTTON_STATES = 22
,
SET_FLASH_LENGTH = 23
, SET_PAD_FLASHING = 24
, SET_LED_OFF = 152
, SET_LED_ON = 188
,
UPDATE_SEVEN_SEGMENT_DISPLAY = 224
, SET_UART_SPEED = 225
, SET_SCROLL_ROW = 228
, SET_SCROLL_LEFT = 236
,
SET_SCROLL_RIGHT
, SET_SCROLL_RIGHT_FULL
, SET_SCROLL_LEFT_FULL
, DONE_SENDING_ROWS = 240
,
SET_SCROLL_UP = 241
, SET_SCROLL_DOWN = 242
, SET_DIMMER_INTERVAL = 243
, SET_MIN_INTERRUPT_INTERVAL = 244
,
REQUEST_FIRMWARE_VERSION = 245
, ENABLE_OLED = 247
, SELECT_OLED = 248
, DESELECT_OLED = 249
,
SET_DC_LOW = 250
, SET_DC_HIGH = 251
} |
|
|
template<typename... Bytes> |
static void | send (Message msg, Bytes... bytes) |
| Send a message and a variable number of following bytes.
|
|
template<typename T, size_t size> |
static void | send (Message msg, const std::array< T, size > &bytes) |
| Send a message followed by all the objects in the provided array.
|
|
static void | send (Message msg) |
| Send a single message.
|
|
static void | send (const RGB &colour) |
| Send a single colour.
|
|
static void | send (uint8_t msg) |
| Send a byte. This was originally bufferPICUart()
|
|
The static class for interacting with the PIC peripheral.