| 30 | } |
| 31 | |
| 32 | void FanBusController::SetLEDs(std::vector<RGBColor> colors) |
| 33 | { |
| 34 | for(unsigned int led_idx = 0; led_idx < 4; led_idx++) |
| 35 | { |
| 36 | unsigned char red = RGBGetRValue(colors[led_idx]); |
| 37 | unsigned char grn = RGBGetGValue(colors[led_idx]); |
| 38 | unsigned char blu = RGBGetBValue(colors[led_idx]); |
| 39 | |
| 40 | bus->write_queue(dev, 0x10 + (led_idx * 3), red); |
| 41 | bus->write_queue(dev, 0x11 + (led_idx * 3), grn); |
| 42 | bus->write_queue(dev, 0x12 + (led_idx * 3), blu); |
| 43 | } |
| 44 | |
| 45 | bus->write_queue(dev, 0x0C, 0x01); |
| 46 | |
| 47 | bus->process_queue(); |
| 48 | } |
no test coverage detected