/* UART HEADER */
#define featureA        0xA0
#define featureB        0xB0
#define featureC        0x20
        -
        -
        -
        - // increment on feature, value of feature are random
        -
        -
#define featureZ     0x??
#define CHECK_CHAR(x) ((x==featureA)||(x==featureB)||(x==featureC) ------- (x==featureZ)? TRUE: FALSE)
Hi all, I got a set of UART header that to indicate what the commands for. So every time I am checking the header using the macro, but I realize that when the command is keep increasing and the macro length also keep increasing, it make the code very messy. I am looking for a mechanism to handle this checking when the feature is more and more.
 
     
    