Hard coded test with all B450M Steel Legend LEDs (except addressable)

This commit is contained in:
Adam Honse
2020-08-26 16:42:01 -05:00
parent 45dc619076
commit 9f584b1f76
3 changed files with 82 additions and 26 deletions

View File

@@ -86,10 +86,11 @@ bool PolychromeController::IsAsrLed()
return(asr_led);
}
void PolychromeController::SetColorsAndSpeed(unsigned char red, unsigned char green, unsigned char blue, unsigned char speed)
void PolychromeController::SetColorsAndSpeed(unsigned char led, unsigned char red, unsigned char green, unsigned char blue, unsigned char speed)
{
unsigned char color_speed_pkt[4] = { red, green, blue, speed };
unsigned char select_all_pkt[1] = { 0x01 };
unsigned char select_zone_pkt[1] = { led };
unsigned char select_all_pkt[1] = { 0x00 };
if (asr_led)
{
@@ -130,6 +131,10 @@ void PolychromeController::SetColorsAndSpeed(unsigned char red, unsigned char gr
}
else
{
/*-----------------------------------------------------*\
| Select zone |
\*-----------------------------------------------------*/
bus->i2c_smbus_write_block_data(dev, POLYCHROME_REG_ZONE_SELECT, 1, select_zone_pkt);
/*-----------------------------------------------------*\
| Select all zones for now |
\*-----------------------------------------------------*/
@@ -172,4 +177,4 @@ void PolychromeController::SetMode(unsigned char mode)
{
bus->i2c_smbus_write_block_data(dev, POLYCHROME_REG_MODE, 1, &active_mode);
}
}
}