Hi everyone.
I want to know if it is possible to colorize the numbers in lstlisting package from latex. For example i want all numbers be in red, even 0x0F (hex) and 0b00001111 (bin):
void SetaPWM2(unsigned char porcento)
{
//100 * 256 = 25.600
unsigned int val = porcento * PR2;
val /= 25;
//garante que tem apenas 10 bits
val &= 0x03ff;
//os 8 primeiros bits são colocados no CCPR1L
CCPR2L = val >> 2;
//os últimos dois são colocados na posição 5 e 4 do CCP1CON
CCP2CON |= (val & 0b00001111) << 4;
}
If there is no way, is there any other package that can do it?
PS: I'm working with C language. Thanks