]> rtime.felk.cvut.cz Git - lincan.git/blob - embedded/arch/arm/mach-lpc17xx/defines/lpc17xx-um2reg.sh
Contributed support for LCP17xx devices and PiKRON's LMC1 board.
[lincan.git] / embedded / arch / arm / mach-lpc17xx / defines / lpc17xx-um2reg.sh
1 #!/bin/sh
2
3 #pdftotext -nopgbrk user.manual.lpc17xx.pdf lpc17xx-um.txt
4
5 # 10.1.1 USB Clock Control register (USBClkCtrl - 0x5000 CFF4)
6 # #define USBDevIntSt_o 0x0000  /* USB Device Interrupt Status (RO) */
7 # #define USBDevIntSt   (*(REG32*)(USB_REGS_BASE+USBDevIntSt_o))
8
9 cat lpc17xx-um.txt | \
10   sed -n -e 's/^[0-9.]* \+\([^(]*\) \+(\([^ ]*\) - 0x5000 C\([^)]*\)).*$/\3@#define \2_o\t0x0\3\t\/* \1 *\/\nx\3@#define \2\t(*(REG32*)(USB_REGS_BASE+\2_o))/p' | \
11   sort -u | sed -e 's/^.*@\(.*\)$/\1/'
12