Read 24bit ?

Hello,

How to read unsigned 24bit integer data ?
closed account (z05DSL3A)
24bit integer data? RGB?
isn't RGB but in they documents tell me that is UNSIGNED 24BIT INTEGER
i think they stored in 3 BYTE (8x3 = 24)
i can read 3 BYTE but how to convert that to UNSIGNED 24 Bit ? hmm
You can use bit shifting
closed account (z05DSL3A)
1
2
3
4
5
6
7
8
9
10
11
12
    
    // typedef unsigned char byte;
    unsigned int val=0;
    byte b1 = 0xf0;
    byte b2 = 0xf0;
    byte b3 = 0xf0;
    
    val = val | b1;
    val = val << 8;
    val = val | b2;
    val = val << 8;
    val = val | b3;
Last edited on
Hello Grey Wolf ,
I don't know what to say but THANKS YOU VERY MUCH!!!!!!!!!!!
it work :X:X:X
many thanks man ^ ^
Topic archived. No new replies allowed.