@@ -6,7 +6,7 @@ OrangeLED::OrangeLED(uint8_t deviceAddress) : I2CDevice(deviceAddress) {}
6
6
7
7
uint8_t OrangeLED::brightness () {
8
8
// Read bits 0 - 5 from orange_led register
9
- uint8_t data = readFromRegister<uint8_t >(WHITE_LED_REGISTER_INFO );
9
+ uint8_t data = readFromRegister<uint8_t >(ORANGE_LED_REGISTER_INFO );
10
10
return data & 63 ;
11
11
}
12
12
@@ -15,19 +15,19 @@ void OrangeLED::setBrightness(uint8_t brightness) {
15
15
return ; // Invalid brightness value
16
16
}
17
17
18
- uint8_t currentRegisterData = readFromRegister<uint8_t >(WHITE_LED_REGISTER_INFO );
18
+ uint8_t currentRegisterData = readFromRegister<uint8_t >(ORANGE_LED_REGISTER_INFO );
19
19
// Overwrite bits 0 - 5 with the new value
20
- writeToRegister<uint8_t >(WHITE_LED_REGISTER_INFO , (currentRegisterData & ~63 ) | brightness);
20
+ writeToRegister<uint8_t >(ORANGE_LED_REGISTER_INFO , (currentRegisterData & ~63 ) | brightness);
21
21
}
22
22
23
23
bool OrangeLED::errorStatusEnabled () {
24
24
// Read bit 7 from orange_led register
25
- uint8_t data = readFromRegister<uint8_t >(WHITE_LED_REGISTER_INFO );
25
+ uint8_t data = readFromRegister<uint8_t >(ORANGE_LED_REGISTER_INFO );
26
26
return data & (1 << 7 );
27
27
}
28
28
29
29
void OrangeLED::setErrorStatusEnabled (bool enabled) {
30
- uint8_t currentRegisterData = readFromRegister<uint8_t >(WHITE_LED_REGISTER_INFO );
30
+ uint8_t currentRegisterData = readFromRegister<uint8_t >(ORANGE_LED_REGISTER_INFO );
31
31
// Set bit 7 to 1 if enabled or 0 if disabled while keeping the other bits unchanged
32
- writeToRegister<uint8_t >(WHITE_LED_REGISTER_INFO , (currentRegisterData & ~(1 << 7 )) | (enabled << 7 ));
32
+ writeToRegister<uint8_t >(ORANGE_LED_REGISTER_INFO , (currentRegisterData & ~(1 << 7 )) | (enabled << 7 ));
33
33
}
0 commit comments