ARM GAS /tmp/ccxcefs2.s page 1 1 .cpu cortex-m0 2 .eabi_attribute 20, 1 3 .eabi_attribute 21, 1 4 .eabi_attribute 23, 3 5 .eabi_attribute 24, 1 6 .eabi_attribute 25, 1 7 .eabi_attribute 26, 1 8 .eabi_attribute 30, 1 9 .eabi_attribute 34, 0 10 .eabi_attribute 18, 4 11 .file "usbd_midi_if.c" 12 .text 13 .Ltext0: 14 .cfi_sections .debug_frame 15 .section .text.MIDI_DataTx,"ax",%progbits 16 .align 1 17 .syntax unified 18 .code 16 19 .thumb_func 20 .fpu softvfp 22 MIDI_DataTx: 23 .LFB52: 24 .file 1 "Src/usbd_midi_if.c" 1:Src/usbd_midi_if.c **** /** 2:Src/usbd_midi_if.c **** ****************************************************************************** 3:Src/usbd_midi_if.c **** * @file : usbd_midi_if.c 4:Src/usbd_midi_if.c **** * @brief : 5:Src/usbd_midi_if.c **** ****************************************************************************** 6:Src/usbd_midi_if.c **** 7:Src/usbd_midi_if.c **** (CC at)2016 by D.F.Mac. @TripArts Music 8:Src/usbd_midi_if.c **** 9:Src/usbd_midi_if.c **** ****************************************************************************** 10:Src/usbd_midi_if.c **** 11:Src/usbd_midi_if.c **** Modified by keshikan (www.keshikan.net) 2018 12:Src/usbd_midi_if.c **** The license is (CC BY 4.0), and takes over from original usbd_midi_if.h/c. 13:Src/usbd_midi_if.c **** 14:Src/usbd_midi_if.c **** See also original source code page. 15:Src/usbd_midi_if.c **** https://github.com/mimuz/mimuz-tuch/blob/master/STM32/ 16:Src/usbd_midi_if.c **** 17:Src/usbd_midi_if.c **** ****************************************************************************** 18:Src/usbd_midi_if.c **** */ 19:Src/usbd_midi_if.c **** 20:Src/usbd_midi_if.c **** /* Includes ------------------------------------------------------------------*/ 21:Src/usbd_midi_if.c **** #include "usbd_midi_if.h" 22:Src/usbd_midi_if.c **** #include "stm32f0xx_hal.h" 23:Src/usbd_midi_if.c **** 24:Src/usbd_midi_if.c **** 25:Src/usbd_midi_if.c **** // basic midi rx/tx functions 26:Src/usbd_midi_if.c **** static uint16_t MIDI_DataRx(uint8_t *msg, uint16_t length); 27:Src/usbd_midi_if.c **** static uint16_t MIDI_DataTx(uint8_t *msg, uint16_t length); 28:Src/usbd_midi_if.c **** 29:Src/usbd_midi_if.c **** // for Cure Series 30:Src/usbd_midi_if.c **** #define MIDI_BUFFER_SIZ (512)//FIFO buffer byte size for midi message buffer 31:Src/usbd_midi_if.c **** 32:Src/usbd_midi_if.c **** RingBufferU8 rbuf_usb_rx[MIDI_OUT_JACK_NUM]; //for input from USB 33:Src/usbd_midi_if.c **** RingBufferU8 rbuf_jack_rx[MIDI_IN_JACK_NUM]; //for input from MIDI-IN jack 34:Src/usbd_midi_if.c **** ARM GAS /tmp/ccxcefs2.s page 2 35:Src/usbd_midi_if.c **** //for receiving midi data from jack 36:Src/usbd_midi_if.c **** MidiAnalysisStatus analyzed_status[MIDI_IN_JACK_NUM]; 37:Src/usbd_midi_if.c **** MIDIEvent midi_event[MIDI_IN_JACK_NUM]; //received midi data 38:Src/usbd_midi_if.c **** 39:Src/usbd_midi_if.c **** uint8_t rx_midi_msg[MIDI_IN_JACK_NUM]; 40:Src/usbd_midi_if.c **** 41:Src/usbd_midi_if.c **** 42:Src/usbd_midi_if.c **** FUNC_STATUS midiInit() 43:Src/usbd_midi_if.c **** { 44:Src/usbd_midi_if.c **** uint32_t i,j; 45:Src/usbd_midi_if.c **** 46:Src/usbd_midi_if.c **** for(i=0; i> 4; 167:Src/usbd_midi_if.c **** uint8_t code_idx_num = msg[0 + 4*cnt_msgs] & 0x0F; 168:Src/usbd_midi_if.c **** 169:Src/usbd_midi_if.c **** switch (code_idx_num) { 170:Src/usbd_midi_if.c **** 171:Src/usbd_midi_if.c **** //not defined 172:Src/usbd_midi_if.c **** case 0x0: 173:Src/usbd_midi_if.c **** case 0x1: 174:Src/usbd_midi_if.c **** midi_size = 0; 175:Src/usbd_midi_if.c **** break; 176:Src/usbd_midi_if.c **** 177:Src/usbd_midi_if.c **** //1byte message 178:Src/usbd_midi_if.c **** case 0x5: 179:Src/usbd_midi_if.c **** case 0xF: 180:Src/usbd_midi_if.c **** midi_size = 1; 181:Src/usbd_midi_if.c **** break; 182:Src/usbd_midi_if.c **** 183:Src/usbd_midi_if.c **** //2byte message 184:Src/usbd_midi_if.c **** case 0x2: 185:Src/usbd_midi_if.c **** case 0x6: 186:Src/usbd_midi_if.c **** case 0xC: 187:Src/usbd_midi_if.c **** case 0xD: 188:Src/usbd_midi_if.c **** midi_size = 2; 189:Src/usbd_midi_if.c **** break; 190:Src/usbd_midi_if.c **** 191:Src/usbd_midi_if.c **** //3byte message 192:Src/usbd_midi_if.c **** case 0x3: 193:Src/usbd_midi_if.c **** case 0x4: 194:Src/usbd_midi_if.c **** case 0x7: 195:Src/usbd_midi_if.c **** case 0x8: 196:Src/usbd_midi_if.c **** case 0x9: 197:Src/usbd_midi_if.c **** case 0xA: 198:Src/usbd_midi_if.c **** case 0xB: 199:Src/usbd_midi_if.c **** case 0xE: 200:Src/usbd_midi_if.c **** midi_size = 3; 201:Src/usbd_midi_if.c **** break; 202:Src/usbd_midi_if.c **** 203:Src/usbd_midi_if.c **** default: 204:Src/usbd_midi_if.c **** midi_size = 0; 205:Src/usbd_midi_if.c **** break; ARM GAS /tmp/ccxcefs2.s page 5 206:Src/usbd_midi_if.c **** } 207:Src/usbd_midi_if.c **** 208:Src/usbd_midi_if.c **** for(cnt = 0;cnt < midi_size;cnt ++){ 209:Src/usbd_midi_if.c **** u8b = *(msg + 4*cnt_msgs + cnt + 1); 210:Src/usbd_midi_if.c **** cureRingBufferU8Enqueue(&rbuf_usb_rx[cable_num], &u8b); 211:Src/usbd_midi_if.c **** } 212:Src/usbd_midi_if.c **** } 213:Src/usbd_midi_if.c **** 214:Src/usbd_midi_if.c **** return 0; 215:Src/usbd_midi_if.c **** } 216:Src/usbd_midi_if.c **** 217:Src/usbd_midi_if.c **** void sendMidiMessage(uint8_t *msg, uint16_t size){ 218:Src/usbd_midi_if.c **** if(size == 4){ 219:Src/usbd_midi_if.c **** // APP_Rx_Buffer[0] = msg[0]; 220:Src/usbd_midi_if.c **** // APP_Rx_Buffer[1] = msg[1]; 221:Src/usbd_midi_if.c **** // APP_Rx_Buffer[2] = msg[2]; 222:Src/usbd_midi_if.c **** // APP_Rx_Buffer[3] = msg[3]; 223:Src/usbd_midi_if.c **** // USBD_MIDI_SendData(&hUsbDeviceFS, APP_Rx_Buffer, size); 224:Src/usbd_midi_if.c **** MIDI_DataTx(msg, size); 225:Src/usbd_midi_if.c **** } 226:Src/usbd_midi_if.c **** } 227:Src/usbd_midi_if.c **** 228:Src/usbd_midi_if.c **** static uint16_t MIDI_DataTx(uint8_t *msg, uint16_t length){ 25 .loc 1 228 0 26 .cfi_startproc 27 @ args = 0, pretend = 0, frame = 0 28 @ frame_needed = 0, uses_anonymous_args = 0 29 .LVL0: 30 0000 70B5 push {r4, r5, r6, lr} 31 .LCFI0: 32 .cfi_def_cfa_offset 16 33 .cfi_offset 4, -16 34 .cfi_offset 5, -12 35 .cfi_offset 6, -8 36 .cfi_offset 14, -4 37 .LVL1: 229:Src/usbd_midi_if.c **** uint32_t i = 0; 38 .loc 1 229 0 39 0002 0022 movs r2, #0 40 .LVL2: 41 .L2: 230:Src/usbd_midi_if.c **** while (i < length) { 42 .loc 1 230 0 43 0004 9142 cmp r1, r2 44 0006 0FD9 bls .L5 231:Src/usbd_midi_if.c **** APP_Rx_Buffer[APP_Rx_ptr_in] = *(msg + i); 45 .loc 1 231 0 46 0008 084C ldr r4, .L6 47 000a 2368 ldr r3, [r4] 48 000c 865C ldrb r6, [r0, r2] 49 000e 084D ldr r5, .L6+4 50 0010 EE54 strb r6, [r5, r3] 232:Src/usbd_midi_if.c **** APP_Rx_ptr_in++; 51 .loc 1 232 0 52 0012 0133 adds r3, r3, #1 53 0014 2360 str r3, [r4] 233:Src/usbd_midi_if.c **** i++; ARM GAS /tmp/ccxcefs2.s page 6 54 .loc 1 233 0 55 0016 0132 adds r2, r2, #1 56 .LVL3: 234:Src/usbd_midi_if.c **** if (APP_Rx_ptr_in == APP_RX_DATA_SIZE) { 57 .loc 1 234 0 58 0018 8024 movs r4, #128 59 001a 6400 lsls r4, r4, #1 60 001c A342 cmp r3, r4 61 001e F1D1 bne .L2 235:Src/usbd_midi_if.c **** APP_Rx_ptr_in = 0; 62 .loc 1 235 0 63 0020 024B ldr r3, .L6 64 0022 0024 movs r4, #0 65 0024 1C60 str r4, [r3] 66 0026 EDE7 b .L2 67 .L5: 236:Src/usbd_midi_if.c **** } 237:Src/usbd_midi_if.c **** } 238:Src/usbd_midi_if.c **** return USBD_OK; 239:Src/usbd_midi_if.c **** } 68 .loc 1 239 0 69 0028 0020 movs r0, #0 70 .LVL4: 71 @ sp needed 72 002a 70BD pop {r4, r5, r6, pc} 73 .L7: 74 .align 2 75 .L6: 76 002c 00000000 .word APP_Rx_ptr_in 77 0030 00000000 .word APP_Rx_Buffer 78 .cfi_endproc 79 .LFE52: 81 .section .text.MIDI_DataRx,"ax",%progbits 82 .align 1 83 .syntax unified 84 .code 16 85 .thumb_func 86 .fpu softvfp 88 MIDI_DataRx: 89 .LFB50: 152:Src/usbd_midi_if.c **** uint16_t cnt; 90 .loc 1 152 0 91 .cfi_startproc 92 @ args = 0, pretend = 0, frame = 16 93 @ frame_needed = 0, uses_anonymous_args = 0 94 .LVL5: 95 0000 F0B5 push {r4, r5, r6, r7, lr} 96 .LCFI1: 97 .cfi_def_cfa_offset 20 98 .cfi_offset 4, -20 99 .cfi_offset 5, -16 100 .cfi_offset 6, -12 101 .cfi_offset 7, -8 102 .cfi_offset 14, -4 103 0002 DE46 mov lr, fp 104 0004 4746 mov r7, r8 105 0006 80B5 push {r7, lr} ARM GAS /tmp/ccxcefs2.s page 7 106 .LCFI2: 107 .cfi_def_cfa_offset 28 108 .cfi_offset 8, -28 109 .cfi_offset 11, -24 110 0008 85B0 sub sp, sp, #20 111 .LCFI3: 112 .cfi_def_cfa_offset 48 113 000a 0600 movs r6, r0 154:Src/usbd_midi_if.c **** uint16_t chk = length % 4; 114 .loc 1 154 0 115 000c 8B08 lsrs r3, r1, #2 116 000e 9B46 mov fp, r3 117 .LVL6: 155:Src/usbd_midi_if.c **** uint8_t u8b; 118 .loc 1 155 0 119 0010 0327 movs r7, #3 120 0012 0F40 ands r7, r1 121 0014 0197 str r7, [sp, #4] 122 .LVL7: 159:Src/usbd_midi_if.c **** { 123 .loc 1 159 0 124 0016 27D0 beq .L10 125 .LVL8: 126 .L9: 215:Src/usbd_midi_if.c **** 127 .loc 1 215 0 128 0018 0020 movs r0, #0 129 001a 05B0 add sp, sp, #20 130 @ sp needed 131 .LVL9: 132 .LVL10: 133 001c 0CBC pop {r2, r3} 134 001e 9046 mov r8, r2 135 0020 9B46 mov fp, r3 136 0022 F0BD pop {r4, r5, r6, r7, pc} 137 .LVL11: 138 .L11: 139 .LBB2: 140 .LBB3: 174:Src/usbd_midi_if.c **** break; 141 .loc 1 174 0 142 0024 0023 movs r3, #0 143 0026 0093 str r3, [sp] 144 .L15: 145 .LVL12: 208:Src/usbd_midi_if.c **** u8b = *(msg + 4*cnt_msgs + cnt + 1); 146 .loc 1 208 0 147 0028 019C ldr r4, [sp, #4] 148 002a 18E0 b .L16 149 .LVL13: 150 .L12: 188:Src/usbd_midi_if.c **** break; 151 .loc 1 188 0 152 002c 0223 movs r3, #2 153 002e 0093 str r3, [sp] 189:Src/usbd_midi_if.c **** 154 .loc 1 189 0 ARM GAS /tmp/ccxcefs2.s page 8 155 0030 FAE7 b .L15 156 .LVL14: 157 .L14: 200:Src/usbd_midi_if.c **** break; 158 .loc 1 200 0 159 0032 0323 movs r3, #3 160 0034 0093 str r3, [sp] 201:Src/usbd_midi_if.c **** 161 .loc 1 201 0 162 0036 F7E7 b .L15 163 .LVL15: 164 .L19: 180:Src/usbd_midi_if.c **** break; 165 .loc 1 180 0 166 0038 0123 movs r3, #1 167 003a 0093 str r3, [sp] 168 003c F4E7 b .L15 169 .LVL16: 170 .L17: 209:Src/usbd_midi_if.c **** cureRingBufferU8Enqueue(&rbuf_usb_rx[cable_num], &u8b); 171 .loc 1 209 0 discriminator 3 172 003e 4346 mov r3, r8 173 0040 E318 adds r3, r4, r3 174 0042 0133 adds r3, r3, #1 175 0044 F35C ldrb r3, [r6, r3] 176 0046 02AA add r2, sp, #8 177 0048 D11D adds r1, r2, #7 178 004a 0B70 strb r3, [r1] 210:Src/usbd_midi_if.c **** } 179 .loc 1 210 0 discriminator 3 180 004c 6B00 lsls r3, r5, #1 181 004e 5B19 adds r3, r3, r5 182 0050 9800 lsls r0, r3, #2 183 0052 0B4B ldr r3, .L20 184 0054 C018 adds r0, r0, r3 185 0056 FFF7FEFF bl cureRingBufferU8Enqueue 186 .LVL17: 208:Src/usbd_midi_if.c **** u8b = *(msg + 4*cnt_msgs + cnt + 1); 187 .loc 1 208 0 discriminator 3 188 005a 0134 adds r4, r4, #1 189 .LVL18: 190 005c A4B2 uxth r4, r4 191 .LVL19: 192 .L16: 208:Src/usbd_midi_if.c **** u8b = *(msg + 4*cnt_msgs + cnt + 1); 193 .loc 1 208 0 is_stmt 0 discriminator 1 194 005e 6B46 mov r3, sp 195 0060 1B88 ldrh r3, [r3] 196 0062 A342 cmp r3, r4 197 0064 EBD8 bhi .L17 198 .LBE3: 164:Src/usbd_midi_if.c **** 199 .loc 1 164 0 is_stmt 1 discriminator 2 200 0066 0137 adds r7, r7, #1 201 .LVL20: 202 .L10: 164:Src/usbd_midi_if.c **** ARM GAS /tmp/ccxcefs2.s page 9 203 .loc 1 164 0 is_stmt 0 discriminator 1 204 0068 BB45 cmp fp, r7 205 006a D5D9 bls .L9 206 .LBB4: 166:Src/usbd_midi_if.c **** uint8_t code_idx_num = msg[0 + 4*cnt_msgs] & 0x0F; 207 .loc 1 166 0 is_stmt 1 208 006c BB00 lsls r3, r7, #2 209 006e 9846 mov r8, r3 210 0070 F25C ldrb r2, [r6, r3] 211 0072 1509 lsrs r5, r2, #4 212 .LVL21: 167:Src/usbd_midi_if.c **** 213 .loc 1 167 0 214 0074 0F23 movs r3, #15 215 0076 1340 ands r3, r2 216 .LVL22: 169:Src/usbd_midi_if.c **** 217 .loc 1 169 0 218 0078 9B00 lsls r3, r3, #2 219 .LVL23: 220 007a 024A ldr r2, .L20+4 221 .LVL24: 222 007c D358 ldr r3, [r2, r3] 223 007e 9F46 mov pc, r3 224 .section .rodata.MIDI_DataRx,"a",%progbits 225 .align 2 226 .L13: 227 0000 24000000 .word .L11 228 0004 24000000 .word .L11 229 0008 2C000000 .word .L12 230 000c 32000000 .word .L14 231 0010 32000000 .word .L14 232 0014 38000000 .word .L19 233 0018 2C000000 .word .L12 234 001c 32000000 .word .L14 235 0020 32000000 .word .L14 236 0024 32000000 .word .L14 237 0028 32000000 .word .L14 238 002c 32000000 .word .L14 239 0030 2C000000 .word .L12 240 0034 2C000000 .word .L12 241 0038 32000000 .word .L14 242 003c 38000000 .word .L19 243 .section .text.MIDI_DataRx 244 .L21: 245 .align 2 246 .L20: 247 0080 00000000 .word rbuf_usb_rx 248 0084 00000000 .word .L13 249 .LBE4: 250 .LBE2: 251 .cfi_endproc 252 .LFE50: 254 .section .text.midiInit,"ax",%progbits 255 .align 1 256 .global midiInit 257 .syntax unified ARM GAS /tmp/ccxcefs2.s page 10 258 .code 16 259 .thumb_func 260 .fpu softvfp 262 midiInit: 263 .LFB43: 43:Src/usbd_midi_if.c **** uint32_t i,j; 264 .loc 1 43 0 265 .cfi_startproc 266 @ args = 0, pretend = 0, frame = 0 267 @ frame_needed = 0, uses_anonymous_args = 0 268 0000 10B5 push {r4, lr} 269 .LCFI4: 270 .cfi_def_cfa_offset 8 271 .cfi_offset 4, -8 272 .cfi_offset 14, -4 273 .LVL25: 46:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Init(&rbuf_usb_rx[i], MIDI_BUFFER_SIZ)) 274 .loc 1 46 0 275 0002 0024 movs r4, #0 276 .LVL26: 277 .L23: 46:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Init(&rbuf_usb_rx[i], MIDI_BUFFER_SIZ)) 278 .loc 1 46 0 is_stmt 0 discriminator 1 279 0004 002C cmp r4, #0 280 0006 01D0 beq .L25 72:Src/usbd_midi_if.c **** } 281 .loc 1 72 0 is_stmt 1 282 0008 0120 movs r0, #1 283 .L24: 73:Src/usbd_midi_if.c **** 284 .loc 1 73 0 285 @ sp needed 286 .LVL27: 287 000a 10BD pop {r4, pc} 288 .LVL28: 289 .L25: 47:Src/usbd_midi_if.c **** { 290 .loc 1 47 0 291 000c 8021 movs r1, #128 292 000e 6300 lsls r3, r4, #1 293 0010 1B19 adds r3, r3, r4 294 0012 9800 lsls r0, r3, #2 295 0014 054B ldr r3, .L27 296 0016 C018 adds r0, r0, r3 297 0018 8900 lsls r1, r1, #2 298 001a FFF7FEFF bl cureRingBufferU8Init 299 .LVL29: 300 001e 0128 cmp r0, #1 301 0020 01D1 bne .L26 46:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Init(&rbuf_usb_rx[i], MIDI_BUFFER_SIZ)) 302 .loc 1 46 0 discriminator 2 303 0022 0134 adds r4, r4, #1 304 .LVL30: 305 0024 EEE7 b .L23 306 .L26: 49:Src/usbd_midi_if.c **** } 307 .loc 1 49 0 ARM GAS /tmp/ccxcefs2.s page 11 308 0026 0020 movs r0, #0 309 0028 EFE7 b .L24 310 .L28: 311 002a C046 .align 2 312 .L27: 313 002c 00000000 .word rbuf_usb_rx 314 .cfi_endproc 315 .LFE43: 317 .section .text.midiGetFromUsbRx,"ax",%progbits 318 .align 1 319 .global midiGetFromUsbRx 320 .syntax unified 321 .code 16 322 .thumb_func 323 .fpu softvfp 325 midiGetFromUsbRx: 326 .LFB44: 76:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Dequeue(&rbuf_usb_rx[cable_num], dat)) 327 .loc 1 76 0 328 .cfi_startproc 329 @ args = 0, pretend = 0, frame = 0 330 @ frame_needed = 0, uses_anonymous_args = 0 331 .LVL31: 332 0000 10B5 push {r4, lr} 333 .LCFI5: 334 .cfi_def_cfa_offset 8 335 .cfi_offset 4, -8 336 .cfi_offset 14, -4 77:Src/usbd_midi_if.c **** { 337 .loc 1 77 0 338 0002 4300 lsls r3, r0, #1 339 0004 1818 adds r0, r3, r0 340 .LVL32: 341 0006 8300 lsls r3, r0, #2 342 0008 0448 ldr r0, .L32 343 000a 1818 adds r0, r3, r0 344 000c FFF7FEFF bl cureRingBufferU8Dequeue 345 .LVL33: 346 0010 0128 cmp r0, #1 347 0012 01D0 beq .L31 79:Src/usbd_midi_if.c **** } 348 .loc 1 79 0 349 0014 0020 movs r0, #0 350 .L30: 83:Src/usbd_midi_if.c **** 351 .loc 1 83 0 352 @ sp needed 353 0016 10BD pop {r4, pc} 354 .L31: 82:Src/usbd_midi_if.c **** } 355 .loc 1 82 0 356 0018 0120 movs r0, #1 357 001a FCE7 b .L30 358 .L33: 359 .align 2 360 .L32: 361 001c 00000000 .word rbuf_usb_rx ARM GAS /tmp/ccxcefs2.s page 12 362 .cfi_endproc 363 .LFE44: 365 .section .text.midiGetFromJackRx,"ax",%progbits 366 .align 1 367 .global midiGetFromJackRx 368 .syntax unified 369 .code 16 370 .thumb_func 371 .fpu softvfp 373 midiGetFromJackRx: 374 .LFB45: 86:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Dequeue(&rbuf_jack_rx[cable_num], &rx_midi_msg[cable_num])) 375 .loc 1 86 0 376 .cfi_startproc 377 @ args = 0, pretend = 0, frame = 0 378 @ frame_needed = 0, uses_anonymous_args = 0 379 .LVL34: 380 0000 10B5 push {r4, lr} 381 .LCFI6: 382 .cfi_def_cfa_offset 8 383 .cfi_offset 4, -8 384 .cfi_offset 14, -4 87:Src/usbd_midi_if.c **** { 385 .loc 1 87 0 386 0002 0749 ldr r1, .L37 387 0004 4118 adds r1, r0, r1 388 0006 4300 lsls r3, r0, #1 389 0008 1818 adds r0, r3, r0 390 .LVL35: 391 000a 8300 lsls r3, r0, #2 392 000c 0548 ldr r0, .L37+4 393 000e 1818 adds r0, r3, r0 394 0010 FFF7FEFF bl cureRingBufferU8Dequeue 395 .LVL36: 396 0014 0128 cmp r0, #1 397 0016 01D0 beq .L36 89:Src/usbd_midi_if.c **** } 398 .loc 1 89 0 399 0018 0020 movs r0, #0 400 .L35: 93:Src/usbd_midi_if.c **** 401 .loc 1 93 0 402 @ sp needed 403 001a 10BD pop {r4, pc} 404 .L36: 92:Src/usbd_midi_if.c **** } 405 .loc 1 92 0 406 001c 0120 movs r0, #1 407 001e FCE7 b .L35 408 .L38: 409 .align 2 410 .L37: 411 0020 00000000 .word rx_midi_msg 412 0024 00000000 .word rbuf_jack_rx 413 .cfi_endproc 414 .LFE45: 416 .section .text.midiSetFromJackRx,"ax",%progbits ARM GAS /tmp/ccxcefs2.s page 13 417 .align 1 418 .global midiSetFromJackRx 419 .syntax unified 420 .code 16 421 .thumb_func 422 .fpu softvfp 424 midiSetFromJackRx: 425 .LFB46: 96:Src/usbd_midi_if.c **** if(BUFFER_SUCCESS != cureRingBufferU8Enqueue(&rbuf_jack_rx[cable_num], dat)) 426 .loc 1 96 0 427 .cfi_startproc 428 @ args = 0, pretend = 0, frame = 0 429 @ frame_needed = 0, uses_anonymous_args = 0 430 .LVL37: 431 0000 10B5 push {r4, lr} 432 .LCFI7: 433 .cfi_def_cfa_offset 8 434 .cfi_offset 4, -8 435 .cfi_offset 14, -4 97:Src/usbd_midi_if.c **** { 436 .loc 1 97 0 437 0002 4300 lsls r3, r0, #1 438 0004 1818 adds r0, r3, r0 439 .LVL38: 440 0006 8300 lsls r3, r0, #2 441 0008 0448 ldr r0, .L42 442 000a 1818 adds r0, r3, r0 443 000c FFF7FEFF bl cureRingBufferU8Enqueue 444 .LVL39: 445 0010 0128 cmp r0, #1 446 0012 01D0 beq .L41 99:Src/usbd_midi_if.c **** } 447 .loc 1 99 0 448 0014 0020 movs r0, #0 449 .L40: 103:Src/usbd_midi_if.c **** 450 .loc 1 103 0 451 @ sp needed 452 0016 10BD pop {r4, pc} 453 .L41: 102:Src/usbd_midi_if.c **** } 454 .loc 1 102 0 455 0018 0120 movs r0, #1 456 001a FCE7 b .L40 457 .L43: 458 .align 2 459 .L42: 460 001c 00000000 .word rbuf_jack_rx 461 .cfi_endproc 462 .LFE46: 464 .section .text.isUsbRxBufEmpty,"ax",%progbits 465 .align 1 466 .global isUsbRxBufEmpty 467 .syntax unified 468 .code 16 469 .thumb_func 470 .fpu softvfp ARM GAS /tmp/ccxcefs2.s page 14 472 isUsbRxBufEmpty: 473 .LFB47: 107:Src/usbd_midi_if.c **** if( 0 != _cureRingBufferU8GetUsedSize(&rbuf_usb_rx[cable_num]) ){ 474 .loc 1 107 0 475 .cfi_startproc 476 @ args = 0, pretend = 0, frame = 0 477 @ frame_needed = 0, uses_anonymous_args = 0 478 .LVL40: 479 0000 10B5 push {r4, lr} 480 .LCFI8: 481 .cfi_def_cfa_offset 8 482 .cfi_offset 4, -8 483 .cfi_offset 14, -4 108:Src/usbd_midi_if.c **** return false; 484 .loc 1 108 0 485 0002 4300 lsls r3, r0, #1 486 0004 1818 adds r0, r3, r0 487 .LVL41: 488 0006 8300 lsls r3, r0, #2 489 0008 0448 ldr r0, .L48 490 000a 1818 adds r0, r3, r0 491 000c FFF7FEFF bl _cureRingBufferU8GetUsedSize 492 .LVL42: 493 0010 0028 cmp r0, #0 494 0012 01D1 bne .L47 112:Src/usbd_midi_if.c **** } 495 .loc 1 112 0 496 0014 0120 movs r0, #1 497 .L45: 113:Src/usbd_midi_if.c **** 498 .loc 1 113 0 499 @ sp needed 500 0016 10BD pop {r4, pc} 501 .L47: 109:Src/usbd_midi_if.c **** } 502 .loc 1 109 0 503 0018 0020 movs r0, #0 504 001a FCE7 b .L45 505 .L49: 506 .align 2 507 .L48: 508 001c 00000000 .word rbuf_usb_rx 509 .cfi_endproc 510 .LFE47: 512 .section .text.isJackRxBufEmpty,"ax",%progbits 513 .align 1 514 .global isJackRxBufEmpty 515 .syntax unified 516 .code 16 517 .thumb_func 518 .fpu softvfp 520 isJackRxBufEmpty: 521 .LFB48: 116:Src/usbd_midi_if.c **** if( 0 != _cureRingBufferU8GetUsedSize(&rbuf_jack_rx[cable_num]) ){ 522 .loc 1 116 0 523 .cfi_startproc 524 @ args = 0, pretend = 0, frame = 0 ARM GAS /tmp/ccxcefs2.s page 15 525 @ frame_needed = 0, uses_anonymous_args = 0 526 .LVL43: 527 0000 10B5 push {r4, lr} 528 .LCFI9: 529 .cfi_def_cfa_offset 8 530 .cfi_offset 4, -8 531 .cfi_offset 14, -4 117:Src/usbd_midi_if.c **** return false; 532 .loc 1 117 0 533 0002 4300 lsls r3, r0, #1 534 0004 1818 adds r0, r3, r0 535 .LVL44: 536 0006 8300 lsls r3, r0, #2 537 0008 0448 ldr r0, .L54 538 000a 1818 adds r0, r3, r0 539 000c FFF7FEFF bl _cureRingBufferU8GetUsedSize 540 .LVL45: 541 0010 0028 cmp r0, #0 542 0012 01D1 bne .L53 121:Src/usbd_midi_if.c **** } 543 .loc 1 121 0 544 0014 0120 movs r0, #1 545 .L51: 122:Src/usbd_midi_if.c **** 546 .loc 1 122 0 547 @ sp needed 548 0016 10BD pop {r4, pc} 549 .L53: 118:Src/usbd_midi_if.c **** } 550 .loc 1 118 0 551 0018 0020 movs r0, #0 552 001a FCE7 b .L51 553 .L55: 554 .align 2 555 .L54: 556 001c 00000000 .word rbuf_jack_rx 557 .cfi_endproc 558 .LFE48: 560 .section .text.isRxBufEmpty,"ax",%progbits 561 .align 1 562 .global isRxBufEmpty 563 .syntax unified 564 .code 16 565 .thumb_func 566 .fpu softvfp 568 isRxBufEmpty: 569 .LFB49: 125:Src/usbd_midi_if.c **** uint32_t i; 570 .loc 1 125 0 571 .cfi_startproc 572 @ args = 0, pretend = 0, frame = 0 573 @ frame_needed = 0, uses_anonymous_args = 0 574 0000 10B5 push {r4, lr} 575 .LCFI10: 576 .cfi_def_cfa_offset 8 577 .cfi_offset 4, -8 578 .cfi_offset 14, -4 ARM GAS /tmp/ccxcefs2.s page 16 579 .LVL46: 128:Src/usbd_midi_if.c **** if(0 != _cureRingBufferU8GetUsedSize(&rbuf_usb_rx[i])) 580 .loc 1 128 0 581 0002 0024 movs r4, #0 582 .LVL47: 583 .L57: 128:Src/usbd_midi_if.c **** if(0 != _cureRingBufferU8GetUsedSize(&rbuf_usb_rx[i])) 584 .loc 1 128 0 is_stmt 0 discriminator 1 585 0004 002C cmp r4, #0 586 0006 01D0 beq .L59 141:Src/usbd_midi_if.c **** } 587 .loc 1 141 0 is_stmt 1 588 0008 0120 movs r0, #1 589 .L58: 142:Src/usbd_midi_if.c **** 590 .loc 1 142 0 591 @ sp needed 592 .LVL48: 593 000a 10BD pop {r4, pc} 594 .LVL49: 595 .L59: 129:Src/usbd_midi_if.c **** { 596 .loc 1 129 0 597 000c 6300 lsls r3, r4, #1 598 000e 1B19 adds r3, r3, r4 599 0010 9800 lsls r0, r3, #2 600 0012 054B ldr r3, .L61 601 0014 C018 adds r0, r0, r3 602 0016 FFF7FEFF bl _cureRingBufferU8GetUsedSize 603 .LVL50: 604 001a 0028 cmp r0, #0 605 001c 01D1 bne .L60 128:Src/usbd_midi_if.c **** if(0 != _cureRingBufferU8GetUsedSize(&rbuf_usb_rx[i])) 606 .loc 1 128 0 discriminator 2 607 001e 0134 adds r4, r4, #1 608 .LVL51: 609 0020 F0E7 b .L57 610 .L60: 131:Src/usbd_midi_if.c **** } 611 .loc 1 131 0 612 0022 0020 movs r0, #0 613 0024 F1E7 b .L58 614 .L62: 615 0026 C046 .align 2 616 .L61: 617 0028 00000000 .word rbuf_usb_rx 618 .cfi_endproc 619 .LFE49: 621 .section .text.sendMidiMessage,"ax",%progbits 622 .align 1 623 .global sendMidiMessage 624 .syntax unified 625 .code 16 626 .thumb_func 627 .fpu softvfp 629 sendMidiMessage: 630 .LFB51: ARM GAS /tmp/ccxcefs2.s page 17 217:Src/usbd_midi_if.c **** if(size == 4){ 631 .loc 1 217 0 632 .cfi_startproc 633 @ args = 0, pretend = 0, frame = 0 634 @ frame_needed = 0, uses_anonymous_args = 0 635 .LVL52: 636 0000 10B5 push {r4, lr} 637 .LCFI11: 638 .cfi_def_cfa_offset 8 639 .cfi_offset 4, -8 640 .cfi_offset 14, -4 218:Src/usbd_midi_if.c **** // APP_Rx_Buffer[0] = msg[0]; 641 .loc 1 218 0 642 0002 0429 cmp r1, #4 643 0004 00D0 beq .L65 644 .LVL53: 645 .L63: 226:Src/usbd_midi_if.c **** 646 .loc 1 226 0 647 @ sp needed 648 0006 10BD pop {r4, pc} 649 .LVL54: 650 .L65: 224:Src/usbd_midi_if.c **** } 651 .loc 1 224 0 652 0008 FFF7FEFF bl MIDI_DataTx 653 .LVL55: 226:Src/usbd_midi_if.c **** 654 .loc 1 226 0 655 000c FBE7 b .L63 656 .cfi_endproc 657 .LFE51: 659 .section .text.midiEventIsGenerated,"ax",%progbits 660 .align 1 661 .global midiEventIsGenerated 662 .syntax unified 663 .code 16 664 .thumb_func 665 .fpu softvfp 667 midiEventIsGenerated: 668 .LFB53: 240:Src/usbd_midi_if.c **** 241:Src/usbd_midi_if.c **** bool midiEventIsGenerated(uint8_t cable_num) 242:Src/usbd_midi_if.c **** { 669 .loc 1 242 0 670 .cfi_startproc 671 @ args = 0, pretend = 0, frame = 0 672 @ frame_needed = 0, uses_anonymous_args = 0 673 .LVL56: 674 0000 F0B5 push {r4, r5, r6, r7, lr} 675 .LCFI12: 676 .cfi_def_cfa_offset 20 677 .cfi_offset 4, -20 678 .cfi_offset 5, -16 679 .cfi_offset 6, -12 680 .cfi_offset 7, -8 681 .cfi_offset 14, -4 ARM GAS /tmp/ccxcefs2.s page 18 243:Src/usbd_midi_if.c **** uint8_t upper_half_byte= (rx_midi_msg[cable_num]) & 0xF0; 682 .loc 1 243 0 683 0002 8F4B ldr r3, .L102 684 0004 1A5C ldrb r2, [r3, r0] 685 0006 0F23 movs r3, #15 686 0008 1100 movs r1, r2 687 000a 9943 bics r1, r3 688 000c 0B00 movs r3, r1 689 .LVL57: 244:Src/usbd_midi_if.c **** 245:Src/usbd_midi_if.c **** if( upper_half_byte & 0x80 ){//0x80-0xFF:status byte 690 .loc 1 245 0 691 000e 49B2 sxtb r1, r1 692 0010 0029 cmp r1, #0 693 0012 24DB blt .L93 246:Src/usbd_midi_if.c **** 247:Src/usbd_midi_if.c **** switch(upper_half_byte){ 248:Src/usbd_midi_if.c **** 249:Src/usbd_midi_if.c **** case 0xF0://0xF0-0xFF:system message 250:Src/usbd_midi_if.c **** switch(rx_midi_msg[cable_num]){ 251:Src/usbd_midi_if.c **** 252:Src/usbd_midi_if.c **** case 0xF0://SysEx Start 253:Src/usbd_midi_if.c **** analyzed_status[cable_num].data_idx = 0; 254:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[ analyzed_status[cable_num].data_idx++ ] = rx_midi_msg[cable_ 255:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_SYSEX; 256:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_SYSTEM_DATA; 257:Src/usbd_midi_if.c **** break; 258:Src/usbd_midi_if.c **** 259:Src/usbd_midi_if.c **** case 0xF7://SysEx End 260:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[ analyzed_status[cable_num].data_idx++ ] = rx_midi_msg[cable_ 261:Src/usbd_midi_if.c **** midi_event[cable_num].length = analyzed_status[cable_num].data_idx; 262:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 263:Src/usbd_midi_if.c **** break; 264:Src/usbd_midi_if.c **** 265:Src/usbd_midi_if.c **** case 0xF2://Song Position 266:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[0] = rx_midi_msg[cable_num]; 267:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_THREE_BYTE; 268:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 269:Src/usbd_midi_if.c **** break; 270:Src/usbd_midi_if.c **** 271:Src/usbd_midi_if.c **** case 0xF1://Time Code 272:Src/usbd_midi_if.c **** case 0xF3://Song Select 273:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[0] = rx_midi_msg[cable_num]; 274:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_TWO_BYTE; 275:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 276:Src/usbd_midi_if.c **** break; 277:Src/usbd_midi_if.c **** 278:Src/usbd_midi_if.c **** case 0xF4://Undefined 279:Src/usbd_midi_if.c **** case 0xF5://Undefined 280:Src/usbd_midi_if.c **** case 0xF6://Tune request 281:Src/usbd_midi_if.c **** case 0xF8://Timing clock 282:Src/usbd_midi_if.c **** case 0xF9://Undefined 283:Src/usbd_midi_if.c **** case 0xFA://Start 284:Src/usbd_midi_if.c **** case 0xFB://Continue 285:Src/usbd_midi_if.c **** case 0xFC://Stop 286:Src/usbd_midi_if.c **** case 0xFD://Undefined 287:Src/usbd_midi_if.c **** case 0xFE://Active Sensing ARM GAS /tmp/ccxcefs2.s page 19 288:Src/usbd_midi_if.c **** case 0xFF://Reset 289:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[0] = rx_midi_msg[cable_num]; 290:Src/usbd_midi_if.c **** midi_event[cable_num].length = 1; 291:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_ONE_BYTE; 292:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 293:Src/usbd_midi_if.c **** break; 294:Src/usbd_midi_if.c **** } 295:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = true; 296:Src/usbd_midi_if.c **** break; 297:Src/usbd_midi_if.c **** 298:Src/usbd_midi_if.c **** case 0x80://Note Off 299:Src/usbd_midi_if.c **** case 0x90://Note On 300:Src/usbd_midi_if.c **** case 0xA0://Polyphonic key-pressure 301:Src/usbd_midi_if.c **** case 0xB0://ControlChange 302:Src/usbd_midi_if.c **** case 0xE0://PitchBend 303:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[0] = rx_midi_msg[cable_num]; 304:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_THREE_BYTE; 305:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 306:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 307:Src/usbd_midi_if.c **** break; 308:Src/usbd_midi_if.c **** 309:Src/usbd_midi_if.c **** case 0xC0://Program Change 310:Src/usbd_midi_if.c **** case 0xD0://Channel pressure 311:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[0] = rx_midi_msg[cable_num]; 312:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_TWO_BYTE; 313:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 314:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 315:Src/usbd_midi_if.c **** break; 316:Src/usbd_midi_if.c **** 317:Src/usbd_midi_if.c **** default: 318:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_NOTHING; 319:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = START_ANALYSIS; 320:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 321:Src/usbd_midi_if.c **** break; 322:Src/usbd_midi_if.c **** } 323:Src/usbd_midi_if.c **** 324:Src/usbd_midi_if.c **** }else{//0x00-0x7F:data byte 325:Src/usbd_midi_if.c **** 326:Src/usbd_midi_if.c **** switch(analyzed_status[cable_num].stat){ 694 .loc 1 326 0 695 0014 8300 lsls r3, r0, #2 696 0016 8B49 ldr r1, .L102+4 697 .LVL58: 698 0018 5B5C ldrb r3, [r3, r1] 699 001a 022B cmp r3, #2 700 001c 00D1 bne .LCB626 701 001e DCE0 b .L82 @long jump 702 .LCB626: 703 0020 00D8 bhi .LCB628 704 0022 B7E0 b .L94 @long jump 705 .LCB628: 706 0024 032B cmp r3, #3 707 0026 00D1 bne .LCB630 708 0028 EEE0 b .L85 @long jump 709 .LCB630: 710 002a 042B cmp r3, #4 711 002c 60D1 bne .L81 ARM GAS /tmp/ccxcefs2.s page 20 327:Src/usbd_midi_if.c **** 328:Src/usbd_midi_if.c **** case WAIT_DATA1: 329:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[1] = rx_midi_msg[cable_num]; 330:Src/usbd_midi_if.c **** 331:Src/usbd_midi_if.c **** if(MSG_THREE_BYTE == analyzed_status[cable_num].type ){ 332:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA2; 333:Src/usbd_midi_if.c **** }else if( MSG_TWO_BYTE == analyzed_status[cable_num].type ){ 334:Src/usbd_midi_if.c **** midi_event[cable_num].length = 2; 335:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 336:Src/usbd_midi_if.c **** }else{ 337:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = START_ANALYSIS; 338:Src/usbd_midi_if.c **** } 339:Src/usbd_midi_if.c **** break; 340:Src/usbd_midi_if.c **** 341:Src/usbd_midi_if.c **** case WAIT_DATA2: 342:Src/usbd_midi_if.c **** if(MSG_THREE_BYTE == analyzed_status[cable_num].type ){ 343:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[2] = rx_midi_msg[cable_num]; 344:Src/usbd_midi_if.c **** midi_event[cable_num].length = 3; 345:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 346:Src/usbd_midi_if.c **** }else{ 347:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = START_ANALYSIS; 348:Src/usbd_midi_if.c **** } 349:Src/usbd_midi_if.c **** break; 350:Src/usbd_midi_if.c **** 351:Src/usbd_midi_if.c **** case WAIT_SYSTEM_DATA: 352:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[ analyzed_status[cable_num].data_idx++ ] = rx_midi_msg[cable_nu 353:Src/usbd_midi_if.c **** 354:Src/usbd_midi_if.c **** if(analyzed_status[cable_num].data_idx > (MIDI_SENDDATA_MAX - 1) ){ 355:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 356:Src/usbd_midi_if.c **** } 357:Src/usbd_midi_if.c **** break; 358:Src/usbd_midi_if.c **** 359:Src/usbd_midi_if.c **** case END_ANALYSIS://running status:When status byte is omitted. 360:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[1] = rx_midi_msg[cable_num]; 712 .loc 1 360 0 713 002e 8101 lsls r1, r0, #6 714 0030 0918 adds r1, r1, r0 715 0032 854B ldr r3, .L102+8 716 0034 5B18 adds r3, r3, r1 717 0036 9A70 strb r2, [r3, #2] 361:Src/usbd_midi_if.c **** if(MSG_THREE_BYTE == analyzed_status[cable_num].type){ 718 .loc 1 361 0 719 0038 8200 lsls r2, r0, #2 720 .LVL59: 721 003a 824B ldr r3, .L102+4 722 003c 9B18 adds r3, r3, r2 723 003e 5B78 ldrb r3, [r3, #1] 724 0040 042B cmp r3, #4 725 0042 00D1 bne .LCB644 726 0044 F5E0 b .L95 @long jump 727 .LCB644: 362:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA2; 363:Src/usbd_midi_if.c **** }else if(MSG_TWO_BYTE == analyzed_status[cable_num].type){ 728 .loc 1 363 0 729 0046 032B cmp r3, #3 730 0048 52D1 bne .L81 364:Src/usbd_midi_if.c **** midi_event[cable_num].length = 2; ARM GAS /tmp/ccxcefs2.s page 21 731 .loc 1 364 0 732 004a 8301 lsls r3, r0, #6 733 004c 1B18 adds r3, r3, r0 734 004e 7E4A ldr r2, .L102+8 735 0050 0221 movs r1, #2 736 0052 9954 strb r1, [r3, r2] 365:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 737 .loc 1 365 0 738 0054 8300 lsls r3, r0, #2 739 0056 7B4A ldr r2, .L102+4 740 0058 0231 adds r1, r1, #2 741 005a 9954 strb r1, [r3, r2] 742 005c 48E0 b .L81 743 .LVL60: 744 .L93: 247:Src/usbd_midi_if.c **** 745 .loc 1 247 0 746 005e B02B cmp r3, #176 747 0060 00D1 bne .LCB662 748 0062 88E0 b .L69 @long jump 749 .LCB662: 750 0064 10D9 bls .L96 751 0066 D02B cmp r3, #208 752 0068 21D0 beq .L71 753 006a 1ED9 bls .L97 754 006c E02B cmp r3, #224 755 006e 00D1 bne .LCB670 756 0070 81E0 b .L69 @long jump 757 .LCB670: 758 0072 F02B cmp r3, #240 759 0074 11D1 bne .L68 250:Src/usbd_midi_if.c **** 760 .loc 1 250 0 761 0076 1300 movs r3, r2 762 0078 1033 adds r3, r3, #16 763 007a D9B2 uxtb r1, r3 764 .LVL61: 765 007c 0F29 cmp r1, #15 766 007e 32D8 bhi .L74 767 0080 8B00 lsls r3, r1, #2 768 0082 7249 ldr r1, .L102+12 769 0084 CB58 ldr r3, [r1, r3] 770 0086 9F46 mov pc, r3 771 .section .rodata.midiEventIsGenerated,"a",%progbits 772 .align 2 773 .L76: 774 0000 CC000000 .word .L75 775 0004 3E010000 .word .L77 776 0008 24010000 .word .L78 777 000c 3E010000 .word .L77 778 0010 58010000 .word .L79 779 0014 58010000 .word .L79 780 0018 58010000 .word .L79 781 001c 00010000 .word .L80 782 0020 58010000 .word .L79 783 0024 58010000 .word .L79 784 0028 58010000 .word .L79 ARM GAS /tmp/ccxcefs2.s page 22 785 002c 58010000 .word .L79 786 0030 58010000 .word .L79 787 0034 58010000 .word .L79 788 0038 58010000 .word .L79 789 003c 58010000 .word .L79 790 .section .text.midiEventIsGenerated 791 .LVL62: 792 .L96: 247:Src/usbd_midi_if.c **** 793 .loc 1 247 0 794 0088 902B cmp r3, #144 795 008a 00D1 bne .LCB692 796 008c 73E0 b .L69 @long jump 797 .LCB692: 798 008e A02B cmp r3, #160 799 0090 00D1 bne .LCB694 800 0092 70E0 b .L69 @long jump 801 .LCB694: 802 0094 802B cmp r3, #128 803 0096 00D1 bne .LCB696 804 0098 6DE0 b .L69 @long jump 805 .LCB696: 806 .L68: 318:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = START_ANALYSIS; 807 .loc 1 318 0 808 009a 6A49 ldr r1, .L102+4 809 .LVL63: 810 009c 8400 lsls r4, r0, #2 811 009e 0A19 adds r2, r1, r4 812 00a0 0023 movs r3, #0 813 .LVL64: 814 00a2 5370 strb r3, [r2, #1] 319:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 815 .loc 1 319 0 816 00a4 6354 strb r3, [r4, r1] 320:Src/usbd_midi_if.c **** break; 817 .loc 1 320 0 818 00a6 9370 strb r3, [r2, #2] 321:Src/usbd_midi_if.c **** } 819 .loc 1 321 0 820 00a8 22E0 b .L81 821 .LVL65: 822 .L97: 247:Src/usbd_midi_if.c **** 823 .loc 1 247 0 824 00aa C02B cmp r3, #192 825 00ac F5D1 bne .L68 826 .L71: 311:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_TWO_BYTE; 827 .loc 1 311 0 828 00ae 8101 lsls r1, r0, #6 829 .LVL66: 830 00b0 0918 adds r1, r1, r0 831 00b2 654B ldr r3, .L102+8 832 .LVL67: 833 00b4 5B18 adds r3, r3, r1 834 00b6 5A70 strb r2, [r3, #1] ARM GAS /tmp/ccxcefs2.s page 23 312:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 835 .loc 1 312 0 836 00b8 624A ldr r2, .L102+4 837 .LVL68: 838 00ba 8100 lsls r1, r0, #2 839 00bc 5318 adds r3, r2, r1 840 00be 0324 movs r4, #3 841 00c0 5C70 strb r4, [r3, #1] 313:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 842 .loc 1 313 0 843 00c2 023C subs r4, r4, #2 844 00c4 8C54 strb r4, [r1, r2] 314:Src/usbd_midi_if.c **** break; 845 .loc 1 314 0 846 00c6 0022 movs r2, #0 847 00c8 9A70 strb r2, [r3, #2] 315:Src/usbd_midi_if.c **** 848 .loc 1 315 0 849 00ca 11E0 b .L81 850 .LVL69: 851 .L75: 254:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_SYSEX; 852 .loc 1 254 0 853 00cc 5D4C ldr r4, .L102+4 854 00ce 8500 lsls r5, r0, #2 855 00d0 6619 adds r6, r4, r5 856 00d2 0127 movs r7, #1 857 00d4 F770 strb r7, [r6, #3] 858 00d6 8101 lsls r1, r0, #6 859 00d8 0918 adds r1, r1, r0 860 00da 5B4B ldr r3, .L102+8 861 00dc 5B18 adds r3, r3, r1 862 00de 5A70 strb r2, [r3, #1] 255:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_SYSTEM_DATA; 863 .loc 1 255 0 864 00e0 7770 strb r7, [r6, #1] 256:Src/usbd_midi_if.c **** break; 865 .loc 1 256 0 866 00e2 0323 movs r3, #3 867 00e4 2B55 strb r3, [r5, r4] 868 .LVL70: 869 .L74: 295:Src/usbd_midi_if.c **** break; 870 .loc 1 295 0 871 00e6 8200 lsls r2, r0, #2 872 00e8 564B ldr r3, .L102+4 873 00ea 9B18 adds r3, r3, r2 874 00ec 0122 movs r2, #1 875 00ee 9A70 strb r2, [r3, #2] 876 .L81: 366:Src/usbd_midi_if.c **** } 367:Src/usbd_midi_if.c **** break; 368:Src/usbd_midi_if.c **** 369:Src/usbd_midi_if.c **** case START_ANALYSIS: 370:Src/usbd_midi_if.c **** break; 371:Src/usbd_midi_if.c **** 372:Src/usbd_midi_if.c **** default: ARM GAS /tmp/ccxcefs2.s page 24 373:Src/usbd_midi_if.c **** break; 374:Src/usbd_midi_if.c **** } 375:Src/usbd_midi_if.c **** } 376:Src/usbd_midi_if.c **** 377:Src/usbd_midi_if.c **** if(END_ANALYSIS == analyzed_status[cable_num].stat){ 877 .loc 1 377 0 878 00f0 8000 lsls r0, r0, #2 879 .LVL71: 880 00f2 544B ldr r3, .L102+4 881 00f4 C35C ldrb r3, [r0, r3] 882 00f6 042B cmp r3, #4 883 00f8 00D1 bne .LCB767 884 00fa 9FE0 b .L98 @long jump 885 .LCB767: 378:Src/usbd_midi_if.c **** return true; 379:Src/usbd_midi_if.c **** }else{ 380:Src/usbd_midi_if.c **** return false; 886 .loc 1 380 0 887 00fc 0020 movs r0, #0 888 .L91: 381:Src/usbd_midi_if.c **** } 382:Src/usbd_midi_if.c **** 383:Src/usbd_midi_if.c **** } 889 .loc 1 383 0 890 @ sp needed 891 00fe F0BD pop {r4, r5, r6, r7, pc} 892 .LVL72: 893 .L80: 260:Src/usbd_midi_if.c **** midi_event[cable_num].length = analyzed_status[cable_num].data_idx; 894 .loc 1 260 0 895 0100 504D ldr r5, .L102+4 896 0102 8600 lsls r6, r0, #2 897 0104 AB19 adds r3, r5, r6 898 0106 D978 ldrb r1, [r3, #3] 899 0108 8C46 mov ip, r1 900 010a 0131 adds r1, r1, #1 901 010c C9B2 uxtb r1, r1 902 010e D970 strb r1, [r3, #3] 903 0110 4D4F ldr r7, .L102+8 904 0112 8301 lsls r3, r0, #6 905 0114 1B18 adds r3, r3, r0 906 0116 FC18 adds r4, r7, r3 907 0118 6444 add r4, r4, ip 908 011a 6270 strb r2, [r4, #1] 261:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 909 .loc 1 261 0 910 011c D955 strb r1, [r3, r7] 262:Src/usbd_midi_if.c **** break; 911 .loc 1 262 0 912 011e 0423 movs r3, #4 913 0120 7355 strb r3, [r6, r5] 263:Src/usbd_midi_if.c **** 914 .loc 1 263 0 915 0122 E0E7 b .L74 916 .L78: 266:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_THREE_BYTE; 917 .loc 1 266 0 ARM GAS /tmp/ccxcefs2.s page 25 918 0124 8101 lsls r1, r0, #6 919 0126 0918 adds r1, r1, r0 920 0128 474B ldr r3, .L102+8 921 012a 5B18 adds r3, r3, r1 922 012c 5A70 strb r2, [r3, #1] 267:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 923 .loc 1 267 0 924 012e 454B ldr r3, .L102+4 925 0130 8200 lsls r2, r0, #2 926 .LVL73: 927 0132 9918 adds r1, r3, r2 928 0134 0424 movs r4, #4 929 0136 4C70 strb r4, [r1, #1] 268:Src/usbd_midi_if.c **** break; 930 .loc 1 268 0 931 0138 0121 movs r1, #1 932 013a D154 strb r1, [r2, r3] 269:Src/usbd_midi_if.c **** 933 .loc 1 269 0 934 013c D3E7 b .L74 935 .LVL74: 936 .L77: 273:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_TWO_BYTE; 937 .loc 1 273 0 938 013e 8101 lsls r1, r0, #6 939 0140 0918 adds r1, r1, r0 940 0142 414B ldr r3, .L102+8 941 0144 5B18 adds r3, r3, r1 942 0146 5A70 strb r2, [r3, #1] 274:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 943 .loc 1 274 0 944 0148 3E4B ldr r3, .L102+4 945 014a 8200 lsls r2, r0, #2 946 .LVL75: 947 014c 9918 adds r1, r3, r2 948 014e 0324 movs r4, #3 949 0150 4C70 strb r4, [r1, #1] 275:Src/usbd_midi_if.c **** break; 950 .loc 1 275 0 951 0152 0121 movs r1, #1 952 0154 D154 strb r1, [r2, r3] 276:Src/usbd_midi_if.c **** 953 .loc 1 276 0 954 0156 C6E7 b .L74 955 .LVL76: 956 .L79: 289:Src/usbd_midi_if.c **** midi_event[cable_num].length = 1; 957 .loc 1 289 0 958 0158 3B49 ldr r1, .L102+8 959 015a 8301 lsls r3, r0, #6 960 015c 1B18 adds r3, r3, r0 961 015e CC18 adds r4, r1, r3 962 0160 6270 strb r2, [r4, #1] 290:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_ONE_BYTE; 963 .loc 1 290 0 964 0162 0122 movs r2, #1 965 .LVL77: ARM GAS /tmp/ccxcefs2.s page 26 966 0164 5A54 strb r2, [r3, r1] 291:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 967 .loc 1 291 0 968 0166 374B ldr r3, .L102+4 969 0168 8200 lsls r2, r0, #2 970 016a 9918 adds r1, r3, r2 971 016c 0224 movs r4, #2 972 016e 4C70 strb r4, [r1, #1] 292:Src/usbd_midi_if.c **** break; 973 .loc 1 292 0 974 0170 0421 movs r1, #4 975 0172 D154 strb r1, [r2, r3] 293:Src/usbd_midi_if.c **** } 976 .loc 1 293 0 977 0174 B7E7 b .L74 978 .LVL78: 979 .L69: 303:Src/usbd_midi_if.c **** analyzed_status[cable_num].type = MSG_THREE_BYTE; 980 .loc 1 303 0 981 0176 8101 lsls r1, r0, #6 982 .LVL79: 983 0178 0918 adds r1, r1, r0 984 017a 334B ldr r3, .L102+8 985 .LVL80: 986 017c 5B18 adds r3, r3, r1 987 017e 5A70 strb r2, [r3, #1] 304:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA1; 988 .loc 1 304 0 989 0180 304A ldr r2, .L102+4 990 .LVL81: 991 0182 8100 lsls r1, r0, #2 992 0184 5318 adds r3, r2, r1 993 0186 0424 movs r4, #4 994 0188 5C70 strb r4, [r3, #1] 305:Src/usbd_midi_if.c **** analyzed_status[cable_num].is_system_common = false; 995 .loc 1 305 0 996 018a 033C subs r4, r4, #3 997 018c 8C54 strb r4, [r1, r2] 306:Src/usbd_midi_if.c **** break; 998 .loc 1 306 0 999 018e 0022 movs r2, #0 1000 0190 9A70 strb r2, [r3, #2] 307:Src/usbd_midi_if.c **** 1001 .loc 1 307 0 1002 0192 ADE7 b .L81 1003 .LVL82: 1004 .L94: 326:Src/usbd_midi_if.c **** 1005 .loc 1 326 0 1006 0194 012B cmp r3, #1 1007 0196 ABD1 bne .L81 329:Src/usbd_midi_if.c **** 1008 .loc 1 329 0 1009 0198 8101 lsls r1, r0, #6 1010 019a 0918 adds r1, r1, r0 1011 019c 2A4B ldr r3, .L102+8 1012 019e 5B18 adds r3, r3, r1 ARM GAS /tmp/ccxcefs2.s page 27 1013 01a0 9A70 strb r2, [r3, #2] 331:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = WAIT_DATA2; 1014 .loc 1 331 0 1015 01a2 8200 lsls r2, r0, #2 1016 .LVL83: 1017 01a4 274B ldr r3, .L102+4 1018 01a6 9B18 adds r3, r3, r2 1019 01a8 5B78 ldrb r3, [r3, #1] 1020 01aa 042B cmp r3, #4 1021 01ac 06D0 beq .L99 333:Src/usbd_midi_if.c **** midi_event[cable_num].length = 2; 1022 .loc 1 333 0 1023 01ae 032B cmp r3, #3 1024 01b0 09D0 beq .L100 337:Src/usbd_midi_if.c **** } 1025 .loc 1 337 0 1026 01b2 8300 lsls r3, r0, #2 1027 01b4 234A ldr r2, .L102+4 1028 01b6 0021 movs r1, #0 1029 01b8 9954 strb r1, [r3, r2] 1030 01ba 99E7 b .L81 1031 .L99: 332:Src/usbd_midi_if.c **** }else if( MSG_TWO_BYTE == analyzed_status[cable_num].type ){ 1032 .loc 1 332 0 1033 01bc 1300 movs r3, r2 1034 01be 214A ldr r2, .L102+4 1035 01c0 0221 movs r1, #2 1036 01c2 9954 strb r1, [r3, r2] 1037 01c4 94E7 b .L81 1038 .L100: 334:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 1039 .loc 1 334 0 1040 01c6 8301 lsls r3, r0, #6 1041 01c8 1B18 adds r3, r3, r0 1042 01ca 1F4A ldr r2, .L102+8 1043 01cc 0221 movs r1, #2 1044 01ce 9954 strb r1, [r3, r2] 335:Src/usbd_midi_if.c **** }else{ 1045 .loc 1 335 0 1046 01d0 8300 lsls r3, r0, #2 1047 01d2 1C4A ldr r2, .L102+4 1048 01d4 0231 adds r1, r1, #2 1049 01d6 9954 strb r1, [r3, r2] 1050 01d8 8AE7 b .L81 1051 .LVL84: 1052 .L82: 342:Src/usbd_midi_if.c **** midi_event[cable_num].midi_byte[2] = rx_midi_msg[cable_num]; 1053 .loc 1 342 0 1054 01da 8100 lsls r1, r0, #2 1055 01dc 194B ldr r3, .L102+4 1056 01de 5B18 adds r3, r3, r1 1057 01e0 5B78 ldrb r3, [r3, #1] 1058 01e2 042B cmp r3, #4 1059 01e4 04D0 beq .L101 347:Src/usbd_midi_if.c **** } 1060 .loc 1 347 0 1061 01e6 8300 lsls r3, r0, #2 ARM GAS /tmp/ccxcefs2.s page 28 1062 01e8 164A ldr r2, .L102+4 1063 .LVL85: 1064 01ea 0021 movs r1, #0 1065 01ec 9954 strb r1, [r3, r2] 1066 01ee 7FE7 b .L81 1067 .LVL86: 1068 .L101: 343:Src/usbd_midi_if.c **** midi_event[cable_num].length = 3; 1069 .loc 1 343 0 1070 01f0 1549 ldr r1, .L102+8 1071 01f2 8301 lsls r3, r0, #6 1072 01f4 1B18 adds r3, r3, r0 1073 01f6 CC18 adds r4, r1, r3 1074 01f8 E270 strb r2, [r4, #3] 344:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 1075 .loc 1 344 0 1076 01fa 0322 movs r2, #3 1077 .LVL87: 1078 01fc 5A54 strb r2, [r3, r1] 345:Src/usbd_midi_if.c **** }else{ 1079 .loc 1 345 0 1080 01fe 8300 lsls r3, r0, #2 1081 0200 104A ldr r2, .L102+4 1082 0202 0421 movs r1, #4 1083 0204 9954 strb r1, [r3, r2] 1084 0206 73E7 b .L81 1085 .LVL88: 1086 .L85: 352:Src/usbd_midi_if.c **** 1087 .loc 1 352 0 1088 0208 8300 lsls r3, r0, #2 1089 020a 0E4C ldr r4, .L102+4 1090 020c E418 adds r4, r4, r3 1091 020e E578 ldrb r5, [r4, #3] 1092 0210 691C adds r1, r5, #1 1093 0212 C9B2 uxtb r1, r1 1094 0214 E170 strb r1, [r4, #3] 1095 0216 8401 lsls r4, r0, #6 1096 0218 2418 adds r4, r4, r0 1097 021a 0B4B ldr r3, .L102+8 1098 021c 1B19 adds r3, r3, r4 1099 021e 5B19 adds r3, r3, r5 1100 0220 5A70 strb r2, [r3, #1] 354:Src/usbd_midi_if.c **** analyzed_status[cable_num].stat = END_ANALYSIS; 1101 .loc 1 354 0 1102 0222 3F29 cmp r1, #63 1103 0224 00D8 bhi .LCB977 1104 0226 63E7 b .L81 @long jump 1105 .LCB977: 355:Src/usbd_midi_if.c **** } 1106 .loc 1 355 0 1107 0228 8300 lsls r3, r0, #2 1108 022a 064A ldr r2, .L102+4 1109 .LVL89: 1110 022c 0421 movs r1, #4 1111 022e 9954 strb r1, [r3, r2] 1112 0230 5EE7 b .L81 ARM GAS /tmp/ccxcefs2.s page 29 1113 .L95: 362:Src/usbd_midi_if.c **** }else if(MSG_TWO_BYTE == analyzed_status[cable_num].type){ 1114 .loc 1 362 0 1115 0232 1300 movs r3, r2 1116 0234 034A ldr r2, .L102+4 1117 0236 0221 movs r1, #2 1118 0238 9954 strb r1, [r3, r2] 1119 023a 59E7 b .L81 1120 .LVL90: 1121 .L98: 378:Src/usbd_midi_if.c **** }else{ 1122 .loc 1 378 0 1123 023c 0120 movs r0, #1 1124 023e 5EE7 b .L91 1125 .L103: 1126 .align 2 1127 .L102: 1128 0240 00000000 .word rx_midi_msg 1129 0244 00000000 .word analyzed_status 1130 0248 00000000 .word midi_event 1131 024c 00000000 .word .L76 1132 .cfi_endproc 1133 .LFE53: 1135 .section .text.midiGenerateUsbPacket,"ax",%progbits 1136 .align 1 1137 .global midiGenerateUsbPacket 1138 .syntax unified 1139 .code 16 1140 .thumb_func 1141 .fpu softvfp 1143 midiGenerateUsbPacket: 1144 .LFB54: 384:Src/usbd_midi_if.c **** 385:Src/usbd_midi_if.c **** 386:Src/usbd_midi_if.c **** void midiGenerateUsbPacket(uint8_t cable_num) 387:Src/usbd_midi_if.c **** { 1145 .loc 1 387 0 1146 .cfi_startproc 1147 @ args = 0, pretend = 0, frame = 8 1148 @ frame_needed = 0, uses_anonymous_args = 0 1149 .LVL91: 1150 0000 F0B5 push {r4, r5, r6, r7, lr} 1151 .LCFI13: 1152 .cfi_def_cfa_offset 20 1153 .cfi_offset 4, -20 1154 .cfi_offset 5, -16 1155 .cfi_offset 6, -12 1156 .cfi_offset 7, -8 1157 .cfi_offset 14, -4 1158 0002 83B0 sub sp, sp, #12 1159 .LCFI14: 1160 .cfi_def_cfa_offset 32 1161 0004 0700 movs r7, r0 388:Src/usbd_midi_if.c **** uint8_t msg_buf[4] = {0x00,0x00,0x00,0x00}; 1162 .loc 1 388 0 1163 0006 0023 movs r3, #0 1164 0008 0193 str r3, [sp, #4] ARM GAS /tmp/ccxcefs2.s page 30 1165 .LVL92: 389:Src/usbd_midi_if.c **** uint32_t cnt_remain=0, cnt_length; 390:Src/usbd_midi_if.c **** 391:Src/usbd_midi_if.c **** switch(analyzed_status[cable_num].type){ 1166 .loc 1 391 0 1167 000a 0400 movs r4, r0 1168 000c 8200 lsls r2, r0, #2 1169 000e 504B ldr r3, .L126 1170 0010 9B18 adds r3, r3, r2 1171 0012 5B78 ldrb r3, [r3, #1] 1172 0014 022B cmp r3, #2 1173 0016 18D0 beq .L106 1174 0018 04D8 bhi .L107 1175 001a 012B cmp r3, #1 1176 001c 23D1 bne .L105 392:Src/usbd_midi_if.c **** 393:Src/usbd_midi_if.c **** case MSG_ONE_BYTE: 394:Src/usbd_midi_if.c **** //byte 0: cable number + code index number 395:Src/usbd_midi_if.c **** msg_buf[0] = (cable_num << 4) + ((midi_event[cable_num].midi_byte[0] & 0xF0) >> 4); 396:Src/usbd_midi_if.c **** 397:Src/usbd_midi_if.c **** sendMidiMessage(msg_buf,4); 398:Src/usbd_midi_if.c **** break; 399:Src/usbd_midi_if.c **** 400:Src/usbd_midi_if.c **** case MSG_TWO_BYTE: 401:Src/usbd_midi_if.c **** case MSG_THREE_BYTE: 402:Src/usbd_midi_if.c **** //byte 0: cable number + code index number 403:Src/usbd_midi_if.c **** if(analyzed_status[cable_num].is_system_common){ 404:Src/usbd_midi_if.c **** msg_buf[0] = (cable_num << 4) + midi_event[cable_num].length; 405:Src/usbd_midi_if.c **** }else{ 406:Src/usbd_midi_if.c **** msg_buf[0] = (cable_num << 4) + ((midi_event[cable_num].midi_byte[0] & 0xF0) >> 4); 407:Src/usbd_midi_if.c **** } 408:Src/usbd_midi_if.c **** 409:Src/usbd_midi_if.c **** //byte 1-3 410:Src/usbd_midi_if.c **** for(uint32_t i=0; i=3){ 458:Src/usbd_midi_if.c **** cnt_remain = 0; 459:Src/usbd_midi_if.c **** } 460:Src/usbd_midi_if.c **** } 461:Src/usbd_midi_if.c **** break; 462:Src/usbd_midi_if.c **** 463:Src/usbd_midi_if.c **** default: 464:Src/usbd_midi_if.c **** break; 465:Src/usbd_midi_if.c **** } 466:Src/usbd_midi_if.c **** USBD_MIDI_SendPacket(); 1226 .loc 1 466 0 1227 0066 FFF7FEFF bl USBD_MIDI_SendPacket 1228 .LVL95: 467:Src/usbd_midi_if.c **** } 1229 .loc 1 467 0 1230 006a 03B0 add sp, sp, #12 1231 @ sp needed 1232 006c F0BD pop {r4, r5, r6, r7, pc} 1233 .LVL96: 1234 .L110: 406:Src/usbd_midi_if.c **** } 1235 .loc 1 406 0 1236 006e 0301 lsls r3, r0, #4 1237 0070 DBB2 uxtb r3, r3 1238 0072 8201 lsls r2, r0, #6 1239 0074 1218 adds r2, r2, r0 1240 0076 374F ldr r7, .L126+4 1241 0078 BF18 adds r7, r7, r2 1242 007a 7A78 ldrb r2, [r7, #1] 1243 007c 1209 lsrs r2, r2, #4 1244 007e 9B18 adds r3, r3, r2 1245 0080 01AA add r2, sp, #4 1246 0082 1370 strb r3, [r2] 1247 0084 DFE7 b .L111 1248 .LVL97: ARM GAS /tmp/ccxcefs2.s page 33 1249 .L113: 1250 .LBB5: 411:Src/usbd_midi_if.c **** } 1251 .loc 1 411 0 discriminator 3 1252 0086 481C adds r0, r1, #1 1253 0088 A201 lsls r2, r4, #6 1254 008a 1219 adds r2, r2, r4 1255 008c 314B ldr r3, .L126+4 1256 008e 9B18 adds r3, r3, r2 1257 0090 5B18 adds r3, r3, r1 1258 0092 5A78 ldrb r2, [r3, #1] 1259 0094 01AB add r3, sp, #4 1260 0096 1A54 strb r2, [r3, r0] 1261 .LVL98: 410:Src/usbd_midi_if.c **** msg_buf[i+1] = midi_event[cable_num].midi_byte[i]; 1262 .loc 1 410 0 discriminator 3 1263 0098 0100 movs r1, r0 1264 .LVL99: 1265 .L112: 410:Src/usbd_midi_if.c **** msg_buf[i+1] = midi_event[cable_num].midi_byte[i]; 1266 .loc 1 410 0 is_stmt 0 discriminator 1 1267 009a A201 lsls r2, r4, #6 1268 009c 1219 adds r2, r2, r4 1269 009e 2D4B ldr r3, .L126+4 1270 00a0 D35C ldrb r3, [r2, r3] 1271 00a2 8B42 cmp r3, r1 1272 00a4 EFD8 bhi .L113 1273 .LBE5: 414:Src/usbd_midi_if.c **** break; 1274 .loc 1 414 0 is_stmt 1 1275 00a6 0421 movs r1, #4 1276 .LVL100: 1277 00a8 01A8 add r0, sp, #4 1278 00aa FFF7FEFF bl sendMidiMessage 1279 .LVL101: 415:Src/usbd_midi_if.c **** 1280 .loc 1 415 0 1281 00ae DAE7 b .L105 1282 .LVL102: 1283 .L125: 421:Src/usbd_midi_if.c **** msg_buf[0] = (cable_num << 4) + 0x4; //SysEx starts or continues 1284 .loc 1 421 0 1285 00b0 01A8 add r0, sp, #4 1286 00b2 C370 strb r3, [r0, #3] 422:Src/usbd_midi_if.c **** sendMidiMessage(msg_buf,4); 1287 .loc 1 422 0 1288 00b4 3B01 lsls r3, r7, #4 1289 00b6 DBB2 uxtb r3, r3 1290 00b8 0433 adds r3, r3, #4 1291 00ba 0370 strb r3, [r0] 423:Src/usbd_midi_if.c **** }else{ 1292 .loc 1 423 0 1293 00bc 0421 movs r1, #4 1294 00be FFF7FEFF bl sendMidiMessage 1295 .LVL103: 1296 00c2 3FE0 b .L116 1297 .L114: ARM GAS /tmp/ccxcefs2.s page 34 431:Src/usbd_midi_if.c **** case 0: 1298 .loc 1 431 0 1299 00c4 012D cmp r5, #1 1300 00c6 1CD0 beq .L117 1301 00c8 002D cmp r5, #0 1302 00ca 0CD0 beq .L118 1303 00cc 022D cmp r5, #2 1304 00ce 39D1 bne .L116 447:Src/usbd_midi_if.c **** msg_buf[3] = 0xF7; 1305 .loc 1 447 0 1306 00d0 3B01 lsls r3, r7, #4 1307 00d2 DBB2 uxtb r3, r3 1308 00d4 0733 adds r3, r3, #7 1309 00d6 01A8 add r0, sp, #4 1310 00d8 0370 strb r3, [r0] 448:Src/usbd_midi_if.c **** sendMidiMessage(msg_buf,4); 1311 .loc 1 448 0 1312 00da F723 movs r3, #247 1313 00dc C370 strb r3, [r0, #3] 449:Src/usbd_midi_if.c **** break; 1314 .loc 1 449 0 1315 00de 0421 movs r1, #4 1316 00e0 FFF7FEFF bl sendMidiMessage 1317 .LVL104: 450:Src/usbd_midi_if.c **** default: 1318 .loc 1 450 0 1319 00e4 2EE0 b .L116 1320 .L118: 433:Src/usbd_midi_if.c **** msg_buf[1] = 0xF7; 1321 .loc 1 433 0 1322 00e6 3B01 lsls r3, r7, #4 1323 00e8 DBB2 uxtb r3, r3 1324 00ea 0533 adds r3, r3, #5 1325 00ec 01A8 add r0, sp, #4 1326 00ee 0370 strb r3, [r0] 434:Src/usbd_midi_if.c **** msg_buf[2] = msg_buf[3] = 0x00; 1327 .loc 1 434 0 1328 00f0 F723 movs r3, #247 1329 00f2 4370 strb r3, [r0, #1] 435:Src/usbd_midi_if.c **** sendMidiMessage(msg_buf,4); 1330 .loc 1 435 0 1331 00f4 0023 movs r3, #0 1332 00f6 C370 strb r3, [r0, #3] 1333 00f8 8370 strb r3, [r0, #2] 436:Src/usbd_midi_if.c **** break; 1334 .loc 1 436 0 1335 00fa 0421 movs r1, #4 1336 00fc FFF7FEFF bl sendMidiMessage 1337 .LVL105: 437:Src/usbd_midi_if.c **** 1338 .loc 1 437 0 1339 0100 20E0 b .L116 1340 .L117: 440:Src/usbd_midi_if.c **** msg_buf[2] = 0xF7; 1341 .loc 1 440 0 1342 0102 3B01 lsls r3, r7, #4 1343 0104 DBB2 uxtb r3, r3 ARM GAS /tmp/ccxcefs2.s page 35 1344 0106 0633 adds r3, r3, #6 1345 0108 01A8 add r0, sp, #4 1346 010a 0370 strb r3, [r0] 441:Src/usbd_midi_if.c **** msg_buf[3] = 0x00; 1347 .loc 1 441 0 1348 010c F723 movs r3, #247 1349 010e 8370 strb r3, [r0, #2] 442:Src/usbd_midi_if.c **** sendMidiMessage(msg_buf,4); 1350 .loc 1 442 0 1351 0110 0023 movs r3, #0 1352 0112 C370 strb r3, [r0, #3] 443:Src/usbd_midi_if.c **** break; 1353 .loc 1 443 0 1354 0114 0421 movs r1, #4 1355 0116 FFF7FEFF bl sendMidiMessage 1356 .LVL106: 444:Src/usbd_midi_if.c **** 1357 .loc 1 444 0 1358 011a 13E0 b .L116 1359 .LVL107: 1360 .L120: 418:Src/usbd_midi_if.c **** if( 0xF7 !=midi_event[cable_num].midi_byte[cnt_length] ){ 1361 .loc 1 418 0 discriminator 2 1362 011c 0136 adds r6, r6, #1 1363 .LVL108: 1364 .L108: 418:Src/usbd_midi_if.c **** if( 0xF7 !=midi_event[cable_num].midi_byte[cnt_length] ){ 1365 .loc 1 418 0 is_stmt 0 discriminator 1 1366 011e A301 lsls r3, r4, #6 1367 0120 1B19 adds r3, r3, r4 1368 0122 0C4A ldr r2, .L126+4 1369 0124 9B5C ldrb r3, [r3, r2] 1370 0126 B342 cmp r3, r6 1371 0128 9DD9 bls .L105 419:Src/usbd_midi_if.c **** if(2 == cnt_remain){ 1372 .loc 1 419 0 is_stmt 1 1373 012a A201 lsls r2, r4, #6 1374 012c 1219 adds r2, r2, r4 1375 012e 094B ldr r3, .L126+4 1376 0130 9B18 adds r3, r3, r2 1377 0132 9B19 adds r3, r3, r6 1378 0134 5B78 ldrb r3, [r3, #1] 1379 0136 F72B cmp r3, #247 1380 0138 C4D0 beq .L114 420:Src/usbd_midi_if.c **** msg_buf[3] = midi_event[cable_num].midi_byte[cnt_length]; 1381 .loc 1 420 0 1382 013a 022D cmp r5, #2 1383 013c B8D0 beq .L125 425:Src/usbd_midi_if.c **** } 1384 .loc 1 425 0 1385 013e 6A1C adds r2, r5, #1 1386 0140 01A9 add r1, sp, #4 1387 0142 8B54 strb r3, [r1, r2] 1388 .L116: 456:Src/usbd_midi_if.c **** if(cnt_remain >=3){ 1389 .loc 1 456 0 1390 0144 0135 adds r5, r5, #1 ARM GAS /tmp/ccxcefs2.s page 36 1391 .LVL109: 457:Src/usbd_midi_if.c **** cnt_remain = 0; 1392 .loc 1 457 0 1393 0146 022D cmp r5, #2 1394 0148 E8D9 bls .L120 458:Src/usbd_midi_if.c **** } 1395 .loc 1 458 0 1396 014a 0025 movs r5, #0 1397 .LVL110: 1398 014c E6E7 b .L120 1399 .L127: 1400 014e C046 .align 2 1401 .L126: 1402 0150 00000000 .word analyzed_status 1403 0154 00000000 .word midi_event 1404 .cfi_endproc 1405 .LFE54: 1407 .section .text.midiProcess,"ax",%progbits 1408 .align 1 1409 .global midiProcess 1410 .syntax unified 1411 .code 16 1412 .thumb_func 1413 .fpu softvfp 1415 midiProcess: 1416 .LFB55: 468:Src/usbd_midi_if.c **** 469:Src/usbd_midi_if.c **** void midiProcess(){ 1417 .loc 1 469 0 1418 .cfi_startproc 1419 @ args = 0, pretend = 0, frame = 0 1420 @ frame_needed = 0, uses_anonymous_args = 0 1421 @ link register save eliminated. 1422 .LVL111: 470:Src/usbd_midi_if.c **** 471:Src/usbd_midi_if.c **** for(uint32_t cable_num=0; cable_num