至于hal.initialize(),调试时通过反汇编窗口看到,
96 hal.initialize();
080125d2: ldr r0, [r7, #20]
080125d4: bl 0x8015b74 <_ZN8touchgfx3HAL10initializeEv>
_ZN8touchgfx3HAL10initializeEv:
08015b75: push {r4, lr}
08015b77: mov r4, r0
08015b79: bl 0x8012bdc <touchgfx::OSWrappers::initialize()> ;调用OSWrappers::initialize(),创建同步信号量
08015b7d: ldr r0, [r4, #4] ;r4=0x2000d43c,是hal实例的引用。执行后r0=0x2000d2f0,是dma实例
08015b7f: ldr r3, [r0, #0]
08015b81: ldr r3, [r3, #12]
08015b83: blx r3 ;调用dma.initialize(),初始化DMA2D
08015b85: ldr r0, [r4, #12]
08015b87: ldr r3, [r0, #0]
08015b89: ldr r3, [r3, #8]
08015b8b: blx r3 ;调用tc.init(),初始化触摸控制
08015b8d: ldr r3, [r4, #0]
08015b8f: mov r0, r4
08015b91: ldr r3, [r3, #96] ; 0x60
08015b93: ldmia.w sp!, {r4, lr}
08015b97: bx r3 ;调用hal.configureInterrupts(),配置中断 |