Line data Source code
1 : #include "NoteCCKPRangeFastLED.hpp" 2 : #include "NovationLaunchpadColorLUT.hpp" 3 : #include <AH/Arduino-Wrapper.h> // pgm_read_byte_near 4 : 5 : BEGIN_CS_NAMESPACE 6 : 7 0 : Color velocityToNovationColor(uint8_t value) { 8 0 : value &= 0x7F; 9 0 : uint8_t r = pgm_read_byte_near(&NovationLaunchpadColorLUT[value][2]); 10 0 : uint8_t g = pgm_read_byte_near(&NovationLaunchpadColorLUT[value][1]); 11 0 : uint8_t b = pgm_read_byte_near(&NovationLaunchpadColorLUT[value][0]); 12 0 : return Color {r, g, b}; 13 : } 14 : 15 : END_CS_NAMESPACE