# C Header with bits names for LPC1768

I'm starting with ARM and I program in C for LPC1768.

I included "LPC17xx.h". It gives registers names in C. But where are the names of bits?

For instance: I want to use UART. So first step: "In the PCONP register (Table46), set bits PCUART2".

Now I'm doing it this way: LPC_SC->PCONP |= (1 << 24);

But I want to do it this way: LPC_SC->PCONP |= (1 << PCUART2)

Now I have to look into lots of tables to see what are the numbers of bits. Is there any C header file that has all the definitions? Something like that: #define PCUART2 24 or similar.

(I know there are high level libraries with functions like "init_uart()" but I have to write it low)

• If you can't find a header, just write it out. Can't take that long, and you only need to do it once. – R Drast Apr 9 '15 at 15:36
• I know I can write it :) I'm looking for it to save work, writing it from zero won't save me any time. And it would take long to go through all the tables.. – zupazt3 Apr 9 '15 at 17:00