Initial commit: Phase 1 skeleton
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// hal/led_stub.h
|
||||
#pragma once
|
||||
|
||||
class LedStub {
|
||||
public:
|
||||
virtual ~LedStub() {}
|
||||
|
||||
virtual void begin() = 0;
|
||||
virtual void set_led_state(uint8_t note, uint8_t channel, uint8_t velocity) = 0;
|
||||
virtual void clear_all() = 0;
|
||||
|
||||
// Helper function to map MIDI note to LED index
|
||||
virtual uint8_t note_to_index(uint8_t note) {
|
||||
// Default implementation - direct mapping
|
||||
// Can be overridden by specific implementations
|
||||
return note;
|
||||
}
|
||||
};
|
||||
|
||||
// LED state structure
|
||||
struct LedState {
|
||||
uint8_t note; // Launchpad note
|
||||
uint8_t channel; // LED channel (1-3)
|
||||
uint8_t velocity; // Color/brightness (0-127)
|
||||
uint32_t timestamp; // When state was set
|
||||
bool active; // Current on/off state
|
||||
};
|
||||
Reference in New Issue
Block a user