Content originally posted in LPCWare by tmune on Fri Aug 23 00:01:51 MST 2013
I found out the code doesn't use tables at all. The assembler code of chip_GPIO_WritePortBit() is:
[list]
IP_GPIO_WritePortBit:
000004a0: push {r7}
000004a2: sub sp, #20
000004a4: add r7, sp, #0
000004a6: str r0, [r7, #12]
000004a8: str r1, [r7, #8]
000004aa: strb r2, [r7, #7]
000004ac: strb r3, [r7, #6]
000004ae: ldrb r3, [r7, #7]
000004b0: ldrb r2, [r7, #6]
000004b2: ldr r1, [r7, #12]
000004b4: ldr r0, [r7, #8]
000004b6: mov.w r0, r0, lsl #5
000004ba: adds r3, r0, r3
000004bc: adds r3, r1, r3
000004be: strb r2, [r3, #0]
000004c0: add.w r7, r7, #20
000004c4: mov sp, r7
000004c6: pop {r7}
000004c8: bx lr
000004ca: nop
[/list]
I'm not familiar with ARM assembly, but I think it write one byte data to one of Byte pin register.
Takashi