Skip to content

Commit

Permalink
get_rgb12 use rgb8torgb12 calculation instead of repeating it
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzuger committed Jan 11, 2021
1 parent 3a2db56 commit 0469132
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tlc5947/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ static uint8_t get_byte(const char* s){


rgb12 get_rgb12(const char* s){
rgb12 c;
c.r = (uint16_t)(get_byte(&s[1]) * RGB12_MAGIC2);
c.g = (uint16_t)(get_byte(&s[3]) * RGB12_MAGIC2);
c.b = (uint16_t)(get_byte(&s[5]) * RGB12_MAGIC2);
return c;
return rgb8torgb12(get_rgb8(s));
}

rgb8 get_rgb8(const char* s){
Expand Down

0 comments on commit 0469132

Please sign in to comment.