|
|
|
|
|
|
|
ARC-FW.elf: file format elf32-littlearm
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
Idx Name Size VMA LMA File off Algn
|
|
|
|
0 .text 00002fe8 00000000 00000000 00010000 2**2
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
1 .relocate 000000cc 20000000 00002fe8 00020000 2**2
|
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
|
|
2 .bss 00000600 200000cc 000030b4 000200cc 2**2
|
|
|
|
ALLOC
|
|
|
|
3 .stack 00002004 200006cc 000036b4 000200cc 2**0
|
|
|
|
ALLOC
|
|
|
|
4 .ARM.attributes 00000028 00000000 00000000 000200cc 2**0
|
|
|
|
CONTENTS, READONLY
|
|
|
|
5 .comment 0000001e 00000000 00000000 000200f4 2**0
|
|
|
|
CONTENTS, READONLY
|
|
|
|
6 .debug_info 000297e9 00000000 00000000 00020112 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
7 .debug_abbrev 00003c17 00000000 00000000 000498fb 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
8 .debug_loc 0000f20d 00000000 00000000 0004d512 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
9 .debug_aranges 00000d30 00000000 00000000 0005c71f 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
10 .debug_ranges 00002ec0 00000000 00000000 0005d44f 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
11 .debug_macro 00009c1a 00000000 00000000 0006030f 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
12 .debug_line 00015ed9 00000000 00000000 00069f29 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
13 .debug_str 0008795f 00000000 00000000 0007fe02 2**0
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
14 .debug_frame 00002830 00000000 00000000 00107764 2**2
|
|
|
|
CONTENTS, READONLY, DEBUGGING, OCTETS
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
|
|
|
00000000 <exception_table>:
|
|
|
|
0: d0 26 00 20 55 01 00 00 51 01 00 00 51 01 00 00 .&. U...Q...Q...
|
|
|
|
...
|
|
|
|
2c: 51 01 00 00 00 00 00 00 00 00 00 00 51 01 00 00 Q...........Q...
|
|
|
|
3c: 51 01 00 00 51 01 00 00 51 01 00 00 51 01 00 00 Q...Q...Q...Q...
|
|
|
|
4c: 51 01 00 00 51 01 00 00 51 01 00 00 51 01 00 00 Q...Q...Q...Q...
|
|
|
|
5c: 19 11 00 00 51 01 00 00 51 01 00 00 51 01 00 00 ....Q...Q...Q...
|
|
|
|
6c: 51 01 00 00 51 01 00 00 00 00 00 00 00 00 00 00 Q...Q...........
|
|
|
|
7c: 51 01 00 00 51 01 00 00 51 01 00 00 51 01 00 00 Q...Q...Q...Q...
|
|
|
|
8c: 51 01 00 00 51 01 00 00 00 00 00 00 00 00 00 00 Q...Q...........
|
|
|
|
9c: 51 01 00 00 51 01 00 00 51 01 00 00 51 01 00 00 Q...Q...Q...Q...
|
|
|
|
ac: 51 01 00 00 00 00 00 00 Q.......
|
|
|
|
|
|
|
|
000000b4 <__do_global_dtors_aux>:
|
|
|
|
b4: b510 push {r4, lr}
|
|
|
|
b6: 4c06 ldr r4, [pc, #24] ; (d0 <__do_global_dtors_aux+0x1c>)
|
|
|
|
b8: 7823 ldrb r3, [r4, #0]
|
|
|
|
ba: 2b00 cmp r3, #0
|
|
|
|
bc: d107 bne.n ce <__do_global_dtors_aux+0x1a>
|
|
|
|
be: 4b05 ldr r3, [pc, #20] ; (d4 <__do_global_dtors_aux+0x20>)
|
|
|
|
c0: 2b00 cmp r3, #0
|
|
|
|
c2: d002 beq.n ca <__do_global_dtors_aux+0x16>
|
|
|
|
c4: 4804 ldr r0, [pc, #16] ; (d8 <__do_global_dtors_aux+0x24>)
|
|
|
|
c6: e000 b.n ca <__do_global_dtors_aux+0x16>
|
|
|
|
c8: bf00 nop
|
|
|
|
ca: 2301 movs r3, #1
|
|
|
|
cc: 7023 strb r3, [r4, #0]
|
|
|
|
ce: bd10 pop {r4, pc}
|
|
|
|
d0: 200000cc .word 0x200000cc
|
|
|
|
d4: 00000000 .word 0x00000000
|
|
|
|
d8: 00002fe8 .word 0x00002fe8
|
|
|
|
|
|
|
|
000000dc <frame_dummy>:
|
|
|
|
dc: 4b04 ldr r3, [pc, #16] ; (f0 <frame_dummy+0x14>)
|
|
|
|
de: b510 push {r4, lr}
|
|
|
|
e0: 2b00 cmp r3, #0
|
|
|
|
e2: d003 beq.n ec <frame_dummy+0x10>
|
|
|
|
e4: 4903 ldr r1, [pc, #12] ; (f4 <frame_dummy+0x18>)
|
|
|
|
e6: 4804 ldr r0, [pc, #16] ; (f8 <frame_dummy+0x1c>)
|
|
|
|
e8: e000 b.n ec <frame_dummy+0x10>
|
|
|
|
ea: bf00 nop
|
|
|
|
ec: bd10 pop {r4, pc}
|
|
|
|
ee: 46c0 nop ; (mov r8, r8)
|
|
|
|
f0: 00000000 .word 0x00000000
|
|
|
|
f4: 200000d0 .word 0x200000d0
|
|
|
|
f8: 00002fe8 .word 0x00002fe8
|
|
|
|
|
|
|
|
000000fc <_delay_init>:
|
|
|
|
fc: 4b02 ldr r3, [pc, #8] ; (108 <_delay_init+0xc>)
|
|
|
|
fe: 4a03 ldr r2, [pc, #12] ; (10c <_delay_init+0x10>)
|
|
|
|
100: 605a str r2, [r3, #4]
|
|
|
|
102: 2205 movs r2, #5
|
|
|
|
104: 601a str r2, [r3, #0]
|
|
|
|
106: 4770 bx lr
|
|
|
|
108: e000e010 .word 0xe000e010
|
|
|
|
10c: 00ffffff .word 0x00ffffff
|
|
|
|
|
|
|
|
00000110 <_delay_cycles>:
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* \brief Delay loop to delay n number of cycles
|
|
|
|
*/
|
|
|
|
void _delay_cycles(void *const hw, uint32_t cycles)
|
|
|
|
{
|
|
|
|
110: b570 push {r4, r5, r6, lr}
|
|
|
|
uint32_t buf = cycles;
|
|
|
|
|
|
|
|
while (n--) {
|
|
|
|
SysTick->LOAD = 0xFFFFFF;
|
|
|
|
SysTick->VAL = 0xFFFFFF;
|
|
|
|
while (!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk))
|
|
|
|
112: 2580 movs r5, #128 ; 0x80
|
|
|
|
uint8_t n = cycles >> 24;
|
|
|
|
114: 0e0b lsrs r3, r1, #24
|
|
|
|
116: 4a0c ldr r2, [pc, #48] ; (148 <_delay_cycles+0x38>)
|
|
|
|
SysTick->LOAD = 0xFFFFFF;
|
|
|
|
118: 4c0c ldr r4, [pc, #48] ; (14c <_delay_cycles+0x3c>)
|
|
|
|
uint8_t n = cycles >> 24;
|
|
|
|
11a: b2d8 uxtb r0, r3
|
|
|
|
while (!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk))
|
|
|
|
11c: 026d lsls r5, r5, #9
|
|
|
|
while (n--) {
|
|
|
|
11e: 3801 subs r0, #1
|
|
|
|
120: b2c0 uxtb r0, r0
|
|
|
|
122: 28ff cmp r0, #255 ; 0xff
|
|
|
|
124: d10a bne.n 13c <_delay_cycles+0x2c>
|
|
|
|
126: 0618 lsls r0, r3, #24
|
|
|
|
128: 1a1b subs r3, r3, r0
|
|
|
|
12a: 185b adds r3, r3, r1
|
|
|
|
;
|
|
|
|
buf -= 0xFFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
SysTick->LOAD = buf;
|
|
|
|
12c: 6053 str r3, [r2, #4]
|
|
|
|
SysTick->VAL = buf;
|
|
|
|
12e: 6093 str r3, [r2, #8]
|
|
|
|
while (!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk))
|
|
|
|
130: 2380 movs r3, #128 ; 0x80
|
|
|
|
132: 025b lsls r3, r3, #9
|
|
|
|
134: 6811 ldr r1, [r2, #0]
|
|
|
|
136: 4219 tst r1, r3
|
|
|
|
138: d0fc beq.n 134 <_delay_cycles+0x24>
|
|
|
|
;
|
|
|
|
}
|
|
|
|
13a: bd70 pop {r4, r5, r6, pc}
|
|
|
|
SysTick->LOAD = 0xFFFFFF;
|
|
|
|
13c: 6054 str r4, [r2, #4]
|
|
|
|
SysTick->VAL = 0xFFFFFF;
|
|
|
|
13e: 6094 str r4, [r2, #8]
|
|
|
|
while (!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk))
|
|
|
|
140: 6816 ldr r6, [r2, #0]
|
|
|
|
142: 422e tst r6, r5
|
|
|
|
144: d0fc beq.n 140 <_delay_cycles+0x30>
|
|
|
|
146: e7ea b.n 11e <_delay_cycles+0xe>
|
|
|
|
148: e000e010 .word 0xe000e010
|
|
|
|
14c: 00ffffff .word 0x00ffffff
|
|
|
|
|
|
|
|
00000150 <Dummy_Handler>:
|
|
|
|
/**
|
|
|
|
* \brief Default interrupt handler for unused IRQs.
|
|
|
|
*/
|
|
|
|
void Dummy_Handler(void)
|
|
|
|
{
|
|
|
|
while (1) {
|
|
|
|
150: e7fe b.n 150 <Dummy_Handler>
|
|
|
|
...
|
|
|
|
|
|
|
|
00000154 <Reset_Handler>:
|
|
|
|
if (pSrc != pDest) {
|
|
|
|
154: 4925 ldr r1, [pc, #148] ; (1ec <Reset_Handler+0x98>)
|
|
|
|
156: 4826 ldr r0, [pc, #152] ; (1f0 <Reset_Handler+0x9c>)
|
|
|
|
{
|
|
|
|
158: b570 push {r4, r5, r6, lr}
|
|
|
|
if (pSrc != pDest) {
|
|
|
|
15a: 4281 cmp r1, r0
|
|
|
|
15c: d00a beq.n 174 <Reset_Handler+0x20>
|
|
|
|
*pDest++ = *pSrc++;
|
|
|
|
15e: 4b25 ldr r3, [pc, #148] ; (1f4 <Reset_Handler+0xa0>)
|
|
|
|
160: 1ec4 subs r4, r0, #3
|
|
|
|
162: 2200 movs r2, #0
|
|
|
|
164: 42a3 cmp r3, r4
|
|
|
|
166: d303 bcc.n 170 <Reset_Handler+0x1c>
|
|
|
|
168: 3303 adds r3, #3
|
|
|
|
16a: 1a1a subs r2, r3, r0
|
|
|
|
16c: 0892 lsrs r2, r2, #2
|
|
|
|
16e: 0092 lsls r2, r2, #2
|
|
|
|
170: 4b21 ldr r3, [pc, #132] ; (1f8 <Reset_Handler+0xa4>)
|
|
|
|
172: 4798 blx r3
|
|
|
|
*pDest++ = 0;
|
|
|
|
174: 4821 ldr r0, [pc, #132] ; (1fc <Reset_Handler+0xa8>)
|
|
|
|
176: 4b22 ldr r3, [pc, #136] ; (200 <Reset_Handler+0xac>)
|
|
|
|
178: 1ec1 subs r1, r0, #3
|
|
|
|
17a: 2200 movs r2, #0
|
|
|
|
17c: 4299 cmp r1, r3
|
|
|
|
17e: d803 bhi.n 188 <Reset_Handler+0x34>
|
|
|
|
180: 3303 adds r3, #3
|
|
|
|
182: 1a1a subs r2, r3, r0
|
|
|
|
184: 0892 lsrs r2, r2, #2
|
|
|
|
186: 0092 lsls r2, r2, #2
|
|
|
|
188: 2100 movs r1, #0
|
|
|
|
18a: 4b1e ldr r3, [pc, #120] ; (204 <Reset_Handler+0xb0>)
|
|
|
|
18c: 4798 blx r3
|
|
|
|
SCB->VTOR = ((uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk);
|
|
|
|
18e: 22ff movs r2, #255 ; 0xff
|
|
|
|
190: 4b1d ldr r3, [pc, #116] ; (208 <Reset_Handler+0xb4>)
|
|
|
|
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
|
|
|
|
192: 2103 movs r1, #3
|
|
|
|
SCB->VTOR = ((uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk);
|
|
|
|
194: 4393 bics r3, r2
|
|
|
|
196: 4a1d ldr r2, [pc, #116] ; (20c <Reset_Handler+0xb8>)
|
|
|
|
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
|
|
|
|
198: 250c movs r5, #12
|
|
|
|
SCB->VTOR = ((uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk);
|
|
|
|
19a: 6093 str r3, [r2, #8]
|
|
|
|
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
|
|
|
|
19c: 2202 movs r2, #2
|
|
|
|
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
|
|
|
|
19e: 2408 movs r4, #8
|
|
|
|
DMAC->QOSCTRL.bit.DQOS = 2;
|
|
|
|
1a0: 2630 movs r6, #48 ; 0x30
|
|
|
|
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
|
|
|
|
1a2: 4b1b ldr r3, [pc, #108] ; (210 <Reset_Handler+0xbc>)
|
|
|
|
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
|
|
|
|
1a4: 481b ldr r0, [pc, #108] ; (214 <Reset_Handler+0xc0>)
|
|
|
|
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
|
|
|
|
1a6: 625a str r2, [r3, #36] ; 0x24
|
|
|
|
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
|
|
|
|
1a8: 78c3 ldrb r3, [r0, #3]
|
|
|
|
1aa: 438b bics r3, r1
|
|
|
|
1ac: 4313 orrs r3, r2
|
|
|
|
1ae: 70c3 strb r3, [r0, #3]
|
|
|
|
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
|
|
|
|
1b0: 78c3 ldrb r3, [r0, #3]
|
|
|
|
1b2: 43ab bics r3, r5
|
|
|
|
1b4: 4323 orrs r3, r4
|
|
|
|
1b6: 70c3 strb r3, [r0, #3]
|
|
|
|
DMAC->QOSCTRL.bit.DQOS = 2;
|
|
|
|
1b8: 4b17 ldr r3, [pc, #92] ; (218 <Reset_Handler+0xc4>)
|
|
|
|
1ba: 7b98 ldrb r0, [r3, #14]
|
|
|
|
1bc: 43b0 bics r0, r6
|
|
|
|
1be: 0006 movs r6, r0
|
|
|
|
1c0: 2020 movs r0, #32
|
|
|
|
1c2: 4330 orrs r0, r6
|
|
|
|
1c4: 7398 strb r0, [r3, #14]
|
|
|
|
DMAC->QOSCTRL.bit.FQOS = 2;
|
|
|
|
1c6: 7b98 ldrb r0, [r3, #14]
|
|
|
|
1c8: 43a8 bics r0, r5
|
|
|
|
1ca: 4304 orrs r4, r0
|
|
|
|
1cc: 739c strb r4, [r3, #14]
|
|
|
|
DMAC->QOSCTRL.bit.WRBQOS = 2;
|
|
|
|
1ce: 7b98 ldrb r0, [r3, #14]
|
|
|
|
1d0: 4388 bics r0, r1
|
|
|
|
1d2: 4302 orrs r2, r0
|
|
|
|
1d4: 739a strb r2, [r3, #14]
|
|
|
|
NVMCTRL->CTRLB.bit.MANW = 1;
|
|
|
|
1d6: 2380 movs r3, #128 ; 0x80
|
|
|
|
1d8: 4a10 ldr r2, [pc, #64] ; (21c <Reset_Handler+0xc8>)
|
|
|
|
1da: 6851 ldr r1, [r2, #4]
|
|
|
|
1dc: 430b orrs r3, r1
|
|
|
|
1de: 6053 str r3, [r2, #4]
|
|
|
|
__libc_init_array();
|
|
|
|
1e0: 4b0f ldr r3, [pc, #60] ; (220 <Reset_Handler+0xcc>)
|
|
|
|
1e2: 4798 blx r3
|
|
|
|
main();
|
|
|
|
1e4: 4b0f ldr r3, [pc, #60] ; (224 <Reset_Handler+0xd0>)
|
|
|
|
1e6: 4798 blx r3
|
|
|
|
while (1)
|
|
|
|
1e8: e7fe b.n 1e8 <Reset_Handler+0x94>
|
|
|
|
1ea: 46c0 nop ; (mov r8, r8)
|
|
|
|
1ec: 00002fe8 .word 0x00002fe8
|
|
|
|
1f0: 20000000 .word 0x20000000
|
|
|
|
1f4: 200000cc .word 0x200000cc
|
|
|
|
1f8: 0000261d .word 0x0000261d
|
|
|
|
1fc: 200000cc .word 0x200000cc
|
|
|
|
200: 200006cc .word 0x200006cc
|
|
|
|
204: 0000262f .word 0x0000262f
|
|
|
|
208: 00000000 .word 0x00000000
|
|
|
|
20c: e000ed00 .word 0xe000ed00
|
|
|
|
210: 410070fc .word 0x410070fc
|
|
|
|
214: 41005000 .word 0x41005000
|
|
|
|
218: 41004800 .word 0x41004800
|
|
|
|
21c: 41004000 .word 0x41004000
|
|
|
|
220: 000025d5 .word 0x000025d5
|
|
|
|
224: 00001bad .word 0x00001bad
|
|
|
|
|
|
|
|
00000228 <cdcdf_acm_req>:
|
|
|
|
* \param[in] ep Endpoint address.
|
|
|
|
* \param[in] req Pointer to the request.
|
|
|
|
* \return Operation status.
|
|
|
|
*/
|
|
|
|
static int32_t cdcdf_acm_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage)
|
|
|
|
{
|
|
|
|
228: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
22a: 0017 movs r7, r2
|
|
|
|
if (0x01 != ((req->bmRequestType >> 5) & 0x03)) { // class request
|
|
|
|
22c: 780a ldrb r2, [r1, #0]
|
|
|
|
{
|
|
|
|
22e: b085 sub sp, #20
|
|
|
|
if (0x01 != ((req->bmRequestType >> 5) & 0x03)) { // class request
|
|
|
|
230: 0653 lsls r3, r2, #25
|
|
|
|
{
|
|
|
|
232: 000c movs r4, r1
|
|
|
|
234: 9001 str r0, [sp, #4]
|
|
|
|
if (0x01 != ((req->bmRequestType >> 5) & 0x03)) { // class request
|
|
|
|
236: 0f9b lsrs r3, r3, #30
|
|
|
|
238: 2b01 cmp r3, #1
|
|
|
|
23a: d152 bne.n 2e2 <cdcdf_acm_req+0xba>
|
|
|
|
return ERR_NOT_FOUND;
|
|
|
|
}
|
|
|
|
if ((req->wIndex == _cdcdf_acm_funcd.func_iface[0]) || (req->wIndex == _cdcdf_acm_funcd.func_iface[1])) {
|
|
|
|
23c: 7963 ldrb r3, [r4, #5]
|
|
|
|
23e: 7909 ldrb r1, [r1, #4]
|
|
|
|
240: 4d2a ldr r5, [pc, #168] ; (2ec <cdcdf_acm_req+0xc4>)
|
|
|
|
242: 021b lsls r3, r3, #8
|
|
|
|
244: 430b orrs r3, r1
|
|
|
|
246: 7829 ldrb r1, [r5, #0]
|
|
|
|
248: 4299 cmp r1, r3
|
|
|
|
24a: d002 beq.n 252 <cdcdf_acm_req+0x2a>
|
|
|
|
24c: 7869 ldrb r1, [r5, #1]
|
|
|
|
24e: 4299 cmp r1, r3
|
|
|
|
250: d147 bne.n 2e2 <cdcdf_acm_req+0xba>
|
|
|
|
uint16_t len = req->wLength;
|
|
|
|
252: 79e6 ldrb r6, [r4, #7]
|
|
|
|
254: 79a3 ldrb r3, [r4, #6]
|
|
|
|
256: 0236 lsls r6, r6, #8
|
|
|
|
if (req->bmRequestType & USB_EP_DIR_IN) {
|
|
|
|
258: b252 sxtb r2, r2
|
|
|
|
uint16_t len = req->wLength;
|
|
|
|
25a: 431e orrs r6, r3
|
|
|
|
if (req->bmRequestType & USB_EP_DIR_IN) {
|
|
|
|
25c: 2a00 cmp r2, #0
|
|
|
|
25e: da0f bge.n 280 <cdcdf_acm_req+0x58>
|
|
|
|
return ERR_NONE;
|
|
|
|
260: 2000 movs r0, #0
|
|
|
|
if (USB_DATA_STAGE == stage) {
|
|
|
|
262: 2f01 cmp r7, #1
|
|
|
|
264: d00a beq.n 27c <cdcdf_acm_req+0x54>
|
|
|
|
switch (req->bRequest) {
|
|
|
|
266: 7863 ldrb r3, [r4, #1]
|
|
|
|
268: 2b21 cmp r3, #33 ; 0x21
|
|
|
|
26a: d111 bne.n 290 <cdcdf_acm_req+0x68>
|
|
|
|
if (sizeof(struct usb_cdc_line_coding) != len) {
|
|
|
|
26c: 2e07 cmp r6, #7
|
|
|
|
26e: d13b bne.n 2e8 <cdcdf_acm_req+0xc0>
|
|
|
|
return usbdc_xfer(ep, (uint8_t *)&usbd_cdc_line_coding, len, false);
|
|
|
|
270: 0003 movs r3, r0
|
|
|
|
272: 1da9 adds r1, r5, #6
|
|
|
|
return usbdc_xfer(ep, ctrl_buf, len, false);
|
|
|
|
274: 0032 movs r2, r6
|
|
|
|
276: 9801 ldr r0, [sp, #4]
|
|
|
|
278: 4c1d ldr r4, [pc, #116] ; (2f0 <cdcdf_acm_req+0xc8>)
|
|
|
|
27a: 47a0 blx r4
|
|
|
|
return cdcdf_acm_set_req(ep, req, stage);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return ERR_NOT_FOUND;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
27c: b005 add sp, #20
|
|
|
|
27e: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
uint8_t * ctrl_buf = usbdc_get_ctrl_buffer();
|
|
|
|
280: 4b1c ldr r3, [pc, #112] ; (2f4 <cdcdf_acm_req+0xcc>)
|
|
|
|
282: 4798 blx r3
|
|
|
|
switch (req->bRequest) {
|
|
|
|
284: 7863 ldrb r3, [r4, #1]
|
|
|
|
uint8_t * ctrl_buf = usbdc_get_ctrl_buffer();
|
|
|
|
286: 0001 movs r1, r0
|
|
|
|
switch (req->bRequest) {
|
|
|
|
288: 2b20 cmp r3, #32
|
|
|
|
28a: d003 beq.n 294 <cdcdf_acm_req+0x6c>
|
|
|
|
28c: 2b22 cmp r3, #34 ; 0x22
|
|
|
|
28e: d019 beq.n 2c4 <cdcdf_acm_req+0x9c>
|
|
|
|
return ERR_INVALID_ARG;
|
|
|
|
290: 200d movs r0, #13
|
|
|
|
292: e027 b.n 2e4 <cdcdf_acm_req+0xbc>
|
|
|
|
if (sizeof(struct usb_cdc_line_coding) != len) {
|
|
|
|
294: 2e07 cmp r6, #7
|
|
|
|
296: d127 bne.n 2e8 <cdcdf_acm_req+0xc0>
|
|
|
|
if (USB_SETUP_STAGE == stage) {
|
|
|
|
298: 2f00 cmp r7, #0
|
|
|
|
29a: d101 bne.n 2a0 <cdcdf_acm_req+0x78>
|
|
|
|
return usbdc_xfer(ep, ctrl_buf, len, false);
|
|
|
|
29c: 003b movs r3, r7
|
|
|
|
29e: e7e9 b.n 274 <cdcdf_acm_req+0x4c>
|
|
|
|
memcpy(&line_coding_tmp, ctrl_buf, sizeof(struct usb_cdc_line_coding));
|
|
|
|
2a0: 0032 movs r2, r6
|
|
|
|
2a2: 4c15 ldr r4, [pc, #84] ; (2f8 <cdcdf_acm_req+0xd0>)
|
|
|
|
2a4: a802 add r0, sp, #8
|
|
|
|
2a6: 47a0 blx r4
|
|
|
|
if ((NULL == cdcdf_acm_set_line_coding) || (true == cdcdf_acm_set_line_coding(&line_coding_tmp))) {
|
|
|
|
2a8: 692b ldr r3, [r5, #16]
|
|
|
|
2aa: 2b00 cmp r3, #0
|
|
|
|
2ac: d105 bne.n 2ba <cdcdf_acm_req+0x92>
|
|
|
|
usbd_cdc_line_coding = line_coding_tmp;
|
|
|
|
2ae: 2207 movs r2, #7
|
|
|
|
2b0: 1da8 adds r0, r5, #6
|
|
|
|
2b2: a902 add r1, sp, #8
|
|
|
|
2b4: 47a0 blx r4
|
|
|
|
return ERR_NONE;
|
|
|
|
2b6: 2000 movs r0, #0
|
|
|
|
2b8: e7e0 b.n 27c <cdcdf_acm_req+0x54>
|
|
|
|
if ((NULL == cdcdf_acm_set_line_coding) || (true == cdcdf_acm_set_line_coding(&line_coding_tmp))) {
|
|
|
|
2ba: a802 add r0, sp, #8
|
|
|
|
2bc: 4798 blx r3
|
|
|
|
2be: 2800 cmp r0, #0
|
|
|
|
2c0: d1f5 bne.n 2ae <cdcdf_acm_req+0x86>
|
|
|
|
2c2: e7f8 b.n 2b6 <cdcdf_acm_req+0x8e>
|
|
|
|
usbdc_xfer(0, NULL, 0, 0);
|
|
|
|
2c4: 2300 movs r3, #0
|
|
|
|
2c6: 4e0a ldr r6, [pc, #40] ; (2f0 <cdcdf_acm_req+0xc8>)
|
|
|
|
2c8: 001a movs r2, r3
|
|
|
|
2ca: 0019 movs r1, r3
|
|
|
|
2cc: 0018 movs r0, r3
|
|
|
|
2ce: 47b0 blx r6
|
|
|
|
if (NULL != cdcdf_acm_notify_state) {
|
|
|
|
2d0: 696b ldr r3, [r5, #20]
|
|
|
|
2d2: 2b00 cmp r3, #0
|
|
|
|
2d4: d0ef beq.n 2b6 <cdcdf_acm_req+0x8e>
|
|
|
|
cdcdf_acm_notify_state(req->wValue);
|
|
|
|
2d6: 78e0 ldrb r0, [r4, #3]
|
|
|
|
2d8: 78a2 ldrb r2, [r4, #2]
|
|
|
|
2da: 0200 lsls r0, r0, #8
|
|
|
|
2dc: 4310 orrs r0, r2
|
|
|
|
2de: 4798 blx r3
|
|
|
|
2e0: e7e9 b.n 2b6 <cdcdf_acm_req+0x8e>
|
|
|
|
return ERR_NOT_FOUND;
|
|
|
|
2e2: 200a movs r0, #10
|
|
|
|
return ERR_INVALID_DATA;
|
|
|
|
2e4: 4240 negs r0, r0
|
|
|
|
2e6: e7c9 b.n 27c <cdcdf_acm_req+0x54>
|
|
|
|
2e8: 2001 movs r0, #1
|
|
|
|
2ea: e7fb b.n 2e4 <cdcdf_acm_req+0xbc>
|
|
|
|
2ec: 200000e8 .word 0x200000e8
|
|
|
|
2f0: 00002001 .word 0x00002001
|
|
|
|
2f4: 00002429 .word 0x00002429
|
|
|
|
2f8: 0000261d .word 0x0000261d
|
|
|
|
|
|
|
|
000002fc <cdcdf_acm_ctrl>:
|
|
|
|
{
|
|
|
|
2fc: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
2fe: 0015 movs r5, r2
|
|
|
|
switch (ctrl) {
|
|
|
|
300: 2901 cmp r1, #1
|
|
|
|
302: d04f beq.n 3a4 <cdcdf_acm_ctrl+0xa8>
|
|
|
|
304: 2902 cmp r1, #2
|
|
|
|
306: d100 bne.n 30a <cdcdf_acm_ctrl+0xe>
|
|
|
|
308: e076 b.n 3f8 <cdcdf_acm_ctrl+0xfc>
|
|
|
|
30a: 2900 cmp r1, #0
|
|
|
|
30c: d000 beq.n 310 <cdcdf_acm_ctrl+0x14>
|
|
|
|
30e: e075 b.n 3fc <cdcdf_acm_ctrl+0x100>
|
|
|
|
return cdcdf_acm_enable(drv, (struct usbd_descriptors *)param);
|
|
|
|
310: 6883 ldr r3, [r0, #8]
|
|
|
|
ifc = desc->sod;
|
|
|
|
312: 6810 ldr r0, [r2, #0]
|
|
|
|
314: 001e movs r6, r3
|
|
|
|
316: 9300 str r3, [sp, #0]
|
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
318: 3302 adds r3, #2
|
|
|
|
31a: 9301 str r3, [sp, #4]
|
|
|
|
if (NULL == ifc) {
|
|
|
|
31c: 2800 cmp r0, #0
|
|
|
|
31e: d102 bne.n 326 <cdcdf_acm_ctrl+0x2a>
|
|
|
|
return ERR_NOT_FOUND;
|
|
|
|
320: 200a movs r0, #10
|
|
|
|
return ERR_NOT_INITIALIZED;
|
|
|
|
322: 4240 negs r0, r0
|
|
|
|
324: e020 b.n 368 <cdcdf_acm_ctrl+0x6c>
|
|
|
|
if ((CDC_CLASS_COMM == ifc_desc.bInterfaceClass) || (CDC_CLASS_DATA == ifc_desc.bInterfaceClass)) {
|
|
|
|
326: 2108 movs r1, #8
|
|
|
|
328: 7943 ldrb r3, [r0, #5]
|
|
|
|
ifc_desc.bInterfaceNumber = ifc[2];
|
|
|
|
32a: 7882 ldrb r2, [r0, #2]
|
|
|
|
if ((CDC_CLASS_COMM == ifc_desc.bInterfaceClass) || (CDC_CLASS_DATA == ifc_desc.bInterfaceClass)) {
|
|
|
|
32c: 438b bics r3, r1
|
|
|
|
32e: 2b02 cmp r3, #2
|
|
|
|
330: d1f6 bne.n 320 <cdcdf_acm_ctrl+0x24>
|
|
|
|
if (func_data->func_iface[i] == ifc_desc.bInterfaceNumber) { // Initialized
|
|
|
|
332: 7833 ldrb r3, [r6, #0]
|
|
|
|
334: 429a cmp r2, r3
|
|
|
|
336: d063 beq.n 400 <cdcdf_acm_ctrl+0x104>
|
|
|
|
} else if (func_data->func_iface[i] != 0xFF) { // Occupied
|
|
|
|
338: 2bff cmp r3, #255 ; 0xff
|
|
|
|
33a: d163 bne.n 404 <cdcdf_acm_ctrl+0x108>
|
|
|
|
func_data->func_iface[i] = ifc_desc.bInterfaceNumber;
|
|
|
|
33c: 7032 strb r2, [r6, #0]
|
|
|
|
ep = usb_find_desc(ifc, desc->eod, USB_DT_ENDPOINT);
|
|
|
|
33e: 6869 ldr r1, [r5, #4]
|
|
|
|
340: 2205 movs r2, #5
|
|
|
|
342: 4b32 ldr r3, [pc, #200] ; (40c <cdcdf_acm_ctrl+0x110>)
|
|
|
|
344: 4798 blx r3
|
|
|
|
ep = usb_find_ep_desc(usb_desc_next(desc->sod), desc->eod);
|
|
|
|
346: 1e04 subs r4, r0, #0
|
|
|
|
while (NULL != ep) {
|
|
|
|
348: d10f bne.n 36a <cdcdf_acm_ctrl+0x6e>
|
|
|
|
ifc = usb_find_desc(usb_desc_next(desc->sod), desc->eod, USB_DT_INTERFACE);
|
|
|
|
34a: 6828 ldr r0, [r5, #0]
|
|
|
|
34c: 2204 movs r2, #4
|
|
|
|
* \param[in] desc Byte pointer to the descriptor start address
|
|
|
|
* \return Byte pointer to the next descriptor
|
|
|
|
*/
|
|
|
|
static inline uint8_t *usb_desc_next(uint8_t *desc)
|
|
|
|
{
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
34e: 7803 ldrb r3, [r0, #0]
|
|
|
|
350: 6869 ldr r1, [r5, #4]
|
|
|
|
352: 18c0 adds r0, r0, r3
|
|
|
|
354: 4b2d ldr r3, [pc, #180] ; (40c <cdcdf_acm_ctrl+0x110>)
|
|
|
|
356: 4798 blx r3
|
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
358: 9b01 ldr r3, [sp, #4]
|
|
|
|
35a: 3601 adds r6, #1
|
|
|
|
35c: 42b3 cmp r3, r6
|
|
|
|
35e: d1dd bne.n 31c <cdcdf_acm_ctrl+0x20>
|
|
|
|
_cdcdf_acm_funcd.enabled = true;
|
|
|
|
360: 2201 movs r2, #1
|
|
|
|
return ERR_NONE;
|
|
|
|
362: 0020 movs r0, r4
|
|
|
|
_cdcdf_acm_funcd.enabled = true;
|
|
|
|
364: 4b2a ldr r3, [pc, #168] ; (410 <cdcdf_acm_ctrl+0x114>)
|
|
|
|
366: 715a strb r2, [r3, #5]
|
|
|
|
}
|
|
|
|
368: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
return (ptr[0] + (ptr[1] << 8));
|
|
|
|
36a: 7963 ldrb r3, [r4, #5]
|
|
|
|
36c: 7922 ldrb r2, [r4, #4]
|
|
|
|
36e: 021b lsls r3, r3, #8
|
|
|
|
ep_desc.bEndpointAddress = ep[2];
|
|
|
|
370: 78a7 ldrb r7, [r4, #2]
|
|
|
|
372: 18d2 adds r2, r2, r3
|
|
|
|
if (usb_d_ep_init(ep_desc.bEndpointAddress, ep_desc.bmAttributes, ep_desc.wMaxPacketSize)) {
|
|
|
|
374: 0038 movs r0, r7
|
|
|
|
376: 78e1 ldrb r1, [r4, #3]
|
|
|
|
378: 4b26 ldr r3, [pc, #152] ; (414 <cdcdf_acm_ctrl+0x118>)
|
|
|
|
37a: b292 uxth r2, r2
|
|
|
|
37c: 4798 blx r3
|
|
|
|
37e: 2800 cmp r0, #0
|
|
|
|
380: d142 bne.n 408 <cdcdf_acm_ctrl+0x10c>
|
|
|
|
if (ep_desc.bEndpointAddress & USB_EP_DIR_IN) {
|
|
|
|
382: b27b sxtb r3, r7
|
|
|
|
384: 4a24 ldr r2, [pc, #144] ; (418 <cdcdf_acm_ctrl+0x11c>)
|
|
|
|
386: 2b00 cmp r3, #0
|
|
|
|
388: da09 bge.n 39e <cdcdf_acm_ctrl+0xa2>
|
|
|
|
func_data->func_ep_in[i] = ep_desc.bEndpointAddress;
|
|
|
|
38a: 70b7 strb r7, [r6, #2]
|
|
|
|
usb_d_ep_enable(func_data->func_ep_out);
|
|
|
|
38c: 0038 movs r0, r7
|
|
|
|
38e: 4790 blx r2
|
|
|
|
desc->sod = ep;
|
|
|
|
390: 602c str r4, [r5, #0]
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
392: 7820 ldrb r0, [r4, #0]
|
|
|
|
ep = usb_find_ep_desc(usb_desc_next(desc->sod), desc->eod);
|
|
|
|
394: 6869 ldr r1, [r5, #4]
|
|
|
|
396: 4b21 ldr r3, [pc, #132] ; (41c <cdcdf_acm_ctrl+0x120>)
|
|
|
|
398: 1820 adds r0, r4, r0
|
|
|
|
39a: 4798 blx r3
|
|
|
|
39c: e7d3 b.n 346 <cdcdf_acm_ctrl+0x4a>
|
|
|
|
func_data->func_ep_out = ep_desc.bEndpointAddress;
|
|
|
|
39e: 9b00 ldr r3, [sp, #0]
|
|
|
|
3a0: 711f strb r7, [r3, #4]
|
|
|
|
3a2: e7f3 b.n 38c <cdcdf_acm_ctrl+0x90>
|
|
|
|
return cdcdf_acm_disable(drv, (struct usbd_descriptors *)param);
|
|
|
|
3a4: 6884 ldr r4, [r0, #8]
|
|
|
|
if (desc) {
|
|
|
|
3a6: 2a00 cmp r2, #0
|
|
|
|
3a8: d005 beq.n 3b6 <cdcdf_acm_ctrl+0xba>
|
|
|
|
ifc_desc.bInterfaceClass = desc->sod[5];
|
|
|
|
3aa: 6813 ldr r3, [r2, #0]
|
|
|
|
if ((ifc_desc.bInterfaceClass != CDC_CLASS_COMM) && (ifc_desc.bInterfaceClass != CDC_CLASS_DATA)) {
|
|
|
|
3ac: 2208 movs r2, #8
|
|
|
|
3ae: 795b ldrb r3, [r3, #5]
|
|
|
|
3b0: 4393 bics r3, r2
|
|
|
|
3b2: 2b02 cmp r3, #2
|
|
|
|
3b4: d1b4 bne.n 320 <cdcdf_acm_ctrl+0x24>
|
|
|
|
if (func_data->func_iface[i] == 0xFF) {
|
|
|
|
3b6: 7823 ldrb r3, [r4, #0]
|
|
|
|
3b8: 2bff cmp r3, #255 ; 0xff
|
|
|
|
3ba: d007 beq.n 3cc <cdcdf_acm_ctrl+0xd0>
|
|
|
|
func_data->func_iface[i] = 0xFF;
|
|
|
|
3bc: 25ff movs r5, #255 ; 0xff
|
|
|
|
if (func_data->func_ep_in[i] != 0xFF) {
|
|
|
|
3be: 78a0 ldrb r0, [r4, #2]
|
|
|
|
func_data->func_iface[i] = 0xFF;
|
|
|
|
3c0: 7025 strb r5, [r4, #0]
|
|
|
|
if (func_data->func_ep_in[i] != 0xFF) {
|
|
|
|
3c2: 42a8 cmp r0, r5
|
|
|
|
3c4: d002 beq.n 3cc <cdcdf_acm_ctrl+0xd0>
|
|
|
|
usb_d_ep_deinit(func_data->func_ep_in[i]);
|
|
|
|
3c6: 4b16 ldr r3, [pc, #88] ; (420 <cdcdf_acm_ctrl+0x124>)
|
|
|
|
3c8: 4798 blx r3
|
|
|
|
func_data->func_ep_in[i] = 0xFF;
|
|
|
|
3ca: 70a5 strb r5, [r4, #2]
|
|
|
|
if (func_data->func_iface[i] == 0xFF) {
|
|
|
|
3cc: 7863 ldrb r3, [r4, #1]
|
|
|
|
3ce: 2bff cmp r3, #255 ; 0xff
|
|
|
|
3d0: d007 beq.n 3e2 <cdcdf_acm_ctrl+0xe6>
|
|
|
|
func_data->func_iface[i] = 0xFF;
|
|
|
|
3d2: 25ff movs r5, #255 ; 0xff
|
|
|
|
if (func_data->func_ep_in[i] != 0xFF) {
|
|
|
|
3d4: 78e0 ldrb r0, [r4, #3]
|
|
|
|
func_data->func_iface[i] = 0xFF;
|
|
|
|
3d6: 7065 strb r5, [r4, #1]
|
|
|
|
if (func_data->func_ep_in[i] != 0xFF) {
|
|
|
|
3d8: 42a8 cmp r0, r5
|
|
|
|
3da: d002 beq.n 3e2 <cdcdf_acm_ctrl+0xe6>
|
|
|
|
usb_d_ep_deinit(func_data->func_ep_in[i]);
|
|
|
|
3dc: 4b10 ldr r3, [pc, #64] ; (420 <cdcdf_acm_ctrl+0x124>)
|
|
|
|
3de: 4798 blx r3
|
|
|
|
func_data->func_ep_in[i] = 0xFF;
|
|
|
|
3e0: 70e5 strb r5, [r4, #3]
|
|
|
|
if (func_data->func_ep_out != 0xFF) {
|
|
|
|
3e2: 7920 ldrb r0, [r4, #4]
|
|
|
|
3e4: 28ff cmp r0, #255 ; 0xff
|
|
|
|
3e6: d003 beq.n 3f0 <cdcdf_acm_ctrl+0xf4>
|
|
|
|
usb_d_ep_deinit(func_data->func_ep_out);
|
|
|
|
3e8: 4b0d ldr r3, [pc, #52] ; (420 <cdcdf_acm_ctrl+0x124>)
|
|
|
|
3ea: 4798 blx r3
|
|
|
|
func_data->func_ep_out = 0xFF;
|
|
|
|
3ec: 23ff movs r3, #255 ; 0xff
|
|
|
|
3ee: 7123 strb r3, [r4, #4]
|
|
|
|
_cdcdf_acm_funcd.enabled = false;
|
|
|
|
3f0: 2000 movs r0, #0
|
|
|
|
3f2: 4b07 ldr r3, [pc, #28] ; (410 <cdcdf_acm_ctrl+0x114>)
|
|
|
|
3f4: 7158 strb r0, [r3, #5]
|
|
|
|
return ERR_NONE;
|
|
|
|
3f6: e7b7 b.n 368 <cdcdf_acm_ctrl+0x6c>
|
|
|
|
return ERR_UNSUPPORTED_OP;
|
|
|
|
3f8: 201b movs r0, #27
|
|
|
|
3fa: e792 b.n 322 <cdcdf_acm_ctrl+0x26>
|
|
|
|
switch (ctrl) {
|
|
|
|
3fc: 200d movs r0, #13
|
|
|
|
3fe: e790 b.n 322 <cdcdf_acm_ctrl+0x26>
|
|
|
|
return ERR_ALREADY_INITIALIZED;
|
|
|
|
400: 2012 movs r0, #18
|
|
|
|
402: e78e b.n 322 <cdcdf_acm_ctrl+0x26>
|
|
|
|
return ERR_NO_RESOURCE;
|
|
|
|
404: 201c movs r0, #28
|
|
|
|
406: e78c b.n 322 <cdcdf_acm_ctrl+0x26>
|
|
|
|
return ERR_NOT_INITIALIZED;
|
|
|
|
408: 2014 movs r0, #20
|
|
|
|
40a: e78a b.n 322 <cdcdf_acm_ctrl+0x26>
|
|
|
|
40c: 0000162d .word 0x0000162d
|
|
|
|
410: 200000e8 .word 0x200000e8
|
|
|
|
414: 0000193d .word 0x0000193d
|
|
|
|
418: 000019cd .word 0x000019cd
|
|
|
|
41c: 00001647 .word 0x00001647
|
|
|
|
420: 000019a1 .word 0x000019a1
|
|
|
|
|
|
|
|
00000424 <cdcdf_acm_init>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Initialize the USB CDC ACM Function Driver
|
|
|
|
*/
|
|
|
|
int32_t cdcdf_acm_init(void)
|
|
|
|
{
|
|
|
|
424: b510 push {r4, lr}
|
|
|
|
if (usbdc_get_state() > USBD_S_POWER) {
|
|
|
|
426: 4b0a ldr r3, [pc, #40] ; (450 <cdcdf_acm_init+0x2c>)
|
|
|
|
428: 4798 blx r3
|
|
|
|
42a: 2801 cmp r0, #1
|
|
|
|
42c: d80c bhi.n 448 <cdcdf_acm_init+0x24>
|
|
|
|
return ERR_DENIED;
|
|
|
|
}
|
|
|
|
|
|
|
|
_cdcdf_acm.ctrl = cdcdf_acm_ctrl;
|
|
|
|
42e: 4809 ldr r0, [pc, #36] ; (454 <cdcdf_acm_init+0x30>)
|
|
|
|
430: 4b09 ldr r3, [pc, #36] ; (458 <cdcdf_acm_init+0x34>)
|
|
|
|
_cdcdf_acm.func_data = &_cdcdf_acm_funcd;
|
|
|
|
432: 6200 str r0, [r0, #32]
|
|
|
|
_cdcdf_acm.ctrl = cdcdf_acm_ctrl;
|
|
|
|
434: 61c3 str r3, [r0, #28]
|
|
|
|
|
|
|
|
usbdc_register_function(&_cdcdf_acm);
|
|
|
|
436: 4b09 ldr r3, [pc, #36] ; (45c <cdcdf_acm_init+0x38>)
|
|
|
|
438: 3018 adds r0, #24
|
|
|
|
43a: 4798 blx r3
|
|
|
|
usbdc_register_handler(USBDC_HDL_REQ, &cdcdf_acm_req_h);
|
|
|
|
43c: 2001 movs r0, #1
|
|
|
|
43e: 4908 ldr r1, [pc, #32] ; (460 <cdcdf_acm_init+0x3c>)
|
|
|
|
440: 4b08 ldr r3, [pc, #32] ; (464 <cdcdf_acm_init+0x40>)
|
|
|
|
442: 4798 blx r3
|
|
|
|
return ERR_NONE;
|
|
|
|
444: 2000 movs r0, #0
|
|
|
|
}
|
|
|
|
446: bd10 pop {r4, pc}
|
|
|
|
return ERR_DENIED;
|
|
|
|
448: 2011 movs r0, #17
|
|
|
|
44a: 4240 negs r0, r0
|
|
|
|
44c: e7fb b.n 446 <cdcdf_acm_init+0x22>
|
|
|
|
44e: 46c0 nop ; (mov r8, r8)
|
|
|
|
450: 00002435 .word 0x00002435
|
|
|
|
454: 200000e8 .word 0x200000e8
|
|
|
|
458: 000002fd .word 0x000002fd
|
|
|
|
45c: 000023d1 .word 0x000023d1
|
|
|
|
460: 20000000 .word 0x20000000
|
|
|
|
464: 00002345 .word 0x00002345
|
|
|
|
|
|
|
|
00000468 <cdcdf_acm_write>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief USB CDC ACM Function Write Data
|
|
|
|
*/
|
|
|
|
int32_t cdcdf_acm_write(uint8_t *buf, uint32_t size)
|
|
|
|
{
|
|
|
|
468: b510 push {r4, lr}
|
|
|
|
/**
|
|
|
|
* \brief Check whether CDC ACM Function is enabled
|
|
|
|
*/
|
|
|
|
bool cdcdf_acm_is_enabled(void)
|
|
|
|
{
|
|
|
|
return _cdcdf_acm_funcd.enabled;
|
|
|
|
46a: 4b07 ldr r3, [pc, #28] ; (488 <cdcdf_acm_write+0x20>)
|
|
|
|
{
|
|
|
|
46c: 000a movs r2, r1
|
|
|
|
if (!cdcdf_acm_is_enabled()) {
|
|
|
|
46e: 7959 ldrb r1, [r3, #5]
|
|
|
|
{
|
|
|
|
470: 0004 movs r4, r0
|
|
|
|
if (!cdcdf_acm_is_enabled()) {
|
|
|
|
472: 2900 cmp r1, #0
|
|
|
|
474: d005 beq.n 482 <cdcdf_acm_write+0x1a>
|
|
|
|
return usbdc_xfer(_cdcdf_acm_funcd.func_ep_in[CDCDF_ACM_DATA_EP_INDEX], buf, size, true);
|
|
|
|
476: 0021 movs r1, r4
|
|
|
|
478: 78d8 ldrb r0, [r3, #3]
|
|
|
|
47a: 4c04 ldr r4, [pc, #16] ; (48c <cdcdf_acm_write+0x24>)
|
|
|
|
47c: 2301 movs r3, #1
|
|
|
|
47e: 47a0 blx r4
|
|
|
|
}
|
|
|
|
480: bd10 pop {r4, pc}
|
|
|
|
return ERR_DENIED;
|
|
|
|
482: 2011 movs r0, #17
|
|
|
|
484: 4240 negs r0, r0
|
|
|
|
486: e7fb b.n 480 <cdcdf_acm_write+0x18>
|
|
|
|
488: 200000e8 .word 0x200000e8
|
|
|
|
48c: 00002001 .word 0x00002001
|
|
|
|
|
|
|
|
00000490 <cdcdf_acm_register_callback>:
|
|
|
|
{
|
|
|
|
490: 000a movs r2, r1
|
|
|
|
492: b510 push {r4, lr}
|
|
|
|
494: 2803 cmp r0, #3
|
|
|
|
496: d810 bhi.n 4ba <cdcdf_acm_register_callback+0x2a>
|
|
|
|
498: 4b09 ldr r3, [pc, #36] ; (4c0 <cdcdf_acm_register_callback+0x30>)
|
|
|
|
49a: f002 f83f bl 251c <__gnu_thumb1_case_uqi>
|
|
|
|
49e: 0802 .short 0x0802
|
|
|
|
4a0: 0c0a .short 0x0c0a
|
|
|
|
usb_d_ep_register_callback(_cdcdf_acm_funcd.func_ep_out, USB_D_EP_CB_XFER, func);
|
|
|
|
4a2: 7918 ldrb r0, [r3, #4]
|
|
|
|
usb_d_ep_register_callback(_cdcdf_acm_funcd.func_ep_in[CDCDF_ACM_DATA_EP_INDEX], USB_D_EP_CB_XFER, func);
|
|
|
|
4a4: 2102 movs r1, #2
|
|
|
|
4a6: 4b07 ldr r3, [pc, #28] ; (4c4 <cdcdf_acm_register_callback+0x34>)
|
|
|
|
4a8: 4798 blx r3
|
|
|
|
return ERR_NONE;
|
|
|
|
4aa: 2000 movs r0, #0
|
|
|
|
}
|
|
|
|
4ac: bd10 pop {r4, pc}
|
|
|
|
usb_d_ep_register_callback(_cdcdf_acm_funcd.func_ep_in[CDCDF_ACM_DATA_EP_INDEX], USB_D_EP_CB_XFER, func);
|
|
|
|
4ae: 78d8 ldrb r0, [r3, #3]
|
|
|
|
4b0: e7f8 b.n 4a4 <cdcdf_acm_register_callback+0x14>
|
|
|
|
cdcdf_acm_set_line_coding = (cdcdf_acm_set_line_coding_t)func;
|
|
|
|
4b2: 6119 str r1, [r3, #16]
|
|
|
|
break;
|
|
|
|
4b4: e7f9 b.n 4aa <cdcdf_acm_register_callback+0x1a>
|
|
|
|
cdcdf_acm_notify_state = (cdcdf_acm_notify_state_t)func;
|
|
|
|
4b6: 6159 str r1, [r3, #20]
|
|
|
|
4b8: e7f7 b.n 4aa <cdcdf_acm_register_callback+0x1a>
|
|
|
|
return ERR_NONE;
|
|
|
|
4ba: 200d movs r0, #13
|
|
|
|
4bc: 4240 negs r0, r0
|
|
|
|
4be: e7f5 b.n 4ac <cdcdf_acm_register_callback+0x1c>
|
|
|
|
4c0: 200000e8 .word 0x200000e8
|
|
|
|
4c4: 00001b61 .word 0x00001b61
|
|
|
|
|
|
|
|
000004c8 <cdcdf_acm_is_enabled>:
|
|
|
|
return _cdcdf_acm_funcd.enabled;
|
|
|
|
4c8: 4b01 ldr r3, [pc, #4] ; (4d0 <cdcdf_acm_is_enabled+0x8>)
|
|
|
|
4ca: 7958 ldrb r0, [r3, #5]
|
|
|
|
}
|
|
|
|
4cc: 4770 bx lr
|
|
|
|
4ce: 46c0 nop ; (mov r8, r8)
|
|
|
|
4d0: 200000e8 .word 0x200000e8
|
|
|
|
|
|
|
|
000004d4 <_sbrk>:
|
|
|
|
extern caddr_t _sbrk(int incr)
|
|
|
|
{
|
|
|
|
static unsigned char *heap = NULL;
|
|
|
|
unsigned char * prev_heap;
|
|
|
|
|
|
|
|
if (heap == NULL) {
|
|
|
|
4d4: 4a05 ldr r2, [pc, #20] ; (4ec <_sbrk+0x18>)
|
|
|
|
{
|
|
|
|
4d6: 0003 movs r3, r0
|
|
|
|
if (heap == NULL) {
|
|
|
|
4d8: 6811 ldr r1, [r2, #0]
|
|
|
|
4da: 2900 cmp r1, #0
|
|
|
|
4dc: d101 bne.n 4e2 <_sbrk+0xe>
|
|
|
|
heap = (unsigned char *)&_end;
|
|
|
|
4de: 4904 ldr r1, [pc, #16] ; (4f0 <_sbrk+0x1c>)
|
|
|
|
4e0: 6011 str r1, [r2, #0]
|
|
|
|
}
|
|
|
|
prev_heap = heap;
|
|
|
|
4e2: 6810 ldr r0, [r2, #0]
|
|
|
|
|
|
|
|
heap += incr;
|
|
|
|
4e4: 18c3 adds r3, r0, r3
|
|
|
|
4e6: 6013 str r3, [r2, #0]
|
|
|
|
|
|
|
|
return (caddr_t)prev_heap;
|
|
|
|
}
|
|
|
|
4e8: 4770 bx lr
|
|
|
|
4ea: 46c0 nop ; (mov r8, r8)
|
|
|
|
4ec: 2000010c .word 0x2000010c
|
|
|
|
4f0: 200026d0 .word 0x200026d0
|
|
|
|
|
|
|
|
000004f4 <_dummy_func_no_return>:
|
|
|
|
static bool _dummy_func_no_return(uint32_t unused0, uint32_t unused1)
|
|
|
|
{
|
|
|
|
(void)unused0;
|
|
|
|
(void)unused1;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
4f4: 2000 movs r0, #0
|
|
|
|
4f6: 4770 bx lr
|
|
|
|
|
|
|
|
000004f8 <_usb_d_dev_wait_dfll_rdy>:
|
|
|
|
*/
|
|
|
|
static inline void _usb_d_dev_wait_dfll_rdy(void)
|
|
|
|
{
|
|
|
|
#define DFLL_READY_FLAG (SYSCTRL_PCLKSR_DFLLRDY | SYSCTRL_PCLKSR_DFLLLCKF | SYSCTRL_PCLKSR_DFLLLCKC)
|
|
|
|
/* In USB recovery mode the status is not checked */
|
|
|
|
if (!(SYSCTRL->DFLLCTRL.reg & SYSCTRL_DFLLCTRL_USBCRM)) {
|
|
|
|
4f8: 4b07 ldr r3, [pc, #28] ; (518 <_usb_d_dev_wait_dfll_rdy+0x20>)
|
|
|
|
4fa: 8c9a ldrh r2, [r3, #36] ; 0x24
|
|
|
|
4fc: 0692 lsls r2, r2, #26
|
|
|
|
4fe: d504 bpl.n 50a <_usb_d_dev_wait_dfll_rdy+0x12>
|
|
|
|
|
|
|
|
static inline hri_sysctrl_pclksr_reg_t hri_sysctrl_get_PCLKSR_reg(const void *const hw, hri_sysctrl_pclksr_reg_t mask)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
tmp = ((Sysctrl *)hw)->PCLKSR.reg;
|
|
|
|
tmp &= mask;
|
|
|
|
500: 2210 movs r2, #16
|
|
|
|
tmp = ((Sysctrl *)hw)->PCLKSR.reg;
|
|
|
|
502: 68d9 ldr r1, [r3, #12]
|
|
|
|
while (hri_sysctrl_get_PCLKSR_reg(SYSCTRL, DFLL_READY_FLAG) != DFLL_READY_FLAG)
|
|
|
|
;
|
|
|
|
} else {
|
|
|
|
while (hri_sysctrl_get_PCLKSR_reg(SYSCTRL, SYSCTRL_PCLKSR_DFLLRDY) != SYSCTRL_PCLKSR_DFLLRDY)
|
|
|
|
504: 4211 tst r1, r2
|
|
|
|
506: d0fc beq.n 502 <_usb_d_dev_wait_dfll_rdy+0xa>
|
|
|
|
508: e004 b.n 514 <_usb_d_dev_wait_dfll_rdy+0x1c>
|
|
|
|
tmp &= mask;
|
|
|
|
50a: 21d0 movs r1, #208 ; 0xd0
|
|
|
|
tmp = ((Sysctrl *)hw)->PCLKSR.reg;
|
|
|
|
50c: 68da ldr r2, [r3, #12]
|
|
|
|
tmp &= mask;
|
|
|
|
50e: 400a ands r2, r1
|
|
|
|
while (hri_sysctrl_get_PCLKSR_reg(SYSCTRL, DFLL_READY_FLAG) != DFLL_READY_FLAG)
|
|
|
|
510: 2ad0 cmp r2, #208 ; 0xd0
|
|
|
|
512: d1fb bne.n 50c <_usb_d_dev_wait_dfll_rdy+0x14>
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
514: 4770 bx lr
|
|
|
|
516: 46c0 nop ; (mov r8, r8)
|
|
|
|
518: 40000800 .word 0x40000800
|
|
|
|
|
|
|
|
0000051c <_usb_d_dev_ept>:
|
|
|
|
* \param[in] epn Endpoint number.
|
|
|
|
* \param[in] dir Endpoint direction.
|
|
|
|
*/
|
|
|
|
static inline struct _usb_d_dev_ep *_usb_d_dev_ept(uint8_t epn, bool dir)
|
|
|
|
{
|
|
|
|
uint8_t ep_index = (epn == 0) ? 0 : (dir ? (epn + CONF_USB_D_MAX_EP_N) : epn);
|
|
|
|
51c: 2800 cmp r0, #0
|
|
|
|
51e: d003 beq.n 528 <_usb_d_dev_ept+0xc>
|
|
|
|
520: 2900 cmp r1, #0
|
|
|
|
522: d001 beq.n 528 <_usb_d_dev_ept+0xc>
|
|
|
|
524: 3002 adds r0, #2
|
|
|
|
526: b2c0 uxtb r0, r0
|
|
|
|
return &dev_inst.ep[ep_index];
|
|
|
|
528: 2314 movs r3, #20
|
|
|
|
52a: 3001 adds r0, #1
|
|
|
|
52c: 4358 muls r0, r3
|
|
|
|
52e: 4b01 ldr r3, [pc, #4] ; (534 <_usb_d_dev_ept+0x18>)
|
|
|
|
530: 18c0 adds r0, r0, r3
|
|
|
|
}
|
|
|
|
532: 4770 bx lr
|
|
|
|
534: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
00000538 <_usb_d_dev_handle_setup>:
|
|
|
|
* \brief Handles setup received interrupt
|
|
|
|
* \param[in] ept Pointer to endpoint information.
|
|
|
|
*/
|
|
|
|
static void _usb_d_dev_handle_setup(struct _usb_d_dev_ep *ept)
|
|
|
|
{
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
538: 230f movs r3, #15
|
|
|
|
{
|
|
|
|
53a: b570 push {r4, r5, r6, lr}
|
|
|
|
53c: 0001 movs r1, r0
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
53e: 7c80 ldrb r0, [r0, #18]
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
|
|
|
|
if (!is_ctrl) {
|
|
|
|
540: 2507 movs r5, #7
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
542: 4003 ands r3, r0
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
544: 001a movs r2, r3
|
|
|
|
546: 7ccc ldrb r4, [r1, #19]
|
|
|
|
if (!is_ctrl) {
|
|
|
|
548: 3208 adds r2, #8
|
|
|
|
54a: 4025 ands r5, r4
|
|
|
|
54c: 015b lsls r3, r3, #5
|
|
|
|
54e: 2d01 cmp r5, #1
|
|
|
|
550: d008 beq.n 564 <_usb_d_dev_handle_setup+0x2c>
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_usbendpoint_clear_EPINTFLAG_reg(const void *const hw, uint8_t submodule_index,
|
|
|
|
hri_usbendpoint_epintflag_reg_t mask)
|
|
|
|
{
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
552: 4914 ldr r1, [pc, #80] ; (5a4 <_usb_d_dev_handle_setup+0x6c>)
|
|
|
|
554: 0152 lsls r2, r2, #5
|
|
|
|
556: 1852 adds r2, r2, r1
|
|
|
|
558: 2110 movs r1, #16
|
|
|
|
55a: 71d1 strb r1, [r2, #7]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_usbendpoint_clear_EPINTEN_RXSTP_bit(const void *const hw, uint8_t submodule_index)
|
|
|
|
{
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = USB_DEVICE_EPINTENSET_RXSTP;
|
|
|
|
55c: 4a12 ldr r2, [pc, #72] ; (5a8 <_usb_d_dev_handle_setup+0x70>)
|
|
|
|
55e: 189b adds r3, r3, r2
|
|
|
|
560: 7259 strb r1, [r3, #9]
|
|
|
|
_usbd_ep_clear_bank_status(epn, 1);
|
|
|
|
_usbd_ep_int_ack(epn, USB_D_BANK0_INT_FLAGS | USB_D_BANK1_INT_FLAGS);
|
|
|
|
_usbd_ep_int_dis(epn, USB_D_BANK0_INT_FLAGS | USB_D_BANK1_INT_FLAGS);
|
|
|
|
/* Invoke callback. */
|
|
|
|
dev_inst.ep_callbacks.setup(ept->ep);
|
|
|
|
}
|
|
|
|
562: bd70 pop {r4, r5, r6, pc}
|
|
|
|
if (_usb_d_dev_ep_is_busy(ept)) {
|
|
|
|
564: 2540 movs r5, #64 ; 0x40
|
|
|
|
566: 422c tst r4, r5
|
|
|
|
568: d006 beq.n 578 <_usb_d_dev_handle_setup+0x40>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
56a: 2680 movs r6, #128 ; 0x80
|
|
|
|
ept->flags.bits.is_busy = 0;
|
|
|
|
56c: 43ac bics r4, r5
|
|
|
|
56e: 74cc strb r4, [r1, #19]
|
|
|
|
570: 4c0d ldr r4, [pc, #52] ; (5a8 <_usb_d_dev_handle_setup+0x70>)
|
|
|
|
572: 191c adds r4, r3, r4
|
|
|
|
574: 7166 strb r6, [r4, #5]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
576: 71a5 strb r5, [r4, #6]
|
|
|
|
ept->flags.bits.is_stalled = 0;
|
|
|
|
578: 2508 movs r5, #8
|
|
|
|
57a: 7ccc ldrb r4, [r1, #19]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
57c: 0152 lsls r2, r2, #5
|
|
|
|
57e: 43ac bics r4, r5
|
|
|
|
580: 74cc strb r4, [r1, #19]
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
582: 2400 movs r4, #0
|
|
|
|
584: 4909 ldr r1, [pc, #36] ; (5ac <_usb_d_dev_handle_setup+0x74>)
|
|
|
|
586: 18c9 adds r1, r1, r3
|
|
|
|
588: 728c strb r4, [r1, #10]
|
|
|
|
58a: 768c strb r4, [r1, #26]
|
|
|
|
58c: 4905 ldr r1, [pc, #20] ; (5a4 <_usb_d_dev_handle_setup+0x6c>)
|
|
|
|
58e: 1852 adds r2, r2, r1
|
|
|
|
590: 216f movs r1, #111 ; 0x6f
|
|
|
|
592: 71d1 strb r1, [r2, #7]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_usbendpoint_clear_EPINTEN_reg(const void *const hw, uint8_t submodule_index,
|
|
|
|
hri_usbendpoint_epintenset_reg_t mask)
|
|
|
|
{
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
594: 4a04 ldr r2, [pc, #16] ; (5a8 <_usb_d_dev_handle_setup+0x70>)
|
|
|
|
596: 189b adds r3, r3, r2
|
|
|
|
598: 7259 strb r1, [r3, #9]
|
|
|
|
dev_inst.ep_callbacks.setup(ept->ep);
|
|
|
|
59a: 4b05 ldr r3, [pc, #20] ; (5b0 <_usb_d_dev_handle_setup+0x78>)
|
|
|
|
59c: 689b ldr r3, [r3, #8]
|
|
|
|
59e: 4798 blx r3
|
|
|
|
5a0: e7df b.n 562 <_usb_d_dev_handle_setup+0x2a>
|
|
|
|
5a2: 46c0 nop ; (mov r8, r8)
|
|
|
|
5a4: 41005000 .word 0x41005000
|
|
|
|
5a8: 410050ff .word 0x410050ff
|
|
|
|
5ac: 20000110 .word 0x20000110
|
|
|
|
5b0: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
000005b4 <_usb_d_dev_handle_stall>:
|
|
|
|
_usbd_ep_int_dis(epn, USB_DEVICE_EPINTFLAG_STALL0 << bank_n);
|
|
|
|
5b4: 2320 movs r3, #32
|
|
|
|
5b6: 408b lsls r3, r1
|
|
|
|
hri_usbendpoint_clear_EPINTEN_reg(USB, epn, flags);
|
|
|
|
5b8: b2da uxtb r2, r3
|
|
|
|
5ba: 230f movs r3, #15
|
|
|
|
* \brief Handles stall sent interrupt
|
|
|
|
* \param[in] ept Pointer to endpoint information.
|
|
|
|
* \param[in] bank_n Bank number.
|
|
|
|
*/
|
|
|
|
static void _usb_d_dev_handle_stall(struct _usb_d_dev_ep *ept, const uint8_t bank_n)
|
|
|
|
{
|
|
|
|
5bc: b510 push {r4, lr}
|
|
|
|
5be: 0004 movs r4, r0
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
5c0: 7c80 ldrb r0, [r0, #18]
|
|
|
|
5c2: 4905 ldr r1, [pc, #20] ; (5d8 <_usb_d_dev_handle_stall+0x24>)
|
|
|
|
5c4: 4003 ands r3, r0
|
|
|
|
5c6: 015b lsls r3, r3, #5
|
|
|
|
5c8: 185b adds r3, r3, r1
|
|
|
|
5ca: 725a strb r2, [r3, #9]
|
|
|
|
/* Clear interrupt enable. Leave status there for status check. */
|
|
|
|
_usbd_ep_int_stall_en(epn, bank_n, false);
|
|
|
|
dev_inst.ep_callbacks.done(ept->ep, USB_TRANS_STALL, ept->trans_count);
|
|
|
|
5cc: 4b03 ldr r3, [pc, #12] ; (5dc <_usb_d_dev_handle_stall+0x28>)
|
|
|
|
5ce: 2101 movs r1, #1
|
|
|
|
5d0: 691b ldr r3, [r3, #16]
|
|
|
|
5d2: 68a2 ldr r2, [r4, #8]
|
|
|
|
5d4: 4798 blx r3
|
|
|
|
}
|
|
|
|
5d6: bd10 pop {r4, pc}
|
|
|
|
5d8: 410050ff .word 0x410050ff
|
|
|
|
5dc: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
000005e0 <_usb_d_dev_trans_done>:
|
|
|
|
* \brief Finish the transaction and invoke callback
|
|
|
|
* \param[in, out] ept Pointer to endpoint information.
|
|
|
|
* \param[in] code Information code passed.
|
|
|
|
*/
|
|
|
|
static void _usb_d_dev_trans_done(struct _usb_d_dev_ep *ept, const int32_t code)
|
|
|
|
{
|
|
|
|
5e0: b510 push {r4, lr}
|
|
|
|
5e2: 0003 movs r3, r0
|
|
|
|
if (!(_usb_d_dev_ep_is_used(ept) && _usb_d_dev_ep_is_busy(ept))) {
|
|
|
|
5e4: 7c80 ldrb r0, [r0, #18]
|
|
|
|
5e6: 28ff cmp r0, #255 ; 0xff
|
|
|
|
5e8: d009 beq.n 5fe <_usb_d_dev_trans_done+0x1e>
|
|
|
|
5ea: 2440 movs r4, #64 ; 0x40
|
|
|
|
5ec: 7cda ldrb r2, [r3, #19]
|
|
|
|
5ee: 4222 tst r2, r4
|
|
|
|
5f0: d005 beq.n 5fe <_usb_d_dev_trans_done+0x1e>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ept->flags.bits.is_busy = 0;
|
|
|
|
5f2: 43a2 bics r2, r4
|
|
|
|
5f4: 74da strb r2, [r3, #19]
|
|
|
|
dev_inst.ep_callbacks.done(ept->ep, code, ept->trans_count);
|
|
|
|
5f6: 4a02 ldr r2, [pc, #8] ; (600 <_usb_d_dev_trans_done+0x20>)
|
|
|
|
5f8: 6914 ldr r4, [r2, #16]
|
|
|
|
5fa: 689a ldr r2, [r3, #8]
|
|
|
|
5fc: 47a0 blx r4
|
|
|
|
}
|
|
|
|
5fe: bd10 pop {r4, pc}
|
|
|
|
600: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
00000604 <_usb_d_dev_trans_stop>:
|
|
|
|
* \param[in, out] ept Pointer to endpoint information.
|
|
|
|
* \param[in] dir Endpoint direction.
|
|
|
|
* \param[in] code Information code passed.
|
|
|
|
*/
|
|
|
|
static void _usb_d_dev_trans_stop(struct _usb_d_dev_ep *ept, bool dir, const int32_t code)
|
|
|
|
{
|
|
|
|
604: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
606: 4694 mov ip, r2
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
608: 7c83 ldrb r3, [r0, #18]
|
|
|
|
;
|
|
|
|
const uint8_t intflags[2] = {USB_D_BANK0_INT_FLAGS, USB_D_BANK1_INT_FLAGS};
|
|
|
|
60a: 4a13 ldr r2, [pc, #76] ; (658 <_usb_d_dev_trans_stop+0x54>)
|
|
|
|
60c: ae01 add r6, sp, #4
|
|
|
|
{
|
|
|
|
60e: 000d movs r5, r1
|
|
|
|
const uint8_t intflags[2] = {USB_D_BANK0_INT_FLAGS, USB_D_BANK1_INT_FLAGS};
|
|
|
|
610: 8032 strh r2, [r6, #0]
|
|
|
|
if (!(_usb_d_dev_ep_is_used(ept) && _usb_d_dev_ep_is_busy(ept))) {
|
|
|
|
612: 2bff cmp r3, #255 ; 0xff
|
|
|
|
614: d01a beq.n 64c <_usb_d_dev_trans_stop+0x48>
|
|
|
|
616: 2740 movs r7, #64 ; 0x40
|
|
|
|
618: 7cc2 ldrb r2, [r0, #19]
|
|
|
|
61a: 423a tst r2, r7
|
|
|
|
61c: d016 beq.n 64c <_usb_d_dev_trans_stop+0x48>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
61e: 220f movs r2, #15
|
|
|
|
620: 4013 ands r3, r2
|
|
|
|
622: 001c movs r4, r3
|
|
|
|
624: 3408 adds r4, #8
|
|
|
|
626: 0162 lsls r2, r4, #5
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* Stop transfer */
|
|
|
|
if (dir) {
|
|
|
|
628: 2900 cmp r1, #0
|
|
|
|
62a: d010 beq.n 64e <_usb_d_dev_trans_stop+0x4a>
|
|
|
|
62c: 4f0b ldr r7, [pc, #44] ; (65c <_usb_d_dev_trans_stop+0x58>)
|
|
|
|
62e: 19d2 adds r2, r2, r7
|
|
|
|
630: 2780 movs r7, #128 ; 0x80
|
|
|
|
632: 7117 strb r7, [r2, #4]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
634: 4909 ldr r1, [pc, #36] ; (65c <_usb_d_dev_trans_stop+0x58>)
|
|
|
|
636: 0164 lsls r4, r4, #5
|
|
|
|
638: 1864 adds r4, r4, r1
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
63a: 4909 ldr r1, [pc, #36] ; (660 <_usb_d_dev_trans_stop+0x5c>)
|
|
|
|
_usbd_ep_set_in_rdy(epn, 1, false);
|
|
|
|
} else {
|
|
|
|
/* NAK OUT */
|
|
|
|
_usbd_ep_set_out_rdy(epn, 0, false);
|
|
|
|
}
|
|
|
|
_usbd_ep_int_ack(epn, intflags[dir]);
|
|
|
|
63c: 5d72 ldrb r2, [r6, r5]
|
|
|
|
63e: 015b lsls r3, r3, #5
|
|
|
|
640: 185b adds r3, r3, r1
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
642: 71e2 strb r2, [r4, #7]
|
|
|
|
_usbd_ep_int_dis(epn, intflags[dir]);
|
|
|
|
_usb_d_dev_trans_done(ept, code);
|
|
|
|
644: 4661 mov r1, ip
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
646: 725a strb r2, [r3, #9]
|
|
|
|
648: 4b06 ldr r3, [pc, #24] ; (664 <_usb_d_dev_trans_stop+0x60>)
|
|
|
|
64a: 4798 blx r3
|
|
|
|
}
|
|
|
|
64c: bdf7 pop {r0, r1, r2, r4, r5, r6, r7, pc}
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
64e: 4903 ldr r1, [pc, #12] ; (65c <_usb_d_dev_trans_stop+0x58>)
|
|
|
|
650: 1852 adds r2, r2, r1
|
|
|
|
652: 7157 strb r7, [r2, #5]
|
|
|
|
}
|
|
|
|
654: e7ee b.n 634 <_usb_d_dev_trans_stop+0x30>
|
|
|
|
656: 46c0 nop ; (mov r8, r8)
|
|
|
|
658: 00004a25 .word 0x00004a25
|
|
|
|
65c: 41005000 .word 0x41005000
|
|
|
|
660: 410050ff .word 0x410050ff
|
|
|
|
664: 000005e1 .word 0x000005e1
|
|
|
|
|
|
|
|
00000668 <_usb_d_dev_handle_trfail>:
|
|
|
|
{
|
|
|
|
668: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
66a: 000d movs r5, r1
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
66c: 210f movs r1, #15
|
|
|
|
66e: 7c83 ldrb r3, [r0, #18]
|
|
|
|
{
|
|
|
|
670: b085 sub sp, #20
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
672: 400b ands r3, r1
|
|
|
|
674: 469c mov ip, r3
|
|
|
|
const uint8_t fail[2] = {USB_DEVICE_EPINTFLAG_TRFAIL0, USB_DEVICE_EPINTFLAG_TRFAIL1};
|
|
|
|
676: 4b30 ldr r3, [pc, #192] ; (738 <_usb_d_dev_handle_trfail+0xd0>)
|
|
|
|
678: ae03 add r6, sp, #12
|
|
|
|
67a: 8033 strh r3, [r6, #0]
|
|
|
|
UsbDeviceDescBank *bank = prvt_inst.desc_table[epn].DeviceDescBank;
|
|
|
|
67c: 4663 mov r3, ip
|
|
|
|
67e: 015b lsls r3, r3, #5
|
|
|
|
680: 9300 str r3, [sp, #0]
|
|
|
|
uint8_t eptype
|
|
|
|
682: 4663 mov r3, ip
|
|
|
|
684: 3308 adds r3, #8
|
|
|
|
686: 492d ldr r1, [pc, #180] ; (73c <_usb_d_dev_handle_trfail+0xd4>)
|
|
|
|
|
|
|
|
static inline hri_usbendpoint_epcfg_reg_t hri_usbendpoint_read_EPCFG_EPTYPE1_bf(const void *const hw,
|
|
|
|
uint8_t submodule_index)
|
|
|
|
{
|
|
|
|
uint8_t tmp;
|
|
|
|
tmp = ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg;
|
|
|
|
688: 015c lsls r4, r3, #5
|
|
|
|
68a: 2d00 cmp r5, #0
|
|
|
|
68c: d020 beq.n 6d0 <_usb_d_dev_handle_trfail+0x68>
|
|
|
|
68e: 5d09 ldrb r1, [r1, r4]
|
|
|
|
tmp = (tmp & USB_DEVICE_EPCFG_EPTYPE1_Msk) >> USB_DEVICE_EPCFG_EPTYPE1_Pos;
|
|
|
|
690: 0649 lsls r1, r1, #25
|
|
|
|
692: 0f49 lsrs r1, r1, #29
|
|
|
|
st.reg = bank[bank_n].STATUS_BK.reg;
|
|
|
|
694: 9a00 ldr r2, [sp, #0]
|
|
|
|
696: 012c lsls r4, r5, #4
|
|
|
|
698: 18a4 adds r4, r4, r2
|
|
|
|
69a: 4a29 ldr r2, [pc, #164] ; (740 <_usb_d_dev_handle_trfail+0xd8>)
|
|
|
|
hri_usbendpoint_clear_EPINTFLAG_reg(hw, epn, fail[bank_n]);
|
|
|
|
69c: 5d76 ldrb r6, [r6, r5]
|
|
|
|
st.reg = bank[bank_n].STATUS_BK.reg;
|
|
|
|
69e: 1914 adds r4, r2, r4
|
|
|
|
6a0: 7aa7 ldrb r7, [r4, #10]
|
|
|
|
6a2: b2ff uxtb r7, r7
|
|
|
|
if ((eptype == USB_D_EPTYPE_ISOCH) && st.bit.CRCERR) {
|
|
|
|
6a4: 2902 cmp r1, #2
|
|
|
|
6a6: d117 bne.n 6d8 <_usb_d_dev_handle_trfail+0x70>
|
|
|
|
6a8: 3901 subs r1, #1
|
|
|
|
6aa: 420f tst r7, r1
|
|
|
|
6ac: d014 beq.n 6d8 <_usb_d_dev_handle_trfail+0x70>
|
|
|
|
bank[bank_n].STATUS_BK.bit.CRCERR = 0;
|
|
|
|
6ae: 7aa7 ldrb r7, [r4, #10]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
6b0: 4a22 ldr r2, [pc, #136] ; (73c <_usb_d_dev_handle_trfail+0xd4>)
|
|
|
|
6b2: 015b lsls r3, r3, #5
|
|
|
|
6b4: 189b adds r3, r3, r2
|
|
|
|
6b6: 438f bics r7, r1
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
6b8: 9a00 ldr r2, [sp, #0]
|
|
|
|
6ba: 72a7 strb r7, [r4, #10]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
6bc: 71de strb r6, [r3, #7]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
6be: 4b21 ldr r3, [pc, #132] ; (744 <_usb_d_dev_handle_trfail+0xdc>)
|
|
|
|
_usb_d_dev_trans_stop(ept, bank_n, USB_TRANS_ERROR);
|
|
|
|
6c0: 4029 ands r1, r5
|
|
|
|
6c2: 18d2 adds r2, r2, r3
|
|
|
|
6c4: 7256 strb r6, [r2, #9]
|
|
|
|
6c6: 2204 movs r2, #4
|
|
|
|
_usb_d_dev_trans_stop(ept, _usb_d_dev_ep_is_in(ept), USB_TRANS_DONE);
|
|
|
|
6c8: 4b1f ldr r3, [pc, #124] ; (748 <_usb_d_dev_handle_trfail+0xe0>)
|
|
|
|
6ca: 4798 blx r3
|
|
|
|
}
|
|
|
|
6cc: b005 add sp, #20
|
|
|
|
6ce: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
tmp = ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg;
|
|
|
|
6d0: 5d0c ldrb r4, [r1, r4]
|
|
|
|
tmp = (tmp & USB_DEVICE_EPCFG_EPTYPE0_Msk) >> USB_DEVICE_EPCFG_EPTYPE0_Pos;
|
|
|
|
6d2: 2107 movs r1, #7
|
|
|
|
6d4: 4021 ands r1, r4
|
|
|
|
return tmp;
|
|
|
|
6d6: e7dd b.n 694 <_usb_d_dev_handle_trfail+0x2c>
|
|
|
|
} else if (st.bit.ERRORFLOW) {
|
|
|
|
6d8: 2102 movs r1, #2
|
|
|
|
6da: 003a movs r2, r7
|
|
|
|
6dc: 400a ands r2, r1
|
|
|
|
6de: 9201 str r2, [sp, #4]
|
|
|
|
6e0: 420f tst r7, r1
|
|
|
|
6e2: d017 beq.n 714 <_usb_d_dev_handle_trfail+0xac>
|
|
|
|
bank[bank_n].STATUS_BK.bit.ERRORFLOW = 0;
|
|
|
|
6e4: 7aa2 ldrb r2, [r4, #10]
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
6e6: 7cc7 ldrb r7, [r0, #19]
|
|
|
|
bank[bank_n].STATUS_BK.bit.ERRORFLOW = 0;
|
|
|
|
6e8: 438a bics r2, r1
|
|
|
|
6ea: 72a2 strb r2, [r4, #10]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
6ec: 4a13 ldr r2, [pc, #76] ; (73c <_usb_d_dev_handle_trfail+0xd4>)
|
|
|
|
6ee: 015b lsls r3, r3, #5
|
|
|
|
6f0: 189b adds r3, r3, r2
|
|
|
|
6f2: 71de strb r6, [r3, #7]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
6f4: 9a00 ldr r2, [sp, #0]
|
|
|
|
6f6: 4b13 ldr r3, [pc, #76] ; (744 <_usb_d_dev_handle_trfail+0xdc>)
|
|
|
|
6f8: 18d2 adds r2, r2, r3
|
|
|
|
if (is_ctrl && _usb_d_dev_ep_is_busy(ept)) {
|
|
|
|
6fa: 2307 movs r3, #7
|
|
|
|
6fc: 7256 strb r6, [r2, #9]
|
|
|
|
6fe: 403b ands r3, r7
|
|
|
|
700: 2b01 cmp r3, #1
|
|
|
|
702: d1e3 bne.n 6cc <_usb_d_dev_handle_trfail+0x64>
|
|
|
|
704: 067b lsls r3, r7, #25
|
|
|
|
706: d5e1 bpl.n 6cc <_usb_d_dev_handle_trfail+0x64>
|
|
|
|
if (bank_n != _usb_d_dev_ep_is_in(ept)) {
|
|
|
|
708: 7cc1 ldrb r1, [r0, #19]
|
|
|
|
70a: 09c9 lsrs r1, r1, #7
|
|
|
|
70c: 42a9 cmp r1, r5
|
|
|
|
70e: d0dd beq.n 6cc <_usb_d_dev_handle_trfail+0x64>
|
|
|
|
_usb_d_dev_trans_stop(ept, _usb_d_dev_ep_is_in(ept), USB_TRANS_DONE);
|
|
|
|
710: 2200 movs r2, #0
|
|
|
|
712: e7d9 b.n 6c8 <_usb_d_dev_handle_trfail+0x60>
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
714: 4662 mov r2, ip
|
|
|
|
716: 0051 lsls r1, r2, #1
|
|
|
|
718: 194d adds r5, r1, r5
|
|
|
|
71a: 4a09 ldr r2, [pc, #36] ; (740 <_usb_d_dev_handle_trfail+0xd8>)
|
|
|
|
71c: 012d lsls r5, r5, #4
|
|
|
|
71e: 1955 adds r5, r2, r5
|
|
|
|
720: 9a01 ldr r2, [sp, #4]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
722: 015b lsls r3, r3, #5
|
|
|
|
724: 72aa strb r2, [r5, #10]
|
|
|
|
726: 4a05 ldr r2, [pc, #20] ; (73c <_usb_d_dev_handle_trfail+0xd4>)
|
|
|
|
728: 189b adds r3, r3, r2
|
|
|
|
72a: 71de strb r6, [r3, #7]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
72c: 9a00 ldr r2, [sp, #0]
|
|
|
|
72e: 4b05 ldr r3, [pc, #20] ; (744 <_usb_d_dev_handle_trfail+0xdc>)
|
|
|
|
730: 18d2 adds r2, r2, r3
|
|
|
|
732: 7256 strb r6, [r2, #9]
|
|
|
|
}
|
|
|
|
734: e7ca b.n 6cc <_usb_d_dev_handle_trfail+0x64>
|
|
|
|
736: 46c0 nop ; (mov r8, r8)
|
|
|
|
738: 00000804 .word 0x00000804
|
|
|
|
73c: 41005000 .word 0x41005000
|
|
|
|
740: 20000110 .word 0x20000110
|
|
|
|
744: 410050ff .word 0x410050ff
|
|
|
|
748: 00000605 .word 0x00000605
|
|
|
|
|
|
|
|
0000074c <_usb_d_dev_reset_epts>:
|
|
|
|
for (i = 0; i < USB_D_N_EP; i++) {
|
|
|
|
74c: 238c movs r3, #140 ; 0x8c
|
|
|
|
{
|
|
|
|
74e: b570 push {r4, r5, r6, lr}
|
|
|
|
dev_inst.ep[i].ep = 0xFF;
|
|
|
|
750: 26ff movs r6, #255 ; 0xff
|
|
|
|
752: 4d09 ldr r5, [pc, #36] ; (778 <_usb_d_dev_reset_epts+0x2c>)
|
|
|
|
754: 009b lsls r3, r3, #2
|
|
|
|
756: 4c09 ldr r4, [pc, #36] ; (77c <_usb_d_dev_reset_epts+0x30>)
|
|
|
|
758: 18ed adds r5, r5, r3
|
|
|
|
_usb_d_dev_trans_done(&dev_inst.ep[i], USB_TRANS_RESET);
|
|
|
|
75a: 2103 movs r1, #3
|
|
|
|
75c: 0020 movs r0, r4
|
|
|
|
75e: 4b08 ldr r3, [pc, #32] ; (780 <_usb_d_dev_reset_epts+0x34>)
|
|
|
|
760: 4798 blx r3
|
|
|
|
dev_inst.ep[i].flags.u8 = 0;
|
|
|
|
762: 2100 movs r1, #0
|
|
|
|
dev_inst.ep[i].ep = 0xFF;
|
|
|
|
764: 74a6 strb r6, [r4, #18]
|
|
|
|
dev_inst.ep[i].flags.u8 = 0;
|
|
|
|
766: 74e1 strb r1, [r4, #19]
|
|
|
|
for (i = 0; i < USB_D_N_EP; i++) {
|
|
|
|
768: 3414 adds r4, #20
|
|
|
|
76a: 42ac cmp r4, r5
|
|
|
|
76c: d1f5 bne.n 75a <_usb_d_dev_reset_epts+0xe>
|
|
|
|
memset(prvt_inst.desc_table, 0, sizeof(UsbDeviceDescriptor) * (CONF_USB_D_MAX_EP_N + 1));
|
|
|
|
76e: 2260 movs r2, #96 ; 0x60
|
|
|
|
770: 4b04 ldr r3, [pc, #16] ; (784 <_usb_d_dev_reset_epts+0x38>)
|
|
|
|
772: 4805 ldr r0, [pc, #20] ; (788 <_usb_d_dev_reset_epts+0x3c>)
|
|
|
|
774: 4798 blx r3
|
|
|
|
}
|
|
|
|
776: bd70 pop {r4, r5, r6, pc}
|
|
|
|
778: 20000170 .word 0x20000170
|
|
|
|
77c: 20000184 .word 0x20000184
|
|
|
|
780: 000005e1 .word 0x000005e1
|
|
|
|
784: 0000262f .word 0x0000262f
|
|
|
|
788: 20000110 .word 0x20000110
|
|
|
|
|
|
|
|
0000078c <_usb_d_dev_in_next>:
|
|
|
|
{
|
|
|
|
78c: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
78e: 270f movs r7, #15
|
|
|
|
{
|
|
|
|
790: b085 sub sp, #20
|
|
|
|
792: 9101 str r1, [sp, #4]
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
794: 7c83 ldrb r3, [r0, #18]
|
|
|
|
{
|
|
|
|
796: 0004 movs r4, r0
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
798: 9302 str r3, [sp, #8]
|
|
|
|
79a: 401f ands r7, r3
|
|
|
|
uint16_t trans_count = isr ? bank[1].PCKSIZE.bit.BYTE_COUNT : 0;
|
|
|
|
79c: 2300 movs r3, #0
|
|
|
|
79e: 4299 cmp r1, r3
|
|
|
|
7a0: d005 beq.n 7ae <_usb_d_dev_in_next+0x22>
|
|
|
|
UsbDeviceDescBank *bank = &prvt_inst.desc_table[epn].DeviceDescBank[0];
|
|
|
|
7a2: 4b4b ldr r3, [pc, #300] ; (8d0 <_usb_d_dev_in_next+0x144>)
|
|
|
|
7a4: 017a lsls r2, r7, #5
|
|
|
|
7a6: 189b adds r3, r3, r2
|
|
|
|
uint16_t trans_count = isr ? bank[1].PCKSIZE.bit.BYTE_COUNT : 0;
|
|
|
|
7a8: 695b ldr r3, [r3, #20]
|
|
|
|
7aa: 049b lsls r3, r3, #18
|
|
|
|
7ac: 0c9b lsrs r3, r3, #18
|
|
|
|
uint16_t last_pkt = trans_count & ((ept->size == 1023) ? ept->size : (ept->size - 1));
|
|
|
|
7ae: 8a25 ldrh r5, [r4, #16]
|
|
|
|
7b0: 4a48 ldr r2, [pc, #288] ; (8d4 <_usb_d_dev_in_next+0x148>)
|
|
|
|
7b2: 46ac mov ip, r5
|
|
|
|
7b4: 4295 cmp r5, r2
|
|
|
|
7b6: d002 beq.n 7be <_usb_d_dev_in_next+0x32>
|
|
|
|
7b8: 1e6a subs r2, r5, #1
|
|
|
|
7ba: b212 sxth r2, r2
|
|
|
|
7bc: 4694 mov ip, r2
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
7be: 2207 movs r2, #7
|
|
|
|
7c0: 7ce0 ldrb r0, [r4, #19]
|
|
|
|
7c2: 4002 ands r2, r0
|
|
|
|
7c4: 9203 str r2, [sp, #12]
|
|
|
|
if (isr) {
|
|
|
|
7c6: 9a01 ldr r2, [sp, #4]
|
|
|
|
7c8: 2a00 cmp r2, #0
|
|
|
|
7ca: d004 beq.n 7d6 <_usb_d_dev_in_next+0x4a>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
7cc: 4942 ldr r1, [pc, #264] ; (8d8 <_usb_d_dev_in_next+0x14c>)
|
|
|
|
7ce: 017a lsls r2, r7, #5
|
|
|
|
7d0: 1852 adds r2, r2, r1
|
|
|
|
7d2: 2102 movs r1, #2
|
|
|
|
7d4: 71d1 strb r1, [r2, #7]
|
|
|
|
ept->trans_count += trans_count;
|
|
|
|
7d6: 68a2 ldr r2, [r4, #8]
|
|
|
|
7d8: 1899 adds r1, r3, r2
|
|
|
|
if (ept->trans_count < ept->trans_size) {
|
|
|
|
7da: 6862 ldr r2, [r4, #4]
|
|
|
|
ept->trans_count += trans_count;
|
|
|
|
7dc: 60a1 str r1, [r4, #8]
|
|
|
|
if (ept->trans_count < ept->trans_size) {
|
|
|
|
7de: 4291 cmp r1, r2
|
|
|
|
7e0: d240 bcs.n 864 <_usb_d_dev_in_next+0xd8>
|
|
|
|
memcpy(ept->cache, &ept->trans_buf[ept->trans_count], trans_next);
|
|
|
|
7e2: 6823 ldr r3, [r4, #0]
|
|
|
|
trans_next = ept->trans_size - ept->trans_count;
|
|
|
|
7e4: 1a52 subs r2, r2, r1
|
|
|
|
memcpy(ept->cache, &ept->trans_buf[ept->trans_count], trans_next);
|
|
|
|
7e6: 1859 adds r1, r3, r1
|
|
|
|
7e8: 017b lsls r3, r7, #5
|
|
|
|
7ea: 4e39 ldr r6, [pc, #228] ; (8d0 <_usb_d_dev_in_next+0x144>)
|
|
|
|
trans_next = ept->trans_size - ept->trans_count;
|
|
|
|
7ec: b292 uxth r2, r2
|
|
|
|
if (ept->flags.bits.use_cache) {
|
|
|
|
7ee: 9302 str r3, [sp, #8]
|
|
|
|
7f0: 0683 lsls r3, r0, #26
|
|
|
|
7f2: d52c bpl.n 84e <_usb_d_dev_in_next+0xc2>
|
|
|
|
if (trans_next > ept->size) {
|
|
|
|
7f4: 1c2b adds r3, r5, #0
|
|
|
|
7f6: 4295 cmp r5, r2
|
|
|
|
7f8: d900 bls.n 7fc <_usb_d_dev_in_next+0x70>
|
|
|
|
7fa: 1c13 adds r3, r2, #0
|
|
|
|
7fc: b29d uxth r5, r3
|
|
|
|
memcpy(ept->cache, &ept->trans_buf[ept->trans_count], trans_next);
|
|
|
|
7fe: 002a movs r2, r5
|
|
|
|
800: 4b36 ldr r3, [pc, #216] ; (8dc <_usb_d_dev_in_next+0x150>)
|
|
|
|
802: 68e0 ldr r0, [r4, #12]
|
|
|
|
804: 4798 blx r3
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
806: 4b32 ldr r3, [pc, #200] ; (8d0 <_usb_d_dev_in_next+0x144>)
|
|
|
|
_usbd_ep_set_buf(epn, 1, (uint32_t)ept->cache);
|
|
|
|
808: 68e2 ldr r2, [r4, #12]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
80a: 0179 lsls r1, r7, #5
|
|
|
|
80c: 185b adds r3, r3, r1
|
|
|
|
80e: 611a str r2, [r3, #16]
|
|
|
|
bank->PCKSIZE.bit.BYTE_COUNT = size;
|
|
|
|
810: 017b lsls r3, r7, #5
|
|
|
|
812: 18f6 adds r6, r6, r3
|
|
|
|
814: 6973 ldr r3, [r6, #20]
|
|
|
|
816: 04ad lsls r5, r5, #18
|
|
|
|
818: 0b9b lsrs r3, r3, #14
|
|
|
|
81a: 0caa lsrs r2, r5, #18
|
|
|
|
81c: 039d lsls r5, r3, #14
|
|
|
|
81e: 4315 orrs r5, r2
|
|
|
|
820: 6175 str r5, [r6, #20]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = count;
|
|
|
|
822: 6973 ldr r3, [r6, #20]
|
|
|
|
824: 4a2e ldr r2, [pc, #184] ; (8e0 <_usb_d_dev_in_next+0x154>)
|
|
|
|
826: 4013 ands r3, r2
|
|
|
|
828: 6173 str r3, [r6, #20]
|
|
|
|
if (!isr) {
|
|
|
|
82a: 9b01 ldr r3, [sp, #4]
|
|
|
|
82c: 2b00 cmp r3, #0
|
|
|
|
82e: d108 bne.n 842 <_usb_d_dev_in_next+0xb6>
|
|
|
|
if (is_ctrl) {
|
|
|
|
830: 9b03 ldr r3, [sp, #12]
|
|
|
|
inten = USB_D_BANK1_INT_FLAGS | USB_DEVICE_EPINTFLAG_TRFAIL0;
|
|
|
|
832: 224e movs r2, #78 ; 0x4e
|
|
|
|
if (is_ctrl) {
|
|
|
|
834: 2b01 cmp r3, #1
|
|
|
|
836: d000 beq.n 83a <_usb_d_dev_in_next+0xae>
|
|
|
|
inten = USB_D_BANK1_INT_FLAGS;
|
|
|
|
838: 3a04 subs r2, #4
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENSET.reg = mask;
|
|
|
|
83a: 492a ldr r1, [pc, #168] ; (8e4 <_usb_d_dev_in_next+0x158>)
|
|
|
|
83c: 017b lsls r3, r7, #5
|
|
|
|
83e: 185b adds r3, r3, r1
|
|
|
|
840: 729a strb r2, [r3, #10]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
842: 4a25 ldr r2, [pc, #148] ; (8d8 <_usb_d_dev_in_next+0x14c>)
|
|
|
|
844: 017b lsls r3, r7, #5
|
|
|
|
846: 189b adds r3, r3, r2
|
|
|
|
848: 2280 movs r2, #128 ; 0x80
|
|
|
|
84a: 715a strb r2, [r3, #5]
|
|
|
|
}
|
|
|
|
84c: e039 b.n 8c2 <_usb_d_dev_in_next+0x136>
|
|
|
|
if (trans_next > USB_D_DEV_TRANS_MAX) {
|
|
|
|
84e: 2380 movs r3, #128 ; 0x80
|
|
|
|
850: 1c15 adds r5, r2, #0
|
|
|
|
852: 019b lsls r3, r3, #6
|
|
|
|
854: 429a cmp r2, r3
|
|
|
|
856: d900 bls.n 85a <_usb_d_dev_in_next+0xce>
|
|
|
|
858: 1c1d adds r5, r3, #0
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
85a: 017b lsls r3, r7, #5
|
|
|
|
85c: 18f3 adds r3, r6, r3
|
|
|
|
85e: b2ad uxth r5, r5
|
|
|
|
860: 6119 str r1, [r3, #16]
|
|
|
|
}
|
|
|
|
862: e7d5 b.n 810 <_usb_d_dev_in_next+0x84>
|
|
|
|
} else if (ept->flags.bits.need_zlp) {
|
|
|
|
864: 2610 movs r6, #16
|
|
|
|
866: 017a lsls r2, r7, #5
|
|
|
|
868: 4230 tst r0, r6
|
|
|
|
86a: d00e beq.n 88a <_usb_d_dev_in_next+0xfe>
|
|
|
|
ept->flags.bits.need_zlp = 0;
|
|
|
|
86c: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = count;
|
|
|
|
86e: 491c ldr r1, [pc, #112] ; (8e0 <_usb_d_dev_in_next+0x154>)
|
|
|
|
ept->flags.bits.need_zlp = 0;
|
|
|
|
870: 43b3 bics r3, r6
|
|
|
|
872: 74e3 strb r3, [r4, #19]
|
|
|
|
bank->PCKSIZE.bit.BYTE_COUNT = size;
|
|
|
|
874: 4b16 ldr r3, [pc, #88] ; (8d0 <_usb_d_dev_in_next+0x144>)
|
|
|
|
876: 189a adds r2, r3, r2
|
|
|
|
878: 1992 adds r2, r2, r6
|
|
|
|
87a: 6853 ldr r3, [r2, #4]
|
|
|
|
87c: 0b9b lsrs r3, r3, #14
|
|
|
|
87e: 039b lsls r3, r3, #14
|
|
|
|
880: 6053 str r3, [r2, #4]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = count;
|
|
|
|
882: 6853 ldr r3, [r2, #4]
|
|
|
|
884: 400b ands r3, r1
|
|
|
|
886: 6053 str r3, [r2, #4]
|
|
|
|
goto _in_tx_exec;
|
|
|
|
888: e7cf b.n 82a <_usb_d_dev_in_next+0x9e>
|
|
|
|
if (is_ctrl) {
|
|
|
|
88a: 9803 ldr r0, [sp, #12]
|
|
|
|
88c: 2801 cmp r0, #1
|
|
|
|
88e: d11a bne.n 8c6 <_usb_d_dev_in_next+0x13a>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
890: 4814 ldr r0, [pc, #80] ; (8e4 <_usb_d_dev_in_next+0x158>)
|
|
|
|
892: 1812 adds r2, r2, r0
|
|
|
|
894: 204b movs r0, #75 ; 0x4b
|
|
|
|
896: 7250 strb r0, [r2, #9]
|
|
|
|
if (last_pkt == ept->size) {
|
|
|
|
898: 4662 mov r2, ip
|
|
|
|
89a: 4013 ands r3, r2
|
|
|
|
89c: 429d cmp r5, r3
|
|
|
|
89e: d10c bne.n 8ba <_usb_d_dev_in_next+0x12e>
|
|
|
|
ept->flags.bits.is_busy = 0;
|
|
|
|
8a0: 2540 movs r5, #64 ; 0x40
|
|
|
|
8a2: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
if (dev_inst.ep_callbacks.more(ept->ep, ept->trans_count)) {
|
|
|
|
8a4: 9802 ldr r0, [sp, #8]
|
|
|
|
ept->flags.bits.is_busy = 0;
|
|
|
|
8a6: 43ab bics r3, r5
|
|
|
|
8a8: 74e3 strb r3, [r4, #19]
|
|
|
|
if (dev_inst.ep_callbacks.more(ept->ep, ept->trans_count)) {
|
|
|
|
8aa: 4b0f ldr r3, [pc, #60] ; (8e8 <_usb_d_dev_in_next+0x15c>)
|
|
|
|
8ac: 68db ldr r3, [r3, #12]
|
|
|
|
8ae: 4798 blx r3
|
|
|
|
8b0: 2800 cmp r0, #0
|
|
|
|
8b2: d106 bne.n 8c2 <_usb_d_dev_in_next+0x136>
|
|
|
|
ept->flags.bits.is_busy = 1;
|
|
|
|
8b4: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
8b6: 432b orrs r3, r5
|
|
|
|
8b8: 74e3 strb r3, [r4, #19]
|
|
|
|
_usb_d_dev_trans_done(ept, USB_TRANS_DONE);
|
|
|
|
8ba: 2100 movs r1, #0
|
|
|
|
8bc: 0020 movs r0, r4
|
|
|
|
8be: 4b0b ldr r3, [pc, #44] ; (8ec <_usb_d_dev_in_next+0x160>)
|
|
|
|
8c0: 4798 blx r3
|
|
|
|
}
|
|
|
|
8c2: b005 add sp, #20
|
|
|
|
8c4: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
8c6: 4807 ldr r0, [pc, #28] ; (8e4 <_usb_d_dev_in_next+0x158>)
|
|
|
|
8c8: 1812 adds r2, r2, r0
|
|
|
|
8ca: 204a movs r0, #74 ; 0x4a
|
|
|
|
8cc: e7e3 b.n 896 <_usb_d_dev_in_next+0x10a>
|
|
|
|
8ce: 46c0 nop ; (mov r8, r8)
|
|
|
|
8d0: 20000110 .word 0x20000110
|
|
|
|
8d4: 000003ff .word 0x000003ff
|
|
|
|
8d8: 41005100 .word 0x41005100
|
|
|
|
8dc: 0000261d .word 0x0000261d
|
|
|
|
8e0: f0003fff .word 0xf0003fff
|
|
|
|
8e4: 410050ff .word 0x410050ff
|
|
|
|
8e8: 20000170 .word 0x20000170
|
|
|
|
8ec: 000005e1 .word 0x000005e1
|
|
|
|
|
|
|
|
000008f0 <_usb_d_dev_out_next>:
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
8f0: 230f movs r3, #15
|
|
|
|
{
|
|
|
|
8f2: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
8f4: 7c85 ldrb r5, [r0, #18]
|
|
|
|
{
|
|
|
|
8f6: b085 sub sp, #20
|
|
|
|
8f8: 0004 movs r4, r0
|
|
|
|
8fa: 000e movs r6, r1
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
8fc: 401d ands r5, r3
|
|
|
|
uint16_t trans_size = isr ? bank->PCKSIZE.bit.MULTI_PACKET_SIZE : 0;
|
|
|
|
8fe: 9103 str r1, [sp, #12]
|
|
|
|
uint16_t last_trans = isr ? bank->PCKSIZE.bit.BYTE_COUNT : 0;
|
|
|
|
900: 9101 str r1, [sp, #4]
|
|
|
|
uint16_t trans_size = isr ? bank->PCKSIZE.bit.MULTI_PACKET_SIZE : 0;
|
|
|
|
902: 2900 cmp r1, #0
|
|
|
|
904: d00a beq.n 91c <_usb_d_dev_out_next+0x2c>
|
|
|
|
906: 4b61 ldr r3, [pc, #388] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
908: 016a lsls r2, r5, #5
|
|
|
|
90a: 189b adds r3, r3, r2
|
|
|
|
90c: 6859 ldr r1, [r3, #4]
|
|
|
|
90e: 0109 lsls r1, r1, #4
|
|
|
|
910: 0c8a lsrs r2, r1, #18
|
|
|
|
912: 9203 str r2, [sp, #12]
|
|
|
|
uint16_t last_trans = isr ? bank->PCKSIZE.bit.BYTE_COUNT : 0;
|
|
|
|
914: 6859 ldr r1, [r3, #4]
|
|
|
|
916: 0489 lsls r1, r1, #18
|
|
|
|
918: 0c8b lsrs r3, r1, #18
|
|
|
|
91a: 9301 str r3, [sp, #4]
|
|
|
|
uint16_t size_mask = (ept->size == 1023) ? 1023 : (ept->size - 1);
|
|
|
|
91c: 8a23 ldrh r3, [r4, #16]
|
|
|
|
91e: 9300 str r3, [sp, #0]
|
|
|
|
920: 9a00 ldr r2, [sp, #0]
|
|
|
|
922: 4b5b ldr r3, [pc, #364] ; (a90 <_usb_d_dev_out_next+0x1a0>)
|
|
|
|
924: 429a cmp r2, r3
|
|
|
|
926: d003 beq.n 930 <_usb_d_dev_out_next+0x40>
|
|
|
|
928: 0013 movs r3, r2
|
|
|
|
92a: 3b01 subs r3, #1
|
|
|
|
92c: b29b uxth r3, r3
|
|
|
|
92e: 9300 str r3, [sp, #0]
|
|
|
|
uint16_t last_pkt = last_trans & size_mask;
|
|
|
|
930: 9b01 ldr r3, [sp, #4]
|
|
|
|
932: 9f00 ldr r7, [sp, #0]
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
934: 7ce2 ldrb r2, [r4, #19]
|
|
|
|
uint16_t last_pkt = last_trans & size_mask;
|
|
|
|
936: 401f ands r7, r3
|
|
|
|
bool is_ctrl = _usb_d_dev_ep_is_ctrl(ept);
|
|
|
|
938: 2307 movs r3, #7
|
|
|
|
93a: 4013 ands r3, r2
|
|
|
|
93c: 9302 str r3, [sp, #8]
|
|
|
|
if (isr) {
|
|
|
|
93e: 2e00 cmp r6, #0
|
|
|
|
940: d004 beq.n 94c <_usb_d_dev_out_next+0x5c>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
942: 4954 ldr r1, [pc, #336] ; (a94 <_usb_d_dev_out_next+0x1a4>)
|
|
|
|
944: 016b lsls r3, r5, #5
|
|
|
|
946: 185b adds r3, r3, r1
|
|
|
|
948: 2101 movs r1, #1
|
|
|
|
94a: 71d9 strb r1, [r3, #7]
|
|
|
|
if (ept->flags.bits.use_cache && ept->trans_size) {
|
|
|
|
94c: 0693 lsls r3, r2, #26
|
|
|
|
94e: d50f bpl.n 970 <_usb_d_dev_out_next+0x80>
|
|
|
|
950: 6863 ldr r3, [r4, #4]
|
|
|
|
952: 2b00 cmp r3, #0
|
|
|
|
954: d00c beq.n 970 <_usb_d_dev_out_next+0x80>
|
|
|
|
uint16_t buf_remain = ept->trans_size - ept->trans_count;
|
|
|
|
956: 68a2 ldr r2, [r4, #8]
|
|
|
|
memcpy(&ept->trans_buf[ept->trans_count], ept->cache, (buf_remain > last_pkt) ? last_pkt : buf_remain);
|
|
|
|
958: 6821 ldr r1, [r4, #0]
|
|
|
|
uint16_t buf_remain = ept->trans_size - ept->trans_count;
|
|
|
|
95a: 1a9b subs r3, r3, r2
|
|
|
|
memcpy(&ept->trans_buf[ept->trans_count], ept->cache, (buf_remain > last_pkt) ? last_pkt : buf_remain);
|
|
|
|
95c: 1888 adds r0, r1, r2
|
|
|
|
95e: 1c1a adds r2, r3, #0
|
|
|
|
960: b29b uxth r3, r3
|
|
|
|
962: 42bb cmp r3, r7
|
|
|
|
964: d900 bls.n 968 <_usb_d_dev_out_next+0x78>
|
|
|
|
966: 1c3a adds r2, r7, #0
|
|
|
|
968: 68e1 ldr r1, [r4, #12]
|
|
|
|
96a: 4b4b ldr r3, [pc, #300] ; (a98 <_usb_d_dev_out_next+0x1a8>)
|
|
|
|
96c: b292 uxth r2, r2
|
|
|
|
96e: 4798 blx r3
|
|
|
|
if (ept->trans_size == 0 && ept->flags.bits.need_zlp) {
|
|
|
|
970: 6863 ldr r3, [r4, #4]
|
|
|
|
972: 016a lsls r2, r5, #5
|
|
|
|
974: 4694 mov ip, r2
|
|
|
|
976: 2b00 cmp r3, #0
|
|
|
|
978: d12c bne.n 9d4 <_usb_d_dev_out_next+0xe4>
|
|
|
|
97a: 7ce2 ldrb r2, [r4, #19]
|
|
|
|
97c: 06d1 lsls r1, r2, #27
|
|
|
|
97e: d529 bpl.n 9d4 <_usb_d_dev_out_next+0xe4>
|
|
|
|
ept->flags.bits.need_zlp = 0;
|
|
|
|
980: 3330 adds r3, #48 ; 0x30
|
|
|
|
982: 439a bics r2, r3
|
|
|
|
984: 3b10 subs r3, #16
|
|
|
|
986: 431a orrs r2, r3
|
|
|
|
988: 74e2 strb r2, [r4, #19]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
98a: 4662 mov r2, ip
|
|
|
|
98c: 68e1 ldr r1, [r4, #12]
|
|
|
|
98e: 4b3f ldr r3, [pc, #252] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = size;
|
|
|
|
990: 4842 ldr r0, [pc, #264] ; (a9c <_usb_d_dev_out_next+0x1ac>)
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
992: 5099 str r1, [r3, r2]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = size;
|
|
|
|
994: 8a21 ldrh r1, [r4, #16]
|
|
|
|
996: 4463 add r3, ip
|
|
|
|
998: 685a ldr r2, [r3, #4]
|
|
|
|
99a: 0489 lsls r1, r1, #18
|
|
|
|
99c: 0909 lsrs r1, r1, #4
|
|
|
|
99e: 4002 ands r2, r0
|
|
|
|
9a0: 430a orrs r2, r1
|
|
|
|
9a2: 605a str r2, [r3, #4]
|
|
|
|
bank->PCKSIZE.bit.BYTE_COUNT = count;
|
|
|
|
9a4: 685a ldr r2, [r3, #4]
|
|
|
|
9a6: 0b92 lsrs r2, r2, #14
|
|
|
|
9a8: 0392 lsls r2, r2, #14
|
|
|
|
9aa: 605a str r2, [r3, #4]
|
|
|
|
if (!isr) {
|
|
|
|
9ac: 2e00 cmp r6, #0
|
|
|
|
9ae: d10b bne.n 9c8 <_usb_d_dev_out_next+0xd8>
|
|
|
|
if (is_ctrl) {
|
|
|
|
9b0: 9902 ldr r1, [sp, #8]
|
|
|
|
inten = USB_D_BANK0_INT_FLAGS;
|
|
|
|
9b2: 2225 movs r2, #37 ; 0x25
|
|
|
|
9b4: 016b lsls r3, r5, #5
|
|
|
|
if (is_ctrl) {
|
|
|
|
9b6: 2901 cmp r1, #1
|
|
|
|
9b8: d103 bne.n 9c2 <_usb_d_dev_out_next+0xd2>
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
9ba: 4a34 ldr r2, [pc, #208] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
9bc: 18d2 adds r2, r2, r3
|
|
|
|
9be: 7696 strb r6, [r2, #26]
|
|
|
|
inten = USB_D_BANK0_INT_FLAGS | USB_DEVICE_EPINTFLAG_TRFAIL1;
|
|
|
|
9c0: 222d movs r2, #45 ; 0x2d
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENSET.reg = mask;
|
|
|
|
9c2: 4937 ldr r1, [pc, #220] ; (aa0 <_usb_d_dev_out_next+0x1b0>)
|
|
|
|
9c4: 185b adds r3, r3, r1
|
|
|
|
9c6: 729a strb r2, [r3, #10]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
9c8: 4b32 ldr r3, [pc, #200] ; (a94 <_usb_d_dev_out_next+0x1a4>)
|
|
|
|
9ca: 016d lsls r5, r5, #5
|
|
|
|
9cc: 18ed adds r5, r5, r3
|
|
|
|
9ce: 2340 movs r3, #64 ; 0x40
|
|
|
|
9d0: 712b strb r3, [r5, #4]
|
|
|
|
}
|
|
|
|
9d2: e01d b.n a10 <_usb_d_dev_out_next+0x120>
|
|
|
|
ept->trans_count += last_trans;
|
|
|
|
9d4: 68a1 ldr r1, [r4, #8]
|
|
|
|
} else if (isr && last_pkt < ept->size) {
|
|
|
|
9d6: 2e00 cmp r6, #0
|
|
|
|
9d8: d01c beq.n a14 <_usb_d_dev_out_next+0x124>
|
|
|
|
9da: 8a22 ldrh r2, [r4, #16]
|
|
|
|
9dc: 42ba cmp r2, r7
|
|
|
|
9de: d919 bls.n a14 <_usb_d_dev_out_next+0x124>
|
|
|
|
ept->flags.bits.need_zlp = 0;
|
|
|
|
9e0: 2210 movs r2, #16
|
|
|
|
9e2: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
9e4: 4393 bics r3, r2
|
|
|
|
9e6: 74e3 strb r3, [r4, #19]
|
|
|
|
ept->trans_count += last_trans;
|
|
|
|
9e8: 9b01 ldr r3, [sp, #4]
|
|
|
|
9ea: 1859 adds r1, r3, r1
|
|
|
|
9ec: 60a1 str r1, [r4, #8]
|
|
|
|
if (is_ctrl) {
|
|
|
|
9ee: 9a02 ldr r2, [sp, #8]
|
|
|
|
9f0: 016b lsls r3, r5, #5
|
|
|
|
9f2: 2a01 cmp r2, #1
|
|
|
|
9f4: d146 bne.n a84 <_usb_d_dev_out_next+0x194>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
9f6: 4a2a ldr r2, [pc, #168] ; (aa0 <_usb_d_dev_out_next+0x1b0>)
|
|
|
|
9f8: 189b adds r3, r3, r2
|
|
|
|
9fa: 222d movs r2, #45 ; 0x2d
|
|
|
|
9fc: 725a strb r2, [r3, #9]
|
|
|
|
if (0 == epn) {
|
|
|
|
9fe: 2d00 cmp r5, #0
|
|
|
|
a00: d102 bne.n a08 <_usb_d_dev_out_next+0x118>
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
a02: 4b22 ldr r3, [pc, #136] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
a04: 68e2 ldr r2, [r4, #12]
|
|
|
|
a06: 601a str r2, [r3, #0]
|
|
|
|
_usb_d_dev_trans_done(ept, USB_TRANS_DONE);
|
|
|
|
a08: 2100 movs r1, #0
|
|
|
|
a0a: 0020 movs r0, r4
|
|
|
|
a0c: 4b25 ldr r3, [pc, #148] ; (aa4 <_usb_d_dev_out_next+0x1b4>)
|
|
|
|
a0e: 4798 blx r3
|
|
|
|
}
|
|
|
|
a10: b005 add sp, #20
|
|
|
|
a12: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
ept->trans_count += trans_size;
|
|
|
|
a14: 9a03 ldr r2, [sp, #12]
|
|
|
|
a16: 1851 adds r1, r2, r1
|
|
|
|
a18: 60a1 str r1, [r4, #8]
|
|
|
|
if (ept->trans_count < ept->trans_size) {
|
|
|
|
a1a: 428b cmp r3, r1
|
|
|
|
a1c: d9e7 bls.n 9ee <_usb_d_dev_out_next+0xfe>
|
|
|
|
if (ept->flags.bits.use_cache) {
|
|
|
|
a1e: 2020 movs r0, #32
|
|
|
|
a20: 7ce2 ldrb r2, [r4, #19]
|
|
|
|
trans_next = ept->trans_size - ept->trans_count;
|
|
|
|
a22: 1a5b subs r3, r3, r1
|
|
|
|
_usbd_ep_set_out_trans(epn, 0, ept->size, 0);
|
|
|
|
a24: 8a27 ldrh r7, [r4, #16]
|
|
|
|
trans_next = ept->trans_size - ept->trans_count;
|
|
|
|
a26: b29b uxth r3, r3
|
|
|
|
if (ept->flags.bits.use_cache) {
|
|
|
|
a28: 4202 tst r2, r0
|
|
|
|
a2a: d016 beq.n a5a <_usb_d_dev_out_next+0x16a>
|
|
|
|
if (trans_next > ept->size) {
|
|
|
|
a2c: 1c39 adds r1, r7, #0
|
|
|
|
a2e: 429f cmp r7, r3
|
|
|
|
a30: d900 bls.n a34 <_usb_d_dev_out_next+0x144>
|
|
|
|
a32: 1c19 adds r1, r3, #0
|
|
|
|
_usbd_ep_set_buf(epn, 0, (uint32_t)ept->cache);
|
|
|
|
a34: 68e0 ldr r0, [r4, #12]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
a36: 4a15 ldr r2, [pc, #84] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
a38: b28b uxth r3, r1
|
|
|
|
a3a: 0169 lsls r1, r5, #5
|
|
|
|
a3c: 5050 str r0, [r2, r1]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = size;
|
|
|
|
a3e: 4a13 ldr r2, [pc, #76] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
a40: 4816 ldr r0, [pc, #88] ; (a9c <_usb_d_dev_out_next+0x1ac>)
|
|
|
|
a42: 4462 add r2, ip
|
|
|
|
a44: 6851 ldr r1, [r2, #4]
|
|
|
|
a46: 049b lsls r3, r3, #18
|
|
|
|
a48: 091b lsrs r3, r3, #4
|
|
|
|
a4a: 4001 ands r1, r0
|
|
|
|
a4c: 430b orrs r3, r1
|
|
|
|
a4e: 6053 str r3, [r2, #4]
|
|
|
|
bank->PCKSIZE.bit.BYTE_COUNT = count;
|
|
|
|
a50: 6853 ldr r3, [r2, #4]
|
|
|
|
a52: 0b9b lsrs r3, r3, #14
|
|
|
|
a54: 039b lsls r3, r3, #14
|
|
|
|
a56: 6053 str r3, [r2, #4]
|
|
|
|
goto _out_rx_exec;
|
|
|
|
a58: e7a8 b.n 9ac <_usb_d_dev_out_next+0xbc>
|
|
|
|
if (trans_next > ept->size) {
|
|
|
|
a5a: 429f cmp r7, r3
|
|
|
|
a5c: d20b bcs.n a76 <_usb_d_dev_out_next+0x186>
|
|
|
|
if (trans_next > USB_D_DEV_TRANS_MAX) {
|
|
|
|
a5e: 2080 movs r0, #128 ; 0x80
|
|
|
|
a60: 0180 lsls r0, r0, #6
|
|
|
|
a62: 4283 cmp r3, r0
|
|
|
|
a64: d80c bhi.n a80 <_usb_d_dev_out_next+0x190>
|
|
|
|
trans_next -= trans_next & size_mask;
|
|
|
|
a66: 9a00 ldr r2, [sp, #0]
|
|
|
|
a68: 4393 bics r3, r2
|
|
|
|
_usbd_ep_set_buf(epn, 0, (uint32_t)&ept->trans_buf[ept->trans_count]);
|
|
|
|
a6a: 6820 ldr r0, [r4, #0]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
a6c: 4a07 ldr r2, [pc, #28] ; (a8c <_usb_d_dev_out_next+0x19c>)
|
|
|
|
_usbd_ep_set_buf(epn, 0, (uint32_t)&ept->trans_buf[ept->trans_count]);
|
|
|
|
a6e: 1841 adds r1, r0, r1
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
a70: 0168 lsls r0, r5, #5
|
|
|
|
a72: 5011 str r1, [r2, r0]
|
|
|
|
}
|
|
|
|
a74: e7e3 b.n a3e <_usb_d_dev_out_next+0x14e>
|
|
|
|
} else if (trans_next < ept->size) {
|
|
|
|
a76: 429f cmp r7, r3
|
|
|
|
a78: d9f7 bls.n a6a <_usb_d_dev_out_next+0x17a>
|
|
|
|
ept->flags.bits.use_cache = 1;
|
|
|
|
a7a: 4310 orrs r0, r2
|
|
|
|
a7c: 74e0 strb r0, [r4, #19]
|
|
|
|
a7e: e7f4 b.n a6a <_usb_d_dev_out_next+0x17a>
|
|
|
|
trans_next = USB_D_DEV_TRANS_MAX;
|
|
|
|
a80: 0003 movs r3, r0
|
|
|
|
a82: e7f2 b.n a6a <_usb_d_dev_out_next+0x17a>
|
|
|
|
a84: 4a06 ldr r2, [pc, #24] ; (aa0 <_usb_d_dev_out_next+0x1b0>)
|
|
|
|
a86: 189b adds r3, r3, r2
|
|
|
|
a88: 2225 movs r2, #37 ; 0x25
|
|
|
|
a8a: e7b7 b.n 9fc <_usb_d_dev_out_next+0x10c>
|
|
|
|
a8c: 20000110 .word 0x20000110
|
|
|
|
a90: 000003ff .word 0x000003ff
|
|
|
|
a94: 41005100 .word 0x41005100
|
|
|
|
a98: 0000261d .word 0x0000261d
|
|
|
|
a9c: f0003fff .word 0xf0003fff
|
|
|
|
aa0: 410050ff .word 0x410050ff
|
|
|
|
aa4: 000005e1 .word 0x000005e1
|
|
|
|
|
|
|
|
00000aa8 <_usbd_ep_pcksize_size>:
|
|
|
|
: ((n > 256) ? 6 : ((n > 128) ? 5 : ((n > 64) ? 4 : ((n > 32) ? 3 : ((n > 16) ? 2 : ((n > 8) ? 1 : 0)))))));
|
|
|
|
aa8: 2380 movs r3, #128 ; 0x80
|
|
|
|
{
|
|
|
|
aaa: 0002 movs r2, r0
|
|
|
|
: ((n > 256) ? 6 : ((n > 128) ? 5 : ((n > 64) ? 4 : ((n > 32) ? 3 : ((n > 16) ? 2 : ((n > 8) ? 1 : 0)))))));
|
|
|
|
aac: 009b lsls r3, r3, #2
|
|
|
|
aae: 2007 movs r0, #7
|
|
|
|
ab0: 429a cmp r2, r3
|
|
|
|
ab2: d814 bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
ab4: 3b01 subs r3, #1
|
|
|
|
ab6: 3bff subs r3, #255 ; 0xff
|
|
|
|
ab8: 3801 subs r0, #1
|
|
|
|
aba: 429a cmp r2, r3
|
|
|
|
abc: d80f bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
abe: 3801 subs r0, #1
|
|
|
|
ac0: 2a80 cmp r2, #128 ; 0x80
|
|
|
|
ac2: d80c bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
ac4: 3801 subs r0, #1
|
|
|
|
ac6: 2a40 cmp r2, #64 ; 0x40
|
|
|
|
ac8: d809 bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
aca: 3801 subs r0, #1
|
|
|
|
acc: 2a20 cmp r2, #32
|
|
|
|
ace: d806 bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
ad0: 3801 subs r0, #1
|
|
|
|
ad2: 2a10 cmp r2, #16
|
|
|
|
ad4: d803 bhi.n ade <_usbd_ep_pcksize_size+0x36>
|
|
|
|
ad6: 3006 adds r0, #6
|
|
|
|
ad8: 4290 cmp r0, r2
|
|
|
|
ada: 4180 sbcs r0, r0
|
|
|
|
adc: 4240 negs r0, r0
|
|
|
|
}
|
|
|
|
ade: 4770 bx lr
|
|
|
|
|
|
|
|
00000ae0 <_usb_d_dev_init>:
|
|
|
|
{
|
|
|
|
ae0: b510 push {r4, lr}
|
|
|
|
return ((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg;
|
|
|
|
ae2: 4c2a ldr r4, [pc, #168] ; (b8c <_usb_d_dev_init+0xac>)
|
|
|
|
ae4: 78a3 ldrb r3, [r4, #2]
|
|
|
|
if (!hri_usbdevice_is_syncing(hw, USB_SYNCBUSY_SWRST)) {
|
|
|
|
ae6: 07db lsls r3, r3, #31
|
|
|
|
ae8: d418 bmi.n b1c <_usb_d_dev_init+0x3c>
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
aea: 2303 movs r3, #3
|
|
|
|
aec: 78a2 ldrb r2, [r4, #2]
|
|
|
|
aee: 421a tst r2, r3
|
|
|
|
af0: d1fc bne.n aec <_usb_d_dev_init+0xc>
|
|
|
|
static inline hri_usb_ctrla_reg_t hri_usb_get_CTRLA_reg(const void *const hw, hri_usb_ctrla_reg_t mask)
|
|
|
|
{
|
|
|
|
uint8_t tmp;
|
|
|
|
hri_usb_wait_for_sync(hw, USB_SYNCBUSY_MASK);
|
|
|
|
tmp = ((Usb *)hw)->HOST.CTRLA.reg;
|
|
|
|
tmp &= mask;
|
|
|
|
af2: 2202 movs r2, #2
|
|
|
|
tmp = ((Usb *)hw)->HOST.CTRLA.reg;
|
|
|
|
af4: 7823 ldrb r3, [r4, #0]
|
|
|
|
if (hri_usbdevice_get_CTRLA_reg(hw, USB_CTRLA_ENABLE)) {
|
|
|
|
af6: 4213 tst r3, r2
|
|
|
|
af8: d00a beq.n b10 <_usb_d_dev_init+0x30>
|
|
|
|
((Usb *)hw)->HOST.CTRLA.reg &= ~USB_CTRLA_ENABLE;
|
|
|
|
afa: 7823 ldrb r3, [r4, #0]
|
|
|
|
afc: 4393 bics r3, r2
|
|
|
|
afe: 7023 strb r3, [r4, #0]
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
b00: 2303 movs r3, #3
|
|
|
|
b02: 78a2 ldrb r2, [r4, #2]
|
|
|
|
b04: 421a tst r2, r3
|
|
|
|
b06: d1fc bne.n b02 <_usb_d_dev_init+0x22>
|
|
|
|
b08: 2302 movs r3, #2
|
|
|
|
b0a: 78a2 ldrb r2, [r4, #2]
|
|
|
|
b0c: 421a tst r2, r3
|
|
|
|
b0e: d1fc bne.n b0a <_usb_d_dev_init+0x2a>
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_usb_write_CTRLA_reg(const void *const hw, hri_usb_ctrla_reg_t data)
|
|
|
|
{
|
|
|
|
USB_CRITICAL_SECTION_ENTER();
|
|
|
|
((Usb *)hw)->HOST.CTRLA.reg = data;
|
|
|
|
b10: 2301 movs r3, #1
|
|
|
|
b12: 7023 strb r3, [r4, #0]
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
b14: 3302 adds r3, #2
|
|
|
|
b16: 78a2 ldrb r2, [r4, #2]
|
|
|
|
b18: 421a tst r2, r3
|
|
|
|
b1a: d1fc bne.n b16 <_usb_d_dev_init+0x36>
|
|
|
|
b1c: 2301 movs r3, #1
|
|
|
|
b1e: 78a2 ldrb r2, [r4, #2]
|
|
|
|
b20: 421a tst r2, r3
|
|
|
|
b22: d1fc bne.n b1e <_usb_d_dev_init+0x3e>
|
|
|
|
dev_inst.callbacks.sof = (_usb_d_dev_sof_cb_t)_dummy_func_no_return;
|
|
|
|
b24: 4b1a ldr r3, [pc, #104] ; (b90 <_usb_d_dev_init+0xb0>)
|
|
|
|
b26: 4a1b ldr r2, [pc, #108] ; (b94 <_usb_d_dev_init+0xb4>)
|
|
|
|
b28: 601a str r2, [r3, #0]
|
|
|
|
dev_inst.callbacks.event = (_usb_d_dev_event_cb_t)_dummy_func_no_return;
|
|
|
|
b2a: 605a str r2, [r3, #4]
|
|
|
|
dev_inst.ep_callbacks.setup = (_usb_d_dev_ep_cb_setup_t)_dummy_func_no_return;
|
|
|
|
b2c: 609a str r2, [r3, #8]
|
|
|
|
dev_inst.ep_callbacks.more = (_usb_d_dev_ep_cb_more_t)_dummy_func_no_return;
|
|
|
|
b2e: 60da str r2, [r3, #12]
|
|
|
|
dev_inst.ep_callbacks.done = (_usb_d_dev_ep_cb_done_t)_dummy_func_no_return;
|
|
|
|
b30: 611a str r2, [r3, #16]
|
|
|
|
_usb_d_dev_reset_epts();
|
|
|
|
b32: 4b19 ldr r3, [pc, #100] ; (b98 <_usb_d_dev_init+0xb8>)
|
|
|
|
b34: 4798 blx r3
|
|
|
|
uint32_t pad_transn
|
|
|
|
b36: 201f movs r0, #31
|
|
|
|
= (*((uint32_t *)(NVMCTRL_OTP4) + (NVM_USB_PAD_TRANSN_POS / 32)) >> (NVM_USB_PAD_TRANSN_POS % 32))
|
|
|
|
b38: 4b18 ldr r3, [pc, #96] ; (b9c <_usb_d_dev_init+0xbc>)
|
|
|
|
b3a: 681a ldr r2, [r3, #0]
|
|
|
|
b3c: 0b53 lsrs r3, r2, #13
|
|
|
|
= (*((uint32_t *)(NVMCTRL_OTP4) + (NVM_USB_PAD_TRANSP_POS / 32)) >> (NVM_USB_PAD_TRANSP_POS % 32))
|
|
|
|
b3e: 0c91 lsrs r1, r2, #18
|
|
|
|
uint32_t pad_trim = (*((uint32_t *)(NVMCTRL_OTP4) + (NVM_USB_PAD_TRIM_POS / 32)) >> (NVM_USB_PAD_TRIM_POS % 32))
|
|
|
|
b40: 0192 lsls r2, r2, #6
|
|
|
|
uint32_t pad_transn
|
|
|
|
b42: 4003 ands r3, r0
|
|
|
|
uint32_t pad_transp
|
|
|
|
b44: 4001 ands r1, r0
|
|
|
|
uint32_t pad_trim = (*((uint32_t *)(NVMCTRL_OTP4) + (NVM_USB_PAD_TRIM_POS / 32)) >> (NVM_USB_PAD_TRIM_POS % 32))
|
|
|
|
b46: 0f52 lsrs r2, r2, #29
|
|
|
|
if (pad_transn == 0x1F) {
|
|
|
|
b48: 4283 cmp r3, r0
|
|
|
|
b4a: d100 bne.n b4e <_usb_d_dev_init+0x6e>
|
|
|
|
pad_transn = 5;
|
|
|
|
b4c: 2305 movs r3, #5
|
|
|
|
if (pad_transp == 0x1F) {
|
|
|
|
b4e: 291f cmp r1, #31
|
|
|
|
b50: d100 bne.n b54 <_usb_d_dev_init+0x74>
|
|
|
|
pad_transp = 29;
|
|
|
|
b52: 3902 subs r1, #2
|
|
|
|
if (pad_trim == 0x7) {
|
|
|
|
b54: 2a07 cmp r2, #7
|
|
|
|
b56: d100 bne.n b5a <_usb_d_dev_init+0x7a>
|
|
|
|
pad_trim = 5;
|
|
|
|
b58: 3a02 subs r2, #2
|
|
|
|
hw->DEVICE.PADCAL.reg = USB_PADCAL_TRANSN(pad_transn) | USB_PADCAL_TRANSP(pad_transp) | USB_PADCAL_TRIM(pad_trim);
|
|
|
|
b5a: 019b lsls r3, r3, #6
|
|
|
|
b5c: 430b orrs r3, r1
|
|
|
|
b5e: 0312 lsls r2, r2, #12
|
|
|
|
b60: 4313 orrs r3, r2
|
|
|
|
b62: 8523 strh r3, [r4, #40] ; 0x28
|
|
|
|
hw->DEVICE.QOSCTRL.bit.CQOS = 3;
|
|
|
|
b64: 2303 movs r3, #3
|
|
|
|
b66: 78e2 ldrb r2, [r4, #3]
|
|
|
|
b68: 431a orrs r2, r3
|
|
|
|
b6a: 70e2 strb r2, [r4, #3]
|
|
|
|
hw->DEVICE.QOSCTRL.bit.DQOS = 3;
|
|
|
|
b6c: 220c movs r2, #12
|
|
|
|
b6e: 78e1 ldrb r1, [r4, #3]
|
|
|
|
b70: 430a orrs r2, r1
|
|
|
|
b72: 70e2 strb r2, [r4, #3]
|
|
|
|
((Usb *)hw)->HOST.CTRLA.reg = data;
|
|
|
|
b74: 2204 movs r2, #4
|
|
|
|
b76: 7022 strb r2, [r4, #0]
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
b78: 78a2 ldrb r2, [r4, #2]
|
|
|
|
b7a: 0010 movs r0, r2
|
|
|
|
b7c: 4018 ands r0, r3
|
|
|
|
b7e: 421a tst r2, r3
|
|
|
|
b80: d1fa bne.n b78 <_usb_d_dev_init+0x98>
|
|
|
|
hri_usbdevice_write_DESCADD_reg(hw, (uint32_t)prvt_inst.desc_table);
|
|
|
|
b82: 4b07 ldr r3, [pc, #28] ; (ba0 <_usb_d_dev_init+0xc0>)
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_usb_write_DESCADD_reg(const void *const hw, hri_usb_descadd_reg_t data)
|
|
|
|
{
|
|
|
|
USB_CRITICAL_SECTION_ENTER();
|
|
|
|
((Usb *)hw)->HOST.DESCADD.reg = data;
|
|
|
|
b84: 6263 str r3, [r4, #36] ; 0x24
|
|
|
|
((Usb *)hw)->DEVICE.CTRLB.reg = data;
|
|
|
|
b86: 2301 movs r3, #1
|
|
|
|
b88: 8123 strh r3, [r4, #8]
|
|
|
|
}
|
|
|
|
b8a: bd10 pop {r4, pc}
|
|
|
|
b8c: 41005000 .word 0x41005000
|
|
|
|
b90: 20000170 .word 0x20000170
|
|
|
|
b94: 000004f5 .word 0x000004f5
|
|
|
|
b98: 0000074d .word 0x0000074d
|
|
|
|
b9c: 00806024 .word 0x00806024
|
|
|
|
ba0: 20000110 .word 0x20000110
|
|
|
|
|
|
|
|
00000ba4 <_usb_d_dev_enable>:
|
|
|
|
tmp &= mask;
|
|
|
|
ba4: 2203 movs r2, #3
|
|
|
|
tmp = ((Usb *)hw)->HOST.SYNCBUSY.reg;
|
|
|
|
ba6: 4b0e ldr r3, [pc, #56] ; (be0 <_usb_d_dev_enable+0x3c>)
|
|
|
|
ba8: 7899 ldrb r1, [r3, #2]
|
|
|
|
if (hri_usbdevice_get_SYNCBUSY_reg(hw, (USB_SYNCBUSY_ENABLE | USB_SYNCBUSY_SWRST))) {
|
|
|
|
baa: 4211 tst r1, r2
|
|
|
|
bac: d114 bne.n bd8 <_usb_d_dev_enable+0x34>
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
bae: 7899 ldrb r1, [r3, #2]
|
|
|
|
bb0: 4211 tst r1, r2
|
|
|
|
bb2: d1fc bne.n bae <_usb_d_dev_enable+0xa>
|
|
|
|
if ((ctrla & USB_CTRLA_ENABLE) == 0) {
|
|
|
|
bb4: 2202 movs r2, #2
|
|
|
|
return ((Usb *)hw)->HOST.CTRLA.reg;
|
|
|
|
bb6: 7819 ldrb r1, [r3, #0]
|
|
|
|
bb8: b2c8 uxtb r0, r1
|
|
|
|
bba: 4211 tst r1, r2
|
|
|
|
bbc: d105 bne.n bca <_usb_d_dev_enable+0x26>
|
|
|
|
hri_usbdevice_write_CTRLA_reg(hw, ctrla | USB_CTRLA_ENABLE);
|
|
|
|
bbe: 4302 orrs r2, r0
|
|
|
|
((Usb *)hw)->HOST.CTRLA.reg = data;
|
|
|
|
bc0: 701a strb r2, [r3, #0]
|
|
|
|
while (((Usb *)hw)->DEVICE.SYNCBUSY.reg & reg) {
|
|
|
|
bc2: 2203 movs r2, #3
|
|
|
|
bc4: 7899 ldrb r1, [r3, #2]
|
|
|
|
bc6: 4211 tst r1, r2
|
|
|
|
bc8: d1fc bne.n bc4 <_usb_d_dev_enable+0x20>
|
|
|
|
*/
|
|
|
|
__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
|
|
|
{
|
|
|
|
if ((int32_t)(IRQn) >= 0)
|
|
|
|
{
|
|
|
|
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
|
|
|
bca: 2180 movs r1, #128 ; 0x80
|
|
|
|
return ERR_NONE;
|
|
|
|
bcc: 2000 movs r0, #0
|
|
|
|
bce: 4a05 ldr r2, [pc, #20] ; (be4 <_usb_d_dev_enable+0x40>)
|
|
|
|
bd0: 6011 str r1, [r2, #0]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
bd2: 4a05 ldr r2, [pc, #20] ; (be8 <_usb_d_dev_enable+0x44>)
|
|
|
|
bd4: 831a strh r2, [r3, #24]
|
|
|
|
}
|
|
|
|
bd6: 4770 bx lr
|
|
|
|
return -USB_ERR_DENIED;
|
|
|
|
bd8: 2011 movs r0, #17
|
|
|
|
bda: 4240 negs r0, r0
|
|
|
|
bdc: e7fb b.n bd6 <_usb_d_dev_enable+0x32>
|
|
|
|
bde: 46c0 nop ; (mov r8, r8)
|
|
|
|
be0: 41005000 .word 0x41005000
|
|
|
|
be4: e000e100 .word 0xe000e100
|
|
|
|
be8: 0000028d .word 0x0000028d
|
|
|
|
|
|
|
|
00000bec <_usb_d_dev_attach>:
|
|
|
|
((Usb *)hw)->DEVICE.CTRLB.reg &= ~USB_DEVICE_CTRLB_DETACH;
|
|
|
|
bec: 2101 movs r1, #1
|
|
|
|
bee: 4a02 ldr r2, [pc, #8] ; (bf8 <_usb_d_dev_attach+0xc>)
|
|
|
|
bf0: 8913 ldrh r3, [r2, #8]
|
|
|
|
bf2: 438b bics r3, r1
|
|
|
|
bf4: 8113 strh r3, [r2, #8]
|
|
|
|
}
|
|
|
|
bf6: 4770 bx lr
|
|
|
|
bf8: 41005000 .word 0x41005000
|
|
|
|
|
|
|
|
00000bfc <_usb_d_dev_set_address>:
|
|
|
|
hri_usbdevice_write_DADD_reg(USB, USB_DEVICE_DADD_ADDEN | USB_DEVICE_DADD_DADD(addr));
|
|
|
|
bfc: 2380 movs r3, #128 ; 0x80
|
|
|
|
bfe: 4318 orrs r0, r3
|
|
|
|
((Usb *)hw)->DEVICE.DADD.reg = data;
|
|
|
|
c00: 4b01 ldr r3, [pc, #4] ; (c08 <_usb_d_dev_set_address+0xc>)
|
|
|
|
c02: 7298 strb r0, [r3, #10]
|
|
|
|
}
|
|
|
|
c04: 4770 bx lr
|
|
|
|
c06: 46c0 nop ; (mov r8, r8)
|
|
|
|
c08: 41005000 .word 0x41005000
|
|
|
|
|
|
|
|
00000c0c <_usb_d_dev_ep_init>:
|
|
|
|
{
|
|
|
|
c0c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
c0e: 240f movs r4, #15
|
|
|
|
c10: 4004 ands r4, r0
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
c12: 4b2e ldr r3, [pc, #184] ; (ccc <_usb_d_dev_ep_init+0xc0>)
|
|
|
|
{
|
|
|
|
c14: 9100 str r1, [sp, #0]
|
|
|
|
c16: 0006 movs r6, r0
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
c18: 09c1 lsrs r1, r0, #7
|
|
|
|
c1a: b247 sxtb r7, r0
|
|
|
|
c1c: 0020 movs r0, r4
|
|
|
|
{
|
|
|
|
c1e: 9201 str r2, [sp, #4]
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
c20: 4798 blx r3
|
|
|
|
uint8_t ep_type = attr & USB_EP_XTYPE_MASK;
|
|
|
|
c22: 2103 movs r1, #3
|
|
|
|
c24: 9b00 ldr r3, [sp, #0]
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
c26: 0005 movs r5, r0
|
|
|
|
uint8_t ep_type = attr & USB_EP_XTYPE_MASK;
|
|
|
|
c28: 400b ands r3, r1
|
|
|
|
c2a: 9300 str r3, [sp, #0]
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N) {
|
|
|
|
c2c: 2c02 cmp r4, #2
|
|
|
|
c2e: d844 bhi.n cba <_usb_d_dev_ep_init+0xae>
|
|
|
|
if (ept->ep != 0xFF) {
|
|
|
|
c30: 7c83 ldrb r3, [r0, #18]
|
|
|
|
c32: 2bff cmp r3, #255 ; 0xff
|
|
|
|
c34: d144 bne.n cc0 <_usb_d_dev_ep_init+0xb4>
|
|
|
|
if (ep_type == USB_EP_XTYPE_CTRL) {
|
|
|
|
c36: 9b00 ldr r3, [sp, #0]
|
|
|
|
c38: 2b00 cmp r3, #0
|
|
|
|
c3a: d110 bne.n c5e <_usb_d_dev_ep_init+0x52>
|
|
|
|
struct _usb_d_dev_ep *ept_in = _usb_d_dev_ept(epn, !dir);
|
|
|
|
c3c: 43f9 mvns r1, r7
|
|
|
|
c3e: b2c9 uxtb r1, r1
|
|
|
|
c40: 4b22 ldr r3, [pc, #136] ; (ccc <_usb_d_dev_ep_init+0xc0>)
|
|
|
|
c42: 0020 movs r0, r4
|
|
|
|
c44: 09c9 lsrs r1, r1, #7
|
|
|
|
c46: 4798 blx r3
|
|
|
|
if (ept_in->ep != 0xFF) {
|
|
|
|
c48: 7c83 ldrb r3, [r0, #18]
|
|
|
|
c4a: 2bff cmp r3, #255 ; 0xff
|
|
|
|
c4c: d138 bne.n cc0 <_usb_d_dev_ep_init+0xb4>
|
|
|
|
if (pcfg->cache == NULL) {
|
|
|
|
c4e: 3bf3 subs r3, #243 ; 0xf3
|
|
|
|
c50: 4363 muls r3, r4
|
|
|
|
c52: 4a1f ldr r2, [pc, #124] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
c54: 589b ldr r3, [r3, r2]
|
|
|
|
c56: 2b00 cmp r3, #0
|
|
|
|
c58: d134 bne.n cc4 <_usb_d_dev_ep_init+0xb8>
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
c5a: 2013 movs r0, #19
|
|
|
|
c5c: e02e b.n cbc <_usb_d_dev_ep_init+0xb0>
|
|
|
|
if ((dir ? pcfg->i_cache : pcfg->cache) && ((dir ? pcfg->i_size : pcfg->size) < max_pkt_siz)) {
|
|
|
|
c5e: 2f00 cmp r7, #0
|
|
|
|
c60: da14 bge.n c8c <_usb_d_dev_ep_init+0x80>
|
|
|
|
c62: 220c movs r2, #12
|
|
|
|
c64: 4362 muls r2, r4
|
|
|
|
c66: 4b1a ldr r3, [pc, #104] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
c68: 189b adds r3, r3, r2
|
|
|
|
c6a: 685a ldr r2, [r3, #4]
|
|
|
|
c6c: 2a00 cmp r2, #0
|
|
|
|
c6e: d119 bne.n ca4 <_usb_d_dev_ep_init+0x98>
|
|
|
|
ept->cache = (uint8_t *)(dir ? pcfg->i_cache : pcfg->cache);
|
|
|
|
c70: 230c movs r3, #12
|
|
|
|
c72: 4363 muls r3, r4
|
|
|
|
c74: 4c16 ldr r4, [pc, #88] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
c76: 18e4 adds r4, r4, r3
|
|
|
|
c78: 6863 ldr r3, [r4, #4]
|
|
|
|
return USB_OK;
|
|
|
|
c7a: 2000 movs r0, #0
|
|
|
|
ept->flags.u8 = (ep_type + 1);
|
|
|
|
c7c: 9900 ldr r1, [sp, #0]
|
|
|
|
ept->cache = (uint8_t *)(dir ? pcfg->i_cache : pcfg->cache);
|
|
|
|
c7e: 60eb str r3, [r5, #12]
|
|
|
|
ept->size = max_pkt_siz;
|
|
|
|
c80: 9b01 ldr r3, [sp, #4]
|
|
|
|
ept->flags.u8 = (ep_type + 1);
|
|
|
|
c82: 3101 adds r1, #1
|
|
|
|
ept->size = max_pkt_siz;
|
|
|
|
c84: 822b strh r3, [r5, #16]
|
|
|
|
ept->flags.u8 = (ep_type + 1);
|
|
|
|
c86: 74e9 strb r1, [r5, #19]
|
|
|
|
ept->ep = ep;
|
|
|
|
c88: 74ae strb r6, [r5, #18]
|
|
|
|
}
|
|
|
|
c8a: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
if ((dir ? pcfg->i_cache : pcfg->cache) && ((dir ? pcfg->i_size : pcfg->size) < max_pkt_siz)) {
|
|
|
|
c8c: 230c movs r3, #12
|
|
|
|
c8e: 4363 muls r3, r4
|
|
|
|
c90: 4a0f ldr r2, [pc, #60] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
c92: 589b ldr r3, [r3, r2]
|
|
|
|
c94: 2b00 cmp r3, #0
|
|
|
|
c96: d00b beq.n cb0 <_usb_d_dev_ep_init+0xa4>
|
|
|
|
c98: 220c movs r2, #12
|
|
|
|
c9a: 4362 muls r2, r4
|
|
|
|
c9c: 4b0c ldr r3, [pc, #48] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
c9e: 189b adds r3, r3, r2
|
|
|
|
ca0: 891b ldrh r3, [r3, #8]
|
|
|
|
ca2: e000 b.n ca6 <_usb_d_dev_ep_init+0x9a>
|
|
|
|
ca4: 895b ldrh r3, [r3, #10]
|
|
|
|
ca6: 9a01 ldr r2, [sp, #4]
|
|
|
|
ca8: 429a cmp r2, r3
|
|
|
|
caa: dcd6 bgt.n c5a <_usb_d_dev_ep_init+0x4e>
|
|
|
|
ept->cache = (uint8_t *)(dir ? pcfg->i_cache : pcfg->cache);
|
|
|
|
cac: 2f00 cmp r7, #0
|
|
|
|
cae: dbdf blt.n c70 <_usb_d_dev_ep_init+0x64>
|
|
|
|
cb0: 230c movs r3, #12
|
|
|
|
cb2: 435c muls r4, r3
|
|
|
|
cb4: 4b06 ldr r3, [pc, #24] ; (cd0 <_usb_d_dev_ep_init+0xc4>)
|
|
|
|
cb6: 58e3 ldr r3, [r4, r3]
|
|
|
|
cb8: e7df b.n c7a <_usb_d_dev_ep_init+0x6e>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
cba: 2012 movs r0, #18
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
cbc: 4240 negs r0, r0
|
|
|
|
cbe: e7e4 b.n c8a <_usb_d_dev_ep_init+0x7e>
|
|
|
|
return -USB_ERR_REDO;
|
|
|
|
cc0: 2014 movs r0, #20
|
|
|
|
cc2: e7fb b.n cbc <_usb_d_dev_ep_init+0xb0>
|
|
|
|
if ((dir ? pcfg->i_cache : pcfg->cache) && ((dir ? pcfg->i_size : pcfg->size) < max_pkt_siz)) {
|
|
|
|
cc4: 2f00 cmp r7, #0
|
|
|
|
cc6: dae7 bge.n c98 <_usb_d_dev_ep_init+0x8c>
|
|
|
|
cc8: e7cb b.n c62 <_usb_d_dev_ep_init+0x56>
|
|
|
|
cca: 46c0 nop ; (mov r8, r8)
|
|
|
|
ccc: 0000051d .word 0x0000051d
|
|
|
|
cd0: 00002e88 .word 0x00002e88
|
|
|
|
|
|
|
|
00000cd4 <_usb_d_dev_ep_deinit>:
|
|
|
|
{
|
|
|
|
cd4: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
cd6: 250f movs r5, #15
|
|
|
|
{
|
|
|
|
cd8: 0004 movs r4, r0
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
cda: 4005 ands r5, r0
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N || !_usb_d_dev_ep_is_used(ept)) {
|
|
|
|
cdc: 2d02 cmp r5, #2
|
|
|
|
cde: d81a bhi.n d16 <_usb_d_dev_ep_deinit+0x42>
|
|
|
|
ce0: b243 sxtb r3, r0
|
|
|
|
bool dir = USB_EP_GET_DIR(ep);
|
|
|
|
ce2: 09c7 lsrs r7, r0, #7
|
|
|
|
ce4: 9301 str r3, [sp, #4]
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
ce6: 0039 movs r1, r7
|
|
|
|
ce8: 4b14 ldr r3, [pc, #80] ; (d3c <_usb_d_dev_ep_deinit+0x68>)
|
|
|
|
cea: 0028 movs r0, r5
|
|
|
|
cec: 4798 blx r3
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N || !_usb_d_dev_ep_is_used(ept)) {
|
|
|
|
cee: 7c83 ldrb r3, [r0, #18]
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
cf0: 0006 movs r6, r0
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N || !_usb_d_dev_ep_is_used(ept)) {
|
|
|
|
cf2: 2bff cmp r3, #255 ; 0xff
|
|
|
|
cf4: d00f beq.n d16 <_usb_d_dev_ep_deinit+0x42>
|
|
|
|
_usb_d_dev_trans_stop(ept, dir, USB_TRANS_RESET);
|
|
|
|
cf6: 2203 movs r2, #3
|
|
|
|
cf8: 4b11 ldr r3, [pc, #68] ; (d40 <_usb_d_dev_ep_deinit+0x6c>)
|
|
|
|
cfa: 0039 movs r1, r7
|
|
|
|
cfc: 4798 blx r3
|
|
|
|
if (_usb_d_dev_ep_is_ctrl(ept)) {
|
|
|
|
cfe: 2207 movs r2, #7
|
|
|
|
d00: 7cf3 ldrb r3, [r6, #19]
|
|
|
|
d02: 4013 ands r3, r2
|
|
|
|
d04: 2b01 cmp r3, #1
|
|
|
|
d06: d107 bne.n d18 <_usb_d_dev_ep_deinit+0x44>
|
|
|
|
hw->DEVICE.DeviceEndpoint[ep].EPCFG.reg = 0;
|
|
|
|
d08: 2200 movs r2, #0
|
|
|
|
d0a: 4b0e ldr r3, [pc, #56] ; (d44 <_usb_d_dev_ep_deinit+0x70>)
|
|
|
|
d0c: 3408 adds r4, #8
|
|
|
|
d0e: 0164 lsls r4, r4, #5
|
|
|
|
d10: 54e2 strb r2, [r4, r3]
|
|
|
|
ept->ep = 0xFF;
|
|
|
|
d12: 23ff movs r3, #255 ; 0xff
|
|
|
|
d14: 8273 strh r3, [r6, #18]
|
|
|
|
}
|
|
|
|
d16: bdf7 pop {r0, r1, r2, r4, r5, r6, r7, pc}
|
|
|
|
} else if (USB_EP_GET_DIR(ep)) {
|
|
|
|
d18: b263 sxtb r3, r4
|
|
|
|
d1a: 2b00 cmp r3, #0
|
|
|
|
d1c: da07 bge.n d2e <_usb_d_dev_ep_deinit+0x5a>
|
|
|
|
hw->DEVICE.DeviceEndpoint[USB_EP_GET_N(ep)].EPCFG.reg &= ~USB_DEVICE_EPCFG_EPTYPE1_Msk;
|
|
|
|
d1e: 2270 movs r2, #112 ; 0x70
|
|
|
|
d20: 4b09 ldr r3, [pc, #36] ; (d48 <_usb_d_dev_ep_deinit+0x74>)
|
|
|
|
d22: 016d lsls r5, r5, #5
|
|
|
|
d24: 18ed adds r5, r5, r3
|
|
|
|
d26: 786b ldrb r3, [r5, #1]
|
|
|
|
d28: 4393 bics r3, r2
|
|
|
|
d2a: 706b strb r3, [r5, #1]
|
|
|
|
d2c: e7f1 b.n d12 <_usb_d_dev_ep_deinit+0x3e>
|
|
|
|
hw->DEVICE.DeviceEndpoint[ep].EPCFG.reg &= ~USB_DEVICE_EPCFG_EPTYPE0_Msk;
|
|
|
|
d2e: 4b06 ldr r3, [pc, #24] ; (d48 <_usb_d_dev_ep_deinit+0x74>)
|
|
|
|
d30: 0164 lsls r4, r4, #5
|
|
|
|
d32: 18e4 adds r4, r4, r3
|
|
|
|
d34: 7863 ldrb r3, [r4, #1]
|
|
|
|
d36: 4393 bics r3, r2
|
|
|
|
d38: 7063 strb r3, [r4, #1]
|
|
|
|
d3a: e7ea b.n d12 <_usb_d_dev_ep_deinit+0x3e>
|
|
|
|
d3c: 0000051d .word 0x0000051d
|
|
|
|
d40: 00000605 .word 0x00000605
|
|
|
|
d44: 41005000 .word 0x41005000
|
|
|
|
d48: 410050ff .word 0x410050ff
|
|
|
|
|
|
|
|
00000d4c <_usb_d_dev_ep_enable>:
|
|
|
|
{
|
|
|
|
d4c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
d4e: 240f movs r4, #15
|
|
|
|
d50: 4004 ands r4, r0
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
d52: 09c1 lsrs r1, r0, #7
|
|
|
|
d54: 4b47 ldr r3, [pc, #284] ; (e74 <_usb_d_dev_ep_enable+0x128>)
|
|
|
|
d56: b245 sxtb r5, r0
|
|
|
|
d58: 0020 movs r0, r4
|
|
|
|
d5a: 4798 blx r3
|
|
|
|
return ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg;
|
|
|
|
d5c: 4b46 ldr r3, [pc, #280] ; (e78 <_usb_d_dev_ep_enable+0x12c>)
|
|
|
|
d5e: 0161 lsls r1, r4, #5
|
|
|
|
d60: 18ce adds r6, r1, r3
|
|
|
|
d62: 7872 ldrb r2, [r6, #1]
|
|
|
|
d64: 0007 movs r7, r0
|
|
|
|
d66: b2d2 uxtb r2, r2
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N || !_usb_d_dev_ep_is_used(ept)) {
|
|
|
|
d68: 2c02 cmp r4, #2
|
|
|
|
d6a: d900 bls.n d6e <_usb_d_dev_ep_enable+0x22>
|
|
|
|
d6c: e07d b.n e6a <_usb_d_dev_ep_enable+0x11e>
|
|
|
|
d6e: 7c83 ldrb r3, [r0, #18]
|
|
|
|
d70: 9301 str r3, [sp, #4]
|
|
|
|
d72: 2bff cmp r3, #255 ; 0xff
|
|
|
|
d74: d100 bne.n d78 <_usb_d_dev_ep_enable+0x2c>
|
|
|
|
d76: e078 b.n e6a <_usb_d_dev_ep_enable+0x11e>
|
|
|
|
bank = prvt_inst.desc_table[epn].DeviceDescBank;
|
|
|
|
d78: 4b40 ldr r3, [pc, #256] ; (e7c <_usb_d_dev_ep_enable+0x130>)
|
|
|
|
d7a: 185c adds r4, r3, r1
|
|
|
|
if (ept->flags.bits.eptype == USB_D_EPTYPE_CTRL) {
|
|
|
|
d7c: 7cc3 ldrb r3, [r0, #19]
|
|
|
|
d7e: 2107 movs r1, #7
|
|
|
|
d80: 0018 movs r0, r3
|
|
|
|
d82: 4008 ands r0, r1
|
|
|
|
d84: 2801 cmp r0, #1
|
|
|
|
d86: d13b bne.n e00 <_usb_d_dev_ep_enable+0xb4>
|
|
|
|
if (epcfg & (USB_DEVICE_EPCFG_EPTYPE1_Msk | USB_DEVICE_EPCFG_EPTYPE0_Msk)) {
|
|
|
|
d88: 2377 movs r3, #119 ; 0x77
|
|
|
|
d8a: 0011 movs r1, r2
|
|
|
|
d8c: 4019 ands r1, r3
|
|
|
|
d8e: 9100 str r1, [sp, #0]
|
|
|
|
d90: 421a tst r2, r3
|
|
|
|
d92: d000 beq.n d96 <_usb_d_dev_ep_enable+0x4a>
|
|
|
|
d94: e06c b.n e70 <_usb_d_dev_ep_enable+0x124>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg = data;
|
|
|
|
d96: 3b66 subs r3, #102 ; 0x66
|
|
|
|
d98: 7073 strb r3, [r6, #1]
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
d9a: 8a3d ldrh r5, [r7, #16]
|
|
|
|
| USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
d9c: 4b38 ldr r3, [pc, #224] ; (e80 <_usb_d_dev_ep_enable+0x134>)
|
|
|
|
d9e: 0028 movs r0, r5
|
|
|
|
da0: 4798 blx r3
|
|
|
|
da2: 23e0 movs r3, #224 ; 0xe0
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
da4: 4a37 ldr r2, [pc, #220] ; (e84 <_usb_d_dev_ep_enable+0x138>)
|
|
|
|
| USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
da6: 05db lsls r3, r3, #23
|
|
|
|
da8: 0700 lsls r0, r0, #28
|
|
|
|
daa: 4018 ands r0, r3
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
dac: 03ab lsls r3, r5, #14
|
|
|
|
dae: 4013 ands r3, r2
|
|
|
|
| USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
db0: 4303 orrs r3, r0
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
db2: 6063 str r3, [r4, #4]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
db4: 2140 movs r1, #64 ; 0x40
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
db6: 2380 movs r3, #128 ; 0x80
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
db8: 220f movs r2, #15
|
|
|
|
= USB_DEVICE_PCKSIZE_BYTE_COUNT(ept->size) | USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
dba: 04ad lsls r5, r5, #18
|
|
|
|
dbc: 0cad lsrs r5, r5, #18
|
|
|
|
dbe: 4328 orrs r0, r5
|
|
|
|
dc0: 6160 str r0, [r4, #20]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
dc2: 71b1 strb r1, [r6, #6]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
dc4: 7173 strb r3, [r6, #5]
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
dc6: 9b00 ldr r3, [sp, #0]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
dc8: 482c ldr r0, [pc, #176] ; (e7c <_usb_d_dev_ep_enable+0x130>)
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
dca: 72a3 strb r3, [r4, #10]
|
|
|
|
dcc: 76a3 strb r3, [r4, #26]
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
dce: 9b01 ldr r3, [sp, #4]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = size;
|
|
|
|
dd0: 03ac lsls r4, r5, #14
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
dd2: 4013 ands r3, r2
|
|
|
|
_usbd_ep_set_buf(epn, 0, (uint32_t)ept->cache);
|
|
|
|
dd4: 68fa ldr r2, [r7, #12]
|
|
|
|
bank->ADDR.reg = addr;
|
|
|
|
dd6: 015b lsls r3, r3, #5
|
|
|
|
dd8: 501a str r2, [r3, r0]
|
|
|
|
bank->PCKSIZE.bit.MULTI_PACKET_SIZE = size;
|
|
|
|
dda: 18c0 adds r0, r0, r3
|
|
|
|
ddc: 6842 ldr r2, [r0, #4]
|
|
|
|
dde: 4d2a ldr r5, [pc, #168] ; (e88 <_usb_d_dev_ep_enable+0x13c>)
|
|
|
|
de0: 4015 ands r5, r2
|
|
|
|
de2: 4325 orrs r5, r4
|
|
|
|
de4: 6045 str r5, [r0, #4]
|
|
|
|
bank->PCKSIZE.bit.BYTE_COUNT = count;
|
|
|
|
de6: 6842 ldr r2, [r0, #4]
|
|
|
|
de8: 0b92 lsrs r2, r2, #14
|
|
|
|
dea: 0392 lsls r2, r2, #14
|
|
|
|
dec: 6042 str r2, [r0, #4]
|
|
|
|
dee: 4a22 ldr r2, [pc, #136] ; (e78 <_usb_d_dev_ep_enable+0x12c>)
|
|
|
|
return USB_OK;
|
|
|
|
df0: 9800 ldr r0, [sp, #0]
|
|
|
|
df2: 189b adds r3, r3, r2
|
|
|
|
df4: 22b0 movs r2, #176 ; 0xb0
|
|
|
|
df6: 715a strb r2, [r3, #5]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENSET.reg = mask;
|
|
|
|
df8: 3aa0 subs r2, #160 ; 0xa0
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
dfa: 7199 strb r1, [r3, #6]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENSET.reg = mask;
|
|
|
|
dfc: 729a strb r2, [r3, #10]
|
|
|
|
}
|
|
|
|
dfe: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
} else if (dir) {
|
|
|
|
e00: 2d00 cmp r5, #0
|
|
|
|
e02: da19 bge.n e38 <_usb_d_dev_ep_enable+0xec>
|
|
|
|
if (epcfg & USB_DEVICE_EPCFG_EPTYPE1_Msk) {
|
|
|
|
e04: 2170 movs r1, #112 ; 0x70
|
|
|
|
e06: 0015 movs r5, r2
|
|
|
|
e08: 400d ands r5, r1
|
|
|
|
e0a: 420a tst r2, r1
|
|
|
|
e0c: d130 bne.n e70 <_usb_d_dev_ep_enable+0x124>
|
|
|
|
epcfg |= USB_DEVICE_EPCFG_EPTYPE1(ept->flags.bits.eptype);
|
|
|
|
e0e: 075b lsls r3, r3, #29
|
|
|
|
e10: 0e5b lsrs r3, r3, #25
|
|
|
|
e12: 4313 orrs r3, r2
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg = data;
|
|
|
|
e14: 7073 strb r3, [r6, #1]
|
|
|
|
= USB_DEVICE_PCKSIZE_BYTE_COUNT(ept->size) | USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
e16: 8a3f ldrh r7, [r7, #16]
|
|
|
|
e18: 4b19 ldr r3, [pc, #100] ; (e80 <_usb_d_dev_ep_enable+0x134>)
|
|
|
|
e1a: 0038 movs r0, r7
|
|
|
|
e1c: 4798 blx r3
|
|
|
|
e1e: 23e0 movs r3, #224 ; 0xe0
|
|
|
|
e20: 0700 lsls r0, r0, #28
|
|
|
|
e22: 05db lsls r3, r3, #23
|
|
|
|
e24: 4018 ands r0, r3
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
e26: 2380 movs r3, #128 ; 0x80
|
|
|
|
e28: 04bf lsls r7, r7, #18
|
|
|
|
e2a: 0cbf lsrs r7, r7, #18
|
|
|
|
e2c: 4338 orrs r0, r7
|
|
|
|
e2e: 6160 str r0, [r4, #20]
|
|
|
|
e30: 7173 strb r3, [r6, #5]
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
e32: 76a5 strb r5, [r4, #26]
|
|
|
|
return USB_OK;
|
|
|
|
e34: 0028 movs r0, r5
|
|
|
|
}
|
|
|
|
e36: e7e2 b.n dfe <_usb_d_dev_ep_enable+0xb2>
|
|
|
|
if (epcfg & USB_DEVICE_EPCFG_EPTYPE0_Msk) {
|
|
|
|
e38: 0015 movs r5, r2
|
|
|
|
e3a: 400d ands r5, r1
|
|
|
|
e3c: 420a tst r2, r1
|
|
|
|
e3e: d117 bne.n e70 <_usb_d_dev_ep_enable+0x124>
|
|
|
|
epcfg |= USB_DEVICE_EPCFG_EPTYPE0(ept->flags.bits.eptype);
|
|
|
|
e40: 075b lsls r3, r3, #29
|
|
|
|
e42: 0f5b lsrs r3, r3, #29
|
|
|
|
e44: 4313 orrs r3, r2
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg = data;
|
|
|
|
e46: 7073 strb r3, [r6, #1]
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
e48: 8a3f ldrh r7, [r7, #16]
|
|
|
|
| USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
e4a: 4b0d ldr r3, [pc, #52] ; (e80 <_usb_d_dev_ep_enable+0x134>)
|
|
|
|
e4c: 0038 movs r0, r7
|
|
|
|
e4e: 4798 blx r3
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
e50: 4a0c ldr r2, [pc, #48] ; (e84 <_usb_d_dev_ep_enable+0x138>)
|
|
|
|
e52: 03bb lsls r3, r7, #14
|
|
|
|
e54: 4013 ands r3, r2
|
|
|
|
| USB_DEVICE_PCKSIZE_SIZE(_usbd_ep_pcksize_size(ept->size));
|
|
|
|
e56: 22e0 movs r2, #224 ; 0xe0
|
|
|
|
e58: 0700 lsls r0, r0, #28
|
|
|
|
e5a: 05d2 lsls r2, r2, #23
|
|
|
|
e5c: 4010 ands r0, r2
|
|
|
|
e5e: 4303 orrs r3, r0
|
|
|
|
bank[0].PCKSIZE.reg = USB_DEVICE_PCKSIZE_MULTI_PACKET_SIZE(ept->size)
|
|
|
|
e60: 6063 str r3, [r4, #4]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSSET.reg = mask;
|
|
|
|
e62: 2340 movs r3, #64 ; 0x40
|
|
|
|
e64: 71b3 strb r3, [r6, #6]
|
|
|
|
bank->STATUS_BK.reg = 0;
|
|
|
|
e66: 72a5 strb r5, [r4, #10]
|
|
|
|
e68: e7e4 b.n e34 <_usb_d_dev_ep_enable+0xe8>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
e6a: 2012 movs r0, #18
|
|
|
|
return -USB_ERR_REDO;
|
|
|
|
e6c: 4240 negs r0, r0
|
|
|
|
e6e: e7c6 b.n dfe <_usb_d_dev_ep_enable+0xb2>
|
|
|
|
e70: 2014 movs r0, #20
|
|
|
|
e72: e7fb b.n e6c <_usb_d_dev_ep_enable+0x120>
|
|
|
|
e74: 0000051d .word 0x0000051d
|
|
|
|
e78: 410050ff .word 0x410050ff
|
|
|
|
e7c: 20000110 .word 0x20000110
|
|
|
|
e80: 00000aa9 .word 0x00000aa9
|
|
|
|
e84: 0fffc000 .word 0x0fffc000
|
|
|
|
e88: f0003fff .word 0xf0003fff
|
|
|
|
|
|
|
|
00000e8c <_usb_d_dev_ep_stall>:
|
|
|
|
{
|
|
|
|
e8c: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
e8e: 0007 movs r7, r0
|
|
|
|
e90: 260f movs r6, #15
|
|
|
|
bool dir = USB_EP_GET_DIR(ep);
|
|
|
|
e92: 09c4 lsrs r4, r0, #7
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
e94: 4037 ands r7, r6
|
|
|
|
{
|
|
|
|
e96: 000d movs r5, r1
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
e98: 0038 movs r0, r7
|
|
|
|
e9a: 0021 movs r1, r4
|
|
|
|
e9c: 4b29 ldr r3, [pc, #164] ; (f44 <_usb_d_dev_ep_stall+0xb8>)
|
|
|
|
e9e: 4798 blx r3
|
|
|
|
ea0: 0002 movs r2, r0
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N) {
|
|
|
|
ea2: 2f02 cmp r7, #2
|
|
|
|
ea4: d84a bhi.n f3c <_usb_d_dev_ep_stall+0xb0>
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
ea6: 7c83 ldrb r3, [r0, #18]
|
|
|
|
hri_usbendpoint_set_EPSTATUS_reg(USB, epn, (USB_DEVICE_EPSTATUS_STALLRQ0 << bank_n));
|
|
|
|
ea8: 2010 movs r0, #16
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
eaa: 4033 ands r3, r6
|
|
|
|
hri_usbendpoint_set_EPSTATUS_reg(USB, epn, (USB_DEVICE_EPSTATUS_STALLRQ0 << bank_n));
|
|
|
|
eac: 40a0 lsls r0, r4
|
|
|
|
if (USB_EP_STALL_SET == ctrl) {
|
|
|
|
eae: 2d01 cmp r5, #1
|
|
|
|
eb0: d110 bne.n ed4 <_usb_d_dev_ep_stall+0x48>
|
|
|
|
eb2: 4d25 ldr r5, [pc, #148] ; (f48 <_usb_d_dev_ep_stall+0xbc>)
|
|
|
|
eb4: 0159 lsls r1, r3, #5
|
|
|
|
hri_usbendpoint_set_EPSTATUS_reg(USB, epn, (USB_DEVICE_EPSTATUS_STALLRQ0 << bank_n));
|
|
|
|
eb6: b2c0 uxtb r0, r0
|
|
|
|
eb8: 1949 adds r1, r1, r5
|
|
|
|
eba: 7148 strb r0, [r1, #5]
|
|
|
|
_usbd_ep_int_en(epn, USB_DEVICE_EPINTFLAG_STALL0 << dir);
|
|
|
|
ebc: 2120 movs r1, #32
|
|
|
|
ebe: 40a1 lsls r1, r4
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENSET.reg = mask;
|
|
|
|
ec0: 4822 ldr r0, [pc, #136] ; (f4c <_usb_d_dev_ep_stall+0xc0>)
|
|
|
|
ec2: 015b lsls r3, r3, #5
|
|
|
|
hri_usbendpoint_set_EPINTEN_reg(USB, epn, flags);
|
|
|
|
ec4: b2c9 uxtb r1, r1
|
|
|
|
ec6: 181b adds r3, r3, r0
|
|
|
|
ec8: 7299 strb r1, [r3, #10]
|
|
|
|
ept->flags.bits.is_stalled = 1;
|
|
|
|
eca: 2308 movs r3, #8
|
|
|
|
ecc: 7cd1 ldrb r1, [r2, #19]
|
|
|
|
ece: 430b orrs r3, r1
|
|
|
|
ept->flags.bits.is_stalled = 0;
|
|
|
|
ed0: 74d3 strb r3, [r2, #19]
|
|
|
|
ed2: e009 b.n ee8 <_usb_d_dev_ep_stall+0x5c>
|
|
|
|
} else if (USB_EP_STALL_CLR == ctrl) {
|
|
|
|
ed4: 015b lsls r3, r3, #5
|
|
|
|
ed6: 2d00 cmp r5, #0
|
|
|
|
ed8: d129 bne.n f2e <_usb_d_dev_ep_stall+0xa2>
|
|
|
|
return ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUS.reg;
|
|
|
|
eda: 491d ldr r1, [pc, #116] ; (f50 <_usb_d_dev_ep_stall+0xc4>)
|
|
|
|
edc: 185d adds r5, r3, r1
|
|
|
|
ede: 491b ldr r1, [pc, #108] ; (f4c <_usb_d_dev_ep_stall+0xc0>)
|
|
|
|
ee0: 185b adds r3, r3, r1
|
|
|
|
ee2: 79d9 ldrb r1, [r3, #7]
|
|
|
|
if (!is_stalled) {
|
|
|
|
ee4: 4208 tst r0, r1
|
|
|
|
ee6: d101 bne.n eec <_usb_d_dev_ep_stall+0x60>
|
|
|
|
rc = _usb_d_dev_ep_stall_clr(ept, dir);
|
|
|
|
ee8: 2000 movs r0, #0
|
|
|
|
eea: e01c b.n f26 <_usb_d_dev_ep_stall+0x9a>
|
|
|
|
_usbd_ep_int_dis(epn, USB_DEVICE_EPINTFLAG_STALL0 << dir);
|
|
|
|
eec: 2120 movs r1, #32
|
|
|
|
eee: 40a1 lsls r1, r4
|
|
|
|
hri_usbendpoint_clear_EPSTATUS_reg(USB, epn, (USB_DEVICE_EPSTATUS_STALLRQ0 << bank_n));
|
|
|
|
ef0: b2c0 uxtb r0, r0
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
ef2: 7158 strb r0, [r3, #5]
|
|
|
|
hri_usbendpoint_clear_EPINTEN_reg(USB, epn, flags);
|
|
|
|
ef4: b2c8 uxtb r0, r1
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTENCLR.reg = mask;
|
|
|
|
ef6: 7258 strb r0, [r3, #9]
|
|
|
|
return ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg;
|
|
|
|
ef8: 7a1e ldrb r6, [r3, #8]
|
|
|
|
if (_usbd_ep_is_stall_sent(epn, dir)) {
|
|
|
|
efa: 4231 tst r1, r6
|
|
|
|
efc: d004 beq.n f08 <_usb_d_dev_ep_stall+0x7c>
|
|
|
|
hri_usbendpoint_clear_EPSTATUS_reg(USB, epn, (USB_DEVICE_EPSTATUS_DTGLOUT << bank_n));
|
|
|
|
efe: 2101 movs r1, #1
|
|
|
|
f00: 40a1 lsls r1, r4
|
|
|
|
f02: b2c9 uxtb r1, r1
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
f04: 7218 strb r0, [r3, #8]
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUSCLR.reg = mask;
|
|
|
|
f06: 7159 strb r1, [r3, #5]
|
|
|
|
if (_usb_d_dev_ep_is_ctrl(ept)) {
|
|
|
|
f08: 2107 movs r1, #7
|
|
|
|
f0a: 7cd3 ldrb r3, [r2, #19]
|
|
|
|
f0c: 4019 ands r1, r3
|
|
|
|
f0e: 2901 cmp r1, #1
|
|
|
|
f10: d10a bne.n f28 <_usb_d_dev_ep_stall+0x9c>
|
|
|
|
return ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPSTATUS.reg;
|
|
|
|
f12: 35ff adds r5, #255 ; 0xff
|
|
|
|
f14: 79ec ldrb r4, [r5, #7]
|
|
|
|
if ((hri_usbendpoint_read_EPSTATUS_reg(USB, epn) & USB_DEVICE_EPSTATUS_STALLRQ_Msk) == 0) {
|
|
|
|
f16: 312f adds r1, #47 ; 0x2f
|
|
|
|
f18: 0020 movs r0, r4
|
|
|
|
f1a: 4008 ands r0, r1
|
|
|
|
f1c: 420c tst r4, r1
|
|
|
|
f1e: d1e3 bne.n ee8 <_usb_d_dev_ep_stall+0x5c>
|
|
|
|
ept->flags.bits.is_stalled = 0;
|
|
|
|
f20: 3928 subs r1, #40 ; 0x28
|
|
|
|
f22: 438b bics r3, r1
|
|
|
|
f24: 74d3 strb r3, [r2, #19]
|
|
|
|
}
|
|
|
|
f26: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
ept->flags.bits.is_stalled = 0;
|
|
|
|
f28: 2108 movs r1, #8
|
|
|
|
f2a: 438b bics r3, r1
|
|
|
|
f2c: e7d0 b.n ed0 <_usb_d_dev_ep_stall+0x44>
|
|
|
|
f2e: 4a06 ldr r2, [pc, #24] ; (f48 <_usb_d_dev_ep_stall+0xbc>)
|
|
|
|
f30: 189b adds r3, r3, r2
|
|
|
|
f32: 799b ldrb r3, [r3, #6]
|
|
|
|
return (hri_usbendpoint_read_EPSTATUS_reg(hw, epn) & (USB_DEVICE_EPSTATUS_STALLRQ0 << bank_n));
|
|
|
|
f34: 4018 ands r0, r3
|
|
|
|
return _usbd_ep_is_stalled(epn, dir);
|
|
|
|
f36: 1e43 subs r3, r0, #1
|
|
|
|
f38: 4198 sbcs r0, r3
|
|
|
|
f3a: e7f4 b.n f26 <_usb_d_dev_ep_stall+0x9a>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
f3c: 2012 movs r0, #18
|
|
|
|
f3e: 4240 negs r0, r0
|
|
|
|
f40: e7f1 b.n f26 <_usb_d_dev_ep_stall+0x9a>
|
|
|
|
f42: 46c0 nop ; (mov r8, r8)
|
|
|
|
f44: 0000051d .word 0x0000051d
|
|
|
|
f48: 41005100 .word 0x41005100
|
|
|
|
f4c: 410050ff .word 0x410050ff
|
|
|
|
f50: 41005000 .word 0x41005000
|
|
|
|
|
|
|
|
00000f54 <_usb_d_dev_ep_read_req>:
|
|
|
|
|
|
|
|
int32_t _usb_d_dev_ep_read_req(const uint8_t ep, uint8_t *req_buf)
|
|
|
|
{
|
|
|
|
f54: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(ep);
|
|
|
|
f56: 230f movs r3, #15
|
|
|
|
f58: 4018 ands r0, r3
|
|
|
|
UsbDeviceDescBank *bank = prvt_inst.desc_table[epn].DeviceDescBank;
|
|
|
|
f5a: 4b11 ldr r3, [pc, #68] ; (fa0 <_usb_d_dev_ep_read_req+0x4c>)
|
|
|
|
f5c: 0144 lsls r4, r0, #5
|
|
|
|
f5e: 191b adds r3, r3, r4
|
|
|
|
{
|
|
|
|
f60: 000f movs r7, r1
|
|
|
|
uint32_t addr = bank[0].ADDR.reg;
|
|
|
|
f62: 6819 ldr r1, [r3, #0]
|
|
|
|
uint16_t bytes = bank[0].PCKSIZE.bit.BYTE_COUNT;
|
|
|
|
f64: 685d ldr r5, [r3, #4]
|
|
|
|
f66: 04ad lsls r5, r5, #18
|
|
|
|
f68: 0cad lsrs r5, r5, #18
|
|
|
|
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N || !req_buf) {
|
|
|
|
f6a: 2802 cmp r0, #2
|
|
|
|
f6c: d812 bhi.n f94 <_usb_d_dev_ep_read_req+0x40>
|
|
|
|
f6e: 2f00 cmp r7, #0
|
|
|
|
f70: d010 beq.n f94 <_usb_d_dev_ep_read_req+0x40>
|
|
|
|
return ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg;
|
|
|
|
f72: 4b0c ldr r3, [pc, #48] ; (fa4 <_usb_d_dev_ep_read_req+0x50>)
|
|
|
|
f74: 18e4 adds r4, r4, r3
|
|
|
|
f76: 7863 ldrb r3, [r4, #1]
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
}
|
|
|
|
if (!_usbd_ep_is_ctrl(epn)) {
|
|
|
|
f78: 2b11 cmp r3, #17
|
|
|
|
f7a: d10e bne.n f9a <_usb_d_dev_ep_read_req+0x46>
|
|
|
|
tmp &= mask;
|
|
|
|
f7c: 2610 movs r6, #16
|
|
|
|
tmp = ((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg;
|
|
|
|
f7e: 7a22 ldrb r2, [r4, #8]
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
}
|
|
|
|
if (!_usbd_ep_is_setup(epn)) {
|
|
|
|
return ERR_NONE;
|
|
|
|
f80: 2000 movs r0, #0
|
|
|
|
if (!_usbd_ep_is_setup(epn)) {
|
|
|
|
f82: 4232 tst r2, r6
|
|
|
|
f84: d005 beq.n f92 <_usb_d_dev_ep_read_req+0x3e>
|
|
|
|
}
|
|
|
|
memcpy(req_buf, (void *)addr, 8);
|
|
|
|
f86: 2208 movs r2, #8
|
|
|
|
f88: 0038 movs r0, r7
|
|
|
|
f8a: 4b07 ldr r3, [pc, #28] ; (fa8 <_usb_d_dev_ep_read_req+0x54>)
|
|
|
|
f8c: 4798 blx r3
|
|
|
|
_usbd_ep_ack_setup(epn);
|
|
|
|
|
|
|
|
return bytes;
|
|
|
|
f8e: 0028 movs r0, r5
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPINTFLAG.reg = mask;
|
|
|
|
f90: 7226 strb r6, [r4, #8]
|
|
|
|
}
|
|
|
|
f92: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
f94: 2012 movs r0, #18
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
f96: 4240 negs r0, r0
|
|
|
|
f98: e7fb b.n f92 <_usb_d_dev_ep_read_req+0x3e>
|
|
|
|
f9a: 2013 movs r0, #19
|
|
|
|
f9c: e7fb b.n f96 <_usb_d_dev_ep_read_req+0x42>
|
|
|
|
f9e: 46c0 nop ; (mov r8, r8)
|
|
|
|
fa0: 20000110 .word 0x20000110
|
|
|
|
fa4: 410050ff .word 0x410050ff
|
|
|
|
fa8: 0000261d .word 0x0000261d
|
|
|
|
|
|
|
|
00000fac <_usb_d_dev_ep_trans>:
|
|
|
|
|
|
|
|
int32_t _usb_d_dev_ep_trans(const struct usb_d_transfer *trans)
|
|
|
|
{
|
|
|
|
fac: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
uint8_t epn = USB_EP_GET_N(trans->ep);
|
|
|
|
fae: 250f movs r5, #15
|
|
|
|
fb0: 7a07 ldrb r7, [r0, #8]
|
|
|
|
{
|
|
|
|
fb2: b087 sub sp, #28
|
|
|
|
fb4: b27b sxtb r3, r7
|
|
|
|
uint8_t epn = USB_EP_GET_N(trans->ep);
|
|
|
|
fb6: 403d ands r5, r7
|
|
|
|
bool dir = USB_EP_GET_DIR(trans->ep);
|
|
|
|
fb8: 09ff lsrs r7, r7, #7
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
fba: 0039 movs r1, r7
|
|
|
|
fbc: 9302 str r3, [sp, #8]
|
|
|
|
{
|
|
|
|
fbe: 0006 movs r6, r0
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
fc0: 4b3a ldr r3, [pc, #232] ; (10ac <_usb_d_dev_ep_trans+0x100>)
|
|
|
|
fc2: 0028 movs r0, r5
|
|
|
|
fc4: 4798 blx r3
|
|
|
|
|
|
|
|
uint16_t size_mask = (ept->size == 1023) ? 1023 : (ept->size - 1);
|
|
|
|
fc6: 493a ldr r1, [pc, #232] ; (10b0 <_usb_d_dev_ep_trans+0x104>)
|
|
|
|
fc8: 8a03 ldrh r3, [r0, #16]
|
|
|
|
struct _usb_d_dev_ep *ept = _usb_d_dev_ept(epn, dir);
|
|
|
|
fca: 0004 movs r4, r0
|
|
|
|
uint16_t size_mask = (ept->size == 1023) ? 1023 : (ept->size - 1);
|
|
|
|
fcc: 001a movs r2, r3
|
|
|
|
fce: 428b cmp r3, r1
|
|
|
|
fd0: d001 beq.n fd6 <_usb_d_dev_ep_trans+0x2a>
|
|
|
|
fd2: 1e5a subs r2, r3, #1
|
|
|
|
fd4: b292 uxth r2, r2
|
|
|
|
bool size_n_aligned = (trans->size & size_mask);
|
|
|
|
fd6: 6871 ldr r1, [r6, #4]
|
|
|
|
fd8: 400a ands r2, r1
|
|
|
|
fda: 9201 str r2, [sp, #4]
|
|
|
|
|
|
|
|
bool use_cache = false;
|
|
|
|
|
|
|
|
volatile hal_atomic_t flags;
|
|
|
|
|
|
|
|
if (epn > CONF_USB_D_MAX_EP_N) {
|
|
|
|
fdc: 2d02 cmp r5, #2
|
|
|
|
fde: d862 bhi.n 10a6 <_usb_d_dev_ep_trans+0xfa>
|
|
|
|
* 1. Buffer not in RAM (cache all).
|
|
|
|
* 2. IN/OUT with unaligned buffer (cache all).
|
|
|
|
* 3. OUT with unaligned packet size (cache last packet).
|
|
|
|
* 4. OUT size < 8 (sub-case for 3).
|
|
|
|
*/
|
|
|
|
if (!_usb_is_addr4dma(trans->buf, trans->size) || (!_usb_is_aligned(trans->buf))
|
|
|
|
fe0: 2080 movs r0, #128 ; 0x80
|
|
|
|
fe2: 6832 ldr r2, [r6, #0]
|
|
|
|
fe4: 0580 lsls r0, r0, #22
|
|
|
|
fe6: 4282 cmp r2, r0
|
|
|
|
fe8: d30d bcc.n 1006 <_usb_d_dev_ep_trans+0x5a>
|
|
|
|
fea: 4d32 ldr r5, [pc, #200] ; (10b4 <_usb_d_dev_ep_trans+0x108>)
|
|
|
|
fec: 1888 adds r0, r1, r2
|
|
|
|
fee: 42a8 cmp r0, r5
|
|
|
|
ff0: d809 bhi.n 1006 <_usb_d_dev_ep_trans+0x5a>
|
|
|
|
ff2: 2003 movs r0, #3
|
|
|
|
ff4: 0015 movs r5, r2
|
|
|
|
ff6: 4005 ands r5, r0
|
|
|
|
ff8: 4202 tst r2, r0
|
|
|
|
ffa: d104 bne.n 1006 <_usb_d_dev_ep_trans+0x5a>
|
|
|
|
|| (!dir && (trans->size < ept->size))) {
|
|
|
|
ffc: 9a02 ldr r2, [sp, #8]
|
|
|
|
ffe: 2a00 cmp r2, #0
|
|
|
|
1000: db0e blt.n 1020 <_usb_d_dev_ep_trans+0x74>
|
|
|
|
1002: 4299 cmp r1, r3
|
|
|
|
1004: d206 bcs.n 1014 <_usb_d_dev_ep_trans+0x68>
|
|
|
|
if (!ept->cache) {
|
|
|
|
1006: 68e3 ldr r3, [r4, #12]
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
}
|
|
|
|
/* Use cache all the time. */
|
|
|
|
use_cache = true;
|
|
|
|
1008: 2501 movs r5, #1
|
|
|
|
if (!ept->cache) {
|
|
|
|
100a: 2b00 cmp r3, #0
|
|
|
|
100c: d108 bne.n 1020 <_usb_d_dev_ep_trans+0x74>
|
|
|
|
return -USB_ERR_FUNC;
|
|
|
|
100e: 2013 movs r0, #19
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
1010: 4240 negs r0, r0
|
|
|
|
1012: e017 b.n 1044 <_usb_d_dev_ep_trans+0x98>
|
|
|
|
}
|
|
|
|
if (!dir && size_n_aligned) {
|
|
|
|
1014: 9b01 ldr r3, [sp, #4]
|
|
|
|
1016: 2b00 cmp r3, #0
|
|
|
|
1018: d016 beq.n 1048 <_usb_d_dev_ep_trans+0x9c>
|
|
|
|
if (!ept->cache) {
|
|
|
|
101a: 68e3 ldr r3, [r4, #12]
|
|
|
|
101c: 2b00 cmp r3, #0
|
|
|
|
101e: d042 beq.n 10a6 <_usb_d_dev_ep_trans+0xfa>
|
|
|
|
}
|
|
|
|
/* Set 'use_cache' on last packet. */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check halt */
|
|
|
|
if (ept->flags.bits.is_stalled) {
|
|
|
|
1020: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
return USB_HALTED;
|
|
|
|
1022: 2002 movs r0, #2
|
|
|
|
if (ept->flags.bits.is_stalled) {
|
|
|
|
1024: 071b lsls r3, r3, #28
|
|
|
|
1026: d40d bmi.n 1044 <_usb_d_dev_ep_trans+0x98>
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Try to start transactions. */
|
|
|
|
|
|
|
|
atomic_enter_critical(&flags);
|
|
|
|
1028: 4b23 ldr r3, [pc, #140] ; (10b8 <_usb_d_dev_ep_trans+0x10c>)
|
|
|
|
102a: a805 add r0, sp, #20
|
|
|
|
102c: 4798 blx r3
|
|
|
|
if (_usb_d_dev_ep_is_busy(ept)) {
|
|
|
|
102e: 7ce1 ldrb r1, [r4, #19]
|
|
|
|
1030: 2340 movs r3, #64 ; 0x40
|
|
|
|
1032: 000a movs r2, r1
|
|
|
|
1034: 401a ands r2, r3
|
|
|
|
1036: 9203 str r2, [sp, #12]
|
|
|
|
1038: 4a20 ldr r2, [pc, #128] ; (10bc <_usb_d_dev_ep_trans+0x110>)
|
|
|
|
103a: 4219 tst r1, r3
|
|
|
|
103c: d006 beq.n 104c <_usb_d_dev_ep_trans+0xa0>
|
|
|
|
atomic_leave_critical(&flags);
|
|
|
|
103e: a805 add r0, sp, #20
|
|
|
|
1040: 4790 blx r2
|
|
|
|
return USB_BUSY;
|
|
|
|
1042: 2001 movs r0, #1
|
|
|
|
} else {
|
|
|
|
_usb_d_dev_out_next(ept, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ERR_NONE;
|
|
|
|
}
|
|
|
|
1044: b007 add sp, #28
|
|
|
|
1046: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
bool use_cache = false;
|
|
|
|
1048: 9d01 ldr r5, [sp, #4]
|
|
|
|
104a: e7e9 b.n 1020 <_usb_d_dev_ep_trans+0x74>
|
|
|
|
ept->flags.bits.is_busy = 1;
|
|
|
|
104c: 430b orrs r3, r1
|
|
|
|
104e: 74e3 strb r3, [r4, #19]
|
|
|
|
atomic_leave_critical(&flags);
|
|
|
|
1050: a805 add r0, sp, #20
|
|
|
|
1052: 4790 blx r2
|
|
|
|
ept->flags.bits.dir = dir;
|
|
|
|
1054: 217f movs r1, #127 ; 0x7f
|
|
|
|
ept->trans_buf = trans->buf;
|
|
|
|
1056: 6833 ldr r3, [r6, #0]
|
|
|
|
ept->flags.bits.dir = dir;
|
|
|
|
1058: 01fa lsls r2, r7, #7
|
|
|
|
ept->trans_buf = trans->buf;
|
|
|
|
105a: 6023 str r3, [r4, #0]
|
|
|
|
ept->trans_size = trans->size;
|
|
|
|
105c: 6873 ldr r3, [r6, #4]
|
|
|
|
ept->flags.bits.need_zlp = (trans->zlp && (!size_n_aligned));
|
|
|
|
105e: 9f03 ldr r7, [sp, #12]
|
|
|
|
ept->trans_size = trans->size;
|
|
|
|
1060: 6063 str r3, [r4, #4]
|
|
|
|
ept->trans_count = 0;
|
|
|
|
1062: 9b03 ldr r3, [sp, #12]
|
|
|
|
1064: 60a3 str r3, [r4, #8]
|
|
|
|
ept->flags.bits.dir = dir;
|
|
|
|
1066: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
1068: 400b ands r3, r1
|
|
|
|
ept->flags.bits.use_cache = use_cache;
|
|
|
|
106a: 4313 orrs r3, r2
|
|
|
|
106c: 0169 lsls r1, r5, #5
|
|
|
|
106e: 001d movs r5, r3
|
|
|
|
1070: 2320 movs r3, #32
|
|
|
|
1072: 439d bics r5, r3
|
|
|
|
1074: 430d orrs r5, r1
|
|
|
|
1076: 74e5 strb r5, [r4, #19]
|
|
|
|
ept->flags.bits.need_zlp = (trans->zlp && (!size_n_aligned));
|
|
|
|
1078: 7a73 ldrb r3, [r6, #9]
|
|
|
|
107a: 2b00 cmp r3, #0
|
|
|
|
107c: d002 beq.n 1084 <_usb_d_dev_ep_trans+0xd8>
|
|
|
|
107e: 9f01 ldr r7, [sp, #4]
|
|
|
|
1080: 427b negs r3, r7
|
|
|
|
1082: 415f adcs r7, r3
|
|
|
|
1084: 2210 movs r2, #16
|
|
|
|
1086: 7ce3 ldrb r3, [r4, #19]
|
|
|
|
1088: 013f lsls r7, r7, #4
|
|
|
|
108a: 4393 bics r3, r2
|
|
|
|
108c: 431f orrs r7, r3
|
|
|
|
if (dir) {
|
|
|
|
108e: 9b02 ldr r3, [sp, #8]
|
|
|
|
_usb_d_dev_in_next(ept, false);
|
|
|
|
1090: 2100 movs r1, #0
|
|
|
|
1092: 0020 movs r0, r4
|
|
|
|
ept->flags.bits.need_zlp = (trans->zlp && (!size_n_aligned));
|
|
|
|
1094: 74e7 strb r7, [r4, #19]
|
|
|
|
if (dir) {
|
|
|
|
1096: 2b00 cmp r3, #0
|
|
|
|
1098: da03 bge.n 10a2 <_usb_d_dev_ep_trans+0xf6>
|
|
|
|
_usb_d_dev_in_next(ept, false);
|
|
|
|
109a: 4b09 ldr r3, [pc, #36] ; (10c0 <_usb_d_dev_ep_trans+0x114>)
|
|
|
|
_usb_d_dev_out_next(ept, false);
|
|
|
|
109c: 4798 blx r3
|
|
|
|
return ERR_NONE;
|
|
|
|
109e: 2000 movs r0, #0
|
|
|
|
10a0: e7d0 b.n 1044 <_usb_d_dev_ep_trans+0x98>
|
|
|
|
_usb_d_dev_out_next(ept, false);
|
|
|
|
10a2: 4b08 ldr r3, [pc, #32] ; (10c4 <_usb_d_dev_ep_trans+0x118>)
|
|
|
|
10a4: e7fa b.n 109c <_usb_d_dev_ep_trans+0xf0>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
10a6: 2012 movs r0, #18
|
|
|
|
10a8: e7b2 b.n 1010 <_usb_d_dev_ep_trans+0x64>
|
|
|
|
10aa: 46c0 nop ; (mov r8, r8)
|
|
|
|
10ac: 0000051d .word 0x0000051d
|
|
|
|
10b0: 000003ff .word 0x000003ff
|
|
|
|
10b4: 20007fff .word 0x20007fff
|
|
|
|
10b8: 00002449 .word 0x00002449
|
|
|
|
10bc: 00002457 .word 0x00002457
|
|
|
|
10c0: 0000078d .word 0x0000078d
|
|
|
|
10c4: 000008f1 .word 0x000008f1
|
|
|
|
|
|
|
|
000010c8 <_usb_d_dev_register_callback>:
|
|
|
|
return USB_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void _usb_d_dev_register_callback(const enum usb_d_cb_type type, const FUNC_PTR func)
|
|
|
|
{
|
|
|
|
FUNC_PTR f = (func == NULL) ? (FUNC_PTR)_dummy_func_no_return : (FUNC_PTR)func;
|
|
|
|
10c8: 2900 cmp r1, #0
|
|
|
|
10ca: d100 bne.n 10ce <_usb_d_dev_register_callback+0x6>
|
|
|
|
10cc: 4905 ldr r1, [pc, #20] ; (10e4 <_usb_d_dev_register_callback+0x1c>)
|
|
|
|
if (type == USB_D_CB_EVENT) {
|
|
|
|
10ce: 2801 cmp r0, #1
|
|
|
|
10d0: d102 bne.n 10d8 <_usb_d_dev_register_callback+0x10>
|
|
|
|
dev_inst.callbacks.event = (_usb_d_dev_event_cb_t)f;
|
|
|
|
10d2: 4b05 ldr r3, [pc, #20] ; (10e8 <_usb_d_dev_register_callback+0x20>)
|
|
|
|
10d4: 6059 str r1, [r3, #4]
|
|
|
|
} else if (type == USB_D_CB_SOF) {
|
|
|
|
dev_inst.callbacks.sof = (_usb_d_dev_sof_cb_t)f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
10d6: 4770 bx lr
|
|
|
|
} else if (type == USB_D_CB_SOF) {
|
|
|
|
10d8: 2800 cmp r0, #0
|
|
|
|
10da: d1fc bne.n 10d6 <_usb_d_dev_register_callback+0xe>
|
|
|
|
dev_inst.callbacks.sof = (_usb_d_dev_sof_cb_t)f;
|
|
|
|
10dc: 4b02 ldr r3, [pc, #8] ; (10e8 <_usb_d_dev_register_callback+0x20>)
|
|
|
|
10de: 6019 str r1, [r3, #0]
|
|
|
|
}
|
|
|
|
10e0: e7f9 b.n 10d6 <_usb_d_dev_register_callback+0xe>
|
|
|
|
10e2: 46c0 nop ; (mov r8, r8)
|
|
|
|
10e4: 000004f5 .word 0x000004f5
|
|
|
|
10e8: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
000010ec <_usb_d_dev_register_ep_callback>:
|
|
|
|
|
|
|
|
void _usb_d_dev_register_ep_callback(const enum usb_d_dev_ep_cb_type type, const FUNC_PTR func)
|
|
|
|
{
|
|
|
|
FUNC_PTR f = (func == NULL) ? (FUNC_PTR)_dummy_func_no_return : (FUNC_PTR)func;
|
|
|
|
10ec: 2900 cmp r1, #0
|
|
|
|
10ee: d100 bne.n 10f2 <_usb_d_dev_register_ep_callback+0x6>
|
|
|
|
10f0: 4907 ldr r1, [pc, #28] ; (1110 <_usb_d_dev_register_ep_callback+0x24>)
|
|
|
|
if (type == USB_D_DEV_EP_CB_SETUP) {
|
|
|
|
10f2: 2800 cmp r0, #0
|
|
|
|
10f4: d102 bne.n 10fc <_usb_d_dev_register_ep_callback+0x10>
|
|
|
|
dev_inst.ep_callbacks.setup = (_usb_d_dev_ep_cb_setup_t)f;
|
|
|
|
10f6: 4b07 ldr r3, [pc, #28] ; (1114 <_usb_d_dev_register_ep_callback+0x28>)
|
|
|
|
10f8: 6099 str r1, [r3, #8]
|
|
|
|
} else if (type == USB_D_DEV_EP_CB_MORE) {
|
|
|
|
dev_inst.ep_callbacks.more = (_usb_d_dev_ep_cb_more_t)f;
|
|
|
|
} else if (type == USB_D_DEV_EP_CB_DONE) {
|
|
|
|
dev_inst.ep_callbacks.done = (_usb_d_dev_ep_cb_done_t)f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
10fa: 4770 bx lr
|
|
|
|
} else if (type == USB_D_DEV_EP_CB_MORE) {
|
|
|
|
10fc: 2801 cmp r0, #1
|
|
|
|
10fe: d102 bne.n 1106 <_usb_d_dev_register_ep_callback+0x1a>
|
|
|
|
dev_inst.ep_callbacks.more = (_usb_d_dev_ep_cb_more_t)f;
|
|
|
|
1100: 4b04 ldr r3, [pc, #16] ; (1114 <_usb_d_dev_register_ep_callback+0x28>)
|
|
|
|
1102: 60d9 str r1, [r3, #12]
|
|
|
|
1104: e7f9 b.n 10fa <_usb_d_dev_register_ep_callback+0xe>
|
|
|
|
} else if (type == USB_D_DEV_EP_CB_DONE) {
|
|
|
|
1106: 2802 cmp r0, #2
|
|
|
|
1108: d1f7 bne.n 10fa <_usb_d_dev_register_ep_callback+0xe>
|
|
|
|
dev_inst.ep_callbacks.done = (_usb_d_dev_ep_cb_done_t)f;
|
|
|
|
110a: 4b02 ldr r3, [pc, #8] ; (1114 <_usb_d_dev_register_ep_callback+0x28>)
|
|
|
|
110c: 6119 str r1, [r3, #16]
|
|
|
|
}
|
|
|
|
110e: e7f4 b.n 10fa <_usb_d_dev_register_ep_callback+0xe>
|
|
|
|
1110: 000004f5 .word 0x000004f5
|
|
|
|
1114: 20000170 .word 0x20000170
|
|
|
|
|
|
|
|
00001118 <USB_Handler>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief USB interrupt handler
|
|
|
|
*/
|
|
|
|
void USB_Handler(void)
|
|
|
|
{
|
|
|
|
1118: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
uint16_t epint = hw->DEVICE.EPINTSMRY.reg;
|
|
|
|
111a: 4b6c ldr r3, [pc, #432] ; (12cc <USB_Handler+0x1b4>)
|
|
|
|
111c: 8c1a ldrh r2, [r3, #32]
|
|
|
|
111e: b291 uxth r1, r2
|
|
|
|
1120: 9101 str r1, [sp, #4]
|
|
|
|
if (0 == epint) {
|
|
|
|
1122: 2a00 cmp r2, #0
|
|
|
|
1124: d000 beq.n 1128 <USB_Handler+0x10>
|
|
|
|
1126: e066 b.n 11f6 <USB_Handler+0xde>
|
|
|
|
return ((Usb *)hw)->DEVICE.INTFLAG.reg;
|
|
|
|
1128: 8b9a ldrh r2, [r3, #28]
|
|
|
|
return ((Usb *)hw)->DEVICE.INTENSET.reg;
|
|
|
|
112a: 8b19 ldrh r1, [r3, #24]
|
|
|
|
if (flags & USB_DEVICE_INTFLAG_SOF) {
|
|
|
|
112c: 2004 movs r0, #4
|
|
|
|
flags &= hri_usbdevice_read_INTEN_reg(USB);
|
|
|
|
112e: 400a ands r2, r1
|
|
|
|
if (flags & USB_DEVICE_INTFLAG_SOF) {
|
|
|
|
1130: 0011 movs r1, r2
|
|
|
|
1132: 4001 ands r1, r0
|
|
|
|
1134: 4202 tst r2, r0
|
|
|
|
1136: d004 beq.n 1142 <USB_Handler+0x2a>
|
|
|
|
((Usb *)hw)->DEVICE.INTFLAG.reg = mask;
|
|
|
|
1138: 8398 strh r0, [r3, #28]
|
|
|
|
dev_inst.callbacks.sof();
|
|
|
|
113a: 4b65 ldr r3, [pc, #404] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
113c: 681b ldr r3, [r3, #0]
|
|
|
|
113e: 4798 blx r3
|
|
|
|
|
|
|
|
_usb_d_dev_handler();
|
|
|
|
}
|
|
|
|
1140: bdf7 pop {r0, r1, r2, r4, r5, r6, r7, pc}
|
|
|
|
if (flags & USB_DEVICE_INTFLAG_LPMSUSP) {
|
|
|
|
1142: 2480 movs r4, #128 ; 0x80
|
|
|
|
1144: 0016 movs r6, r2
|
|
|
|
1146: 00a4 lsls r4, r4, #2
|
|
|
|
1148: 4026 ands r6, r4
|
|
|
|
114a: 4222 tst r2, r4
|
|
|
|
114c: d01d beq.n 118a <USB_Handler+0x72>
|
|
|
|
114e: 4a61 ldr r2, [pc, #388] ; (12d4 <USB_Handler+0x1bc>)
|
|
|
|
1150: 839a strh r2, [r3, #28]
|
|
|
|
((Usb *)hw)->DEVICE.INTENCLR.reg = mask;
|
|
|
|
1152: 829a strh r2, [r3, #20]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
1154: 3a92 subs r2, #146 ; 0x92
|
|
|
|
1156: 3aff subs r2, #255 ; 0xff
|
|
|
|
1158: 831a strh r2, [r3, #24]
|
|
|
|
if (bank->EXTREG.bit.SUBPID == 0x3) {
|
|
|
|
115a: 4b5f ldr r3, [pc, #380] ; (12d8 <USB_Handler+0x1c0>)
|
|
|
|
115c: 891a ldrh r2, [r3, #8]
|
|
|
|
115e: 0712 lsls r2, r2, #28
|
|
|
|
1160: 0f12 lsrs r2, r2, #28
|
|
|
|
1162: 2a03 cmp r2, #3
|
|
|
|
1164: d005 beq.n 1172 <USB_Handler+0x5a>
|
|
|
|
1166: 8d1a ldrh r2, [r3, #40] ; 0x28
|
|
|
|
1168: 0712 lsls r2, r2, #28
|
|
|
|
116a: 0f12 lsrs r2, r2, #28
|
|
|
|
116c: 2a03 cmp r2, #3
|
|
|
|
116e: d107 bne.n 1180 <USB_Handler+0x68>
|
|
|
|
UsbDeviceDescBank *bank = &prvt_inst.desc_table[i].DeviceDescBank[0];
|
|
|
|
1170: 2101 movs r1, #1
|
|
|
|
bank->EXTREG.reg = 0;
|
|
|
|
1172: 2200 movs r2, #0
|
|
|
|
lpm_variable = bank->EXTREG.bit.VARIABLE;
|
|
|
|
1174: 0149 lsls r1, r1, #5
|
|
|
|
1176: 185b adds r3, r3, r1
|
|
|
|
1178: 8919 ldrh r1, [r3, #8]
|
|
|
|
bank->EXTREG.reg = 0;
|
|
|
|
117a: 811a strh r2, [r3, #8]
|
|
|
|
lpm_variable = bank->EXTREG.bit.VARIABLE;
|
|
|
|
117c: 0449 lsls r1, r1, #17
|
|
|
|
117e: 0d49 lsrs r1, r1, #21
|
|
|
|
dev_inst.callbacks.event(USB_EV_LPM_SUSPEND, lpm_variable);
|
|
|
|
1180: 2003 movs r0, #3
|
|
|
|
1182: 4b53 ldr r3, [pc, #332] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
1184: 685b ldr r3, [r3, #4]
|
|
|
|
dev_inst.callbacks.event(USB_EV_SUSPEND, 0);
|
|
|
|
1186: 4798 blx r3
|
|
|
|
1188: e7da b.n 1140 <USB_Handler+0x28>
|
|
|
|
} else if (flags & USB_DEVICE_INTFLAG_RAMACER) {
|
|
|
|
118a: 2480 movs r4, #128 ; 0x80
|
|
|
|
118c: 0015 movs r5, r2
|
|
|
|
118e: 4025 ands r5, r4
|
|
|
|
1190: 4222 tst r2, r4
|
|
|
|
1192: d005 beq.n 11a0 <USB_Handler+0x88>
|
|
|
|
((Usb *)hw)->DEVICE.INTFLAG.reg = mask;
|
|
|
|
1194: 839c strh r4, [r3, #28]
|
|
|
|
dev_inst.callbacks.event(USB_EV_ERROR, 0);
|
|
|
|
1196: 4b4e ldr r3, [pc, #312] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
1198: 0031 movs r1, r6
|
|
|
|
119a: 2005 movs r0, #5
|
|
|
|
119c: 685b ldr r3, [r3, #4]
|
|
|
|
119e: e7f2 b.n 1186 <USB_Handler+0x6e>
|
|
|
|
} else if (flags & USB_D_WAKEUP_INT_FLAGS) {
|
|
|
|
11a0: 2670 movs r6, #112 ; 0x70
|
|
|
|
11a2: 0014 movs r4, r2
|
|
|
|
11a4: 4034 ands r4, r6
|
|
|
|
11a6: 4232 tst r2, r6
|
|
|
|
11a8: d00a beq.n 11c0 <USB_Handler+0xa8>
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
11aa: 4a4a ldr r2, [pc, #296] ; (12d4 <USB_Handler+0x1bc>)
|
|
|
|
((Usb *)hw)->DEVICE.INTFLAG.reg = mask;
|
|
|
|
11ac: 839e strh r6, [r3, #28]
|
|
|
|
((Usb *)hw)->DEVICE.INTENCLR.reg = mask;
|
|
|
|
11ae: 829e strh r6, [r3, #20]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
11b0: 831a strh r2, [r3, #24]
|
|
|
|
_usb_d_dev_wait_dfll_rdy();
|
|
|
|
11b2: 4b4a ldr r3, [pc, #296] ; (12dc <USB_Handler+0x1c4>)
|
|
|
|
11b4: 4798 blx r3
|
|
|
|
dev_inst.callbacks.event(USB_EV_WAKEUP, 0);
|
|
|
|
11b6: 4b46 ldr r3, [pc, #280] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
11b8: 0029 movs r1, r5
|
|
|
|
11ba: 2002 movs r0, #2
|
|
|
|
11bc: 685b ldr r3, [r3, #4]
|
|
|
|
11be: e7e2 b.n 1186 <USB_Handler+0x6e>
|
|
|
|
} else if (flags & USB_DEVICE_INTFLAG_EORST) {
|
|
|
|
11c0: 2508 movs r5, #8
|
|
|
|
11c2: 0011 movs r1, r2
|
|
|
|
11c4: 4029 ands r1, r5
|
|
|
|
11c6: 422a tst r2, r5
|
|
|
|
11c8: d00c beq.n 11e4 <USB_Handler+0xcc>
|
|
|
|
((UsbDevice *)hw)->DeviceEndpoint[submodule_index].EPCFG.reg = data;
|
|
|
|
11ca: 4a45 ldr r2, [pc, #276] ; (12e0 <USB_Handler+0x1c8>)
|
|
|
|
11cc: 7054 strb r4, [r2, #1]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
11ce: 4a41 ldr r2, [pc, #260] ; (12d4 <USB_Handler+0x1bc>)
|
|
|
|
((Usb *)hw)->DEVICE.INTFLAG.reg = mask;
|
|
|
|
11d0: 839d strh r5, [r3, #28]
|
|
|
|
((Usb *)hw)->DEVICE.INTENCLR.reg = mask;
|
|
|
|
11d2: 829e strh r6, [r3, #20]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
11d4: 831a strh r2, [r3, #24]
|
|
|
|
_usb_d_dev_reset_epts();
|
|
|
|
11d6: 4b43 ldr r3, [pc, #268] ; (12e4 <USB_Handler+0x1cc>)
|
|
|
|
11d8: 4798 blx r3
|
|
|
|
dev_inst.callbacks.event(USB_EV_RESET, 0);
|
|
|
|
11da: 4b3d ldr r3, [pc, #244] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
11dc: 0021 movs r1, r4
|
|
|
|
11de: 2001 movs r0, #1
|
|
|
|
11e0: 685b ldr r3, [r3, #4]
|
|
|
|
11e2: e7d0 b.n 1186 <USB_Handler+0x6e>
|
|
|
|
} else if (flags & USB_DEVICE_INTFLAG_SUSPEND) {
|
|
|
|
11e4: 07d2 lsls r2, r2, #31
|
|
|
|
11e6: d506 bpl.n 11f6 <USB_Handler+0xde>
|
|
|
|
((Usb *)hw)->DEVICE.INTFLAG.reg = mask;
|
|
|
|
11e8: 4a3a ldr r2, [pc, #232] ; (12d4 <USB_Handler+0x1bc>)
|
|
|
|
11ea: 839a strh r2, [r3, #28]
|
|
|
|
((Usb *)hw)->DEVICE.INTENCLR.reg = mask;
|
|
|
|
11ec: 829a strh r2, [r3, #20]
|
|
|
|
((Usb *)hw)->DEVICE.INTENSET.reg = mask;
|
|
|
|
11ee: 831e strh r6, [r3, #24]
|
|
|
|
dev_inst.callbacks.event(USB_EV_SUSPEND, 0);
|
|
|
|
11f0: 4b37 ldr r3, [pc, #220] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
11f2: 685b ldr r3, [r3, #4]
|
|
|
|
11f4: e7c7 b.n 1186 <USB_Handler+0x6e>
|
|
|
|
uint32_t lpm_variable = 0;
|
|
|
|
11f6: 2600 movs r6, #0
|
|
|
|
uint8_t epn = USB_EP_GET_N(ept->ep);
|
|
|
|
11f8: 270f movs r7, #15
|
|
|
|
if (!(epint & (1u << epn))) {
|
|
|
|
11fa: 2501 movs r5, #1
|
|
|
|
11fc: 4c3a ldr r4, [pc, #232] ; (12e8 <USB_Handler+0x1d0>)
|
|
|
|
if (ept->ep == 0xFF) {
|
|
|
|
11fe: 7ca3 ldrb r3, [r4, #18]
|
|
|
|
1200: 2bff cmp r3, #255 ; 0xff
|
|
|
|
1202: d038 beq.n 1276 <USB_Handler+0x15e>
|
|
|
|
if (!(epint & (1u << epn))) {
|
|
|
|
1204: 002a movs r2, r5
|
|
|
|
1206: 403b ands r3, r7
|
|
|
|
1208: 409a lsls r2, r3
|
|
|
|
120a: 9901 ldr r1, [sp, #4]
|
|
|
|
120c: 4211 tst r1, r2
|
|
|
|
120e: d032 beq.n 1276 <USB_Handler+0x15e>
|
|
|
|
flags = hw->DEVICE.DeviceEndpoint[epn].EPINTFLAG.reg;
|
|
|
|
1210: 4936 ldr r1, [pc, #216] ; (12ec <USB_Handler+0x1d4>)
|
|
|
|
1212: 015a lsls r2, r3, #5
|
|
|
|
1214: 1852 adds r2, r2, r1
|
|
|
|
mask = hw->DEVICE.DeviceEndpoint[epn].EPINTENSET.reg;
|
|
|
|
1216: 4932 ldr r1, [pc, #200] ; (12e0 <USB_Handler+0x1c8>)
|
|
|
|
1218: 015b lsls r3, r3, #5
|
|
|
|
121a: 185b adds r3, r3, r1
|
|
|
|
flags = hw->DEVICE.DeviceEndpoint[epn].EPINTFLAG.reg;
|
|
|
|
121c: 7812 ldrb r2, [r2, #0]
|
|
|
|
mask = hw->DEVICE.DeviceEndpoint[epn].EPINTENSET.reg;
|
|
|
|
121e: 7a99 ldrb r1, [r3, #10]
|
|
|
|
flags &= mask;
|
|
|
|
1220: 000b movs r3, r1
|
|
|
|
1222: 4013 ands r3, r2
|
|
|
|
if (flags) {
|
|
|
|
1224: 4211 tst r1, r2
|
|
|
|
1226: d026 beq.n 1276 <USB_Handler+0x15e>
|
|
|
|
if ((ept->flags.bits.eptype == 0x1) && !_usb_d_dev_ep_is_busy(ept)) {
|
|
|
|
1228: 2114 movs r1, #20
|
|
|
|
122a: 4371 muls r1, r6
|
|
|
|
122c: 4a28 ldr r2, [pc, #160] ; (12d0 <USB_Handler+0x1b8>)
|
|
|
|
122e: 1852 adds r2, r2, r1
|
|
|
|
1230: 2147 movs r1, #71 ; 0x47
|
|
|
|
1232: 3210 adds r2, #16
|
|
|
|
1234: 7dd2 ldrb r2, [r2, #23]
|
|
|
|
1236: 4011 ands r1, r2
|
|
|
|
1238: 2901 cmp r1, #1
|
|
|
|
123a: d111 bne.n 1260 <USB_Handler+0x148>
|
|
|
|
if (flags & USB_DEVICE_EPINTFLAG_RXSTP) {
|
|
|
|
123c: 06da lsls r2, r3, #27
|
|
|
|
123e: d503 bpl.n 1248 <USB_Handler+0x130>
|
|
|
|
_usb_d_dev_handle_setup(ept);
|
|
|
|
1240: 0020 movs r0, r4
|
|
|
|
1242: 4b2b ldr r3, [pc, #172] ; (12f0 <USB_Handler+0x1d8>)
|
|
|
|
1244: 4798 blx r3
|
|
|
|
1246: e016 b.n 1276 <USB_Handler+0x15e>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_STALL1) {
|
|
|
|
1248: 2240 movs r2, #64 ; 0x40
|
|
|
|
124a: 0019 movs r1, r3
|
|
|
|
124c: 4011 ands r1, r2
|
|
|
|
124e: 4213 tst r3, r2
|
|
|
|
1250: d001 beq.n 1256 <USB_Handler+0x13e>
|
|
|
|
_usb_d_dev_handle_stall(ept, 1);
|
|
|
|
1252: 0029 movs r1, r5
|
|
|
|
1254: e001 b.n 125a <USB_Handler+0x142>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_STALL0) {
|
|
|
|
1256: 069b lsls r3, r3, #26
|
|
|
|
1258: d50d bpl.n 1276 <USB_Handler+0x15e>
|
|
|
|
_usb_d_dev_handle_stall(ept, 0);
|
|
|
|
125a: 0020 movs r0, r4
|
|
|
|
125c: 4b25 ldr r3, [pc, #148] ; (12f4 <USB_Handler+0x1dc>)
|
|
|
|
125e: e009 b.n 1274 <USB_Handler+0x15c>
|
|
|
|
} else if (_usb_d_dev_ep_is_in(ept)) {
|
|
|
|
1260: b251 sxtb r1, r2
|
|
|
|
1262: 2900 cmp r1, #0
|
|
|
|
1264: da1c bge.n 12a0 <USB_Handler+0x188>
|
|
|
|
if (flags & USB_DEVICE_EPINTFLAG_STALL1) {
|
|
|
|
1266: 0659 lsls r1, r3, #25
|
|
|
|
1268: d4f3 bmi.n 1252 <USB_Handler+0x13a>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_TRFAIL1) {
|
|
|
|
126a: 0719 lsls r1, r3, #28
|
|
|
|
126c: d508 bpl.n 1280 <USB_Handler+0x168>
|
|
|
|
_usb_d_dev_handle_trfail(ept, 1);
|
|
|
|
126e: 0029 movs r1, r5
|
|
|
|
1270: 0020 movs r0, r4
|
|
|
|
1272: 4b21 ldr r3, [pc, #132] ; (12f8 <USB_Handler+0x1e0>)
|
|
|
|
1274: 4798 blx r3
|
|
|
|
for (i = 0; i < USB_D_N_EP; i++) {
|
|
|
|
1276: 3601 adds r6, #1
|
|
|
|
1278: 3414 adds r4, #20
|
|
|
|
127a: 2e1b cmp r6, #27
|
|
|
|
127c: d1bf bne.n 11fe <USB_Handler+0xe6>
|
|
|
|
127e: e75f b.n 1140 <USB_Handler+0x28>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_TRCPT1) {
|
|
|
|
1280: 0799 lsls r1, r3, #30
|
|
|
|
1282: d503 bpl.n 128c <USB_Handler+0x174>
|
|
|
|
_usb_d_dev_in_next(ept, true);
|
|
|
|
1284: 0029 movs r1, r5
|
|
|
|
1286: 0020 movs r0, r4
|
|
|
|
1288: 4b1c ldr r3, [pc, #112] ; (12fc <USB_Handler+0x1e4>)
|
|
|
|
128a: e7f3 b.n 1274 <USB_Handler+0x15c>
|
|
|
|
} else if (_usb_d_dev_ep_is_ctrl(ept)) {
|
|
|
|
128c: 2107 movs r1, #7
|
|
|
|
128e: 400a ands r2, r1
|
|
|
|
1290: 2a01 cmp r2, #1
|
|
|
|
1292: d1f0 bne.n 1276 <USB_Handler+0x15e>
|
|
|
|
_usb_d_dev_handle_trfail(ept, 0);
|
|
|
|
1294: 2100 movs r1, #0
|
|
|
|
if (flags & USB_DEVICE_EPINTFLAG_TRFAIL0) {
|
|
|
|
1296: 075a lsls r2, r3, #29
|
|
|
|
1298: d4ea bmi.n 1270 <USB_Handler+0x158>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_RXSTP) {
|
|
|
|
129a: 06db lsls r3, r3, #27
|
|
|
|
129c: d5eb bpl.n 1276 <USB_Handler+0x15e>
|
|
|
|
129e: e7cf b.n 1240 <USB_Handler+0x128>
|
|
|
|
if (flags & USB_DEVICE_EPINTFLAG_STALL0) {
|
|
|
|
12a0: 2020 movs r0, #32
|
|
|
|
12a2: 0019 movs r1, r3
|
|
|
|
12a4: 4001 ands r1, r0
|
|
|
|
12a6: 4203 tst r3, r0
|
|
|
|
12a8: d001 beq.n 12ae <USB_Handler+0x196>
|
|
|
|
_usb_d_dev_handle_stall(ept, 0);
|
|
|
|
12aa: 2100 movs r1, #0
|
|
|
|
12ac: e7d5 b.n 125a <USB_Handler+0x142>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_TRFAIL0) {
|
|
|
|
12ae: 0758 lsls r0, r3, #29
|
|
|
|
12b0: d4de bmi.n 1270 <USB_Handler+0x158>
|
|
|
|
} else if (flags & USB_DEVICE_EPINTFLAG_TRCPT0) {
|
|
|
|
12b2: 422b tst r3, r5
|
|
|
|
12b4: d003 beq.n 12be <USB_Handler+0x1a6>
|
|
|
|
_usb_d_dev_out_next(ept, true);
|
|
|
|
12b6: 0029 movs r1, r5
|
|
|
|
12b8: 0020 movs r0, r4
|
|
|
|
12ba: 4b11 ldr r3, [pc, #68] ; (1300 <USB_Handler+0x1e8>)
|
|
|
|
12bc: e7da b.n 1274 <USB_Handler+0x15c>
|
|
|
|
} else if (_usb_d_dev_ep_is_ctrl(ept)) {
|
|
|
|
12be: 2107 movs r1, #7
|
|
|
|
12c0: 400a ands r2, r1
|
|
|
|
12c2: 2a01 cmp r2, #1
|
|
|
|
12c4: d1d7 bne.n 1276 <USB_Handler+0x15e>
|
|
|
|
if (flags & USB_DEVICE_EPINTFLAG_TRFAIL1) {
|
|
|
|
12c6: 071a lsls r2, r3, #28
|
|
|
|
12c8: d5e7 bpl.n 129a <USB_Handler+0x182>
|
|
|
|
12ca: e7d0 b.n 126e <USB_Handler+0x156>
|
|
|
|
12cc: 41005000 .word 0x41005000
|
|
|
|
12d0: 20000170 .word 0x20000170
|
|
|
|
12d4: 00000201 .word 0x00000201
|
|
|
|
12d8: 20000110 .word 0x20000110
|
|
|
|
12dc: 000004f9 .word 0x000004f9
|
|
|
|
12e0: 410050ff .word 0x410050ff
|
|
|
|
12e4: 0000074d .word 0x0000074d
|
|
|
|
12e8: 20000184 .word 0x20000184
|
|
|
|
12ec: 41005107 .word 0x41005107
|
|
|
|
12f0: 00000539 .word 0x00000539
|
|
|
|
12f4: 000005b5 .word 0x000005b5
|
|
|
|
12f8: 00000669 .word 0x00000669
|
|
|
|
12fc: 0000078d .word 0x0000078d
|
|
|
|
1300: 000008f1 .word 0x000008f1
|
|
|
|
|
|
|
|
00001304 <delay_init>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Initialize Delay driver
|
|
|
|
*/
|
|
|
|
void delay_init(void *const hw)
|
|
|
|
{
|
|
|
|
1304: b510 push {r4, lr}
|
|
|
|
_delay_init(hardware = hw);
|
|
|
|
1306: 4b02 ldr r3, [pc, #8] ; (1310 <delay_init+0xc>)
|
|
|
|
1308: 6018 str r0, [r3, #0]
|
|
|
|
130a: 4b02 ldr r3, [pc, #8] ; (1314 <delay_init+0x10>)
|
|
|
|
130c: 4798 blx r3
|
|
|
|
}
|
|
|
|
130e: bd10 pop {r4, pc}
|
|
|
|
1310: 20000460 .word 0x20000460
|
|
|
|
1314: 000000fd .word 0x000000fd
|
|
|
|
|
|
|
|
00001318 <delay_ms>:
|
|
|
|
/**
|
|
|
|
* \brief Perform delay in ms
|
|
|
|
*/
|
|
|
|
void delay_ms(const uint16_t ms)
|
|
|
|
{
|
|
|
|
_delay_cycles(hardware, _get_cycles_for_ms(ms));
|
|
|
|
1318: 4b04 ldr r3, [pc, #16] ; (132c <delay_ms+0x14>)
|
|
|
|
{
|
|
|
|
131a: b510 push {r4, lr}
|
|
|
|
_delay_cycles(hardware, _get_cycles_for_ms(ms));
|
|
|
|
131c: 681c ldr r4, [r3, #0]
|
|
|
|
131e: 4b04 ldr r3, [pc, #16] ; (1330 <delay_ms+0x18>)
|
|
|
|
1320: 4798 blx r3
|
|
|
|
1322: 0001 movs r1, r0
|
|
|
|
1324: 4b03 ldr r3, [pc, #12] ; (1334 <delay_ms+0x1c>)
|
|
|
|
1326: 0020 movs r0, r4
|
|
|
|
1328: 4798 blx r3
|
|
|
|
}
|
|
|
|
132a: bd10 pop {r4, pc}
|
|
|
|
132c: 20000460 .word 0x20000460
|
|
|
|
1330: 000013d9 .word 0x000013d9
|
|
|
|
1334: 00000111 .word 0x00000111
|
|
|
|
|
|
|
|
00001338 <_pm_init>:
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_pm_set_CPUSEL_CPUDIV_bf(const void *const hw, hri_pm_cpusel_reg_t mask)
|
|
|
|
{
|
|
|
|
PM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Pm *)hw)->CPUSEL.reg |= PM_CPUSEL_CPUDIV(mask);
|
|
|
|
1338: 4b06 ldr r3, [pc, #24] ; (1354 <_pm_init+0x1c>)
|
|
|
|
133a: 7a1a ldrb r2, [r3, #8]
|
|
|
|
133c: b2d2 uxtb r2, r2
|
|
|
|
133e: 721a strb r2, [r3, #8]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_pm_set_APBASEL_APBADIV_bf(const void *const hw, hri_pm_apbasel_reg_t mask)
|
|
|
|
{
|
|
|
|
PM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Pm *)hw)->APBASEL.reg |= PM_APBASEL_APBADIV(mask);
|
|
|
|
1340: 7a5a ldrb r2, [r3, #9]
|
|
|
|
1342: b2d2 uxtb r2, r2
|
|
|
|
1344: 725a strb r2, [r3, #9]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_pm_set_APBBSEL_APBBDIV_bf(const void *const hw, hri_pm_apbbsel_reg_t mask)
|
|
|
|
{
|
|
|
|
PM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Pm *)hw)->APBBSEL.reg |= PM_APBBSEL_APBBDIV(mask);
|
|
|
|
1346: 7a9a ldrb r2, [r3, #10]
|
|
|
|
1348: b2d2 uxtb r2, r2
|
|
|
|
134a: 729a strb r2, [r3, #10]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_pm_set_APBCSEL_APBCDIV_bf(const void *const hw, hri_pm_apbcsel_reg_t mask)
|
|
|
|
{
|
|
|
|
PM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Pm *)hw)->APBCSEL.reg |= PM_APBCSEL_APBCDIV(mask);
|
|
|
|
134c: 7ada ldrb r2, [r3, #11]
|
|
|
|
134e: b2d2 uxtb r2, r2
|
|
|
|
1350: 72da strb r2, [r3, #11]
|
|
|
|
{
|
|
|
|
hri_pm_set_CPUSEL_CPUDIV_bf(PM, CONF_CPU_DIV);
|
|
|
|
hri_pm_set_APBASEL_APBADIV_bf(PM, CONF_APBA_DIV);
|
|
|
|
hri_pm_set_APBBSEL_APBBDIV_bf(PM, CONF_APBB_DIV);
|
|
|
|
hri_pm_set_APBCSEL_APBCDIV_bf(PM, CONF_APBC_DIV);
|
|
|
|
}
|
|
|
|
1352: 4770 bx lr
|
|
|
|
1354: 40000400 .word 0x40000400
|
|
|
|
|
|
|
|
00001358 <_init_chip>:
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_nvmctrl_set_CTRLB_RWS_bf(const void *const hw, hri_nvmctrl_ctrlb_reg_t mask)
|
|
|
|
{
|
|
|
|
NVMCTRL_CRITICAL_SECTION_ENTER();
|
|
|
|
((Nvmctrl *)hw)->CTRLB.reg |= NVMCTRL_CTRLB_RWS(mask);
|
|
|
|
1358: 4b06 ldr r3, [pc, #24] ; (1374 <_init_chip+0x1c>)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Initialize the hardware abstraction layer
|
|
|
|
*/
|
|
|
|
void _init_chip(void)
|
|
|
|
{
|
|
|
|
135a: b510 push {r4, lr}
|
|
|
|
135c: 685a ldr r2, [r3, #4]
|
|
|
|
135e: 605a str r2, [r3, #4]
|
|
|
|
hri_nvmctrl_set_CTRLB_RWS_bf(NVMCTRL, CONF_NVM_WAIT_STATE);
|
|
|
|
|
|
|
|
_pm_init();
|
|
|
|
1360: 4b05 ldr r3, [pc, #20] ; (1378 <_init_chip+0x20>)
|
|
|
|
1362: 4798 blx r3
|
|
|
|
_sysctrl_init_sources();
|
|
|
|
1364: 4b05 ldr r3, [pc, #20] ; (137c <_init_chip+0x24>)
|
|
|
|
1366: 4798 blx r3
|
|
|
|
#if _GCLK_INIT_1ST
|
|
|
|
_gclk_init_generators_by_fref(_GCLK_INIT_1ST);
|
|
|
|
#endif
|
|
|
|
_sysctrl_init_referenced_generators();
|
|
|
|
1368: 4b05 ldr r3, [pc, #20] ; (1380 <_init_chip+0x28>)
|
|
|
|
136a: 4798 blx r3
|
|
|
|
_gclk_init_generators_by_fref(_GCLK_INIT_LAST);
|
|
|
|
136c: 20ff movs r0, #255 ; 0xff
|
|
|
|
136e: 4b05 ldr r3, [pc, #20] ; (1384 <_init_chip+0x2c>)
|
|
|
|
1370: 4798 blx r3
|
|
|
|
#if CONF_DMAC_ENABLE
|
|
|
|
_pm_enable_bus_clock(PM_BUS_AHB, DMAC);
|
|
|
|
_pm_enable_bus_clock(PM_BUS_APBB, DMAC);
|
|
|
|
_dma_init();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
1372: bd10 pop {r4, pc}
|
|
|
|
1374: 41004000 .word 0x41004000
|
|
|
|
1378: 00001339 .word 0x00001339
|
|
|
|
137c: 00001425 .word 0x00001425
|
|
|
|
1380: 00001465 .word 0x00001465
|
|
|
|
1384: 000015d9 .word 0x000015d9
|
|
|
|
|
|
|
|
00001388 <is_list_element>:
|
|
|
|
* \brief Check whether element belongs to list
|
|
|
|
*/
|
|
|
|
bool is_list_element(const struct list_descriptor *const list, const void *const element)
|
|
|
|
{
|
|
|
|
struct list_element *it;
|
|
|
|
for (it = list->head; it; it = it->next) {
|
|
|
|
1388: 6800 ldr r0, [r0, #0]
|
|
|
|
138a: 2800 cmp r0, #0
|
|
|
|
138c: d100 bne.n 1390 <is_list_element+0x8>
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
138e: 4770 bx lr
|
|
|
|
if (it == element) {
|
|
|
|
1390: 4288 cmp r0, r1
|
|
|
|
1392: d1f9 bne.n 1388 <is_list_element>
|
|
|
|
return true;
|
|
|
|
1394: 2001 movs r0, #1
|
|
|
|
1396: e7fa b.n 138e <is_list_element+0x6>
|
|
|
|
|
|
|
|
00001398 <list_insert_at_end>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Insert an element at list end
|
|
|
|
*/
|
|
|
|
void list_insert_at_end(struct list_descriptor *const list, void *const element)
|
|
|
|
{
|
|
|
|
1398: b570 push {r4, r5, r6, lr}
|
|
|
|
struct list_element *it = list->head;
|
|
|
|
|
|
|
|
ASSERT(!is_list_element(list, element));
|
|
|
|
139a: 4b0c ldr r3, [pc, #48] ; (13cc <list_insert_at_end+0x34>)
|
|
|
|
{
|
|
|
|
139c: 0005 movs r5, r0
|
|
|
|
139e: 000c movs r4, r1
|
|
|
|
struct list_element *it = list->head;
|
|
|
|
13a0: 6806 ldr r6, [r0, #0]
|
|
|
|
ASSERT(!is_list_element(list, element));
|
|
|
|
13a2: 4798 blx r3
|
|
|
|
13a4: 2301 movs r3, #1
|
|
|
|
13a6: 4058 eors r0, r3
|
|
|
|
13a8: 224f movs r2, #79 ; 0x4f
|
|
|
|
13aa: 4b09 ldr r3, [pc, #36] ; (13d0 <list_insert_at_end+0x38>)
|
|
|
|
13ac: 4909 ldr r1, [pc, #36] ; (13d4 <list_insert_at_end+0x3c>)
|
|
|
|
13ae: b2c0 uxtb r0, r0
|
|
|
|
13b0: 4798 blx r3
|
|
|
|
|
|
|
|
if (!list->head) {
|
|
|
|
13b2: 682b ldr r3, [r5, #0]
|
|
|
|
13b4: 2b00 cmp r3, #0
|
|
|
|
13b6: d102 bne.n 13be <list_insert_at_end+0x26>
|
|
|
|
list->head = (struct list_element *)element;
|
|
|
|
13b8: 602c str r4, [r5, #0]
|
|
|
|
((struct list_element *)element)->next = NULL;
|
|
|
|
13ba: 6023 str r3, [r4, #0]
|
|
|
|
while (it->next) {
|
|
|
|
it = it->next;
|
|
|
|
}
|
|
|
|
it->next = (struct list_element *)element;
|
|
|
|
((struct list_element *)element)->next = NULL;
|
|
|
|
}
|
|
|
|
13bc: bd70 pop {r4, r5, r6, pc}
|
|
|
|
while (it->next) {
|
|
|
|
13be: 0033 movs r3, r6
|
|
|
|
13c0: 6836 ldr r6, [r6, #0]
|
|
|
|
13c2: 2e00 cmp r6, #0
|
|
|
|
13c4: d1fb bne.n 13be <list_insert_at_end+0x26>
|
|
|
|
it->next = (struct list_element *)element;
|
|
|
|
13c6: 601c str r4, [r3, #0]
|
|
|
|
((struct list_element *)element)->next = NULL;
|
|
|
|
13c8: 6026 str r6, [r4, #0]
|
|
|
|
13ca: e7f7 b.n 13bc <list_insert_at_end+0x24>
|
|
|
|
13cc: 00001389 .word 0x00001389
|
|
|
|
13d0: 000013e1 .word 0x000013e1
|
|
|
|
13d4: 00002eac .word 0x00002eac
|
|
|
|
|
|
|
|
000013d8 <_get_cycles_for_ms>:
|
|
|
|
{
|
|
|
|
switch (power) {
|
|
|
|
case 8:
|
|
|
|
return (ms * (freq / 100000)) * 100;
|
|
|
|
case 7:
|
|
|
|
return (ms * (freq / 10000)) * 10;
|
|
|
|
13d8: 23fa movs r3, #250 ; 0xfa
|
|
|
|
13da: 015b lsls r3, r3, #5
|
|
|
|
13dc: 4358 muls r0, r3
|
|
|
|
* \brief Retrieve the amount of cycles to delay for the given amount of ms
|
|
|
|
*/
|
|
|
|
uint32_t _get_cycles_for_ms(const uint16_t ms)
|
|
|
|
{
|
|
|
|
return _get_cycles_for_ms_internal(ms, CONF_CPU_FREQUENCY, CPU_FREQ_POWER);
|
|
|
|
}
|
|
|
|
13de: 4770 bx lr
|
|
|
|
|
|
|
|
000013e0 <assert>:
|
|
|
|
/**
|
|
|
|
* \brief Assert function
|
|
|
|
*/
|
|
|
|
void assert(const bool condition, const char *const file, const int line)
|
|
|
|
{
|
|
|
|
if (!(condition)) {
|
|
|
|
13e0: 2800 cmp r0, #0
|
|
|
|
13e2: d100 bne.n 13e6 <assert+0x6>
|
|
|
|
__asm("BKPT #0");
|
|
|
|
13e4: be00 bkpt 0x0000
|
|
|
|
}
|
|
|
|
(void)file;
|
|
|
|
(void)line;
|
|
|
|
}
|
|
|
|
13e6: 4770 bx lr
|
|
|
|
|
|
|
|
000013e8 <cdc_device_acm_init>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief CDC ACM Init
|
|
|
|
*/
|
|
|
|
void cdc_device_acm_init(void)
|
|
|
|
{
|
|
|
|
13e8: b510 push {r4, lr}
|
|
|
|
/* usb stack init */
|
|
|
|
usbdc_init(ctrl_buffer);
|
|
|
|
13ea: 4b05 ldr r3, [pc, #20] ; (1400 <cdc_device_acm_init+0x18>)
|
|
|
|
13ec: 4805 ldr r0, [pc, #20] ; (1404 <cdc_device_acm_init+0x1c>)
|
|
|
|
13ee: 4798 blx r3
|
|
|
|
|
|
|
|
/* usbdc_register_funcion inside */
|
|
|
|
cdcdf_acm_init();
|
|
|
|
13f0: 4b05 ldr r3, [pc, #20] ; (1408 <cdc_device_acm_init+0x20>)
|
|
|
|
13f2: 4798 blx r3
|
|
|
|
|
|
|
|
usbdc_start(single_desc);
|
|
|
|
13f4: 4b05 ldr r3, [pc, #20] ; (140c <cdc_device_acm_init+0x24>)
|
|
|
|
13f6: 4806 ldr r0, [pc, #24] ; (1410 <cdc_device_acm_init+0x28>)
|
|
|
|
13f8: 4798 blx r3
|
|
|
|
usbdc_attach();
|
|
|
|
13fa: 4b06 ldr r3, [pc, #24] ; (1414 <cdc_device_acm_init+0x2c>)
|
|
|
|
13fc: 4798 blx r3
|
|
|
|
}
|
|
|
|
13fe: bd10 pop {r4, pc}
|
|
|
|
1400: 00002371 .word 0x00002371
|
|
|
|
1404: 20000464 .word 0x20000464
|
|
|
|
1408: 00000425 .word 0x00000425
|
|
|
|
140c: 000023e9 .word 0x000023e9
|
|
|
|
1410: 20000008 .word 0x20000008
|
|
|
|
1414: 0000241d .word 0x0000241d
|
|
|
|
|
|
|
|
00001418 <usb_init>:
|
|
|
|
|
|
|
|
cdcdf_acm_register_callback(CDCDF_ACM_CB_STATE_C, (FUNC_PTR)usb_device_cb_state_c);
|
|
|
|
}
|
|
|
|
|
|
|
|
void usb_init(void)
|
|
|
|
{
|
|
|
|
1418: b510 push {r4, lr}
|
|
|
|
|
|
|
|
cdc_device_acm_init();
|
|
|
|
141a: 4b01 ldr r3, [pc, #4] ; (1420 <usb_init+0x8>)
|
|
|
|
141c: 4798 blx r3
|
|
|
|
}
|
|
|
|
141e: bd10 pop {r4, pc}
|
|
|
|
1420: 000013e9 .word 0x000013e9
|
|
|
|
|
|
|
|
00001424 <_sysctrl_init_sources>:
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline hri_sysctrl_osc8m_reg_t hri_sysctrl_read_OSC8M_CALIB_bf(const void *const hw)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
tmp = ((Sysctrl *)hw)->OSC8M.reg;
|
|
|
|
1424: 4b0d ldr r3, [pc, #52] ; (145c <_sysctrl_init_sources+0x38>)
|
|
|
|
1426: 6a18 ldr r0, [r3, #32]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline hri_sysctrl_osc8m_reg_t hri_sysctrl_read_OSC8M_FRANGE_bf(const void *const hw)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
tmp = ((Sysctrl *)hw)->OSC8M.reg;
|
|
|
|
1428: 6a19 ldr r1, [r3, #32]
|
|
|
|
|
|
|
|
#if CONF_OSC8M_CONFIG == 1
|
|
|
|
calib = hri_sysctrl_read_OSC8M_CALIB_bf(hw);
|
|
|
|
|
|
|
|
hri_sysctrl_write_OSC8M_reg(hw,
|
|
|
|
SYSCTRL_OSC8M_FRANGE(hri_sysctrl_read_OSC8M_FRANGE_bf(hw)) |
|
|
|
|
142a: 0f89 lsrs r1, r1, #30
|
|
|
|
142c: 078a lsls r2, r1, #30
|
|
|
|
#if CONF_OSC8M_OVERWRITE_CALIBRATION == 1
|
|
|
|
SYSCTRL_OSC8M_CALIB(CONF_OSC8M_CALIB) |
|
|
|
|
#else
|
|
|
|
SYSCTRL_OSC8M_CALIB(calib) |
|
|
|
|
142e: 490c ldr r1, [pc, #48] ; (1460 <_sysctrl_init_sources+0x3c>)
|
|
|
|
1430: 4001 ands r1, r0
|
|
|
|
#endif
|
|
|
|
SYSCTRL_OSC8M_PRESC(CONF_OSC8M_PRESC)
|
|
|
|
| (CONF_OSC8M_RUNSTDBY << SYSCTRL_OSC8M_RUNSTDBY_Pos)
|
|
|
|
1432: 430a orrs r2, r1
|
|
|
|
hri_sysctrl_write_OSC8M_reg(hw,
|
|
|
|
1434: 2102 movs r1, #2
|
|
|
|
1436: 430a orrs r2, r1
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sysctrl_write_OSC8M_reg(const void *const hw, hri_sysctrl_osc8m_reg_t data)
|
|
|
|
{
|
|
|
|
SYSCTRL_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sysctrl *)hw)->OSC8M.reg = data;
|
|
|
|
1438: 621a str r2, [r3, #32]
|
|
|
|
((Sysctrl *)hw)->OSC32K.reg |= SYSCTRL_OSC32K_ENABLE;
|
|
|
|
143a: 699a ldr r2, [r3, #24]
|
|
|
|
143c: 4311 orrs r1, r2
|
|
|
|
143e: 6199 str r1, [r3, #24]
|
|
|
|
tmp = (tmp & SYSCTRL_OSCULP32K_CALIB_Msk) >> SYSCTRL_OSCULP32K_CALIB_Pos;
|
|
|
|
1440: 211f movs r1, #31
|
|
|
|
tmp = ((Sysctrl *)hw)->OSCULP32K.reg;
|
|
|
|
1442: 7f1a ldrb r2, [r3, #28]
|
|
|
|
tmp = (tmp & SYSCTRL_OSCULP32K_CALIB_Msk) >> SYSCTRL_OSCULP32K_CALIB_Pos;
|
|
|
|
1444: 400a ands r2, r1
|
|
|
|
((Sysctrl *)hw)->OSCULP32K.reg = data;
|
|
|
|
1446: 771a strb r2, [r3, #28]
|
|
|
|
return (((Sysctrl *)hw)->PCLKSR.reg & SYSCTRL_PCLKSR_OSC8MRDY) >> SYSCTRL_PCLKSR_OSC8MRDY_Pos;
|
|
|
|
1448: 391e subs r1, #30
|
|
|
|
144a: 68da ldr r2, [r3, #12]
|
|
|
|
144c: 08d2 lsrs r2, r2, #3
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONF_OSC8M_CONFIG == 1
|
|
|
|
#if CONF_OSC8M_ENABLE == 1
|
|
|
|
while (!hri_sysctrl_get_PCLKSR_OSC8MRDY_bit(hw))
|
|
|
|
144e: 420a tst r2, r1
|
|
|
|
1450: d0fb beq.n 144a <_sysctrl_init_sources+0x26>
|
|
|
|
((Sysctrl *)hw)->OSC8M.reg |= SYSCTRL_OSC8M_ONDEMAND;
|
|
|
|
1452: 2280 movs r2, #128 ; 0x80
|
|
|
|
1454: 6a19 ldr r1, [r3, #32]
|
|
|
|
1456: 430a orrs r2, r1
|
|
|
|
1458: 621a str r2, [r3, #32]
|
|
|
|
hri_sysctrl_set_OSC8M_ONDEMAND_bit(hw);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
(void)calib, (void)hw;
|
|
|
|
}
|
|
|
|
145a: 4770 bx lr
|
|
|
|
145c: 40000800 .word 0x40000800
|
|
|
|
1460: 0fff0000 .word 0x0fff0000
|
|
|
|
|
|
|
|
00001464 <_sysctrl_init_referenced_generators>:
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sysctrl_write_DFLLCTRL_reg(const void *const hw, hri_sysctrl_dfllctrl_reg_t data)
|
|
|
|
{
|
|
|
|
SYSCTRL_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sysctrl *)hw)->DFLLCTRL.reg = data;
|
|
|
|
1464: 2202 movs r2, #2
|
|
|
|
return (((Sysctrl *)hw)->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLRDY) >> SYSCTRL_PCLKSR_DFLLRDY_Pos;
|
|
|
|
1466: 2101 movs r1, #1
|
|
|
|
((Sysctrl *)hw)->DFLLCTRL.reg = data;
|
|
|
|
1468: 4b14 ldr r3, [pc, #80] ; (14bc <_sysctrl_init_referenced_generators+0x58>)
|
|
|
|
146a: 849a strh r2, [r3, #36] ; 0x24
|
|
|
|
return (((Sysctrl *)hw)->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLRDY) >> SYSCTRL_PCLKSR_DFLLRDY_Pos;
|
|
|
|
146c: 68da ldr r2, [r3, #12]
|
|
|
|
146e: 0912 lsrs r2, r2, #4
|
|
|
|
hri_gclk_write_CLKCTRL_reg(GCLK,
|
|
|
|
GCLK_CLKCTRL_ID(0) | GCLK_CLKCTRL_GEN(CONF_DFLL_GCLK) | (1 << GCLK_CLKCTRL_CLKEN_Pos));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
hri_sysctrl_write_DFLLCTRL_reg(hw, SYSCTRL_DFLLCTRL_ENABLE);
|
|
|
|
while (!hri_sysctrl_get_PCLKSR_DFLLRDY_bit(hw))
|
|
|
|
1470: 420a tst r2, r1
|
|
|
|
1472: d0fb beq.n 146c <_sysctrl_init_referenced_generators+0x8>
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sysctrl_write_DFLLMUL_reg(const void *const hw, hri_sysctrl_dfllmul_reg_t data)
|
|
|
|
{
|
|
|
|
SYSCTRL_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sysctrl *)hw)->DFLLMUL.reg = data;
|
|
|
|
1474: 4a12 ldr r2, [pc, #72] ; (14c0 <_sysctrl_init_referenced_generators+0x5c>)
|
|
|
|
1476: 62da str r2, [r3, #44] ; 0x2c
|
|
|
|
((Sysctrl *)hw)->DFLLVAL.reg = data;
|
|
|
|
1478: 22fc movs r2, #252 ; 0xfc
|
|
|
|
147a: 01d2 lsls r2, r2, #7
|
|
|
|
147c: 629a str r2, [r3, #40] ; 0x28
|
|
|
|
((Sysctrl *)hw)->DFLLCTRL.reg = data;
|
|
|
|
147e: 229b movs r2, #155 ; 0x9b
|
|
|
|
1480: 0052 lsls r2, r2, #1
|
|
|
|
1482: 849a strh r2, [r3, #36] ; 0x24
|
|
|
|
tmp = ((Sysctrl *)hw)->DFLLCTRL.reg;
|
|
|
|
1484: 8c9a ldrh r2, [r3, #36] ; 0x24
|
|
|
|
tmp = (tmp & SYSCTRL_DFLLCTRL_MODE) >> SYSCTRL_DFLLCTRL_MODE_Pos;
|
|
|
|
1486: 0892 lsrs r2, r2, #2
|
|
|
|
| SYSCTRL_DPLLCTRLB_FILTER(CONF_DPLL_FILTER));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONF_DFLL_CONFIG == 1
|
|
|
|
#if CONF_DFLL_ENABLE == 1
|
|
|
|
if (hri_sysctrl_get_DFLLCTRL_MODE_bit(hw)) {
|
|
|
|
1488: 420a tst r2, r1
|
|
|
|
148a: d010 beq.n 14ae <_sysctrl_init_referenced_generators+0x4a>
|
|
|
|
tmp &= mask;
|
|
|
|
148c: 2210 movs r2, #16
|
|
|
|
tmp = ((Sysctrl *)hw)->PCLKSR.reg;
|
|
|
|
148e: 68d9 ldr r1, [r3, #12]
|
|
|
|
= SYSCTRL_PCLKSR_DFLLRDY | SYSCTRL_PCLKSR_DFLLLCKF | SYSCTRL_PCLKSR_DFLLLCKC;
|
|
|
|
#else
|
|
|
|
hri_sysctrl_pclksr_reg_t status_mask = SYSCTRL_PCLKSR_DFLLRDY;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
while (hri_sysctrl_get_PCLKSR_reg(hw, status_mask) != status_mask)
|
|
|
|
1490: 4211 tst r1, r2
|
|
|
|
1492: d0fc beq.n 148e <_sysctrl_init_referenced_generators+0x2a>
|
|
|
|
((Sysctrl *)hw)->DFLLCTRL.reg |= SYSCTRL_DFLLCTRL_ONDEMAND;
|
|
|
|
1494: 2280 movs r2, #128 ; 0x80
|
|
|
|
1496: 8c99 ldrh r1, [r3, #36] ; 0x24
|
|
|
|
1498: 430a orrs r2, r1
|
|
|
|
return ((const Gclk *)hw)->STATUS.bit.SYNCBUSY;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool hri_gclk_get_STATUS_SYNCBUSY_bit(const void *const hw)
|
|
|
|
{
|
|
|
|
return (((Gclk *)hw)->STATUS.reg & GCLK_STATUS_SYNCBUSY) >> GCLK_STATUS_SYNCBUSY_Pos;
|
|
|
|
149a: 490a ldr r1, [pc, #40] ; (14c4 <_sysctrl_init_referenced_generators+0x60>)
|
|
|
|
149c: 849a strh r2, [r3, #36] ; 0x24
|
|
|
|
149e: 784a ldrb r2, [r1, #1]
|
|
|
|
14a0: 09d2 lsrs r2, r2, #7
|
|
|
|
hri_sysctrl_set_DPLLCTRLA_ONDEMAND_bit(hw);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONF_DFLL_CONFIG == 1
|
|
|
|
while (hri_gclk_get_STATUS_SYNCBUSY_bit(GCLK))
|
|
|
|
14a2: d1fc bne.n 149e <_sysctrl_init_referenced_generators+0x3a>
|
|
|
|
((Sysctrl *)hw)->OSC32K.reg &= ~SYSCTRL_OSC32K_ENABLE;
|
|
|
|
14a4: 2102 movs r1, #2
|
|
|
|
14a6: 699a ldr r2, [r3, #24]
|
|
|
|
14a8: 438a bics r2, r1
|
|
|
|
14aa: 619a str r2, [r3, #24]
|
|
|
|
/* Disable after all possible configurations needs sync written. */
|
|
|
|
hri_sysctrl_clear_OSC32K_ENABLE_bit(hw);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
(void)hw;
|
|
|
|
}
|
|
|
|
14ac: 4770 bx lr
|
|
|
|
return (((Sysctrl *)hw)->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLRDY) >> SYSCTRL_PCLKSR_DFLLRDY_Pos;
|
|
|
|
14ae: 2101 movs r1, #1
|
|
|
|
14b0: 68da ldr r2, [r3, #12]
|
|
|
|
14b2: 0912 lsrs r2, r2, #4
|
|
|
|
while (!hri_sysctrl_get_PCLKSR_DFLLRDY_bit(hw))
|
|
|
|
14b4: 420a tst r2, r1
|
|
|
|
14b6: d0fb beq.n 14b0 <_sysctrl_init_referenced_generators+0x4c>
|
|
|
|
14b8: e7ec b.n 1494 <_sysctrl_init_referenced_generators+0x30>
|
|
|
|
14ba: 46c0 nop ; (mov r8, r8)
|
|
|
|
14bc: 40000800 .word 0x40000800
|
|
|
|
14c0: 0401bb80 .word 0x0401bb80
|
|
|
|
14c4: 40000c00 .word 0x40000c00
|
|
|
|
|
|
|
|
000014c8 <usart_sync_write>:
|
|
|
|
* \param[in] length The number of bytes to write
|
|
|
|
*
|
|
|
|
* \return The number of bytes written.
|
|
|
|
*/
|
|
|
|
static int32_t usart_sync_write(struct io_descriptor *const io_descr, const uint8_t *const buf, const uint16_t length)
|
|
|
|
{
|
|
|
|
14c8: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
14ca: 0006 movs r6, r0
|
|
|
|
14cc: 000d movs r5, r1
|
|
|
|
14ce: 0014 movs r4, r2
|
|
|
|
uint32_t offset = 0;
|
|
|
|
struct usart_sync_descriptor *descr = CONTAINER_OF(io_descr, struct usart_sync_descriptor, io);
|
|
|
|
|
|
|
|
ASSERT(io_descr && buf && length);
|
|
|
|
14d0: 2800 cmp r0, #0
|
|
|
|
14d2: d004 beq.n 14de <usart_sync_write+0x16>
|
|
|
|
14d4: 1e08 subs r0, r1, #0
|
|
|
|
14d6: d002 beq.n 14de <usart_sync_write+0x16>
|
|
|
|
14d8: 0010 movs r0, r2
|
|
|
|
14da: 1e43 subs r3, r0, #1
|
|
|
|
14dc: 4198 sbcs r0, r3
|
|
|
|
14de: 22f1 movs r2, #241 ; 0xf1
|
|
|
|
14e0: 4910 ldr r1, [pc, #64] ; (1524 <usart_sync_write+0x5c>)
|
|
|
|
14e2: 4b11 ldr r3, [pc, #68] ; (1528 <usart_sync_write+0x60>)
|
|
|
|
14e4: 4798 blx r3
|
|
|
|
while (!_usart_sync_is_ready_to_send(&descr->device))
|
|
|
|
14e6: 0037 movs r7, r6
|
|
|
|
14e8: 3708 adds r7, #8
|
|
|
|
14ea: 0038 movs r0, r7
|
|
|
|
14ec: 4b0f ldr r3, [pc, #60] ; (152c <usart_sync_write+0x64>)
|
|
|
|
14ee: 4798 blx r3
|
|
|
|
14f0: 2800 cmp r0, #0
|
|
|
|
14f2: d0f8 beq.n 14e6 <usart_sync_write+0x1e>
|
|
|
|
uint32_t offset = 0;
|
|
|
|
14f4: 2600 movs r6, #0
|
|
|
|
;
|
|
|
|
do {
|
|
|
|
_usart_sync_write_byte(&descr->device, buf[offset]);
|
|
|
|
14f6: 0038 movs r0, r7
|
|
|
|
14f8: 5da9 ldrb r1, [r5, r6]
|
|
|
|
14fa: 4b0d ldr r3, [pc, #52] ; (1530 <usart_sync_write+0x68>)
|
|
|
|
14fc: 4798 blx r3
|
|
|
|
while (!_usart_sync_is_ready_to_send(&descr->device))
|
|
|
|
14fe: 0038 movs r0, r7
|
|
|
|
1500: 4b0a ldr r3, [pc, #40] ; (152c <usart_sync_write+0x64>)
|
|
|
|
1502: 4798 blx r3
|
|
|
|
1504: 2800 cmp r0, #0
|
|
|
|
1506: d0fa beq.n 14fe <usart_sync_write+0x36>
|
|
|
|
;
|
|
|
|
} while (++offset < length);
|
|
|
|
1508: 3601 adds r6, #1
|
|
|
|
150a: 42b4 cmp r4, r6
|
|
|
|
150c: d8f3 bhi.n 14f6 <usart_sync_write+0x2e>
|
|
|
|
150e: 2501 movs r5, #1
|
|
|
|
1510: 2c00 cmp r4, #0
|
|
|
|
1512: d000 beq.n 1516 <usart_sync_write+0x4e>
|
|
|
|
1514: 0025 movs r5, r4
|
|
|
|
while (!_usart_sync_is_transmit_done(&descr->device))
|
|
|
|
1516: 0038 movs r0, r7
|
|
|
|
1518: 4b06 ldr r3, [pc, #24] ; (1534 <usart_sync_write+0x6c>)
|
|
|
|
151a: 4798 blx r3
|
|
|
|
151c: 2800 cmp r0, #0
|
|
|
|
151e: d0fa beq.n 1516 <usart_sync_write+0x4e>
|
|
|
|
;
|
|
|
|
return (int32_t)offset;
|
|
|
|
}
|
|
|
|
1520: 0028 movs r0, r5
|
|
|
|
1522: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
1524: 00002eca .word 0x00002eca
|
|
|
|
1528: 000013e1 .word 0x000013e1
|
|
|
|
152c: 00001e4b .word 0x00001e4b
|
|
|
|
1530: 00001e3d .word 0x00001e3d
|
|
|
|
1534: 00001e55 .word 0x00001e55
|
|
|
|
|
|
|
|
00001538 <usart_sync_read>:
|
|
|
|
* \param[in] length The size of a buffer
|
|
|
|
*
|
|
|
|
* \return The number of bytes read.
|
|
|
|
*/
|
|
|
|
static int32_t usart_sync_read(struct io_descriptor *const io_descr, uint8_t *const buf, const uint16_t length)
|
|
|
|
{
|
|
|
|
1538: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
153a: 0005 movs r5, r0
|
|
|
|
153c: 0014 movs r4, r2
|
|
|
|
153e: 9101 str r1, [sp, #4]
|
|
|
|
uint32_t offset = 0;
|
|
|
|
struct usart_sync_descriptor *descr = CONTAINER_OF(io_descr, struct usart_sync_descriptor, io);
|
|
|
|
|
|
|
|
ASSERT(io_descr && buf && length);
|
|
|
|
1540: 2800 cmp r0, #0
|
|
|
|
1542: d004 beq.n 154e <usart_sync_read+0x16>
|
|
|
|
1544: 1e08 subs r0, r1, #0
|
|
|
|
1546: d002 beq.n 154e <usart_sync_read+0x16>
|
|
|
|
1548: 0010 movs r0, r2
|
|
|
|
154a: 1e43 subs r3, r0, #1
|
|
|
|
154c: 4198 sbcs r0, r3
|
|
|
|
154e: 2286 movs r2, #134 ; 0x86
|
|
|
|
1550: 490c ldr r1, [pc, #48] ; (1584 <usart_sync_read+0x4c>)
|
|
|
|
1552: 4b0d ldr r3, [pc, #52] ; (1588 <usart_sync_read+0x50>)
|
|
|
|
1554: 0052 lsls r2, r2, #1
|
|
|
|
1556: 4798 blx r3
|
|
|
|
uint32_t offset = 0;
|
|
|
|
1558: 2600 movs r6, #0
|
|
|
|
do {
|
|
|
|
while (!_usart_sync_is_byte_received(&descr->device))
|
|
|
|
155a: 002f movs r7, r5
|
|
|
|
155c: 3708 adds r7, #8
|
|
|
|
155e: 0038 movs r0, r7
|
|
|
|
1560: 4b0a ldr r3, [pc, #40] ; (158c <usart_sync_read+0x54>)
|
|
|
|
1562: 4798 blx r3
|
|
|
|
1564: 2800 cmp r0, #0
|
|
|
|
1566: d0f8 beq.n 155a <usart_sync_read+0x22>
|
|
|
|
;
|
|
|
|
buf[offset] = _usart_sync_read_byte(&descr->device);
|
|
|
|
1568: 4b09 ldr r3, [pc, #36] ; (1590 <usart_sync_read+0x58>)
|
|
|
|
156a: 0038 movs r0, r7
|
|
|
|
156c: 4798 blx r3
|
|
|
|
156e: 9b01 ldr r3, [sp, #4]
|
|
|
|
1570: 5598 strb r0, [r3, r6]
|
|
|
|
} while (++offset < length);
|
|
|
|
1572: 3601 adds r6, #1
|
|
|
|
1574: 42b4 cmp r4, r6
|
|
|
|
1576: d8f0 bhi.n 155a <usart_sync_read+0x22>
|
|
|
|
1578: 2001 movs r0, #1
|
|
|
|
157a: 2c00 cmp r4, #0
|
|
|
|
157c: d000 beq.n 1580 <usart_sync_read+0x48>
|
|
|
|
157e: 0020 movs r0, r4
|
|
|
|
|
|
|
|
return (int32_t)offset;
|
|
|
|
}
|
|
|
|
1580: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
1582: 46c0 nop ; (mov r8, r8)
|
|
|
|
1584: 00002eca .word 0x00002eca
|
|
|
|
1588: 000013e1 .word 0x000013e1
|
|
|
|
158c: 00001e5f .word 0x00001e5f
|
|
|
|
1590: 00001e43 .word 0x00001e43
|
|
|
|
|
|
|
|
00001594 <usart_sync_init>:
|
|
|
|
{
|
|
|
|
1594: b570 push {r4, r5, r6, lr}
|
|
|
|
1596: 0004 movs r4, r0
|
|
|
|
1598: 000d movs r5, r1
|
|
|
|
ASSERT(descr && hw);
|
|
|
|
159a: 2800 cmp r0, #0
|
|
|
|
159c: d002 beq.n 15a4 <usart_sync_init+0x10>
|
|
|
|
159e: 0008 movs r0, r1
|
|
|
|
15a0: 1e43 subs r3, r0, #1
|
|
|
|
15a2: 4198 sbcs r0, r3
|
|
|
|
15a4: 4907 ldr r1, [pc, #28] ; (15c4 <usart_sync_init+0x30>)
|
|
|
|
15a6: 4b08 ldr r3, [pc, #32] ; (15c8 <usart_sync_init+0x34>)
|
|
|
|
15a8: 2234 movs r2, #52 ; 0x34
|
|
|
|
15aa: 4798 blx r3
|
|
|
|
init_status = _usart_sync_init(&descr->device, hw);
|
|
|
|
15ac: 0020 movs r0, r4
|
|
|
|
15ae: 0029 movs r1, r5
|
|
|
|
15b0: 4b06 ldr r3, [pc, #24] ; (15cc <usart_sync_init+0x38>)
|
|
|
|
15b2: 3008 adds r0, #8
|
|
|
|
15b4: 4798 blx r3
|
|
|
|
if (init_status) {
|
|
|
|
15b6: 2800 cmp r0, #0
|
|
|
|
15b8: d103 bne.n 15c2 <usart_sync_init+0x2e>
|
|
|
|
descr->io.read = usart_sync_read;
|
|
|
|
15ba: 4b05 ldr r3, [pc, #20] ; (15d0 <usart_sync_init+0x3c>)
|
|
|
|
15bc: 6063 str r3, [r4, #4]
|
|
|
|
descr->io.write = usart_sync_write;
|
|
|
|
15be: 4b05 ldr r3, [pc, #20] ; (15d4 <usart_sync_init+0x40>)
|
|
|
|
15c0: 6023 str r3, [r4, #0]
|
|
|
|
}
|
|
|
|
15c2: bd70 pop {r4, r5, r6, pc}
|
|
|
|
15c4: 00002eca .word 0x00002eca
|
|
|
|
15c8: 000013e1 .word 0x000013e1
|
|
|
|
15cc: 00001e11 .word 0x00001e11
|
|
|
|
15d0: 00001539 .word 0x00001539
|
|
|
|
15d4: 000014c9 .word 0x000014c9
|
|
|
|
|
|
|
|
000015d8 <_gclk_init_generators_by_fref>:
|
|
|
|
|
|
|
|
void _gclk_init_generators_by_fref(uint32_t bm)
|
|
|
|
{
|
|
|
|
|
|
|
|
#if CONF_GCLK_GENERATOR_0_CONFIG == 1
|
|
|
|
if (bm & (1ul << 0)) {
|
|
|
|
15d8: 07c3 lsls r3, r0, #31
|
|
|
|
15da: d509 bpl.n 15f0 <_gclk_init_generators_by_fref+0x18>
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_gclk_write_GENDIV_reg(const void *const hw, hri_gclk_gendiv_reg_t data)
|
|
|
|
{
|
|
|
|
GCLK_CRITICAL_SECTION_ENTER();
|
|
|
|
((Gclk *)hw)->GENDIV.reg = data;
|
|
|
|
15dc: 2380 movs r3, #128 ; 0x80
|
|
|
|
15de: 4a10 ldr r2, [pc, #64] ; (1620 <_gclk_init_generators_by_fref+0x48>)
|
|
|
|
15e0: 005b lsls r3, r3, #1
|
|
|
|
15e2: 6093 str r3, [r2, #8]
|
|
|
|
((Gclk *)hw)->GENCTRL.reg = data;
|
|
|
|
15e4: 2383 movs r3, #131 ; 0x83
|
|
|
|
15e6: 025b lsls r3, r3, #9
|
|
|
|
15e8: 6053 str r3, [r2, #4]
|
|
|
|
while (((const Gclk *)hw)->STATUS.bit.SYNCBUSY)
|
|
|
|
15ea: 7853 ldrb r3, [r2, #1]
|
|
|
|
15ec: 09db lsrs r3, r3, #7
|
|
|
|
15ee: d1fc bne.n 15ea <_gclk_init_generators_by_fref+0x12>
|
|
|
|
| (CONF_GCLK_GENERATOR_2_CONFIG << GCLK_GENCTRL_GENEN_Pos) | CONF_GCLK_GEN_2_SRC | GCLK_GENCTRL_ID(2));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONF_GCLK_GENERATOR_3_CONFIG == 1
|
|
|
|
if (bm & (1ul << 3)) {
|
|
|
|
15f0: 0703 lsls r3, r0, #28
|
|
|
|
15f2: d508 bpl.n 1606 <_gclk_init_generators_by_fref+0x2e>
|
|
|
|
((Gclk *)hw)->GENDIV.reg = data;
|
|
|
|
15f4: 2304 movs r3, #4
|
|
|
|
15f6: 4a0a ldr r2, [pc, #40] ; (1620 <_gclk_init_generators_by_fref+0x48>)
|
|
|
|
15f8: 33ff adds r3, #255 ; 0xff
|
|
|
|
15fa: 6093 str r3, [r2, #8]
|
|
|
|
((Gclk *)hw)->GENCTRL.reg = data;
|
|
|
|
15fc: 4b09 ldr r3, [pc, #36] ; (1624 <_gclk_init_generators_by_fref+0x4c>)
|
|
|
|
15fe: 6053 str r3, [r2, #4]
|
|
|
|
while (((const Gclk *)hw)->STATUS.bit.SYNCBUSY)
|
|
|
|
1600: 7853 ldrb r3, [r2, #1]
|
|
|
|
1602: 09db lsrs r3, r3, #7
|
|
|
|
1604: d1fc bne.n 1600 <_gclk_init_generators_by_fref+0x28>
|
|
|
|
| (CONF_GCLK_GENERATOR_6_CONFIG << GCLK_GENCTRL_GENEN_Pos) | CONF_GCLK_GEN_6_SRC | GCLK_GENCTRL_ID(6));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONF_GCLK_GENERATOR_7_CONFIG == 1
|
|
|
|
if (bm & (1ul << 7)) {
|
|
|
|
1606: 0603 lsls r3, r0, #24
|
|
|
|
1608: d508 bpl.n 161c <_gclk_init_generators_by_fref+0x44>
|
|
|
|
((Gclk *)hw)->GENDIV.reg = data;
|
|
|
|
160a: 2308 movs r3, #8
|
|
|
|
160c: 4a04 ldr r2, [pc, #16] ; (1620 <_gclk_init_generators_by_fref+0x48>)
|
|
|
|
160e: 33ff adds r3, #255 ; 0xff
|
|
|
|
1610: 6093 str r3, [r2, #8]
|
|
|
|
((Gclk *)hw)->GENCTRL.reg = data;
|
|
|
|
1612: 4b05 ldr r3, [pc, #20] ; (1628 <_gclk_init_generators_by_fref+0x50>)
|
|
|
|
1614: 6053 str r3, [r2, #4]
|
|
|
|
while (((const Gclk *)hw)->STATUS.bit.SYNCBUSY)
|
|
|
|
1616: 7853 ldrb r3, [r2, #1]
|
|
|
|
1618: 09db lsrs r3, r3, #7
|
|
|
|
161a: d1fc bne.n 1616 <_gclk_init_generators_by_fref+0x3e>
|
|
|
|
| (CONF_GCLK_GEN_8_DIVSEL << GCLK_GENCTRL_DIVSEL_Pos) | (CONF_GCLK_GEN_8_OE << GCLK_GENCTRL_OE_Pos)
|
|
|
|
| (CONF_GCLK_GEN_8_OOV << GCLK_GENCTRL_OOV_Pos) | (CONF_GCLK_GEN_8_IDC << GCLK_GENCTRL_IDC_Pos)
|
|
|
|
| (CONF_GCLK_GENERATOR_8_CONFIG << GCLK_GENCTRL_GENEN_Pos) | CONF_GCLK_GEN_8_SRC | GCLK_GENCTRL_ID(8));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
161c: 4770 bx lr
|
|
|
|
161e: 46c0 nop ; (mov r8, r8)
|
|
|
|
1620: 40000c00 .word 0x40000c00
|
|
|
|
1624: 00010303 .word 0x00010303
|
|
|
|
1628: 00210707 .word 0x00210707
|
|
|
|
|
|
|
|
0000162c <usb_find_desc>:
|
|
|
|
#define _param_error_check(cond) ASSERT(cond)
|
|
|
|
#define _desc_len_check() ASSERT(usb_desc_len(desc) >= 2)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
uint8_t *usb_find_desc(uint8_t *desc, uint8_t *eof, uint8_t type)
|
|
|
|
{
|
|
|
|
162c: b510 push {r4, lr}
|
|
|
|
_param_error_check(desc && eof && (desc < eof));
|
|
|
|
|
|
|
|
while (desc < eof) {
|
|
|
|
162e: 4288 cmp r0, r1
|
|
|
|
1630: d301 bcc.n 1636 <usb_find_desc+0xa>
|
|
|
|
_desc_len_check();
|
|
|
|
1632: 2000 movs r0, #0
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
desc = usb_desc_next(desc);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
1634: bd10 pop {r4, pc}
|
|
|
|
return desc[0];
|
|
|
|
1636: 7803 ldrb r3, [r0, #0]
|
|
|
|
_desc_len_check();
|
|
|
|
1638: 2b01 cmp r3, #1
|
|
|
|
163a: d9fa bls.n 1632 <usb_find_desc+0x6>
|
|
|
|
if (type == usb_desc_type(desc)) {
|
|
|
|
163c: 7844 ldrb r4, [r0, #1]
|
|
|
|
163e: 4294 cmp r4, r2
|
|
|
|
1640: d0f8 beq.n 1634 <usb_find_desc+0x8>
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
1642: 18c0 adds r0, r0, r3
|
|
|
|
1644: e7f3 b.n 162e <usb_find_desc+0x2>
|
|
|
|
|
|
|
|
00001646 <usb_find_ep_desc>:
|
|
|
|
|
|
|
|
uint8_t *usb_find_ep_desc(uint8_t *desc, uint8_t *eof)
|
|
|
|
{
|
|
|
|
_param_error_check(desc && eof && (desc < eof));
|
|
|
|
|
|
|
|
while (desc < eof) {
|
|
|
|
1646: 4288 cmp r0, r1
|
|
|
|
1648: d301 bcc.n 164e <usb_find_ep_desc+0x8>
|
|
|
|
_desc_len_check();
|
|
|
|
164a: 2000 movs r0, #0
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
desc = usb_desc_next(desc);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
164c: 4770 bx lr
|
|
|
|
return desc[0];
|
|
|
|
164e: 7803 ldrb r3, [r0, #0]
|
|
|
|
_desc_len_check();
|
|
|
|
1650: 2b01 cmp r3, #1
|
|
|
|
1652: d9fa bls.n 164a <usb_find_ep_desc+0x4>
|
|
|
|
return desc[1];
|
|
|
|
1654: 7842 ldrb r2, [r0, #1]
|
|
|
|
if (USB_DT_INTERFACE == usb_desc_type(desc)) {
|
|
|
|
1656: 2a04 cmp r2, #4
|
|
|
|
1658: d0f7 beq.n 164a <usb_find_ep_desc+0x4>
|
|
|
|
if (USB_DT_ENDPOINT == usb_desc_type(desc)) {
|
|
|
|
165a: 2a05 cmp r2, #5
|
|
|
|
165c: d0f6 beq.n 164c <usb_find_ep_desc+0x6>
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
165e: 18c0 adds r0, r0, r3
|
|
|
|
1660: e7f1 b.n 1646 <usb_find_ep_desc>
|
|
|
|
...
|
|
|
|
|
|
|
|
00001664 <usb_find_cfg_desc>:
|
|
|
|
|
|
|
|
uint8_t *usb_find_cfg_desc(uint8_t *desc, uint8_t *eof, uint8_t cfg_value)
|
|
|
|
{
|
|
|
|
1664: b570 push {r4, r5, r6, lr}
|
|
|
|
_param_error_check(desc && eof && (desc < eof));
|
|
|
|
|
|
|
|
desc = usb_find_desc(desc, eof, USB_DT_CONFIG);
|
|
|
|
1666: 4b0d ldr r3, [pc, #52] ; (169c <usb_find_cfg_desc+0x38>)
|
|
|
|
{
|
|
|
|
1668: 0015 movs r5, r2
|
|
|
|
desc = usb_find_desc(desc, eof, USB_DT_CONFIG);
|
|
|
|
166a: 2202 movs r2, #2
|
|
|
|
{
|
|
|
|
166c: 000c movs r4, r1
|
|
|
|
desc = usb_find_desc(desc, eof, USB_DT_CONFIG);
|
|
|
|
166e: 4798 blx r3
|
|
|
|
if (!desc) {
|
|
|
|
1670: 2800 cmp r0, #0
|
|
|
|
1672: d10f bne.n 1694 <usb_find_cfg_desc+0x30>
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
desc = usb_cfg_desc_next(desc);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
1674: bd70 pop {r4, r5, r6, pc}
|
|
|
|
_desc_len_check();
|
|
|
|
1676: 7803 ldrb r3, [r0, #0]
|
|
|
|
1678: 2b01 cmp r3, #1
|
|
|
|
167a: d90d bls.n 1698 <usb_find_cfg_desc+0x34>
|
|
|
|
if (desc[1] != USB_DT_CONFIG) {
|
|
|
|
167c: 7843 ldrb r3, [r0, #1]
|
|
|
|
167e: 2b02 cmp r3, #2
|
|
|
|
1680: d10a bne.n 1698 <usb_find_cfg_desc+0x34>
|
|
|
|
if (desc[5] == cfg_value) {
|
|
|
|
1682: 7943 ldrb r3, [r0, #5]
|
|
|
|
1684: 42ab cmp r3, r5
|
|
|
|
1686: d0f5 beq.n 1674 <usb_find_cfg_desc+0x10>
|
|
|
|
return (ptr[0] + (ptr[1] << 8));
|
|
|
|
1688: 78c2 ldrb r2, [r0, #3]
|
|
|
|
168a: 7883 ldrb r3, [r0, #2]
|
|
|
|
168c: 0212 lsls r2, r2, #8
|
|
|
|
168e: 189b adds r3, r3, r2
|
|
|
|
* \param[in] cfg_desc Byte pointer to the descriptor start address
|
|
|
|
* \return Byte pointer to descriptor after configuration end
|
|
|
|
*/
|
|
|
|
static inline uint8_t *usb_cfg_desc_next(uint8_t *cfg_desc)
|
|
|
|
{
|
|
|
|
return (cfg_desc + usb_cfg_desc_total_len(cfg_desc));
|
|
|
|
1690: b29b uxth r3, r3
|
|
|
|
1692: 18c0 adds r0, r0, r3
|
|
|
|
while (desc < eof) {
|
|
|
|
1694: 42a0 cmp r0, r4
|
|
|
|
1696: d3ee bcc.n 1676 <usb_find_cfg_desc+0x12>
|
|
|
|
return NULL;
|
|
|
|
1698: 2000 movs r0, #0
|
|
|
|
169a: e7eb b.n 1674 <usb_find_cfg_desc+0x10>
|
|
|
|
169c: 0000162d .word 0x0000162d
|
|
|
|
|
|
|
|
000016a0 <usb_find_str_desc>:
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t *usb_find_str_desc(uint8_t *desc, uint8_t *eof, uint8_t str_index)
|
|
|
|
{
|
|
|
|
16a0: b570 push {r4, r5, r6, lr}
|
|
|
|
16a2: 000c movs r4, r1
|
|
|
|
16a4: 0016 movs r6, r2
|
|
|
|
uint8_t i;
|
|
|
|
|
|
|
|
_param_error_check(desc && eof && (desc < eof));
|
|
|
|
|
|
|
|
for (i = 0; desc < eof;) {
|
|
|
|
16a6: 2500 movs r5, #0
|
|
|
|
16a8: 42a0 cmp r0, r4
|
|
|
|
16aa: d301 bcc.n 16b0 <usb_find_str_desc+0x10>
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
desc = usb_desc_next(desc);
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
16ac: 2000 movs r0, #0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
16ae: bd70 pop {r4, r5, r6, pc}
|
|
|
|
desc = usb_find_desc(desc, eof, USB_DT_STRING);
|
|
|
|
16b0: 2203 movs r2, #3
|
|
|
|
16b2: 0021 movs r1, r4
|
|
|
|
16b4: 4b05 ldr r3, [pc, #20] ; (16cc <usb_find_str_desc+0x2c>)
|
|
|
|
16b6: 4798 blx r3
|
|
|
|
if (desc) {
|
|
|
|
16b8: 2800 cmp r0, #0
|
|
|
|
16ba: d0f8 beq.n 16ae <usb_find_str_desc+0xe>
|
|
|
|
return desc[0];
|
|
|
|
16bc: 7803 ldrb r3, [r0, #0]
|
|
|
|
_desc_len_check();
|
|
|
|
16be: 2b01 cmp r3, #1
|
|
|
|
16c0: d9f4 bls.n 16ac <usb_find_str_desc+0xc>
|
|
|
|
if (i == str_index) {
|
|
|
|
16c2: 42b5 cmp r5, r6
|
|
|
|
16c4: d0f3 beq.n 16ae <usb_find_str_desc+0xe>
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
16c6: 18c0 adds r0, r0, r3
|
|
|
|
16c8: 3501 adds r5, #1
|
|
|
|
16ca: e7ed b.n 16a8 <usb_find_str_desc+0x8>
|
|
|
|
16cc: 0000162d .word 0x0000162d
|
|
|
|
|
|
|
|
000016d0 <_usb_d_find_ep>:
|
|
|
|
* \return Index of endpoint descriptor.
|
|
|
|
* \retval >=0 The index.
|
|
|
|
* \retval <0 Not found (endpoint is not initialized).
|
|
|
|
*/
|
|
|
|
static int8_t _usb_d_find_ep(const uint8_t ep)
|
|
|
|
{
|
|
|
|
16d0: 0002 movs r2, r0
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
if (usb_d_inst.ep[i].xfer.hdr.ep == ep) {
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
if (usb_d_inst.ep[i].xfer.hdr.type == USB_EP_XTYPE_CTRL
|
|
|
|
&& (ep & USB_EP_N_MASK) == usb_d_inst.ep[i].xfer.hdr.ep) {
|
|
|
|
16d2: 210f movs r1, #15
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
16d4: 2000 movs r0, #0
|
|
|
|
{
|
|
|
|
16d6: b530 push {r4, r5, lr}
|
|
|
|
16d8: 4b09 ldr r3, [pc, #36] ; (1700 <_usb_d_find_ep+0x30>)
|
|
|
|
&& (ep & USB_EP_N_MASK) == usb_d_inst.ep[i].xfer.hdr.ep) {
|
|
|
|
16da: 4011 ands r1, r2
|
|
|
|
if (usb_d_inst.ep[i].xfer.hdr.ep == ep) {
|
|
|
|
16dc: 785c ldrb r4, [r3, #1]
|
|
|
|
16de: 4294 cmp r4, r2
|
|
|
|
16e0: d00c beq.n 16fc <_usb_d_find_ep+0x2c>
|
|
|
|
if (usb_d_inst.ep[i].xfer.hdr.type == USB_EP_XTYPE_CTRL
|
|
|
|
16e2: 781d ldrb r5, [r3, #0]
|
|
|
|
16e4: 2d00 cmp r5, #0
|
|
|
|
16e6: d101 bne.n 16ec <_usb_d_find_ep+0x1c>
|
|
|
|
&& (ep & USB_EP_N_MASK) == usb_d_inst.ep[i].xfer.hdr.ep) {
|
|
|
|
16e8: 428c cmp r4, r1
|
|
|
|
16ea: d007 beq.n 16fc <_usb_d_find_ep+0x2c>
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
16ec: 3001 adds r0, #1
|
|
|
|
16ee: b2c4 uxtb r4, r0
|
|
|
|
16f0: 3320 adds r3, #32
|
|
|
|
16f2: b240 sxtb r0, r0
|
|
|
|
16f4: 2c0d cmp r4, #13
|
|
|
|
16f6: d1f1 bne.n 16dc <_usb_d_find_ep+0xc>
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
16f8: 2001 movs r0, #1
|
|
|
|
16fa: 4240 negs r0, r0
|
|
|
|
}
|
|
|
|
16fc: bd30 pop {r4, r5, pc}
|
|
|
|
16fe: 46c0 nop ; (mov r8, r8)
|
|
|
|
1700: 200004a4 .word 0x200004a4
|
|
|
|
|
|
|
|
00001704 <usb_d_dummy_cb_false>:
|
|
|
|
{
|
|
|
|
(void)unused0;
|
|
|
|
(void)unused1;
|
|
|
|
(void)unused2;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
1704: 2000 movs r0, #0
|
|
|
|
1706: 4770 bx lr
|
|
|
|
|
|
|
|
00001708 <usb_d_cb_trans_more>:
|
|
|
|
* \brief Callback invoked when request more data
|
|
|
|
* \param[in] ep Endpoint number with transfer direction on bit 8.
|
|
|
|
* \param[in] transfered Number of bytes transfered.
|
|
|
|
*/
|
|
|
|
static bool usb_d_cb_trans_more(const uint8_t ep, const uint32_t transfered)
|
|
|
|
{
|
|
|
|
1708: b570 push {r4, r5, r6, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
170a: 4b08 ldr r3, [pc, #32] ; (172c <usb_d_cb_trans_more+0x24>)
|
|
|
|
{
|
|
|
|
170c: 0004 movs r4, r0
|
|
|
|
170e: 000d movs r5, r1
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1710: 4798 blx r3
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
if (ept->xfer.hdr.state == USB_EP_S_X_DATA) {
|
|
|
|
1712: 4b07 ldr r3, [pc, #28] ; (1730 <usb_d_cb_trans_more+0x28>)
|
|
|
|
1714: 0140 lsls r0, r0, #5
|
|
|
|
1716: 181b adds r3, r3, r0
|
|
|
|
1718: 789a ldrb r2, [r3, #2]
|
|
|
|
return ept->callbacks.more(ep, transfered);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
171a: 2000 movs r0, #0
|
|
|
|
if (ept->xfer.hdr.state == USB_EP_S_X_DATA) {
|
|
|
|
171c: 2a03 cmp r2, #3
|
|
|
|
171e: d103 bne.n 1728 <usb_d_cb_trans_more+0x20>
|
|
|
|
return ept->callbacks.more(ep, transfered);
|
|
|
|
1720: 0029 movs r1, r5
|
|
|
|
1722: 0020 movs r0, r4
|
|
|
|
1724: 699b ldr r3, [r3, #24]
|
|
|
|
1726: 4798 blx r3
|
|
|
|
}
|
|
|
|
1728: bd70 pop {r4, r5, r6, pc}
|
|
|
|
172a: 46c0 nop ; (mov r8, r8)
|
|
|
|
172c: 000016d1 .word 0x000016d1
|
|
|
|
1730: 200004a4 .word 0x200004a4
|
|
|
|
|
|
|
|
00001734 <_usb_d_cb_trans_done>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback when USB transactions are finished.
|
|
|
|
*/
|
|
|
|
static void _usb_d_cb_trans_done(const uint8_t ep, const int32_t code, const uint32_t transferred)
|
|
|
|
{
|
|
|
|
1734: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1736: 4b37 ldr r3, [pc, #220] ; (1814 <_usb_d_cb_trans_done+0xe0>)
|
|
|
|
{
|
|
|
|
1738: b087 sub sp, #28
|
|
|
|
173a: 000f movs r7, r1
|
|
|
|
173c: 9000 str r0, [sp, #0]
|
|
|
|
173e: 9201 str r2, [sp, #4]
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1740: 4798 blx r3
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
|
|
|
|
if (code == USB_TRANS_DONE) {
|
|
|
|
1742: 4d35 ldr r5, [pc, #212] ; (1818 <_usb_d_cb_trans_done+0xe4>)
|
|
|
|
1744: 0144 lsls r4, r0, #5
|
|
|
|
1746: 2f00 cmp r7, #0
|
|
|
|
1748: d141 bne.n 17ce <_usb_d_cb_trans_done+0x9a>
|
|
|
|
ept->xfer.hdr.status = USB_XFER_DONE;
|
|
|
|
174a: 192e adds r6, r5, r4
|
|
|
|
174c: 70f7 strb r7, [r6, #3]
|
|
|
|
if (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) {
|
|
|
|
174e: 5d29 ldrb r1, [r5, r4]
|
|
|
|
1750: 2900 cmp r1, #0
|
|
|
|
1752: d133 bne.n 17bc <_usb_d_cb_trans_done+0x88>
|
|
|
|
bool err = ept->callbacks.xfer(ept->xfer.hdr.ep, USB_XFER_DATA, ept->xfer.req);
|
|
|
|
1754: 0022 movs r2, r4
|
|
|
|
if (state == USB_EP_S_X_DATA) {
|
|
|
|
1756: 78b4 ldrb r4, [r6, #2]
|
|
|
|
bool err = ept->callbacks.xfer(ept->xfer.hdr.ep, USB_XFER_DATA, ept->xfer.req);
|
|
|
|
1758: 320c adds r2, #12
|
|
|
|
175a: 7870 ldrb r0, [r6, #1]
|
|
|
|
175c: 69f3 ldr r3, [r6, #28]
|
|
|
|
175e: 18aa adds r2, r5, r2
|
|
|
|
if (state == USB_EP_S_X_DATA) {
|
|
|
|
1760: 2c03 cmp r4, #3
|
|
|
|
1762: d127 bne.n 17b4 <_usb_d_cb_trans_done+0x80>
|
|
|
|
1764: 270c movs r7, #12
|
|
|
|
bool err = ept->callbacks.xfer(ept->xfer.hdr.ep, USB_XFER_DATA, ept->xfer.req);
|
|
|
|
1766: 3101 adds r1, #1
|
|
|
|
1768: 57f7 ldrsb r7, [r6, r7]
|
|
|
|
176a: 4798 blx r3
|
|
|
|
176c: 0003 movs r3, r0
|
|
|
|
if (err) {
|
|
|
|
176e: 7870 ldrb r0, [r6, #1]
|
|
|
|
1770: 2b00 cmp r3, #0
|
|
|
|
1772: d00b beq.n 178c <_usb_d_cb_trans_done+0x58>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_HALTED;
|
|
|
|
1774: 4b29 ldr r3, [pc, #164] ; (181c <_usb_d_cb_trans_done+0xe8>)
|
|
|
|
1776: 8073 strh r3, [r6, #2]
|
|
|
|
_usb_d_dev_ep_stall(req_dir ? ept->xfer.hdr.ep : (ept->xfer.hdr.ep | USB_EP_DIR), USB_EP_STALL_SET);
|
|
|
|
1778: 2f00 cmp r7, #0
|
|
|
|
177a: db02 blt.n 1782 <_usb_d_cb_trans_done+0x4e>
|
|
|
|
177c: 3b86 subs r3, #134 ; 0x86
|
|
|
|
177e: 3bff subs r3, #255 ; 0xff
|
|
|
|
1780: 4318 orrs r0, r3
|
|
|
|
1782: 2101 movs r1, #1
|
|
|
|
1784: 4b26 ldr r3, [pc, #152] ; (1820 <_usb_d_cb_trans_done+0xec>)
|
|
|
|
1786: 4798 blx r3
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_ERROR;
|
|
|
|
ept->xfer.hdr.status = USB_XFER_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
ept->callbacks.xfer(ep, (enum usb_xfer_code)ept->xfer.hdr.status, (void *)transferred);
|
|
|
|
}
|
|
|
|
1788: b007 add sp, #28
|
|
|
|
178a: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_STATUS;
|
|
|
|
178c: 2204 movs r2, #4
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
178e: 9303 str r3, [sp, #12]
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_STATUS;
|
|
|
|
1790: 70b2 strb r2, [r6, #2]
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
1792: 9304 str r3, [sp, #16]
|
|
|
|
1794: 2f00 cmp r7, #0
|
|
|
|
1796: db0a blt.n 17ae <_usb_d_cb_trans_done+0x7a>
|
|
|
|
1798: 2380 movs r3, #128 ; 0x80
|
|
|
|
179a: 4318 orrs r0, r3
|
|
|
|
179c: ab02 add r3, sp, #8
|
|
|
|
179e: 7318 strb r0, [r3, #12]
|
|
|
|
17a0: 2301 movs r3, #1
|
|
|
|
17a2: aa02 add r2, sp, #8
|
|
|
|
17a4: 7353 strb r3, [r2, #13]
|
|
|
|
return _usb_d_dev_ep_trans(&trans);
|
|
|
|
17a6: a803 add r0, sp, #12
|
|
|
|
17a8: 4b1e ldr r3, [pc, #120] ; (1824 <_usb_d_cb_trans_done+0xf0>)
|
|
|
|
17aa: 4798 blx r3
|
|
|
|
17ac: e7ec b.n 1788 <_usb_d_cb_trans_done+0x54>
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
17ae: 230f movs r3, #15
|
|
|
|
17b0: 4018 ands r0, r3
|
|
|
|
17b2: e7f3 b.n 179c <_usb_d_cb_trans_done+0x68>
|
|
|
|
ept->callbacks.xfer(ept->xfer.hdr.ep, USB_XFER_DONE, ept->xfer.req);
|
|
|
|
17b4: 4798 blx r3
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_SETUP;
|
|
|
|
17b6: 2302 movs r3, #2
|
|
|
|
17b8: 70b3 strb r3, [r6, #2]
|
|
|
|
17ba: e7e5 b.n 1788 <_usb_d_cb_trans_done+0x54>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
17bc: 2301 movs r3, #1
|
|
|
|
17be: 70b3 strb r3, [r6, #2]
|
|
|
|
ept->callbacks.xfer(ep, (enum usb_xfer_code)ept->xfer.hdr.status, (void *)transferred);
|
|
|
|
17c0: 192c adds r4, r5, r4
|
|
|
|
17c2: 78e1 ldrb r1, [r4, #3]
|
|
|
|
17c4: 69e3 ldr r3, [r4, #28]
|
|
|
|
17c6: 9a01 ldr r2, [sp, #4]
|
|
|
|
17c8: 9800 ldr r0, [sp, #0]
|
|
|
|
17ca: 4798 blx r3
|
|
|
|
17cc: e7dc b.n 1788 <_usb_d_cb_trans_done+0x54>
|
|
|
|
ept->xfer.hdr.status = USB_XFER_HALT;
|
|
|
|
17ce: 192b adds r3, r5, r4
|
|
|
|
} else if (code == USB_TRANS_STALL) {
|
|
|
|
17d0: 2f01 cmp r7, #1
|
|
|
|
17d2: d10c bne.n 17ee <_usb_d_cb_trans_done+0xba>
|
|
|
|
ept->xfer.hdr.status = USB_XFER_HALT;
|
|
|
|
17d4: 2202 movs r2, #2
|
|
|
|
17d6: 70da strb r2, [r3, #3]
|
|
|
|
if (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) {
|
|
|
|
17d8: 5d29 ldrb r1, [r5, r4]
|
|
|
|
17da: 2900 cmp r1, #0
|
|
|
|
17dc: d104 bne.n 17e8 <_usb_d_cb_trans_done+0xb4>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_SETUP;
|
|
|
|
17de: 709a strb r2, [r3, #2]
|
|
|
|
_usb_d_dev_ep_stall(ep, USB_EP_STALL_CLR);
|
|
|
|
17e0: 9800 ldr r0, [sp, #0]
|
|
|
|
17e2: 4b0f ldr r3, [pc, #60] ; (1820 <_usb_d_cb_trans_done+0xec>)
|
|
|
|
17e4: 4798 blx r3
|
|
|
|
17e6: e7eb b.n 17c0 <_usb_d_cb_trans_done+0x8c>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_HALTED;
|
|
|
|
17e8: 2205 movs r2, #5
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
17ea: 709a strb r2, [r3, #2]
|
|
|
|
17ec: e7e8 b.n 17c0 <_usb_d_cb_trans_done+0x8c>
|
|
|
|
} else if (code == USB_TRANS_ABORT) {
|
|
|
|
17ee: 2f02 cmp r7, #2
|
|
|
|
17f0: d108 bne.n 1804 <_usb_d_cb_trans_done+0xd0>
|
|
|
|
ept->xfer.hdr.status = USB_XFER_ABORT;
|
|
|
|
17f2: 2204 movs r2, #4
|
|
|
|
17f4: 70da strb r2, [r3, #3]
|
|
|
|
if (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) {
|
|
|
|
17f6: 5d2a ldrb r2, [r5, r4]
|
|
|
|
17f8: 2a00 cmp r2, #0
|
|
|
|
17fa: d101 bne.n 1800 <_usb_d_cb_trans_done+0xcc>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_SETUP;
|
|
|
|
17fc: 709f strb r7, [r3, #2]
|
|
|
|
return;
|
|
|
|
17fe: e7c3 b.n 1788 <_usb_d_cb_trans_done+0x54>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
1800: 2201 movs r2, #1
|
|
|
|
1802: e7f2 b.n 17ea <_usb_d_cb_trans_done+0xb6>
|
|
|
|
} else if (code == USB_TRANS_RESET) {
|
|
|
|
1804: 2f03 cmp r7, #3
|
|
|
|
1806: d103 bne.n 1810 <_usb_d_cb_trans_done+0xdc>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_DISABLED;
|
|
|
|
1808: 22a0 movs r2, #160 ; 0xa0
|
|
|
|
180a: 00d2 lsls r2, r2, #3
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_ERROR;
|
|
|
|
180c: 805a strh r2, [r3, #2]
|
|
|
|
180e: e7d7 b.n 17c0 <_usb_d_cb_trans_done+0x8c>
|
|
|
|
1810: 4a05 ldr r2, [pc, #20] ; (1828 <_usb_d_cb_trans_done+0xf4>)
|
|
|
|
1812: e7fb b.n 180c <_usb_d_cb_trans_done+0xd8>
|
|
|
|
1814: 000016d1 .word 0x000016d1
|
|
|
|
1818: 200004a4 .word 0x200004a4
|
|
|
|
181c: 00000205 .word 0x00000205
|
|
|
|
1820: 00000e8d .word 0x00000e8d
|
|
|
|
1824: 00000fad .word 0x00000fad
|
|
|
|
1828: 00000606 .word 0x00000606
|
|
|
|
|
|
|
|
0000182c <usb_d_cb_trans_setup>:
|
|
|
|
{
|
|
|
|
182c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
182e: 4b18 ldr r3, [pc, #96] ; (1890 <usb_d_cb_trans_setup+0x64>)
|
|
|
|
{
|
|
|
|
1830: 0004 movs r4, r0
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1832: 4798 blx r3
|
|
|
|
uint8_t * req = ept->xfer.req;
|
|
|
|
1834: 0147 lsls r7, r0, #5
|
|
|
|
1836: 003b movs r3, r7
|
|
|
|
1838: 4d16 ldr r5, [pc, #88] ; (1894 <usb_d_cb_trans_setup+0x68>)
|
|
|
|
183a: 330c adds r3, #12
|
|
|
|
183c: 195b adds r3, r3, r5
|
|
|
|
uint8_t n = _usb_d_dev_ep_read_req(ep, req);
|
|
|
|
183e: 0019 movs r1, r3
|
|
|
|
uint8_t * req = ept->xfer.req;
|
|
|
|
1840: 9301 str r3, [sp, #4]
|
|
|
|
uint8_t n = _usb_d_dev_ep_read_req(ep, req);
|
|
|
|
1842: 0020 movs r0, r4
|
|
|
|
1844: 4b14 ldr r3, [pc, #80] ; (1898 <usb_d_cb_trans_setup+0x6c>)
|
|
|
|
1846: 4798 blx r3
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_SET);
|
|
|
|
1848: 2680 movs r6, #128 ; 0x80
|
|
|
|
if (n != 8) {
|
|
|
|
184a: b2c0 uxtb r0, r0
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_SET);
|
|
|
|
184c: 4326 orrs r6, r4
|
|
|
|
184e: 9600 str r6, [sp, #0]
|
|
|
|
1850: 4e12 ldr r6, [pc, #72] ; (189c <usb_d_cb_trans_setup+0x70>)
|
|
|
|
if (n != 8) {
|
|
|
|
1852: 2808 cmp r0, #8
|
|
|
|
1854: d006 beq.n 1864 <usb_d_cb_trans_setup+0x38>
|
|
|
|
_usb_d_dev_ep_stall(ep, USB_EP_STALL_SET);
|
|
|
|
1856: 2101 movs r1, #1
|
|
|
|
1858: 0020 movs r0, r4
|
|
|
|
185a: 47b0 blx r6
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_SET);
|
|
|
|
185c: 2101 movs r1, #1
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_SET);
|
|
|
|
185e: 9800 ldr r0, [sp, #0]
|
|
|
|
1860: 47b0 blx r6
|
|
|
|
}
|
|
|
|
1862: bdf7 pop {r0, r1, r2, r4, r5, r6, r7, pc}
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
1864: 19ed adds r5, r5, r7
|
|
|
|
1866: 2701 movs r7, #1
|
|
|
|
_usb_d_dev_ep_stall(ep, USB_EP_STALL_CLR);
|
|
|
|
1868: 2100 movs r1, #0
|
|
|
|
186a: 0020 movs r0, r4
|
|
|
|
186c: 47b0 blx r6
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_CLR);
|
|
|
|
186e: 2100 movs r1, #0
|
|
|
|
1870: 9800 ldr r0, [sp, #0]
|
|
|
|
1872: 47b0 blx r6
|
|
|
|
if (!ept->callbacks.req(ep, req)) {
|
|
|
|
1874: 0020 movs r0, r4
|
|
|
|
1876: 9901 ldr r1, [sp, #4]
|
|
|
|
1878: 696b ldr r3, [r5, #20]
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
187a: 70af strb r7, [r5, #2]
|
|
|
|
if (!ept->callbacks.req(ep, req)) {
|
|
|
|
187c: 4798 blx r3
|
|
|
|
187e: 2800 cmp r0, #0
|
|
|
|
1880: d1ef bne.n 1862 <usb_d_cb_trans_setup+0x36>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_HALTED;
|
|
|
|
1882: 2305 movs r3, #5
|
|
|
|
_usb_d_dev_ep_stall(ep, USB_EP_STALL_SET);
|
|
|
|
1884: 0039 movs r1, r7
|
|
|
|
1886: 0020 movs r0, r4
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_HALTED;
|
|
|
|
1888: 70ab strb r3, [r5, #2]
|
|
|
|
_usb_d_dev_ep_stall(ep, USB_EP_STALL_SET);
|
|
|
|
188a: 47b0 blx r6
|
|
|
|
_usb_d_dev_ep_stall(ep | USB_EP_DIR, USB_EP_STALL_SET);
|
|
|
|
188c: 0039 movs r1, r7
|
|
|
|
188e: e7e6 b.n 185e <usb_d_cb_trans_setup+0x32>
|
|
|
|
1890: 000016d1 .word 0x000016d1
|
|
|
|
1894: 200004a4 .word 0x200004a4
|
|
|
|
1898: 00000f55 .word 0x00000f55
|
|
|
|
189c: 00000e8d .word 0x00000e8d
|
|
|
|
|
|
|
|
000018a0 <usb_d_init>:
|
|
|
|
|
|
|
|
int32_t usb_d_init(void)
|
|
|
|
{
|
|
|
|
18a0: b570 push {r4, r5, r6, lr}
|
|
|
|
int32_t rc = _usb_d_dev_init();
|
|
|
|
18a2: 4b12 ldr r3, [pc, #72] ; (18ec <usb_d_init+0x4c>)
|
|
|
|
18a4: 4798 blx r3
|
|
|
|
uint8_t i;
|
|
|
|
if (rc < 0) {
|
|
|
|
18a6: 2800 cmp r0, #0
|
|
|
|
18a8: db1e blt.n 18e8 <usb_d_init+0x48>
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
memset(usb_d_inst.ep, 0x00, sizeof(struct usb_d_ep) * CONF_USB_D_NUM_EP_SP);
|
|
|
|
18aa: 22d0 movs r2, #208 ; 0xd0
|
|
|
|
18ac: 4c10 ldr r4, [pc, #64] ; (18f0 <usb_d_init+0x50>)
|
|
|
|
18ae: 2100 movs r1, #0
|
|
|
|
18b0: 0020 movs r0, r4
|
|
|
|
18b2: 4b10 ldr r3, [pc, #64] ; (18f4 <usb_d_init+0x54>)
|
|
|
|
18b4: 0052 lsls r2, r2, #1
|
|
|
|
18b6: 4798 blx r3
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
18b8: 0023 movs r3, r4
|
|
|
|
usb_d_inst.ep[i].xfer.hdr.ep = 0xFF;
|
|
|
|
18ba: 21ff movs r1, #255 ; 0xff
|
|
|
|
memset(usb_d_inst.ep, 0x00, sizeof(struct usb_d_ep) * CONF_USB_D_NUM_EP_SP);
|
|
|
|
18bc: 240d movs r4, #13
|
|
|
|
usb_d_inst.ep[i].callbacks.req = (usb_d_ep_cb_setup_t)usb_d_dummy_cb_false;
|
|
|
|
18be: 4a0e ldr r2, [pc, #56] ; (18f8 <usb_d_init+0x58>)
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
18c0: 3c01 subs r4, #1
|
|
|
|
18c2: b2e4 uxtb r4, r4
|
|
|
|
usb_d_inst.ep[i].xfer.hdr.ep = 0xFF;
|
|
|
|
18c4: 7059 strb r1, [r3, #1]
|
|
|
|
usb_d_inst.ep[i].callbacks.req = (usb_d_ep_cb_setup_t)usb_d_dummy_cb_false;
|
|
|
|
18c6: 615a str r2, [r3, #20]
|
|
|
|
usb_d_inst.ep[i].callbacks.more = (usb_d_ep_cb_more_t)usb_d_dummy_cb_false;
|
|
|
|
18c8: 619a str r2, [r3, #24]
|
|
|
|
usb_d_inst.ep[i].callbacks.xfer = (usb_d_ep_cb_xfer_t)usb_d_dummy_cb_false;
|
|
|
|
18ca: 61da str r2, [r3, #28]
|
|
|
|
for (i = 0; i < CONF_USB_D_NUM_EP_SP; i++) {
|
|
|
|
18cc: 3320 adds r3, #32
|
|
|
|
18ce: 2c00 cmp r4, #0
|
|
|
|
18d0: d1f6 bne.n 18c0 <usb_d_init+0x20>
|
|
|
|
}
|
|
|
|
/* Handles device driver endpoint callbacks to build transfer. */
|
|
|
|
_usb_d_dev_register_ep_callback(USB_D_DEV_EP_CB_SETUP, (FUNC_PTR)usb_d_cb_trans_setup);
|
|
|
|
18d2: 4d0a ldr r5, [pc, #40] ; (18fc <usb_d_init+0x5c>)
|
|
|
|
18d4: 0020 movs r0, r4
|
|
|
|
18d6: 490a ldr r1, [pc, #40] ; (1900 <usb_d_init+0x60>)
|
|
|
|
18d8: 47a8 blx r5
|
|
|
|
_usb_d_dev_register_ep_callback(USB_D_DEV_EP_CB_MORE, (FUNC_PTR)usb_d_cb_trans_more);
|
|
|
|
18da: 2001 movs r0, #1
|
|
|
|
18dc: 4909 ldr r1, [pc, #36] ; (1904 <usb_d_init+0x64>)
|
|
|
|
18de: 47a8 blx r5
|
|
|
|
_usb_d_dev_register_ep_callback(USB_D_DEV_EP_CB_DONE, (FUNC_PTR)_usb_d_cb_trans_done);
|
|
|
|
18e0: 2002 movs r0, #2
|
|
|
|
18e2: 4909 ldr r1, [pc, #36] ; (1908 <usb_d_init+0x68>)
|
|
|
|
18e4: 47a8 blx r5
|
|
|
|
return ERR_NONE;
|
|
|
|
18e6: 0020 movs r0, r4
|
|
|
|
}
|
|
|
|
18e8: bd70 pop {r4, r5, r6, pc}
|
|
|
|
18ea: 46c0 nop ; (mov r8, r8)
|
|
|
|
18ec: 00000ae1 .word 0x00000ae1
|
|
|
|
18f0: 200004a4 .word 0x200004a4
|
|
|
|
18f4: 0000262f .word 0x0000262f
|
|
|
|
18f8: 00001705 .word 0x00001705
|
|
|
|
18fc: 000010ed .word 0x000010ed
|
|
|
|
1900: 0000182d .word 0x0000182d
|
|
|
|
1904: 00001709 .word 0x00001709
|
|
|
|
1908: 00001735 .word 0x00001735
|
|
|
|
|
|
|
|
0000190c <usb_d_register_callback>:
|
|
|
|
{
|
|
|
|
_usb_d_dev_deinit();
|
|
|
|
}
|
|
|
|
|
|
|
|
void usb_d_register_callback(const enum usb_d_cb_type type, const FUNC_PTR func)
|
|
|
|
{
|
|
|
|
190c: b510 push {r4, lr}
|
|
|
|
/* Directly uses device driver callback. */
|
|
|
|
_usb_d_dev_register_callback(type, func);
|
|
|
|
190e: 4b01 ldr r3, [pc, #4] ; (1914 <usb_d_register_callback+0x8>)
|
|
|
|
1910: 4798 blx r3
|
|
|
|
}
|
|
|
|
1912: bd10 pop {r4, pc}
|
|
|
|
1914: 000010c9 .word 0x000010c9
|
|
|
|
|
|
|
|
00001918 <usb_d_enable>:
|
|
|
|
|
|
|
|
int32_t usb_d_enable(void)
|
|
|
|
{
|
|
|
|
1918: b510 push {r4, lr}
|
|
|
|
return _usb_d_dev_enable();
|
|
|
|
191a: 4b01 ldr r3, [pc, #4] ; (1920 <usb_d_enable+0x8>)
|
|
|
|
191c: 4798 blx r3
|
|
|
|
}
|
|
|
|
191e: bd10 pop {r4, pc}
|
|
|
|
1920: 00000ba5 .word 0x00000ba5
|
|
|
|
|
|
|
|
00001924 <usb_d_attach>:
|
|
|
|
{
|
|
|
|
_usb_d_dev_disable();
|
|
|
|
}
|
|
|
|
|
|
|
|
void usb_d_attach(void)
|
|
|
|
{
|
|
|
|
1924: b510 push {r4, lr}
|
|
|
|
_usb_d_dev_attach();
|
|
|
|
1926: 4b01 ldr r3, [pc, #4] ; (192c <usb_d_attach+0x8>)
|
|
|
|
1928: 4798 blx r3
|
|
|
|
}
|
|
|
|
192a: bd10 pop {r4, pc}
|
|
|
|
192c: 00000bed .word 0x00000bed
|
|
|
|
|
|
|
|
00001930 <usb_d_set_address>:
|
|
|
|
{
|
|
|
|
return _usb_d_dev_get_uframe_n();
|
|
|
|
}
|
|
|
|
|
|
|
|
void usb_d_set_address(const uint8_t addr)
|
|
|
|
{
|
|
|
|
1930: b510 push {r4, lr}
|
|
|
|
_usb_d_dev_set_address(addr);
|
|
|
|
1932: 4b01 ldr r3, [pc, #4] ; (1938 <usb_d_set_address+0x8>)
|
|
|
|
1934: 4798 blx r3
|
|
|
|
}
|
|
|
|
1936: bd10 pop {r4, pc}
|
|
|
|
1938: 00000bfd .word 0x00000bfd
|
|
|
|
|
|
|
|
0000193c <usb_d_ep_init>:
|
|
|
|
{
|
|
|
|
return usb_d_ep_init(0, USB_EP_XTYPE_CTRL, max_pkt_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
int32_t usb_d_ep_init(const uint8_t ep, const uint8_t attr, const uint16_t max_pkt_size)
|
|
|
|
{
|
|
|
|
193c: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
int32_t rc;
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
193e: 4c10 ldr r4, [pc, #64] ; (1980 <usb_d_ep_init+0x44>)
|
|
|
|
{
|
|
|
|
1940: 0006 movs r6, r0
|
|
|
|
1942: 000d movs r5, r1
|
|
|
|
1944: 0017 movs r7, r2
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1946: 47a0 blx r4
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
if (ep_index >= 0) {
|
|
|
|
1948: 2800 cmp r0, #0
|
|
|
|
194a: da13 bge.n 1974 <usb_d_ep_init+0x38>
|
|
|
|
return -USB_ERR_REDO;
|
|
|
|
} else {
|
|
|
|
ep_index = _usb_d_find_ep(0xFF);
|
|
|
|
194c: 20ff movs r0, #255 ; 0xff
|
|
|
|
194e: 47a0 blx r4
|
|
|
|
1950: 1e04 subs r4, r0, #0
|
|
|
|
if (ep_index < 0) {
|
|
|
|
1952: db12 blt.n 197a <usb_d_ep_init+0x3e>
|
|
|
|
return -USB_ERR_ALLOC_FAIL;
|
|
|
|
}
|
|
|
|
ept = &usb_d_inst.ep[ep_index];
|
|
|
|
}
|
|
|
|
rc = _usb_d_dev_ep_init(ep, attr, max_pkt_size);
|
|
|
|
1954: 003a movs r2, r7
|
|
|
|
1956: 0029 movs r1, r5
|
|
|
|
1958: 0030 movs r0, r6
|
|
|
|
195a: 4b0a ldr r3, [pc, #40] ; (1984 <usb_d_ep_init+0x48>)
|
|
|
|
195c: 4798 blx r3
|
|
|
|
if (rc < 0) {
|
|
|
|
195e: 2800 cmp r0, #0
|
|
|
|
1960: db07 blt.n 1972 <usb_d_ep_init+0x36>
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
ept->xfer.hdr.ep = ep;
|
|
|
|
ept->xfer.hdr.type = attr & USB_EP_XTYPE_MASK;
|
|
|
|
1962: 2103 movs r1, #3
|
|
|
|
return ERR_NONE;
|
|
|
|
1964: 2000 movs r0, #0
|
|
|
|
ept->xfer.hdr.ep = ep;
|
|
|
|
1966: 4b08 ldr r3, [pc, #32] ; (1988 <usb_d_ep_init+0x4c>)
|
|
|
|
1968: 0164 lsls r4, r4, #5
|
|
|
|
196a: 191a adds r2, r3, r4
|
|
|
|
ept->xfer.hdr.type = attr & USB_EP_XTYPE_MASK;
|
|
|
|
196c: 400d ands r5, r1
|
|
|
|
ept->xfer.hdr.ep = ep;
|
|
|
|
196e: 7056 strb r6, [r2, #1]
|
|
|
|
ept->xfer.hdr.type = attr & USB_EP_XTYPE_MASK;
|
|
|
|
1970: 54e5 strb r5, [r4, r3]
|
|
|
|
}
|
|
|
|
1972: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
return -USB_ERR_REDO;
|
|
|
|
1974: 2014 movs r0, #20
|
|
|
|
return -USB_ERR_ALLOC_FAIL;
|
|
|
|
1976: 4240 negs r0, r0
|
|
|
|
1978: e7fb b.n 1972 <usb_d_ep_init+0x36>
|
|
|
|
197a: 2015 movs r0, #21
|
|
|
|
197c: e7fb b.n 1976 <usb_d_ep_init+0x3a>
|
|
|
|
197e: 46c0 nop ; (mov r8, r8)
|
|
|
|
1980: 000016d1 .word 0x000016d1
|
|
|
|
1984: 00000c0d .word 0x00000c0d
|
|
|
|
1988: 200004a4 .word 0x200004a4
|
|
|
|
|
|
|
|
0000198c <usb_d_ep0_init>:
|
|
|
|
return usb_d_ep_init(0, USB_EP_XTYPE_CTRL, max_pkt_size);
|
|
|
|
198c: 2100 movs r1, #0
|
|
|
|
{
|
|
|
|
198e: b510 push {r4, lr}
|
|
|
|
return usb_d_ep_init(0, USB_EP_XTYPE_CTRL, max_pkt_size);
|
|
|
|
1990: 0002 movs r2, r0
|
|
|
|
1992: 0008 movs r0, r1
|
|
|
|
1994: 4b01 ldr r3, [pc, #4] ; (199c <usb_d_ep0_init+0x10>)
|
|
|
|
1996: 4798 blx r3
|
|
|
|
}
|
|
|
|
1998: bd10 pop {r4, pc}
|
|
|
|
199a: 46c0 nop ; (mov r8, r8)
|
|
|
|
199c: 0000193d .word 0x0000193d
|
|
|
|
|
|
|
|
000019a0 <usb_d_ep_deinit>:
|
|
|
|
|
|
|
|
void usb_d_ep_deinit(const uint8_t ep)
|
|
|
|
{
|
|
|
|
19a0: b570 push {r4, r5, r6, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
19a2: 4b07 ldr r3, [pc, #28] ; (19c0 <usb_d_ep_deinit+0x20>)
|
|
|
|
{
|
|
|
|
19a4: 0005 movs r5, r0
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
19a6: 4798 blx r3
|
|
|
|
19a8: 1e04 subs r4, r0, #0
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
if (ep_index < 0) {
|
|
|
|
19aa: db07 blt.n 19bc <usb_d_ep_deinit+0x1c>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
_usb_d_dev_ep_deinit(ep);
|
|
|
|
19ac: 0028 movs r0, r5
|
|
|
|
19ae: 4b05 ldr r3, [pc, #20] ; (19c4 <usb_d_ep_deinit+0x24>)
|
|
|
|
19b0: 4798 blx r3
|
|
|
|
ept->xfer.hdr.ep = 0xFF;
|
|
|
|
19b2: 23ff movs r3, #255 ; 0xff
|
|
|
|
19b4: 4804 ldr r0, [pc, #16] ; (19c8 <usb_d_ep_deinit+0x28>)
|
|
|
|
19b6: 0164 lsls r4, r4, #5
|
|
|
|
19b8: 1904 adds r4, r0, r4
|
|
|
|
19ba: 7063 strb r3, [r4, #1]
|
|
|
|
}
|
|
|
|
19bc: bd70 pop {r4, r5, r6, pc}
|
|
|
|
19be: 46c0 nop ; (mov r8, r8)
|
|
|
|
19c0: 000016d1 .word 0x000016d1
|
|
|
|
19c4: 00000cd5 .word 0x00000cd5
|
|
|
|
19c8: 200004a4 .word 0x200004a4
|
|
|
|
|
|
|
|
000019cc <usb_d_ep_enable>:
|
|
|
|
|
|
|
|
int32_t usb_d_ep_enable(const uint8_t ep)
|
|
|
|
{
|
|
|
|
19cc: b570 push {r4, r5, r6, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
19ce: 4b0c ldr r3, [pc, #48] ; (1a00 <usb_d_ep_enable+0x34>)
|
|
|
|
{
|
|
|
|
19d0: 0004 movs r4, r0
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
19d2: 4798 blx r3
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
int32_t rc;
|
|
|
|
if (ep_index < 0) {
|
|
|
|
19d4: 2800 cmp r0, #0
|
|
|
|
19d6: db0f blt.n 19f8 <usb_d_ep_enable+0x2c>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
}
|
|
|
|
ept->xfer.hdr.state = (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) ? USB_EP_S_X_SETUP : USB_EP_S_IDLE;
|
|
|
|
19d8: 4d0a ldr r5, [pc, #40] ; (1a04 <usb_d_ep_enable+0x38>)
|
|
|
|
19da: 0140 lsls r0, r0, #5
|
|
|
|
19dc: 5d42 ldrb r2, [r0, r5]
|
|
|
|
19de: 182d adds r5, r5, r0
|
|
|
|
19e0: 4251 negs r1, r2
|
|
|
|
19e2: 414a adcs r2, r1
|
|
|
|
19e4: 3201 adds r2, #1
|
|
|
|
rc = _usb_d_dev_ep_enable(ep);
|
|
|
|
19e6: 0020 movs r0, r4
|
|
|
|
19e8: 4b07 ldr r3, [pc, #28] ; (1a08 <usb_d_ep_enable+0x3c>)
|
|
|
|
ept->xfer.hdr.state = (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) ? USB_EP_S_X_SETUP : USB_EP_S_IDLE;
|
|
|
|
19ea: 70aa strb r2, [r5, #2]
|
|
|
|
rc = _usb_d_dev_ep_enable(ep);
|
|
|
|
19ec: 4798 blx r3
|
|
|
|
if (rc < 0) {
|
|
|
|
19ee: 2800 cmp r0, #0
|
|
|
|
19f0: da01 bge.n 19f6 <usb_d_ep_enable+0x2a>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_DISABLED;
|
|
|
|
19f2: 2300 movs r3, #0
|
|
|
|
19f4: 70ab strb r3, [r5, #2]
|
|
|
|
}
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
19f6: bd70 pop {r4, r5, r6, pc}
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
19f8: 2012 movs r0, #18
|
|
|
|
19fa: 4240 negs r0, r0
|
|
|
|
19fc: e7fb b.n 19f6 <usb_d_ep_enable+0x2a>
|
|
|
|
19fe: 46c0 nop ; (mov r8, r8)
|
|
|
|
1a00: 000016d1 .word 0x000016d1
|
|
|
|
1a04: 200004a4 .word 0x200004a4
|
|
|
|
1a08: 00000d4d .word 0x00000d4d
|
|
|
|
|
|
|
|
00001a0c <usb_d_ep_transfer>:
|
|
|
|
}
|
|
|
|
return usb_d_inst.ep[ep_index].xfer.req;
|
|
|
|
}
|
|
|
|
|
|
|
|
int32_t usb_d_ep_transfer(const struct usb_d_transfer *xfer)
|
|
|
|
{
|
|
|
|
1a0c: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(xfer->ep);
|
|
|
|
1a0e: 7a03 ldrb r3, [r0, #8]
|
|
|
|
{
|
|
|
|
1a10: 0004 movs r4, r0
|
|
|
|
1a12: b08b sub sp, #44 ; 0x2c
|
|
|
|
int8_t ep_index = _usb_d_find_ep(xfer->ep);
|
|
|
|
1a14: 0018 movs r0, r3
|
|
|
|
1a16: 9301 str r3, [sp, #4]
|
|
|
|
1a18: 4b32 ldr r3, [pc, #200] ; (1ae4 <usb_d_ep_transfer+0xd8>)
|
|
|
|
1a1a: 4798 blx r3
|
|
|
|
struct usb_d_ep * ept = &usb_d_inst.ep[ep_index];
|
|
|
|
bool dir = USB_EP_GET_DIR(xfer->ep), zlp = xfer->zlp;
|
|
|
|
1a1c: 7a63 ldrb r3, [r4, #9]
|
|
|
|
int8_t ep_index = _usb_d_find_ep(xfer->ep);
|
|
|
|
1a1e: 1e06 subs r6, r0, #0
|
|
|
|
uint32_t len = xfer->size;
|
|
|
|
1a20: 6865 ldr r5, [r4, #4]
|
|
|
|
bool dir = USB_EP_GET_DIR(xfer->ep), zlp = xfer->zlp;
|
|
|
|
1a22: 9302 str r3, [sp, #8]
|
|
|
|
int32_t rc;
|
|
|
|
volatile uint8_t state;
|
|
|
|
volatile hal_atomic_t flags;
|
|
|
|
|
|
|
|
if (ep_index < 0) {
|
|
|
|
1a24: db5b blt.n 1ade <usb_d_ep_transfer+0xd2>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
}
|
|
|
|
|
|
|
|
atomic_enter_critical(&flags);
|
|
|
|
1a26: 4b30 ldr r3, [pc, #192] ; (1ae8 <usb_d_ep_transfer+0xdc>)
|
|
|
|
1a28: a806 add r0, sp, #24
|
|
|
|
1a2a: 4798 blx r3
|
|
|
|
state = ept->xfer.hdr.state;
|
|
|
|
1a2c: 0173 lsls r3, r6, #5
|
|
|
|
1a2e: 9300 str r3, [sp, #0]
|
|
|
|
1a30: 9a00 ldr r2, [sp, #0]
|
|
|
|
1a32: 4b2e ldr r3, [pc, #184] ; (1aec <usb_d_ep_transfer+0xe0>)
|
|
|
|
1a34: 189e adds r6, r3, r2
|
|
|
|
1a36: 78b3 ldrb r3, [r6, #2]
|
|
|
|
1a38: aa04 add r2, sp, #16
|
|
|
|
1a3a: 1dd7 adds r7, r2, #7
|
|
|
|
1a3c: 703b strb r3, [r7, #0]
|
|
|
|
if (state == USB_EP_S_IDLE) {
|
|
|
|
1a3e: 783a ldrb r2, [r7, #0]
|
|
|
|
1a40: b2d3 uxtb r3, r2
|
|
|
|
1a42: 9303 str r3, [sp, #12]
|
|
|
|
1a44: 4b2a ldr r3, [pc, #168] ; (1af0 <usb_d_ep_transfer+0xe4>)
|
|
|
|
1a46: 2a01 cmp r2, #1
|
|
|
|
1a48: d11d bne.n 1a86 <usb_d_ep_transfer+0x7a>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_DATA;
|
|
|
|
1a4a: 3202 adds r2, #2
|
|
|
|
1a4c: 70b2 strb r2, [r6, #2]
|
|
|
|
atomic_leave_critical(&flags);
|
|
|
|
1a4e: a806 add r0, sp, #24
|
|
|
|
1a50: 4798 blx r3
|
|
|
|
default: /* USB_EP_S_X_xxxx */
|
|
|
|
return USB_BUSY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ept->xfer.hdr.type == USB_EP_XTYPE_CTRL) {
|
|
|
|
1a52: 4b26 ldr r3, [pc, #152] ; (1aec <usb_d_ep_transfer+0xe0>)
|
|
|
|
1a54: 9a00 ldr r2, [sp, #0]
|
|
|
|
1a56: 5cd3 ldrb r3, [r2, r3]
|
|
|
|
1a58: 2b00 cmp r3, #0
|
|
|
|
1a5a: d01f beq.n 1a9c <usb_d_ep_transfer+0x90>
|
|
|
|
bool dir = USB_EP_GET_DIR(xfer->ep), zlp = xfer->zlp;
|
|
|
|
1a5c: 9802 ldr r0, [sp, #8]
|
|
|
|
1a5e: 9b01 ldr r3, [sp, #4]
|
|
|
|
1a60: 1e42 subs r2, r0, #1
|
|
|
|
1a62: 4190 sbcs r0, r2
|
|
|
|
1a64: 09d9 lsrs r1, r3, #7
|
|
|
|
1a66: b2c0 uxtb r0, r0
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
1a68: 6823 ldr r3, [r4, #0]
|
|
|
|
zlp = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rc = _usb_d_trans(xfer->ep, dir, xfer->buf, len, zlp);
|
|
|
|
1a6a: 7a22 ldrb r2, [r4, #8]
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
1a6c: 9307 str r3, [sp, #28]
|
|
|
|
1a6e: 9508 str r5, [sp, #32]
|
|
|
|
1a70: 2900 cmp r1, #0
|
|
|
|
1a72: d031 beq.n 1ad8 <usb_d_ep_transfer+0xcc>
|
|
|
|
1a74: 2380 movs r3, #128 ; 0x80
|
|
|
|
1a76: 431a orrs r2, r3
|
|
|
|
1a78: ab04 add r3, sp, #16
|
|
|
|
1a7a: 751a strb r2, [r3, #20]
|
|
|
|
1a7c: 7558 strb r0, [r3, #21]
|
|
|
|
return _usb_d_dev_ep_trans(&trans);
|
|
|
|
1a7e: 4b1d ldr r3, [pc, #116] ; (1af4 <usb_d_ep_transfer+0xe8>)
|
|
|
|
1a80: a807 add r0, sp, #28
|
|
|
|
1a82: 4798 blx r3
|
|
|
|
return rc;
|
|
|
|
1a84: e008 b.n 1a98 <usb_d_ep_transfer+0x8c>
|
|
|
|
atomic_leave_critical(&flags);
|
|
|
|
1a86: a806 add r0, sp, #24
|
|
|
|
1a88: 4798 blx r3
|
|
|
|
switch (state) {
|
|
|
|
1a8a: 783b ldrb r3, [r7, #0]
|
|
|
|
1a8c: 2001 movs r0, #1
|
|
|
|
1a8e: b2da uxtb r2, r3
|
|
|
|
1a90: 2b06 cmp r3, #6
|
|
|
|
1a92: d801 bhi.n 1a98 <usb_d_ep_transfer+0x8c>
|
|
|
|
1a94: 4b18 ldr r3, [pc, #96] ; (1af8 <usb_d_ep_transfer+0xec>)
|
|
|
|
1a96: 5698 ldrsb r0, [r3, r2]
|
|
|
|
}
|
|
|
|
1a98: b00b add sp, #44 ; 0x2c
|
|
|
|
1a9a: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
uint16_t req_len = USB_GET_wLength(ept->xfer.req);
|
|
|
|
1a9c: 7cf2 ldrb r2, [r6, #19]
|
|
|
|
1a9e: 7cb3 ldrb r3, [r6, #18]
|
|
|
|
1aa0: 0212 lsls r2, r2, #8
|
|
|
|
1aa2: 189b adds r3, r3, r2
|
|
|
|
1aa4: b29b uxth r3, r3
|
|
|
|
if (req_len == 0) {
|
|
|
|
1aa6: 2b00 cmp r3, #0
|
|
|
|
1aa8: d105 bne.n 1ab6 <usb_d_ep_transfer+0xaa>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_STATUS;
|
|
|
|
1aaa: 2204 movs r2, #4
|
|
|
|
zlp = true;
|
|
|
|
1aac: 9803 ldr r0, [sp, #12]
|
|
|
|
len = 0;
|
|
|
|
1aae: 001d movs r5, r3
|
|
|
|
dir = true;
|
|
|
|
1ab0: 0001 movs r1, r0
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_X_STATUS;
|
|
|
|
1ab2: 70b2 strb r2, [r6, #2]
|
|
|
|
1ab4: e7d8 b.n 1a68 <usb_d_ep_transfer+0x5c>
|
|
|
|
if (len > req_len) {
|
|
|
|
1ab6: 429d cmp r5, r3
|
|
|
|
1ab8: d900 bls.n 1abc <usb_d_ep_transfer+0xb0>
|
|
|
|
1aba: 001d movs r5, r3
|
|
|
|
dir = (USB_GET_bmRequestType(ept->xfer.req) & USB_REQ_TYPE_IN);
|
|
|
|
1abc: 490b ldr r1, [pc, #44] ; (1aec <usb_d_ep_transfer+0xe0>)
|
|
|
|
zlp = false;
|
|
|
|
1abe: 2000 movs r0, #0
|
|
|
|
dir = (USB_GET_bmRequestType(ept->xfer.req) & USB_REQ_TYPE_IN);
|
|
|
|
1ac0: 468c mov ip, r1
|
|
|
|
1ac2: 9a00 ldr r2, [sp, #0]
|
|
|
|
1ac4: 0001 movs r1, r0
|
|
|
|
1ac6: 4462 add r2, ip
|
|
|
|
if (dir) {
|
|
|
|
1ac8: 7b12 ldrb r2, [r2, #12]
|
|
|
|
1aca: 2a7f cmp r2, #127 ; 0x7f
|
|
|
|
1acc: d9cc bls.n 1a68 <usb_d_ep_transfer+0x5c>
|
|
|
|
zlp = (req_len > len);
|
|
|
|
1ace: 429d cmp r5, r3
|
|
|
|
1ad0: 419b sbcs r3, r3
|
|
|
|
dir = (USB_GET_bmRequestType(ept->xfer.req) & USB_REQ_TYPE_IN);
|
|
|
|
1ad2: 3101 adds r1, #1
|
|
|
|
zlp = (req_len > len);
|
|
|
|
1ad4: 4258 negs r0, r3
|
|
|
|
1ad6: e7c7 b.n 1a68 <usb_d_ep_transfer+0x5c>
|
|
|
|
struct usb_d_transfer trans
|
|
|
|
1ad8: 230f movs r3, #15
|
|
|
|
1ada: 401a ands r2, r3
|
|
|
|
1adc: e7cc b.n 1a78 <usb_d_ep_transfer+0x6c>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
1ade: 2012 movs r0, #18
|
|
|
|
1ae0: 4240 negs r0, r0
|
|
|
|
1ae2: e7d9 b.n 1a98 <usb_d_ep_transfer+0x8c>
|
|
|
|
1ae4: 000016d1 .word 0x000016d1
|
|
|
|
1ae8: 00002449 .word 0x00002449
|
|
|
|
1aec: 200004a4 .word 0x200004a4
|
|
|
|
1af0: 00002457 .word 0x00002457
|
|
|
|
1af4: 00000fad .word 0x00000fad
|
|
|
|
1af8: 00002ee6 .word 0x00002ee6
|
|
|
|
|
|
|
|
00001afc <usb_d_ep_halt>:
|
|
|
|
}
|
|
|
|
return ERR_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
int32_t usb_d_ep_halt(const uint8_t ep, const enum usb_ep_halt_ctrl ctrl)
|
|
|
|
{
|
|
|
|
1afc: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
1afe: 0005 movs r5, r0
|
|
|
|
1b00: 1e0e subs r6, r1, #0
|
|
|
|
if (ctrl == USB_EP_HALT_CLR) {
|
|
|
|
1b02: d11a bne.n 1b3a <usb_d_ep_halt+0x3e>
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1b04: 4b12 ldr r3, [pc, #72] ; (1b50 <usb_d_ep_halt+0x54>)
|
|
|
|
1b06: 4798 blx r3
|
|
|
|
1b08: 1e04 subs r4, r0, #0
|
|
|
|
if (ep_index < 0) {
|
|
|
|
1b0a: db1d blt.n 1b48 <usb_d_ep_halt+0x4c>
|
|
|
|
if (_usb_d_dev_ep_stall(ep, USB_EP_STALL_GET)) {
|
|
|
|
1b0c: 2102 movs r1, #2
|
|
|
|
1b0e: 0028 movs r0, r5
|
|
|
|
1b10: 4f10 ldr r7, [pc, #64] ; (1b54 <usb_d_ep_halt+0x58>)
|
|
|
|
1b12: 47b8 blx r7
|
|
|
|
1b14: 2800 cmp r0, #0
|
|
|
|
1b16: d00f beq.n 1b38 <usb_d_ep_halt+0x3c>
|
|
|
|
rc = _usb_d_dev_ep_stall(ep, USB_EP_STALL_CLR);
|
|
|
|
1b18: 0031 movs r1, r6
|
|
|
|
1b1a: 0028 movs r0, r5
|
|
|
|
1b1c: 47b8 blx r7
|
|
|
|
if (rc < 0) {
|
|
|
|
1b1e: 2800 cmp r0, #0
|
|
|
|
1b20: db0a blt.n 1b38 <usb_d_ep_halt+0x3c>
|
|
|
|
ept->xfer.hdr.state = USB_EP_S_IDLE;
|
|
|
|
1b22: 480d ldr r0, [pc, #52] ; (1b58 <usb_d_ep_halt+0x5c>)
|
|
|
|
1b24: 4b0d ldr r3, [pc, #52] ; (1b5c <usb_d_ep_halt+0x60>)
|
|
|
|
1b26: 0164 lsls r4, r4, #5
|
|
|
|
1b28: 1824 adds r4, r4, r0
|
|
|
|
1b2a: 8063 strh r3, [r4, #2]
|
|
|
|
ept->callbacks.xfer(ep, USB_XFER_UNHALT, NULL);
|
|
|
|
1b2c: 0032 movs r2, r6
|
|
|
|
1b2e: 2103 movs r1, #3
|
|
|
|
1b30: 0028 movs r0, r5
|
|
|
|
1b32: 69e3 ldr r3, [r4, #28]
|
|
|
|
1b34: 4798 blx r3
|
|
|
|
return ERR_NONE;
|
|
|
|
1b36: 0030 movs r0, r6
|
|
|
|
} else if (ctrl == USB_EP_HALT_SET) {
|
|
|
|
return _usb_d_dev_ep_stall(ep, USB_EP_STALL_SET);
|
|
|
|
} else {
|
|
|
|
return _usb_d_dev_ep_stall(ep, USB_EP_STALL_GET);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1b38: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
} else if (ctrl == USB_EP_HALT_SET) {
|
|
|
|
1b3a: 4b06 ldr r3, [pc, #24] ; (1b54 <usb_d_ep_halt+0x58>)
|
|
|
|
1b3c: 2901 cmp r1, #1
|
|
|
|
1b3e: d000 beq.n 1b42 <usb_d_ep_halt+0x46>
|
|
|
|
return _usb_d_dev_ep_stall(ep, USB_EP_STALL_GET);
|
|
|
|
1b40: 2102 movs r1, #2
|
|
|
|
1b42: 0028 movs r0, r5
|
|
|
|
1b44: 4798 blx r3
|
|
|
|
1b46: e7f7 b.n 1b38 <usb_d_ep_halt+0x3c>
|
|
|
|
return -USB_ERR_PARAM;
|
|
|
|
1b48: 2012 movs r0, #18
|
|
|
|
1b4a: 4240 negs r0, r0
|
|
|
|
1b4c: e7f4 b.n 1b38 <usb_d_ep_halt+0x3c>
|
|
|
|
1b4e: 46c0 nop ; (mov r8, r8)
|
|
|
|
1b50: 000016d1 .word 0x000016d1
|
|
|
|
1b54: 00000e8d .word 0x00000e8d
|
|
|
|
1b58: 200004a4 .word 0x200004a4
|
|
|
|
1b5c: 00000301 .word 0x00000301
|
|
|
|
|
|
|
|
00001b60 <usb_d_ep_register_callback>:
|
|
|
|
|
|
|
|
void usb_d_ep_register_callback(const uint8_t ep, const enum usb_d_ep_cb_type type, const FUNC_PTR func)
|
|
|
|
{
|
|
|
|
1b60: b570 push {r4, r5, r6, lr}
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1b62: 4b0f ldr r3, [pc, #60] ; (1ba0 <usb_d_ep_register_callback+0x40>)
|
|
|
|
{
|
|
|
|
1b64: 0014 movs r4, r2
|
|
|
|
1b66: 000d movs r5, r1
|
|
|
|
int8_t ep_index = _usb_d_find_ep(ep);
|
|
|
|
1b68: 4798 blx r3
|
|
|
|
struct usb_d_ep *ept = &usb_d_inst.ep[ep_index];
|
|
|
|
FUNC_PTR f = func ? (FUNC_PTR)func : (FUNC_PTR)usb_d_dummy_cb_false;
|
|
|
|
1b6a: 2c00 cmp r4, #0
|
|
|
|
1b6c: d100 bne.n 1b70 <usb_d_ep_register_callback+0x10>
|
|
|
|
1b6e: 4c0d ldr r4, [pc, #52] ; (1ba4 <usb_d_ep_register_callback+0x44>)
|
|
|
|
if (ep_index < 0) {
|
|
|
|
1b70: 2800 cmp r0, #0
|
|
|
|
1b72: db09 blt.n 1b88 <usb_d_ep_register_callback+0x28>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
switch (type) {
|
|
|
|
1b74: 2d01 cmp r5, #1
|
|
|
|
1b76: d008 beq.n 1b8a <usb_d_ep_register_callback+0x2a>
|
|
|
|
1b78: 2d02 cmp r5, #2
|
|
|
|
1b7a: d00b beq.n 1b94 <usb_d_ep_register_callback+0x34>
|
|
|
|
1b7c: 2d00 cmp r5, #0
|
|
|
|
1b7e: d103 bne.n 1b88 <usb_d_ep_register_callback+0x28>
|
|
|
|
case USB_D_EP_CB_SETUP:
|
|
|
|
ept->callbacks.req = (usb_d_ep_cb_setup_t)f;
|
|
|
|
1b80: 4b09 ldr r3, [pc, #36] ; (1ba8 <usb_d_ep_register_callback+0x48>)
|
|
|
|
1b82: 0140 lsls r0, r0, #5
|
|
|
|
1b84: 1818 adds r0, r3, r0
|
|
|
|
1b86: 6144 str r4, [r0, #20]
|
|
|
|
ept->callbacks.xfer = (usb_d_ep_cb_xfer_t)f;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1b88: bd70 pop {r4, r5, r6, pc}
|
|
|
|
ept->callbacks.more = (usb_d_ep_cb_more_t)f;
|
|
|
|
1b8a: 4b07 ldr r3, [pc, #28] ; (1ba8 <usb_d_ep_register_callback+0x48>)
|
|
|
|
1b8c: 0140 lsls r0, r0, #5
|
|
|
|
1b8e: 1818 adds r0, r3, r0
|
|
|
|
1b90: 6184 str r4, [r0, #24]
|
|
|
|
break;
|
|
|
|
1b92: e7f9 b.n 1b88 <usb_d_ep_register_callback+0x28>
|
|
|
|
ept->callbacks.xfer = (usb_d_ep_cb_xfer_t)f;
|
|
|
|
1b94: 4b04 ldr r3, [pc, #16] ; (1ba8 <usb_d_ep_register_callback+0x48>)
|
|
|
|
1b96: 0140 lsls r0, r0, #5
|
|
|
|
1b98: 1818 adds r0, r3, r0
|
|
|
|
1b9a: 61c4 str r4, [r0, #28]
|
|
|
|
break;
|
|
|
|
1b9c: e7f4 b.n 1b88 <usb_d_ep_register_callback+0x28>
|
|
|
|
1b9e: 46c0 nop ; (mov r8, r8)
|
|
|
|
1ba0: 000016d1 .word 0x000016d1
|
|
|
|
1ba4: 00001705 .word 0x00001705
|
|
|
|
1ba8: 200004a4 .word 0x200004a4
|
|
|
|
|
|
|
|
00001bac <main>:
|
|
|
|
#include <atmel_start.h>
|
|
|
|
#include "serial.h"
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
1bac: b510 push {r4, lr}
|
|
|
|
/* Initializes MCU, drivers and middleware */
|
|
|
|
atmel_start_init();
|
|
|
|
1bae: 4b04 ldr r3, [pc, #16] ; (1bc0 <main+0x14>)
|
|
|
|
1bb0: 4798 blx r3
|
|
|
|
arc_serial_init();
|
|
|
|
1bb2: 4b04 ldr r3, [pc, #16] ; (1bc4 <main+0x18>)
|
|
|
|
1bb4: 4798 blx r3
|
|
|
|
|
|
|
|
arc_printf("Hello World");
|
|
|
|
1bb6: 4804 ldr r0, [pc, #16] ; (1bc8 <main+0x1c>)
|
|
|
|
1bb8: 4b04 ldr r3, [pc, #16] ; (1bcc <main+0x20>)
|
|
|
|
1bba: 4798 blx r3
|
|
|
|
/* Replace with your application code */
|
|
|
|
while (1) {
|
|
|
|
1bbc: e7fe b.n 1bbc <main+0x10>
|
|
|
|
1bbe: 46c0 nop ; (mov r8, r8)
|
|
|
|
1bc0: 00001e69 .word 0x00001e69
|
|
|
|
1bc4: 0000247d .word 0x0000247d
|
|
|
|
1bc8: 00002ef4 .word 0x00002ef4
|
|
|
|
1bcc: 000024c9 .word 0x000024c9
|
|
|
|
|
|
|
|
00001bd0 <_gpio_set_pin_function>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Set gpio pin function
|
|
|
|
*/
|
|
|
|
static inline void _gpio_set_pin_function(const uint32_t gpio, const uint32_t function)
|
|
|
|
{
|
|
|
|
1bd0: b530 push {r4, r5, lr}
|
|
|
|
bool value)
|
|
|
|
{
|
|
|
|
uint8_t tmp;
|
|
|
|
PORT_CRITICAL_SECTION_ENTER();
|
|
|
|
tmp = ((Port *)hw)->Group[submodule_index].PINCFG[index].reg;
|
|
|
|
tmp &= ~PORT_PINCFG_PMUXEN;
|
|
|
|
1bd2: 2401 movs r4, #1
|
|
|
|
tmp = ((Port *)hw)->Group[submodule_index].PINCFG[index].reg;
|
|
|
|
1bd4: 4b0c ldr r3, [pc, #48] ; (1c08 <_gpio_set_pin_function+0x38>)
|
|
|
|
uint8_t port = GPIO_PORT(gpio);
|
|
|
|
uint8_t pin = GPIO_PIN(gpio);
|
|
|
|
1bd6: b2c5 uxtb r5, r0
|
|
|
|
1bd8: 18c0 adds r0, r0, r3
|
|
|
|
1bda: 7803 ldrb r3, [r0, #0]
|
|
|
|
} else {
|
|
|
|
hri_port_write_PINCFG_PMUXEN_bit(PORT, port, pin, true);
|
|
|
|
|
|
|
|
if (pin & 1) {
|
|
|
|
// Odd numbered pin
|
|
|
|
hri_port_write_PMUX_PMUXO_bf(PORT, port, pin >> 1, function & 0xffff);
|
|
|
|
1bdc: b2ca uxtb r2, r1
|
|
|
|
tmp &= ~PORT_PINCFG_PMUXEN;
|
|
|
|
1bde: 43a3 bics r3, r4
|
|
|
|
tmp = ((Port *)hw)->Group[submodule_index].PMUX[index].reg;
|
|
|
|
1be0: 490a ldr r1, [pc, #40] ; (1c0c <_gpio_set_pin_function+0x3c>)
|
|
|
|
tmp |= value << PORT_PINCFG_PMUXEN_Pos;
|
|
|
|
1be2: 4323 orrs r3, r4
|
|
|
|
((Port *)hw)->Group[submodule_index].PINCFG[index].reg = tmp;
|
|
|
|
1be4: 7003 strb r3, [r0, #0]
|
|
|
|
tmp = ((Port *)hw)->Group[submodule_index].PMUX[index].reg;
|
|
|
|
1be6: 086b lsrs r3, r5, #1
|
|
|
|
1be8: 185b adds r3, r3, r1
|
|
|
|
tmp &= ~PORT_PMUX_PMUXO_Msk;
|
|
|
|
1bea: 200f movs r0, #15
|
|
|
|
tmp = ((Port *)hw)->Group[submodule_index].PMUX[index].reg;
|
|
|
|
1bec: 7819 ldrb r1, [r3, #0]
|
|
|
|
if (pin & 1) {
|
|
|
|
1bee: 4225 tst r5, r4
|
|
|
|
1bf0: d005 beq.n 1bfe <_gpio_set_pin_function+0x2e>
|
|
|
|
tmp &= ~PORT_PMUX_PMUXO_Msk;
|
|
|
|
1bf2: 4001 ands r1, r0
|
|
|
|
tmp |= PORT_PMUX_PMUXO(data);
|
|
|
|
1bf4: 0112 lsls r2, r2, #4
|
|
|
|
1bf6: 4311 orrs r1, r2
|
|
|
|
1bf8: b2c9 uxtb r1, r1
|
|
|
|
((Port *)hw)->Group[submodule_index].PMUX[index].reg = tmp;
|
|
|
|
1bfa: 7019 strb r1, [r3, #0]
|
|
|
|
} else {
|
|
|
|
// Even numbered pin
|
|
|
|
hri_port_write_PMUX_PMUXE_bf(PORT, port, pin >> 1, function & 0xffff);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1bfc: bd30 pop {r4, r5, pc}
|
|
|
|
tmp &= ~PORT_PMUX_PMUXE_Msk;
|
|
|
|
1bfe: 4381 bics r1, r0
|
|
|
|
tmp |= PORT_PMUX_PMUXE(data);
|
|
|
|
1c00: 430a orrs r2, r1
|
|
|
|
((Port *)hw)->Group[submodule_index].PMUX[index].reg = tmp;
|
|
|
|
1c02: 701a strb r2, [r3, #0]
|
|
|
|
1c04: e7fa b.n 1bfc <_gpio_set_pin_function+0x2c>
|
|
|
|
1c06: 46c0 nop ; (mov r8, r8)
|
|
|
|
1c08: 41004440 .word 0x41004440
|
|
|
|
1c0c: 41004430 .word 0x41004430
|
|
|
|
|
|
|
|
00001c10 <USART_0_PORT_init>:
|
|
|
|
#include <hpl_pm_base.h>
|
|
|
|
|
|
|
|
struct usart_sync_descriptor USART_0;
|
|
|
|
|
|
|
|
void USART_0_PORT_init(void)
|
|
|
|
{
|
|
|
|
1c10: b510 push {r4, lr}
|
|
|
|
* found in the header files for the device
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static inline void gpio_set_pin_function(const uint32_t pin, uint32_t function)
|
|
|
|
{
|
|
|
|
_gpio_set_pin_function(pin, function);
|
|
|
|
1c12: 2016 movs r0, #22
|
|
|
|
1c14: 4c03 ldr r4, [pc, #12] ; (1c24 <USART_0_PORT_init+0x14>)
|
|
|
|
1c16: 4904 ldr r1, [pc, #16] ; (1c28 <USART_0_PORT_init+0x18>)
|
|
|
|
1c18: 47a0 blx r4
|
|
|
|
1c1a: 2017 movs r0, #23
|
|
|
|
1c1c: 4903 ldr r1, [pc, #12] ; (1c2c <USART_0_PORT_init+0x1c>)
|
|
|
|
1c1e: 47a0 blx r4
|
|
|
|
|
|
|
|
gpio_set_pin_function(PA22, PINMUX_PA22C_SERCOM3_PAD0);
|
|
|
|
|
|
|
|
gpio_set_pin_function(PA23, PINMUX_PA23C_SERCOM3_PAD1);
|
|
|
|
}
|
|
|
|
1c20: bd10 pop {r4, pc}
|
|
|
|
1c22: 46c0 nop ; (mov r8, r8)
|
|
|
|
1c24: 00001bd1 .word 0x00001bd1
|
|
|
|
1c28: 00160002 .word 0x00160002
|
|
|
|
1c2c: 00170002 .word 0x00170002
|
|
|
|
|
|
|
|
00001c30 <USART_0_CLOCK_init>:
|
|
|
|
peripheral = (uint32_t)_pm_get_apbb_index(module);
|
|
|
|
PM->APBBMASK.reg |= 1 << peripheral;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case PM_BUS_APBC:
|
|
|
|
PM->APBCMASK.reg |= 1 << peripheral;
|
|
|
|
1c30: 2320 movs r3, #32
|
|
|
|
1c32: 4a04 ldr r2, [pc, #16] ; (1c44 <USART_0_CLOCK_init+0x14>)
|
|
|
|
1c34: 6a11 ldr r1, [r2, #32]
|
|
|
|
1c36: 430b orrs r3, r1
|
|
|
|
1c38: 6213 str r3, [r2, #32]
|
|
|
|
((Gclk *)hw)->CLKCTRL.reg = data;
|
|
|
|
1c3a: 4b03 ldr r3, [pc, #12] ; (1c48 <USART_0_CLOCK_init+0x18>)
|
|
|
|
1c3c: 4a03 ldr r2, [pc, #12] ; (1c4c <USART_0_CLOCK_init+0x1c>)
|
|
|
|
1c3e: 805a strh r2, [r3, #2]
|
|
|
|
|
|
|
|
void USART_0_CLOCK_init(void)
|
|
|
|
{
|
|
|
|
_pm_enable_bus_clock(PM_BUS_APBC, SERCOM3);
|
|
|
|
_gclk_enable_channel(SERCOM3_GCLK_ID_CORE, CONF_GCLK_SERCOM3_CORE_SRC);
|
|
|
|
}
|
|
|
|
1c40: 4770 bx lr
|
|
|
|
1c42: 46c0 nop ; (mov r8, r8)
|
|
|
|
1c44: 40000400 .word 0x40000400
|
|
|
|
1c48: 40000c00 .word 0x40000c00
|
|
|
|
1c4c: 00004017 .word 0x00004017
|
|
|
|
|
|
|
|
00001c50 <USART_0_init>:
|
|
|
|
|
|
|
|
void USART_0_init(void)
|
|
|
|
{
|
|
|
|
1c50: b510 push {r4, lr}
|
|
|
|
USART_0_CLOCK_init();
|
|
|
|
1c52: 4b05 ldr r3, [pc, #20] ; (1c68 <USART_0_init+0x18>)
|
|
|
|
1c54: 4798 blx r3
|
|
|
|
usart_sync_init(&USART_0, SERCOM3, (void *)NULL);
|
|
|
|
1c56: 2200 movs r2, #0
|
|
|
|
1c58: 4904 ldr r1, [pc, #16] ; (1c6c <USART_0_init+0x1c>)
|
|
|
|
1c5a: 4b05 ldr r3, [pc, #20] ; (1c70 <USART_0_init+0x20>)
|
|
|
|
1c5c: 4805 ldr r0, [pc, #20] ; (1c74 <USART_0_init+0x24>)
|
|
|
|
1c5e: 4798 blx r3
|
|
|
|
USART_0_PORT_init();
|
|
|
|
1c60: 4b05 ldr r3, [pc, #20] ; (1c78 <USART_0_init+0x28>)
|
|
|
|
1c62: 4798 blx r3
|
|
|
|
}
|
|
|
|
1c64: bd10 pop {r4, pc}
|
|
|
|
1c66: 46c0 nop ; (mov r8, r8)
|
|
|
|
1c68: 00001c31 .word 0x00001c31
|
|
|
|
1c6c: 42001400 .word 0x42001400
|
|
|
|
1c70: 00001595 .word 0x00001595
|
|
|
|
1c74: 20000644 .word 0x20000644
|
|
|
|
1c78: 00001c11 .word 0x00001c11
|
|
|
|
|
|
|
|
00001c7c <delay_driver_init>:
|
|
|
|
|
|
|
|
void delay_driver_init(void)
|
|
|
|
{
|
|
|
|
1c7c: b510 push {r4, lr}
|
|
|
|
delay_init(SysTick);
|
|
|
|
1c7e: 4802 ldr r0, [pc, #8] ; (1c88 <delay_driver_init+0xc>)
|
|
|
|
1c80: 4b02 ldr r3, [pc, #8] ; (1c8c <delay_driver_init+0x10>)
|
|
|
|
1c82: 4798 blx r3
|
|
|
|
}
|
|
|
|
1c84: bd10 pop {r4, pc}
|
|
|
|
1c86: 46c0 nop ; (mov r8, r8)
|
|
|
|
1c88: e000e010 .word 0xe000e010
|
|
|
|
1c8c: 00001305 .word 0x00001305
|
|
|
|
|
|
|
|
00001c90 <USB_DEVICE_INSTANCE_PORT_init>:
|
|
|
|
|
|
|
|
void USB_DEVICE_INSTANCE_PORT_init(void)
|
|
|
|
{
|
|
|
|
1c90: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
((Port *)hw)->Group[submodule_index].DIRSET.reg = mask;
|
|
|
|
1c92: 25c0 movs r5, #192 ; 0xc0
|
|
|
|
1c94: 2380 movs r3, #128 ; 0x80
|
|
|
|
|
|
|
|
static inline void hri_port_write_WRCONFIG_reg(const void *const hw, uint8_t submodule_index,
|
|
|
|
hri_port_wrconfig_reg_t data)
|
|
|
|
{
|
|
|
|
PORT_CRITICAL_SECTION_ENTER();
|
|
|
|
((Port *)hw)->Group[submodule_index].WRCONFIG.reg = data;
|
|
|
|
1c96: 2780 movs r7, #128 ; 0x80
|
|
|
|
1c98: 4c11 ldr r4, [pc, #68] ; (1ce0 <USB_DEVICE_INSTANCE_PORT_init+0x50>)
|
|
|
|
1c9a: 4a12 ldr r2, [pc, #72] ; (1ce4 <USB_DEVICE_INSTANCE_PORT_init+0x54>)
|
|
|
|
((Port *)hw)->Group[submodule_index].DIRSET.reg = mask;
|
|
|
|
1c9c: 05ed lsls r5, r5, #23
|
|
|
|
((Port *)hw)->Group[submodule_index].WRCONFIG.reg = data;
|
|
|
|
1c9e: 05ff lsls r7, r7, #23
|
|
|
|
((Port *)hw)->Group[submodule_index].DIRSET.reg = mask;
|
|
|
|
1ca0: 045b lsls r3, r3, #17
|
|
|
|
1ca2: 60ab str r3, [r5, #8]
|
|
|
|
((Port *)hw)->Group[submodule_index].WRCONFIG.reg = data;
|
|
|
|
1ca4: 62a7 str r7, [r4, #40] ; 0x28
|
|
|
|
1ca6: 62a2 str r2, [r4, #40] ; 0x28
|
|
|
|
((Port *)hw)->Group[submodule_index].PINCFG[index].reg &= ~PORT_PINCFG_PULLEN;
|
|
|
|
1ca8: 0022 movs r2, r4
|
|
|
|
1caa: 2604 movs r6, #4
|
|
|
|
((Port *)hw)->Group[submodule_index].OUTCLR.reg = mask;
|
|
|
|
1cac: 616b str r3, [r5, #20]
|
|
|
|
((Port *)hw)->Group[submodule_index].PINCFG[index].reg &= ~PORT_PINCFG_PULLEN;
|
|
|
|
1cae: 3258 adds r2, #88 ; 0x58
|
|
|
|
1cb0: 7813 ldrb r3, [r2, #0]
|
|
|
|
1cb2: 2018 movs r0, #24
|
|
|
|
1cb4: 43b3 bics r3, r6
|
|
|
|
1cb6: 7013 strb r3, [r2, #0]
|
|
|
|
1cb8: 490b ldr r1, [pc, #44] ; (1ce8 <USB_DEVICE_INSTANCE_PORT_init+0x58>)
|
|
|
|
1cba: 4b0c ldr r3, [pc, #48] ; (1cec <USB_DEVICE_INSTANCE_PORT_init+0x5c>)
|
|
|
|
1cbc: 4798 blx r3
|
|
|
|
((Port *)hw)->Group[submodule_index].DIRSET.reg = mask;
|
|
|
|
1cbe: 2380 movs r3, #128 ; 0x80
|
|
|
|
((Port *)hw)->Group[submodule_index].WRCONFIG.reg = data;
|
|
|
|
1cc0: 4a0b ldr r2, [pc, #44] ; (1cf0 <USB_DEVICE_INSTANCE_PORT_init+0x60>)
|
|
|
|
((Port *)hw)->Group[submodule_index].DIRSET.reg = mask;
|
|
|
|
1cc2: 049b lsls r3, r3, #18
|
|
|
|
1cc4: 60ab str r3, [r5, #8]
|
|
|
|
((Port *)hw)->Group[submodule_index].WRCONFIG.reg = data;
|
|
|
|
1cc6: 62a7 str r7, [r4, #40] ; 0x28
|
|
|
|
1cc8: 62a2 str r2, [r4, #40] ; 0x28
|
|
|
|
((Port *)hw)->Group[submodule_index].OUTCLR.reg = mask;
|
|
|
|
1cca: 616b str r3, [r5, #20]
|
|
|
|
((Port *)hw)->Group[submodule_index].PINCFG[index].reg &= ~PORT_PINCFG_PULLEN;
|
|
|
|
1ccc: 3459 adds r4, #89 ; 0x59
|
|
|
|
1cce: 7823 ldrb r3, [r4, #0]
|
|
|
|
1cd0: 2019 movs r0, #25
|
|
|
|
1cd2: 43b3 bics r3, r6
|
|
|
|
1cd4: 7023 strb r3, [r4, #0]
|
|
|
|
1cd6: 4907 ldr r1, [pc, #28] ; (1cf4 <USB_DEVICE_INSTANCE_PORT_init+0x64>)
|
|
|
|
1cd8: 4b04 ldr r3, [pc, #16] ; (1cec <USB_DEVICE_INSTANCE_PORT_init+0x5c>)
|
|
|
|
1cda: 4798 blx r3
|
|
|
|
// <GPIO_PIN_FUNCTION_E"> E
|
|
|
|
// <GPIO_PIN_FUNCTION_F"> F
|
|
|
|
// <GPIO_PIN_FUNCTION_G"> G
|
|
|
|
// <GPIO_PIN_FUNCTION_H"> H
|
|
|
|
PINMUX_PA25G_USB_DP);
|
|
|
|
}
|
|
|
|
1cdc: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
1cde: 46c0 nop ; (mov r8, r8)
|
|
|
|
1ce0: 41004400 .word 0x41004400
|
|
|
|
1ce4: c0000100 .word 0xc0000100
|
|
|
|
1ce8: 00180006 .word 0x00180006
|
|
|
|
1cec: 00001bd1 .word 0x00001bd1
|
|
|
|
1cf0: c0000200 .word 0xc0000200
|
|
|
|
1cf4: 00190006 .word 0x00190006
|
|
|
|
|
|
|
|
00001cf8 <USB_DEVICE_INSTANCE_CLOCK_init>:
|
|
|
|
PM->APBBMASK.reg |= 1 << peripheral;
|
|
|
|
1cf8: 2220 movs r2, #32
|
|
|
|
1cfa: 4b06 ldr r3, [pc, #24] ; (1d14 <USB_DEVICE_INSTANCE_CLOCK_init+0x1c>)
|
|
|
|
1cfc: 69d9 ldr r1, [r3, #28]
|
|
|
|
1cfe: 430a orrs r2, r1
|
|
|
|
1d00: 61da str r2, [r3, #28]
|
|
|
|
PM->AHBMASK.reg |= 1 << peripheral;
|
|
|
|
1d02: 2240 movs r2, #64 ; 0x40
|
|
|
|
1d04: 6959 ldr r1, [r3, #20]
|
|
|
|
1d06: 430a orrs r2, r1
|
|
|
|
1d08: 615a str r2, [r3, #20]
|
|
|
|
1d0a: 4b03 ldr r3, [pc, #12] ; (1d18 <USB_DEVICE_INSTANCE_CLOCK_init+0x20>)
|
|
|
|
1d0c: 4a03 ldr r2, [pc, #12] ; (1d1c <USB_DEVICE_INSTANCE_CLOCK_init+0x24>)
|
|
|
|
1d0e: 805a strh r2, [r3, #2]
|
|
|
|
{
|
|
|
|
|
|
|
|
_pm_enable_bus_clock(PM_BUS_APBB, USB);
|
|
|
|
_pm_enable_bus_clock(PM_BUS_AHB, USB);
|
|
|
|
_gclk_enable_channel(USB_GCLK_ID, CONF_GCLK_USB_SRC);
|
|
|
|
}
|
|
|
|
1d10: 4770 bx lr
|
|
|
|
1d12: 46c0 nop ; (mov r8, r8)
|
|
|
|
1d14: 40000400 .word 0x40000400
|
|
|
|
1d18: 40000c00 .word 0x40000c00
|
|
|
|
1d1c: 00004706 .word 0x00004706
|
|
|
|
|
|
|
|
00001d20 <USB_DEVICE_INSTANCE_init>:
|
|
|
|
|
|
|
|
void USB_DEVICE_INSTANCE_init(void)
|
|
|
|
{
|
|
|
|
1d20: b510 push {r4, lr}
|
|
|
|
USB_DEVICE_INSTANCE_CLOCK_init();
|
|
|
|
1d22: 4b03 ldr r3, [pc, #12] ; (1d30 <USB_DEVICE_INSTANCE_init+0x10>)
|
|
|
|
1d24: 4798 blx r3
|
|
|
|
usb_d_init();
|
|
|
|
1d26: 4b03 ldr r3, [pc, #12] ; (1d34 <USB_DEVICE_INSTANCE_init+0x14>)
|
|
|
|
1d28: 4798 blx r3
|
|
|
|
USB_DEVICE_INSTANCE_PORT_init();
|
|
|
|
1d2a: 4b03 ldr r3, [pc, #12] ; (1d38 <USB_DEVICE_INSTANCE_init+0x18>)
|
|
|
|
1d2c: 4798 blx r3
|
|
|
|
}
|
|
|
|
1d2e: bd10 pop {r4, pc}
|
|
|
|
1d30: 00001cf9 .word 0x00001cf9
|
|
|
|
1d34: 000018a1 .word 0x000018a1
|
|
|
|
1d38: 00001c91 .word 0x00001c91
|
|
|
|
|
|
|
|
00001d3c <system_init>:
|
|
|
|
|
|
|
|
void system_init(void)
|
|
|
|
{
|
|
|
|
1d3c: b510 push {r4, lr}
|
|
|
|
* Currently the following initialization functions are supported:
|
|
|
|
* - System clock initialization
|
|
|
|
*/
|
|
|
|
static inline void init_mcu(void)
|
|
|
|
{
|
|
|
|
_init_chip();
|
|
|
|
1d3e: 4b04 ldr r3, [pc, #16] ; (1d50 <system_init+0x14>)
|
|
|
|
1d40: 4798 blx r3
|
|
|
|
init_mcu();
|
|
|
|
|
|
|
|
USART_0_init();
|
|
|
|
1d42: 4b04 ldr r3, [pc, #16] ; (1d54 <system_init+0x18>)
|
|
|
|
1d44: 4798 blx r3
|
|
|
|
|
|
|
|
delay_driver_init();
|
|
|
|
1d46: 4b04 ldr r3, [pc, #16] ; (1d58 <system_init+0x1c>)
|
|
|
|
1d48: 4798 blx r3
|
|
|
|
|
|
|
|
USB_DEVICE_INSTANCE_init();
|
|
|
|
1d4a: 4b04 ldr r3, [pc, #16] ; (1d5c <system_init+0x20>)
|
|
|
|
1d4c: 4798 blx r3
|
|
|
|
}
|
|
|
|
1d4e: bd10 pop {r4, pc}
|
|
|
|
1d50: 00001359 .word 0x00001359
|
|
|
|
1d54: 00001c51 .word 0x00001c51
|
|
|
|
1d58: 00001c7d .word 0x00001c7d
|
|
|
|
1d5c: 00001d21 .word 0x00001d21
|
|
|
|
|
|
|
|
00001d60 <hri_sercomusart_wait_for_sync>:
|
|
|
|
return ((Sercom *)hw)->SPI.SYNCBUSY.reg & reg;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_wait_for_sync(const void *const hw, hri_sercomusart_syncbusy_reg_t reg)
|
|
|
|
{
|
|
|
|
while (((Sercom *)hw)->USART.SYNCBUSY.reg & reg) {
|
|
|
|
1d60: 69c3 ldr r3, [r0, #28]
|
|
|
|
1d62: 4219 tst r1, r3
|
|
|
|
1d64: d1fc bne.n 1d60 <hri_sercomusart_wait_for_sync>
|
|
|
|
};
|
|
|
|
}
|
|
|
|
1d66: 4770 bx lr
|
|
|
|
|
|
|
|
00001d68 <hri_sercomusart_clear_CTRLA_ENABLE_bit>:
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_clear_CTRLA_ENABLE_bit(const void *const hw)
|
|
|
|
{
|
|
|
|
SERCOM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE;
|
|
|
|
1d68: 2202 movs r2, #2
|
|
|
|
{
|
|
|
|
1d6a: b510 push {r4, lr}
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE;
|
|
|
|
1d6c: 6803 ldr r3, [r0, #0]
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1d6e: 2103 movs r1, #3
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE;
|
|
|
|
1d70: 4393 bics r3, r2
|
|
|
|
1d72: 6003 str r3, [r0, #0]
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1d74: 4b01 ldr r3, [pc, #4] ; (1d7c <hri_sercomusart_clear_CTRLA_ENABLE_bit+0x14>)
|
|
|
|
1d76: 4798 blx r3
|
|
|
|
SERCOM_CRITICAL_SECTION_LEAVE();
|
|
|
|
}
|
|
|
|
1d78: bd10 pop {r4, pc}
|
|
|
|
1d7a: 46c0 nop ; (mov r8, r8)
|
|
|
|
1d7c: 00001d61 .word 0x00001d61
|
|
|
|
|
|
|
|
00001d80 <_usart_init>:
|
|
|
|
{
|
|
|
|
#ifdef _UNIT_TEST_
|
|
|
|
return ((uint32_t)hw - (uint32_t)SERCOM0) / sizeof(Sercom);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return ((uint32_t)hw - (uint32_t)SERCOM0) >> 10;
|
|
|
|
1d80: 4b1b ldr r3, [pc, #108] ; (1df0 <_usart_init+0x70>)
|
|
|
|
* \param[in] hw The pointer to hardware instance
|
|
|
|
*
|
|
|
|
* \return The status of initialization
|
|
|
|
*/
|
|
|
|
static int32_t _usart_init(void *const hw)
|
|
|
|
{
|
|
|
|
1d82: b570 push {r4, r5, r6, lr}
|
|
|
|
return ((uint32_t)hw - (uint32_t)SERCOM0) >> 10;
|
|
|
|
1d84: 18c3 adds r3, r0, r3
|
|
|
|
1d86: 0a9b lsrs r3, r3, #10
|
|
|
|
if (_usarts[i].number == sercom_offset) {
|
|
|
|
1d88: b2db uxtb r3, r3
|
|
|
|
{
|
|
|
|
1d8a: 0004 movs r4, r0
|
|
|
|
if (_usarts[i].number == sercom_offset) {
|
|
|
|
1d8c: 2b03 cmp r3, #3
|
|
|
|
1d8e: d004 beq.n 1d9a <_usart_init+0x1a>
|
|
|
|
ASSERT(false);
|
|
|
|
1d90: 2000 movs r0, #0
|
|
|
|
1d92: 4a18 ldr r2, [pc, #96] ; (1df4 <_usart_init+0x74>)
|
|
|
|
1d94: 4918 ldr r1, [pc, #96] ; (1df8 <_usart_init+0x78>)
|
|
|
|
1d96: 4b19 ldr r3, [pc, #100] ; (1dfc <_usart_init+0x7c>)
|
|
|
|
1d98: 4798 blx r3
|
|
|
|
return ((Sercom *)hw)->USART.SYNCBUSY.reg & reg;
|
|
|
|
1d9a: 69e3 ldr r3, [r4, #28]
|
|
|
|
1d9c: 4d18 ldr r5, [pc, #96] ; (1e00 <_usart_init+0x80>)
|
|
|
|
uint8_t i = _get_sercom_index(hw);
|
|
|
|
|
|
|
|
if (!hri_sercomusart_is_syncing(hw, SERCOM_USART_SYNCBUSY_SWRST)) {
|
|
|
|
1d9e: 07db lsls r3, r3, #31
|
|
|
|
1da0: d411 bmi.n 1dc6 <_usart_init+0x46>
|
|
|
|
hri_sercomusart_ctrla_reg_t mask)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
tmp = ((Sercom *)hw)->USART.CTRLA.reg;
|
|
|
|
tmp &= mask;
|
|
|
|
1da2: 2602 movs r6, #2
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1da4: 2103 movs r1, #3
|
|
|
|
1da6: 0020 movs r0, r4
|
|
|
|
1da8: 47a8 blx r5
|
|
|
|
tmp = ((Sercom *)hw)->USART.CTRLA.reg;
|
|
|
|
1daa: 6823 ldr r3, [r4, #0]
|
|
|
|
uint32_t mode = _usarts[i].ctrl_a & SERCOM_USART_CTRLA_MODE_Msk;
|
|
|
|
if (hri_sercomusart_get_CTRLA_reg(hw, SERCOM_USART_CTRLA_ENABLE)) {
|
|
|
|
1dac: 4233 tst r3, r6
|
|
|
|
1dae: d005 beq.n 1dbc <_usart_init+0x3c>
|
|
|
|
hri_sercomusart_clear_CTRLA_ENABLE_bit(hw);
|
|
|
|
1db0: 0020 movs r0, r4
|
|
|
|
1db2: 4b14 ldr r3, [pc, #80] ; (1e04 <_usart_init+0x84>)
|
|
|
|
1db4: 4798 blx r3
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1db6: 0031 movs r1, r6
|
|
|
|
1db8: 0020 movs r0, r4
|
|
|
|
1dba: 47a8 blx r5
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_write_CTRLA_reg(const void *const hw, hri_sercomusart_ctrla_reg_t data)
|
|
|
|
{
|
|
|
|
SERCOM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg = data;
|
|
|
|
1dbc: 2305 movs r3, #5
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1dbe: 2103 movs r1, #3
|
|
|
|
1dc0: 0020 movs r0, r4
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg = data;
|
|
|
|
1dc2: 6023 str r3, [r4, #0]
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1dc4: 47a8 blx r5
|
|
|
|
}
|
|
|
|
hri_sercomusart_write_CTRLA_reg(hw, SERCOM_USART_CTRLA_SWRST | mode);
|
|
|
|
}
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST);
|
|
|
|
1dc6: 0020 movs r0, r4
|
|
|
|
1dc8: 2101 movs r1, #1
|
|
|
|
1dca: 47a8 blx r5
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg = data;
|
|
|
|
1dcc: 4b0e ldr r3, [pc, #56] ; (1e08 <_usart_init+0x88>)
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1dce: 0020 movs r0, r4
|
|
|
|
((Sercom *)hw)->USART.CTRLA.reg = data;
|
|
|
|
1dd0: 6023 str r3, [r4, #0]
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_SWRST | SERCOM_USART_SYNCBUSY_ENABLE);
|
|
|
|
1dd2: 2103 movs r1, #3
|
|
|
|
1dd4: 47a8 blx r5
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_write_CTRLB_reg(const void *const hw, hri_sercomusart_ctrlb_reg_t data)
|
|
|
|
{
|
|
|
|
SERCOM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sercom *)hw)->USART.CTRLB.reg = data;
|
|
|
|
1dd6: 23c0 movs r3, #192 ; 0xc0
|
|
|
|
1dd8: 029b lsls r3, r3, #10
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_MASK);
|
|
|
|
1dda: 0020 movs r0, r4
|
|
|
|
((Sercom *)hw)->USART.CTRLB.reg = data;
|
|
|
|
1ddc: 6063 str r3, [r4, #4]
|
|
|
|
hri_sercomusart_wait_for_sync(hw, SERCOM_USART_SYNCBUSY_MASK);
|
|
|
|
1dde: 2107 movs r1, #7
|
|
|
|
1de0: 47a8 blx r5
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_write_RXPL_reg(const void *const hw, hri_sercomusart_rxpl_reg_t data)
|
|
|
|
{
|
|
|
|
SERCOM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sercom *)hw)->USART.RXPL.reg = data;
|
|
|
|
1de2: 2000 movs r0, #0
|
|
|
|
((Sercom *)hw)->USART.BAUD.reg = data;
|
|
|
|
1de4: 4b09 ldr r3, [pc, #36] ; (1e0c <_usart_init+0x8c>)
|
|
|
|
1de6: 81a3 strh r3, [r4, #12]
|
|
|
|
((Sercom *)hw)->USART.RXPL.reg = data;
|
|
|
|
1de8: 73a0 strb r0, [r4, #14]
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hri_sercomusart_write_DBGCTRL_reg(const void *const hw, hri_sercomusart_dbgctrl_reg_t data)
|
|
|
|
{
|
|
|
|
SERCOM_CRITICAL_SECTION_ENTER();
|
|
|
|
((Sercom *)hw)->USART.DBGCTRL.reg = data;
|
|
|
|
1dea: 3430 adds r4, #48 ; 0x30
|
|
|
|
1dec: 7020 strb r0, [r4, #0]
|
|
|
|
|
|
|
|
hri_sercomusart_write_RXPL_reg(hw, _usarts[i].rxpl);
|
|
|
|
hri_sercomusart_write_DBGCTRL_reg(hw, _usarts[i].debug_ctrl);
|
|
|
|
|
|
|
|
return ERR_NONE;
|
|
|
|
}
|
|
|
|
1dee: bd70 pop {r4, r5, r6, pc}
|
|
|
|
1df0: bdfff800 .word 0xbdfff800
|
|
|
|
1df4: 0000023a .word 0x0000023a
|
|
|
|
1df8: 00002f00 .word 0x00002f00
|
|
|
|
1dfc: 000013e1 .word 0x000013e1
|
|
|
|
1e00: 00001d61 .word 0x00001d61
|
|
|
|
1e04: 00001d69 .word 0x00001d69
|
|
|
|
1e08: 40100004 .word 0x40100004
|
|
|
|
1e0c: ffffc504 .word 0xffffc504
|
|
|
|
|
|
|
|
00001e10 <_usart_sync_init>:
|
|
|
|
{
|
|
|
|
1e10: b570 push {r4, r5, r6, lr}
|
|
|
|
1e12: 0005 movs r5, r0
|
|
|
|
ASSERT(device);
|
|
|
|
1e14: 1e43 subs r3, r0, #1
|
|
|
|
1e16: 4198 sbcs r0, r3
|
|
|
|
{
|
|
|
|
1e18: 000c movs r4, r1
|
|
|
|
ASSERT(device);
|
|
|
|
1e1a: 22b4 movs r2, #180 ; 0xb4
|
|
|
|
1e1c: 4904 ldr r1, [pc, #16] ; (1e30 <_usart_sync_init+0x20>)
|
|
|
|
1e1e: 4b05 ldr r3, [pc, #20] ; (1e34 <_usart_sync_init+0x24>)
|
|
|
|
1e20: b2c0 uxtb r0, r0
|
|
|
|
1e22: 4798 blx r3
|
|
|
|
device->hw = hw;
|
|
|
|
1e24: 602c str r4, [r5, #0]
|
|
|
|
return _usart_init(hw);
|
|
|
|
1e26: 0020 movs r0, r4
|
|
|
|
1e28: 4b03 ldr r3, [pc, #12] ; (1e38 <_usart_sync_init+0x28>)
|
|
|
|
1e2a: 4798 blx r3
|
|
|
|
}
|
|
|
|
1e2c: bd70 pop {r4, r5, r6, pc}
|
|
|
|
1e2e: 46c0 nop ; (mov r8, r8)
|
|
|
|
1e30: 00002f00 .word 0x00002f00
|
|
|
|
1e34: 000013e1 .word 0x000013e1
|
|
|
|
1e38: 00001d81 .word 0x00001d81
|
|
|
|
|
|
|
|
00001e3c <_usart_sync_write_byte>:
|
|
|
|
hri_sercomusart_write_DATA_reg(device->hw, data);
|
|
|
|
1e3c: 6803 ldr r3, [r0, #0]
|
|
|
|
((Sercom *)hw)->USART.DATA.reg = data;
|
|
|
|
1e3e: 8519 strh r1, [r3, #40] ; 0x28
|
|
|
|
}
|
|
|
|
1e40: 4770 bx lr
|
|
|
|
|
|
|
|
00001e42 <_usart_sync_read_byte>:
|
|
|
|
return hri_sercomusart_read_DATA_reg(device->hw);
|
|
|
|
1e42: 6803 ldr r3, [r0, #0]
|
|
|
|
return ((Sercom *)hw)->USART.DATA.reg;
|
|
|
|
1e44: 8d18 ldrh r0, [r3, #40] ; 0x28
|
|
|
|
1e46: b2c0 uxtb r0, r0
|
|
|
|
}
|
|
|
|
1e48: 4770 bx lr
|
|
|
|
|
|
|
|
00001e4a <_usart_sync_is_ready_to_send>:
|
|
|
|
return hri_sercomusart_get_interrupt_DRE_bit(device->hw);
|
|
|
|
1e4a: 6803 ldr r3, [r0, #0]
|
|
|
|
return (((Sercom *)hw)->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) >> SERCOM_USART_INTFLAG_DRE_Pos;
|
|
|
|
1e4c: 7e18 ldrb r0, [r3, #24]
|
|
|
|
1e4e: 2301 movs r3, #1
|
|
|
|
1e50: 4018 ands r0, r3
|
|
|
|
}
|
|
|
|
1e52: 4770 bx lr
|
|
|
|
|
|
|
|
00001e54 <_usart_sync_is_transmit_done>:
|
|
|
|
return hri_sercomusart_get_interrupt_TXC_bit(device->hw);
|
|
|
|
1e54: 6803 ldr r3, [r0, #0]
|
|
|
|
return (((Sercom *)hw)->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) >> SERCOM_USART_INTFLAG_TXC_Pos;
|
|
|
|
1e56: 7e18 ldrb r0, [r3, #24]
|
|
|
|
1e58: 0780 lsls r0, r0, #30
|
|
|
|
1e5a: 0fc0 lsrs r0, r0, #31
|
|
|
|
}
|
|
|
|
1e5c: 4770 bx lr
|
|
|
|
|
|
|
|
00001e5e <_usart_sync_is_byte_received>:
|
|
|
|
return hri_sercomusart_get_interrupt_RXC_bit(device->hw);
|
|
|
|
1e5e: 6803 ldr r3, [r0, #0]
|
|
|
|
return (((Sercom *)hw)->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) >> SERCOM_USART_INTFLAG_RXC_Pos;
|
|
|
|
1e60: 7e18 ldrb r0, [r3, #24]
|
|
|
|
1e62: 0740 lsls r0, r0, #29
|
|
|
|
1e64: 0fc0 lsrs r0, r0, #31
|
|
|
|
}
|
|
|
|
1e66: 4770 bx lr
|
|
|
|
|
|
|
|
00001e68 <atmel_start_init>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes MCU, drivers and middleware in the project
|
|
|
|
**/
|
|
|
|
void atmel_start_init(void)
|
|
|
|
{
|
|
|
|
1e68: b510 push {r4, lr}
|
|
|
|
system_init();
|
|
|
|
1e6a: 4b02 ldr r3, [pc, #8] ; (1e74 <atmel_start_init+0xc>)
|
|
|
|
1e6c: 4798 blx r3
|
|
|
|
usb_init();
|
|
|
|
1e6e: 4b02 ldr r3, [pc, #8] ; (1e78 <atmel_start_init+0x10>)
|
|
|
|
1e70: 4798 blx r3
|
|
|
|
}
|
|
|
|
1e72: bd10 pop {r4, pc}
|
|
|
|
1e74: 00001d3d .word 0x00001d3d
|
|
|
|
1e78: 00001419 .word 0x00001419
|
|
|
|
|
|
|
|
00001e7c <usbdc_unconfig>:
|
|
|
|
/**
|
|
|
|
* \brief Unconfig, close all interfaces
|
|
|
|
*/
|
|
|
|
static void usbdc_unconfig(void)
|
|
|
|
{
|
|
|
|
struct usbdf_driver *func = (struct usbdf_driver *)usbdc.func_list.head;
|
|
|
|
1e7c: 4b06 ldr r3, [pc, #24] ; (1e98 <usbdc_unconfig+0x1c>)
|
|
|
|
{
|
|
|
|
1e7e: b510 push {r4, lr}
|
|
|
|
struct usbdf_driver *func = (struct usbdf_driver *)usbdc.func_list.head;
|
|
|
|
1e80: 691c ldr r4, [r3, #16]
|
|
|
|
while (NULL != func) {
|
|
|
|
1e82: 2c00 cmp r4, #0
|
|
|
|
1e84: d100 bne.n 1e88 <usbdc_unconfig+0xc>
|
|
|
|
func->ctrl(func, USBDF_DISABLE, NULL);
|
|
|
|
func = func->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1e86: bd10 pop {r4, pc}
|
|
|
|
func->ctrl(func, USBDF_DISABLE, NULL);
|
|
|
|
1e88: 0020 movs r0, r4
|
|
|
|
1e8a: 6863 ldr r3, [r4, #4]
|
|
|
|
1e8c: 2200 movs r2, #0
|
|
|
|
1e8e: 2101 movs r1, #1
|
|
|
|
1e90: 4798 blx r3
|
|
|
|
func = func->next;
|
|
|
|
1e92: 6824 ldr r4, [r4, #0]
|
|
|
|
1e94: e7f5 b.n 1e82 <usbdc_unconfig+0x6>
|
|
|
|
1e96: 46c0 nop ; (mov r8, r8)
|
|
|
|
1e98: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00001e9c <usbdc_change_notify>:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Invoke all registered Change notification callbacks. */
|
|
|
|
static void usbdc_change_notify(enum usbdc_change_type change, uint32_t value)
|
|
|
|
{
|
|
|
|
1e9c: b570 push {r4, r5, r6, lr}
|
|
|
|
1e9e: 0005 movs r5, r0
|
|
|
|
1ea0: 000e movs r6, r1
|
|
|
|
struct usbdc_change_handler *cg = (struct usbdc_change_handler *)usbdc.handlers.change_list.head;
|
|
|
|
1ea2: 4b06 ldr r3, [pc, #24] ; (1ebc <usbdc_change_notify+0x20>)
|
|
|
|
1ea4: 68dc ldr r4, [r3, #12]
|
|
|
|
|
|
|
|
while (cg != NULL) {
|
|
|
|
1ea6: 2c00 cmp r4, #0
|
|
|
|
1ea8: d100 bne.n 1eac <usbdc_change_notify+0x10>
|
|
|
|
if (NULL != cg->cb) {
|
|
|
|
cg->cb(change, value);
|
|
|
|
}
|
|
|
|
cg = cg->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1eaa: bd70 pop {r4, r5, r6, pc}
|
|
|
|
if (NULL != cg->cb) {
|
|
|
|
1eac: 6863 ldr r3, [r4, #4]
|
|
|
|
1eae: 2b00 cmp r3, #0
|
|
|
|
1eb0: d002 beq.n 1eb8 <usbdc_change_notify+0x1c>
|
|
|
|
cg->cb(change, value);
|
|
|
|
1eb2: 0031 movs r1, r6
|
|
|
|
1eb4: 0028 movs r0, r5
|
|
|
|
1eb6: 4798 blx r3
|
|
|
|
cg = cg->next;
|
|
|
|
1eb8: 6824 ldr r4, [r4, #0]
|
|
|
|
1eba: e7f4 b.n 1ea6 <usbdc_change_notify+0xa>
|
|
|
|
1ebc: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00001ec0 <usbdc_request_handler>:
|
|
|
|
|
|
|
|
/** Invoke all registered request callbacks until request handled. */
|
|
|
|
static int32_t usbdc_request_handler(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage)
|
|
|
|
{
|
|
|
|
1ec0: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
1ec2: 0005 movs r5, r0
|
|
|
|
1ec4: 000e movs r6, r1
|
|
|
|
1ec6: 0017 movs r7, r2
|
|
|
|
struct usbdc_req_handler *h = (struct usbdc_req_handler *)usbdc.handlers.req_list.head;
|
|
|
|
1ec8: 4b0b ldr r3, [pc, #44] ; (1ef8 <usbdc_request_handler+0x38>)
|
|
|
|
1eca: 689c ldr r4, [r3, #8]
|
|
|
|
int32_t rc;
|
|
|
|
|
|
|
|
while (h != NULL) {
|
|
|
|
1ecc: 2c00 cmp r4, #0
|
|
|
|
1ece: d101 bne.n 1ed4 <usbdc_request_handler+0x14>
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
h = h->next;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
1ed0: 0020 movs r0, r4
|
|
|
|
}
|
|
|
|
1ed2: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
if (NULL != h->cb) {
|
|
|
|
1ed4: 6863 ldr r3, [r4, #4]
|
|
|
|
1ed6: 2b00 cmp r3, #0
|
|
|
|
1ed8: d101 bne.n 1ede <usbdc_request_handler+0x1e>
|
|
|
|
h = h->next;
|
|
|
|
1eda: 6824 ldr r4, [r4, #0]
|
|
|
|
1edc: e7f6 b.n 1ecc <usbdc_request_handler+0xc>
|
|
|
|
rc = h->cb(ep, req, stage);
|
|
|
|
1ede: 003a movs r2, r7
|
|
|
|
1ee0: 0031 movs r1, r6
|
|
|
|
1ee2: 0028 movs r0, r5
|
|
|
|
1ee4: 4798 blx r3
|
|
|
|
if (0 == rc) {
|
|
|
|
1ee6: 2800 cmp r0, #0
|
|
|
|
1ee8: d004 beq.n 1ef4 <usbdc_request_handler+0x34>
|
|
|
|
} else if (ERR_NOT_FOUND != rc) {
|
|
|
|
1eea: 300a adds r0, #10
|
|
|
|
1eec: d0f5 beq.n 1eda <usbdc_request_handler+0x1a>
|
|
|
|
return -1;
|
|
|
|
1eee: 2001 movs r0, #1
|
|
|
|
1ef0: 4240 negs r0, r0
|
|
|
|
1ef2: e7ee b.n 1ed2 <usbdc_request_handler+0x12>
|
|
|
|
return true;
|
|
|
|
1ef4: 2001 movs r0, #1
|
|
|
|
1ef6: e7ec b.n 1ed2 <usbdc_request_handler+0x12>
|
|
|
|
1ef8: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00001efc <usbd_sof_cb>:
|
|
|
|
struct usbdc_sof_handler *sof = (struct usbdc_sof_handler *)usbdc.handlers.sof_list.head;
|
|
|
|
1efc: 4b05 ldr r3, [pc, #20] ; (1f14 <usbd_sof_cb+0x18>)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Callback invoked on USB device SOF
|
|
|
|
*/
|
|
|
|
static void usbd_sof_cb(void)
|
|
|
|
{
|
|
|
|
1efe: b510 push {r4, lr}
|
|
|
|
struct usbdc_sof_handler *sof = (struct usbdc_sof_handler *)usbdc.handlers.sof_list.head;
|
|
|
|
1f00: 685c ldr r4, [r3, #4]
|
|
|
|
while (sof != NULL) {
|
|
|
|
1f02: 2c00 cmp r4, #0
|
|
|
|
1f04: d100 bne.n 1f08 <usbd_sof_cb+0xc>
|
|
|
|
usbdc_sof_notify();
|
|
|
|
}
|
|
|
|
1f06: bd10 pop {r4, pc}
|
|
|
|
if (NULL != sof->cb) {
|
|
|
|
1f08: 6863 ldr r3, [r4, #4]
|
|
|
|
1f0a: 2b00 cmp r3, #0
|
|
|
|
1f0c: d000 beq.n 1f10 <usbd_sof_cb+0x14>
|
|
|
|
sof->cb();
|
|
|
|
1f0e: 4798 blx r3
|
|
|
|
sof = sof->next;
|
|
|
|
1f10: 6824 ldr r4, [r4, #0]
|
|
|
|
1f12: e7f6 b.n 1f02 <usbd_sof_cb+0x6>
|
|
|
|
1f14: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00001f18 <usbdc_cb_ctl_done>:
|
|
|
|
* \return Data has error or not.
|
|
|
|
* \retval true There is data error, protocol error.
|
|
|
|
* \retval false There is no data error.
|
|
|
|
*/
|
|
|
|
static bool usbdc_cb_ctl_done(const uint8_t ep, const enum usb_xfer_code code, struct usb_req *req)
|
|
|
|
{
|
|
|
|
1f18: b510 push {r4, lr}
|
|
|
|
1f1a: 0014 movs r4, r2
|
|
|
|
(void)ep;
|
|
|
|
|
|
|
|
switch (code) {
|
|
|
|
1f1c: 2900 cmp r1, #0
|
|
|
|
1f1e: d003 beq.n 1f28 <usbdc_cb_ctl_done+0x10>
|
|
|
|
1f20: 2901 cmp r1, #1
|
|
|
|
1f22: d023 beq.n 1f6c <usbdc_cb_ctl_done+0x54>
|
|
|
|
return usbdc_ctrl_data_end(req);
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
1f24: 2000 movs r0, #0
|
|
|
|
1f26: bd10 pop {r4, pc}
|
|
|
|
if (req->bmRequestType != USB_REQT_TYPE_STANDARD) {
|
|
|
|
1f28: 7813 ldrb r3, [r2, #0]
|
|
|
|
1f2a: 2b00 cmp r3, #0
|
|
|
|
1f2c: d1fa bne.n 1f24 <usbdc_cb_ctl_done+0xc>
|
|
|
|
switch (req->bRequest) {
|
|
|
|
1f2e: 7853 ldrb r3, [r2, #1]
|
|
|
|
1f30: 2b05 cmp r3, #5
|
|
|
|
1f32: d00f beq.n 1f54 <usbdc_cb_ctl_done+0x3c>
|
|
|
|
1f34: 2b09 cmp r3, #9
|
|
|
|
1f36: d1f5 bne.n 1f24 <usbdc_cb_ctl_done+0xc>
|
|
|
|
usbdc.cfg_value = req->wValue;
|
|
|
|
1f38: 78e1 ldrb r1, [r4, #3]
|
|
|
|
1f3a: 7892 ldrb r2, [r2, #2]
|
|
|
|
1f3c: 4b0e ldr r3, [pc, #56] ; (1f78 <usbdc_cb_ctl_done+0x60>)
|
|
|
|
1f3e: 0209 lsls r1, r1, #8
|
|
|
|
1f40: 4311 orrs r1, r2
|
|
|
|
1f42: 76d9 strb r1, [r3, #27]
|
|
|
|
usbdc.state = req->wValue ? USBD_S_CONFIG : USBD_S_ADDRESS;
|
|
|
|
1f44: 1e4a subs r2, r1, #1
|
|
|
|
1f46: 4191 sbcs r1, r2
|
|
|
|
1f48: 3103 adds r1, #3
|
|
|
|
usbdc.state = req->wValue ? USBD_S_ADDRESS : USBD_S_DEFAULT;
|
|
|
|
1f4a: 7699 strb r1, [r3, #26]
|
|
|
|
usbdc_change_notify(USBDC_C_STATE, usbdc.state);
|
|
|
|
1f4c: 2001 movs r0, #1
|
|
|
|
1f4e: 4b0b ldr r3, [pc, #44] ; (1f7c <usbdc_cb_ctl_done+0x64>)
|
|
|
|
1f50: 4798 blx r3
|
|
|
|
break;
|
|
|
|
1f52: e7e7 b.n 1f24 <usbdc_cb_ctl_done+0xc>
|
|
|
|
usb_d_set_address(addr);
|
|
|
|
1f54: 4b0a ldr r3, [pc, #40] ; (1f80 <usbdc_cb_ctl_done+0x68>)
|
|
|
|
1f56: 7890 ldrb r0, [r2, #2]
|
|
|
|
1f58: 4798 blx r3
|
|
|
|
usbdc.state = req->wValue ? USBD_S_ADDRESS : USBD_S_DEFAULT;
|
|
|
|
1f5a: 78e1 ldrb r1, [r4, #3]
|
|
|
|
1f5c: 78a2 ldrb r2, [r4, #2]
|
|
|
|
1f5e: 0209 lsls r1, r1, #8
|
|
|
|
1f60: 4311 orrs r1, r2
|
|
|
|
1f62: 1e4b subs r3, r1, #1
|
|
|
|
1f64: 4199 sbcs r1, r3
|
|
|
|
1f66: 4b04 ldr r3, [pc, #16] ; (1f78 <usbdc_cb_ctl_done+0x60>)
|
|
|
|
1f68: 3102 adds r1, #2
|
|
|
|
1f6a: e7ee b.n 1f4a <usbdc_cb_ctl_done+0x32>
|
|
|
|
usbdc_request_handler(0, req, USB_DATA_STAGE);
|
|
|
|
1f6c: 000a movs r2, r1
|
|
|
|
1f6e: 4b05 ldr r3, [pc, #20] ; (1f84 <usbdc_cb_ctl_done+0x6c>)
|
|
|
|
1f70: 0021 movs r1, r4
|
|
|
|
1f72: 2000 movs r0, #0
|
|
|
|
1f74: 4798 blx r3
|
|
|
|
return usbdc_ctrl_data_end(req);
|
|
|
|
1f76: e7d5 b.n 1f24 <usbdc_cb_ctl_done+0xc>
|
|
|
|
1f78: 20000650 .word 0x20000650
|
|
|
|
1f7c: 00001e9d .word 0x00001e9d
|
|
|
|
1f80: 00001931 .word 0x00001931
|
|
|
|
1f84: 00001ec1 .word 0x00001ec1
|
|
|
|
|
|
|
|
00001f88 <usbdc_reset>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief USB Device Core Reset
|
|
|
|
*/
|
|
|
|
void usbdc_reset(void)
|
|
|
|
{
|
|
|
|
1f88: b570 push {r4, r5, r6, lr}
|
|
|
|
usbdc_unconfig();
|
|
|
|
|
|
|
|
usbdc.state = USBD_S_DEFAULT;
|
|
|
|
usbdc.cfg_value = 0;
|
|
|
|
usbdc.ifc_alt_map = 0;
|
|
|
|
1f8a: 2400 movs r4, #0
|
|
|
|
usbdc.state = USBD_S_DEFAULT;
|
|
|
|
1f8c: 2602 movs r6, #2
|
|
|
|
usbdc_unconfig();
|
|
|
|
1f8e: 4b0c ldr r3, [pc, #48] ; (1fc0 <usbdc_reset+0x38>)
|
|
|
|
1f90: 4798 blx r3
|
|
|
|
usbdc.state = USBD_S_DEFAULT;
|
|
|
|
1f92: 4d0c ldr r5, [pc, #48] ; (1fc4 <usbdc_reset+0x3c>)
|
|
|
|
|
|
|
|
// Setup EP0
|
|
|
|
usb_d_ep_deinit(0);
|
|
|
|
1f94: 0020 movs r0, r4
|
|
|
|
usbdc.state = USBD_S_DEFAULT;
|
|
|
|
1f96: 836e strh r6, [r5, #26]
|
|
|
|
usb_d_ep_deinit(0);
|
|
|
|
1f98: 4b0b ldr r3, [pc, #44] ; (1fc8 <usbdc_reset+0x40>)
|
|
|
|
usbdc.ifc_alt_map = 0;
|
|
|
|
1f9a: 776c strb r4, [r5, #29]
|
|
|
|
usb_d_ep_deinit(0);
|
|
|
|
1f9c: 4798 blx r3
|
|
|
|
usb_d_ep0_init(usbdc.ctrl_size);
|
|
|
|
1f9e: 4b0b ldr r3, [pc, #44] ; (1fcc <usbdc_reset+0x44>)
|
|
|
|
1fa0: 7f28 ldrb r0, [r5, #28]
|
|
|
|
1fa2: 4798 blx r3
|
|
|
|
usb_d_ep_register_callback(0, USB_D_EP_CB_SETUP, (FUNC_PTR)usbdc_cb_ctl_req);
|
|
|
|
1fa4: 4d0a ldr r5, [pc, #40] ; (1fd0 <usbdc_reset+0x48>)
|
|
|
|
1fa6: 0021 movs r1, r4
|
|
|
|
1fa8: 0020 movs r0, r4
|
|
|
|
1faa: 4a0a ldr r2, [pc, #40] ; (1fd4 <usbdc_reset+0x4c>)
|
|
|
|
1fac: 47a8 blx r5
|
|
|
|
usb_d_ep_register_callback(0, USB_D_EP_CB_XFER, (FUNC_PTR)usbdc_cb_ctl_done);
|
|
|
|
1fae: 0031 movs r1, r6
|
|
|
|
1fb0: 0020 movs r0, r4
|
|
|
|
1fb2: 4a09 ldr r2, [pc, #36] ; (1fd8 <usbdc_reset+0x50>)
|
|
|
|
1fb4: 47a8 blx r5
|
|
|
|
usb_d_ep_enable(0);
|
|
|
|
1fb6: 0020 movs r0, r4
|
|
|
|
1fb8: 4b08 ldr r3, [pc, #32] ; (1fdc <usbdc_reset+0x54>)
|
|
|
|
1fba: 4798 blx r3
|
|
|
|
}
|
|
|
|
1fbc: bd70 pop {r4, r5, r6, pc}
|
|
|
|
1fbe: 46c0 nop ; (mov r8, r8)
|
|
|
|
1fc0: 00001e7d .word 0x00001e7d
|
|
|
|
1fc4: 20000650 .word 0x20000650
|
|
|
|
1fc8: 000019a1 .word 0x000019a1
|
|
|
|
1fcc: 0000198d .word 0x0000198d
|
|
|
|
1fd0: 00001b61 .word 0x00001b61
|
|
|
|
1fd4: 0000201d .word 0x0000201d
|
|
|
|
1fd8: 00001f19 .word 0x00001f19
|
|
|
|
1fdc: 000019cd .word 0x000019cd
|
|
|
|
|
|
|
|
00001fe0 <usbd_event_cb>:
|
|
|
|
* \brief Callback invoked on USB device events
|
|
|
|
* \param[in] ev Event code.
|
|
|
|
* \param[in] param Event parameter for event handling.
|
|
|
|
*/
|
|
|
|
static void usbd_event_cb(const enum usb_event ev, const uint32_t param)
|
|
|
|
{
|
|
|
|
1fe0: b510 push {r4, lr}
|
|
|
|
(void)param;
|
|
|
|
|
|
|
|
switch (ev) {
|
|
|
|
1fe2: 2800 cmp r0, #0
|
|
|
|
1fe4: d002 beq.n 1fec <usbd_event_cb+0xc>
|
|
|
|
1fe6: 2801 cmp r0, #1
|
|
|
|
1fe8: d003 beq.n 1ff2 <usbd_event_cb+0x12>
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
1fea: bd10 pop {r4, pc}
|
|
|
|
usbdc_change_notify(USBDC_C_CONN, param);
|
|
|
|
1fec: 4b02 ldr r3, [pc, #8] ; (1ff8 <usbd_event_cb+0x18>)
|
|
|
|
1fee: 4798 blx r3
|
|
|
|
break;
|
|
|
|
1ff0: e7fb b.n 1fea <usbd_event_cb+0xa>
|
|
|
|
usbdc_reset();
|
|
|
|
1ff2: 4b02 ldr r3, [pc, #8] ; (1ffc <usbd_event_cb+0x1c>)
|
|
|
|
1ff4: 4798 blx r3
|
|
|
|
}
|
|
|
|
1ff6: e7f8 b.n 1fea <usbd_event_cb+0xa>
|
|
|
|
1ff8: 00001e9d .word 0x00001e9d
|
|
|
|
1ffc: 00001f89 .word 0x00001f89
|
|
|
|
|
|
|
|
00002000 <usbdc_xfer>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Issue USB device transfer
|
|
|
|
*/
|
|
|
|
int32_t usbdc_xfer(uint8_t ep, uint8_t *buf, uint32_t size, bool zlp)
|
|
|
|
{
|
|
|
|
2000: b51f push {r0, r1, r2, r3, r4, lr}
|
|
|
|
struct usb_d_transfer xfer = {(uint8_t *)buf, size, ep, zlp};
|
|
|
|
2002: 9202 str r2, [sp, #8]
|
|
|
|
2004: 466a mov r2, sp
|
|
|
|
2006: 7310 strb r0, [r2, #12]
|
|
|
|
2008: 7353 strb r3, [r2, #13]
|
|
|
|
return usb_d_ep_transfer(&xfer);
|
|
|
|
200a: a801 add r0, sp, #4
|
|
|
|
200c: 4b02 ldr r3, [pc, #8] ; (2018 <usbdc_xfer+0x18>)
|
|
|
|
struct usb_d_transfer xfer = {(uint8_t *)buf, size, ep, zlp};
|
|
|
|
200e: 9101 str r1, [sp, #4]
|
|
|
|
return usb_d_ep_transfer(&xfer);
|
|
|
|
2010: 4798 blx r3
|
|
|
|
}
|
|
|
|
2012: b005 add sp, #20
|
|
|
|
2014: bd00 pop {pc}
|
|
|
|
2016: 46c0 nop ; (mov r8, r8)
|
|
|
|
2018: 00001a0d .word 0x00001a0d
|
|
|
|
|
|
|
|
0000201c <usbdc_cb_ctl_req>:
|
|
|
|
{
|
|
|
|
201c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
switch (usbdc_request_handler(ep, req, USB_SETUP_STAGE)) {
|
|
|
|
201e: 4bb7 ldr r3, [pc, #732] ; (22fc <usbdc_cb_ctl_req+0x2e0>)
|
|
|
|
2020: 2200 movs r2, #0
|
|
|
|
{
|
|
|
|
2022: 0004 movs r4, r0
|
|
|
|
2024: 000d movs r5, r1
|
|
|
|
switch (usbdc_request_handler(ep, req, USB_SETUP_STAGE)) {
|
|
|
|
2026: 4798 blx r3
|
|
|
|
2028: 0003 movs r3, r0
|
|
|
|
return false;
|
|
|
|
202a: 2000 movs r0, #0
|
|
|
|
switch (usbdc_request_handler(ep, req, USB_SETUP_STAGE)) {
|
|
|
|
202c: 1c5a adds r2, r3, #1
|
|
|
|
202e: d100 bne.n 2032 <usbdc_cb_ctl_req+0x16>
|
|
|
|
2030: e0c1 b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
2032: 3001 adds r0, #1
|
|
|
|
2034: 4283 cmp r3, r0
|
|
|
|
2036: d100 bne.n 203a <usbdc_cb_ctl_req+0x1e>
|
|
|
|
2038: e0bd b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
switch (req->bmRequestType & (USB_REQT_TYPE_MASK | USB_REQT_DIR_IN)) {
|
|
|
|
203a: 782b ldrb r3, [r5, #0]
|
|
|
|
203c: 221f movs r2, #31
|
|
|
|
203e: 0019 movs r1, r3
|
|
|
|
2040: 4391 bics r1, r2
|
|
|
|
2042: d004 beq.n 204e <usbdc_cb_ctl_req+0x32>
|
|
|
|
2044: 2980 cmp r1, #128 ; 0x80
|
|
|
|
2046: d100 bne.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
2048: e0b6 b.n 21b8 <usbdc_cb_ctl_req+0x19c>
|
|
|
|
switch (req->bRequest) {
|
|
|
|
204a: 2000 movs r0, #0
|
|
|
|
204c: e0b3 b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
switch (req->bRequest) {
|
|
|
|
204e: 7868 ldrb r0, [r5, #1]
|
|
|
|
2050: 3801 subs r0, #1
|
|
|
|
2052: 280a cmp r0, #10
|
|
|
|
2054: d8f9 bhi.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
2056: f000 fa57 bl 2508 <__gnu_thumb1_case_sqi>
|
|
|
|
205a: f846 .short 0xf846
|
|
|
|
205c: f80bf856 .word 0xf80bf856
|
|
|
|
2060: f806f8f8 .word 0xf806f8f8
|
|
|
|
2064: 60 .byte 0x60
|
|
|
|
2065: 00 .byte 0x00
|
|
|
|
if (!usbdc_set_config(req->wValue)) {
|
|
|
|
2066: 78aa ldrb r2, [r5, #2]
|
|
|
|
if (cfg_value == 0) {
|
|
|
|
2068: 2a00 cmp r2, #0
|
|
|
|
206a: d10b bne.n 2084 <usbdc_cb_ctl_req+0x68>
|
|
|
|
usbdc_unconfig();
|
|
|
|
206c: 4ba4 ldr r3, [pc, #656] ; (2300 <usbdc_cb_ctl_req+0x2e4>)
|
|
|
|
206e: 4798 blx r3
|
|
|
|
return (ERR_NONE == usbdc_xfer(ep, NULL, 0, true));
|
|
|
|
2070: 2200 movs r2, #0
|
|
|
|
2072: 2301 movs r3, #1
|
|
|
|
2074: 0011 movs r1, r2
|
|
|
|
if (ERR_NONE != usbdc_xfer(ep, str_desc, length, need_zlp)) {
|
|
|
|
2076: 0020 movs r0, r4
|
|
|
|
2078: 4ca2 ldr r4, [pc, #648] ; (2304 <usbdc_cb_ctl_req+0x2e8>)
|
|
|
|
207a: 47a0 blx r4
|
|
|
|
207c: 4243 negs r3, r0
|
|
|
|
207e: 4158 adcs r0, r3
|
|
|
|
2080: b2c0 uxtb r0, r0
|
|
|
|
2082: e098 b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
cfg_desc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, cfg_value);
|
|
|
|
2084: 4da0 ldr r5, [pc, #640] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
2086: 682b ldr r3, [r5, #0]
|
|
|
|
2088: cb03 ldmia r3!, {r0, r1}
|
|
|
|
208a: 4ba0 ldr r3, [pc, #640] ; (230c <usbdc_cb_ctl_req+0x2f0>)
|
|
|
|
208c: 4798 blx r3
|
|
|
|
if (NULL == cfg_desc) {
|
|
|
|
208e: 2800 cmp r0, #0
|
|
|
|
2090: d100 bne.n 2094 <usbdc_cb_ctl_req+0x78>
|
|
|
|
2092: e090 b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
return (ptr[0] + (ptr[1] << 8));
|
|
|
|
2094: 78c3 ldrb r3, [r0, #3]
|
|
|
|
2096: 7881 ldrb r1, [r0, #2]
|
|
|
|
2098: 021b lsls r3, r3, #8
|
|
|
|
209a: 18c9 adds r1, r1, r3
|
|
|
|
desc.eod = cfg_desc + total_len;
|
|
|
|
209c: b289 uxth r1, r1
|
|
|
|
209e: 1841 adds r1, r0, r1
|
|
|
|
desc.sod = usb_find_desc(cfg_desc, desc.eod, USB_DT_INTERFACE);
|
|
|
|
20a0: 2204 movs r2, #4
|
|
|
|
20a2: 4b9b ldr r3, [pc, #620] ; (2310 <usbdc_cb_ctl_req+0x2f4>)
|
|
|
|
desc.eod = cfg_desc + total_len;
|
|
|
|
20a4: 9101 str r1, [sp, #4]
|
|
|
|
desc.sod = usb_find_desc(cfg_desc, desc.eod, USB_DT_INTERFACE);
|
|
|
|
20a6: 4798 blx r3
|
|
|
|
uint8_t last_iface = 0xFF;
|
|
|
|
20a8: 22ff movs r2, #255 ; 0xff
|
|
|
|
desc.sod = usb_find_desc(cfg_desc, desc.eod, USB_DT_INTERFACE);
|
|
|
|
20aa: 9000 str r0, [sp, #0]
|
|
|
|
while (NULL != desc.sod) {
|
|
|
|
20ac: 9b00 ldr r3, [sp, #0]
|
|
|
|
20ae: 2b00 cmp r3, #0
|
|
|
|
20b0: d0de beq.n 2070 <usbdc_cb_ctl_req+0x54>
|
|
|
|
if (last_iface != desc.sod[2] /* bInterfaceNumber */) {
|
|
|
|
20b2: 789e ldrb r6, [r3, #2]
|
|
|
|
20b4: 4296 cmp r6, r2
|
|
|
|
20b6: d002 beq.n 20be <usbdc_cb_ctl_req+0xa2>
|
|
|
|
func = (struct usbdf_driver *)usbdc.func_list.head;
|
|
|
|
20b8: 692f ldr r7, [r5, #16]
|
|
|
|
while (NULL != func) {
|
|
|
|
20ba: 2f00 cmp r7, #0
|
|
|
|
20bc: d10a bne.n 20d4 <usbdc_cb_ctl_req+0xb8>
|
|
|
|
desc.sod = usb_desc_next(desc.sod);
|
|
|
|
20be: 9800 ldr r0, [sp, #0]
|
|
|
|
desc.sod = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE);
|
|
|
|
20c0: 2204 movs r2, #4
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
20c2: 7803 ldrb r3, [r0, #0]
|
|
|
|
20c4: 9901 ldr r1, [sp, #4]
|
|
|
|
20c6: 18c0 adds r0, r0, r3
|
|
|
|
desc.sod = usb_desc_next(desc.sod);
|
|
|
|
20c8: 9000 str r0, [sp, #0]
|
|
|
|
desc.sod = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE);
|
|
|
|
20ca: 4b91 ldr r3, [pc, #580] ; (2310 <usbdc_cb_ctl_req+0x2f4>)
|
|
|
|
20cc: 4798 blx r3
|
|
|
|
20ce: 0032 movs r2, r6
|
|
|
|
20d0: 9000 str r0, [sp, #0]
|
|
|
|
20d2: e7eb b.n 20ac <usbdc_cb_ctl_req+0x90>
|
|
|
|
if (func->ctrl(func, USBDF_ENABLE, &desc)) {
|
|
|
|
20d4: 466a mov r2, sp
|
|
|
|
20d6: 2100 movs r1, #0
|
|
|
|
20d8: 0038 movs r0, r7
|
|
|
|
20da: 687b ldr r3, [r7, #4]
|
|
|
|
20dc: 4798 blx r3
|
|
|
|
20de: 2800 cmp r0, #0
|
|
|
|
20e0: d0ed beq.n 20be <usbdc_cb_ctl_req+0xa2>
|
|
|
|
func = func->next;
|
|
|
|
20e2: 683f ldr r7, [r7, #0]
|
|
|
|
20e4: e7e9 b.n 20ba <usbdc_cb_ctl_req+0x9e>
|
|
|
|
switch (req->bmRequestType & USB_REQT_RECIP_MASK) {
|
|
|
|
20e6: 2b02 cmp r3, #2
|
|
|
|
20e8: d1af bne.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (req->wLength != 0) {
|
|
|
|
20ea: 79ee ldrb r6, [r5, #7]
|
|
|
|
20ec: 79ab ldrb r3, [r5, #6]
|
|
|
|
20ee: 0236 lsls r6, r6, #8
|
|
|
|
20f0: 431e orrs r6, r3
|
|
|
|
20f2: d1aa bne.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
usb_d_ep_halt(req->wIndex & 0xFF, USB_EP_HALT_CLR);
|
|
|
|
20f4: 0031 movs r1, r6
|
|
|
|
20f6: 7928 ldrb r0, [r5, #4]
|
|
|
|
usb_d_ep_halt(req->wIndex & 0xFF, USB_EP_HALT_SET);
|
|
|
|
20f8: 4b86 ldr r3, [pc, #536] ; (2314 <usbdc_cb_ctl_req+0x2f8>)
|
|
|
|
20fa: 4798 blx r3
|
|
|
|
usbdc_xfer(ep, NULL, 0, true);
|
|
|
|
20fc: 2301 movs r3, #1
|
|
|
|
20fe: 0032 movs r2, r6
|
|
|
|
2100: 0031 movs r1, r6
|
|
|
|
usbdc_xfer(ep, usbdc.ctrl_buf, 1, false);
|
|
|
|
2102: 0020 movs r0, r4
|
|
|
|
2104: e054 b.n 21b0 <usbdc_cb_ctl_req+0x194>
|
|
|
|
switch (req->bmRequestType & USB_REQT_RECIP_MASK) {
|
|
|
|
2106: 2b02 cmp r3, #2
|
|
|
|
2108: d19f bne.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (req->wLength != 0) {
|
|
|
|
210a: 79eb ldrb r3, [r5, #7]
|
|
|
|
210c: 79ae ldrb r6, [r5, #6]
|
|
|
|
210e: 021b lsls r3, r3, #8
|
|
|
|
2110: 431e orrs r6, r3
|
|
|
|
2112: d19a bne.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
usb_d_ep_halt(req->wIndex & 0xFF, USB_EP_HALT_SET);
|
|
|
|
2114: 2101 movs r1, #1
|
|
|
|
2116: 7928 ldrb r0, [r5, #4]
|
|
|
|
2118: e7ee b.n 20f8 <usbdc_cb_ctl_req+0xdc>
|
|
|
|
return usbdc_set_interface(req->wValue, req->wIndex);
|
|
|
|
211a: 78ec ldrb r4, [r5, #3]
|
|
|
|
211c: 78ab ldrb r3, [r5, #2]
|
|
|
|
211e: 0224 lsls r4, r4, #8
|
|
|
|
2120: 431c orrs r4, r3
|
|
|
|
2122: 792b ldrb r3, [r5, #4]
|
|
|
|
2124: 796d ldrb r5, [r5, #5]
|
|
|
|
ifc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, usbdc.cfg_value);
|
|
|
|
2126: 4e78 ldr r6, [pc, #480] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
return usbdc_set_interface(req->wValue, req->wIndex);
|
|
|
|
2128: 022d lsls r5, r5, #8
|
|
|
|
212a: 431d orrs r5, r3
|
|
|
|
ifc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, usbdc.cfg_value);
|
|
|
|
212c: 6833 ldr r3, [r6, #0]
|
|
|
|
212e: 7ef2 ldrb r2, [r6, #27]
|
|
|
|
2130: cb03 ldmia r3!, {r0, r1}
|
|
|
|
2132: 4b76 ldr r3, [pc, #472] ; (230c <usbdc_cb_ctl_req+0x2f0>)
|
|
|
|
2134: 4798 blx r3
|
|
|
|
if (NULL == ifc) {
|
|
|
|
2136: 2800 cmp r0, #0
|
|
|
|
2138: d087 beq.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (NULL == (ifc = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE))) {
|
|
|
|
213a: 2204 movs r2, #4
|
|
|
|
desc.sod = ifc;
|
|
|
|
213c: 9000 str r0, [sp, #0]
|
|
|
|
return (ptr[0] + (ptr[1] << 8));
|
|
|
|
213e: 78c3 ldrb r3, [r0, #3]
|
|
|
|
2140: 7881 ldrb r1, [r0, #2]
|
|
|
|
2142: 021b lsls r3, r3, #8
|
|
|
|
2144: 18c9 adds r1, r1, r3
|
|
|
|
desc.eod = ifc + usb_cfg_desc_total_len(ifc);
|
|
|
|
2146: b289 uxth r1, r1
|
|
|
|
2148: 1841 adds r1, r0, r1
|
|
|
|
if (NULL == (ifc = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE))) {
|
|
|
|
214a: 4f71 ldr r7, [pc, #452] ; (2310 <usbdc_cb_ctl_req+0x2f4>)
|
|
|
|
desc.eod = ifc + usb_cfg_desc_total_len(ifc);
|
|
|
|
214c: 9101 str r1, [sp, #4]
|
|
|
|
ifc = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE);
|
|
|
|
214e: 47b8 blx r7
|
|
|
|
if (NULL == ifc) {
|
|
|
|
2150: 2800 cmp r0, #0
|
|
|
|
2152: d100 bne.n 2156 <usbdc_cb_ctl_req+0x13a>
|
|
|
|
2154: e779 b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
while (ifc[2] != ifc_id || ifc[3] != alt_set) {
|
|
|
|
2156: 7883 ldrb r3, [r0, #2]
|
|
|
|
2158: 42ab cmp r3, r5
|
|
|
|
215a: d110 bne.n 217e <usbdc_cb_ctl_req+0x162>
|
|
|
|
215c: 78c3 ldrb r3, [r0, #3]
|
|
|
|
215e: 42a3 cmp r3, r4
|
|
|
|
2160: d10d bne.n 217e <usbdc_cb_ctl_req+0x162>
|
|
|
|
func = (struct usbdf_driver *)usbdc.func_list.head;
|
|
|
|
2162: 6937 ldr r7, [r6, #16]
|
|
|
|
desc.sod = ifc;
|
|
|
|
2164: 9000 str r0, [sp, #0]
|
|
|
|
while (NULL != func) {
|
|
|
|
2166: 2f00 cmp r7, #0
|
|
|
|
2168: d100 bne.n 216c <usbdc_cb_ctl_req+0x150>
|
|
|
|
216a: e76e b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (func->ctrl(func, USBDF_DISABLE, &desc)) {
|
|
|
|
216c: 2101 movs r1, #1
|
|
|
|
216e: 466a mov r2, sp
|
|
|
|
2170: 0038 movs r0, r7
|
|
|
|
2172: 687b ldr r3, [r7, #4]
|
|
|
|
2174: 4798 blx r3
|
|
|
|
2176: 1e01 subs r1, r0, #0
|
|
|
|
2178: d008 beq.n 218c <usbdc_cb_ctl_req+0x170>
|
|
|
|
func = func->next;
|
|
|
|
217a: 683f ldr r7, [r7, #0]
|
|
|
|
217c: e7f3 b.n 2166 <usbdc_cb_ctl_req+0x14a>
|
|
|
|
desc.sod = usb_desc_next(desc.sod);
|
|
|
|
217e: 9800 ldr r0, [sp, #0]
|
|
|
|
ifc = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE);
|
|
|
|
2180: 2204 movs r2, #4
|
|
|
|
return (desc + usb_desc_len(desc));
|
|
|
|
2182: 7803 ldrb r3, [r0, #0]
|
|
|
|
2184: 9901 ldr r1, [sp, #4]
|
|
|
|
2186: 18c0 adds r0, r0, r3
|
|
|
|
desc.sod = usb_desc_next(desc.sod);
|
|
|
|
2188: 9000 str r0, [sp, #0]
|
|
|
|
ifc = usb_find_desc(desc.sod, desc.eod, USB_DT_INTERFACE);
|
|
|
|
218a: e7e0 b.n 214e <usbdc_cb_ctl_req+0x132>
|
|
|
|
} else if (ERR_NONE == func->ctrl(func, USBDF_ENABLE, &desc)) {
|
|
|
|
218c: 466a mov r2, sp
|
|
|
|
218e: 0038 movs r0, r7
|
|
|
|
2190: 687b ldr r3, [r7, #4]
|
|
|
|
2192: 4798 blx r3
|
|
|
|
2194: 2800 cmp r0, #0
|
|
|
|
2196: d000 beq.n 219a <usbdc_cb_ctl_req+0x17e>
|
|
|
|
2198: e757 b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (alt_set) {
|
|
|
|
219a: 2c00 cmp r4, #0
|
|
|
|
219c: d004 beq.n 21a8 <usbdc_cb_ctl_req+0x18c>
|
|
|
|
usbdc.ifc_alt_map |= 1 << ifc_id;
|
|
|
|
219e: 2201 movs r2, #1
|
|
|
|
21a0: 40aa lsls r2, r5
|
|
|
|
21a2: 7f73 ldrb r3, [r6, #29]
|
|
|
|
21a4: 4313 orrs r3, r2
|
|
|
|
21a6: 7773 strb r3, [r6, #29]
|
|
|
|
usbdc_xfer(0, NULL, 0, 0);
|
|
|
|
21a8: 2300 movs r3, #0
|
|
|
|
21aa: 001a movs r2, r3
|
|
|
|
21ac: 0019 movs r1, r3
|
|
|
|
21ae: 0018 movs r0, r3
|
|
|
|
21b0: 4c54 ldr r4, [pc, #336] ; (2304 <usbdc_cb_ctl_req+0x2e8>)
|
|
|
|
21b2: 47a0 blx r4
|
|
|
|
return true;
|
|
|
|
21b4: 2001 movs r0, #1
|
|
|
|
}
|
|
|
|
21b6: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
switch (req->bRequest) {
|
|
|
|
21b8: 7868 ldrb r0, [r5, #1]
|
|
|
|
21ba: 280a cmp r0, #10
|
|
|
|
21bc: d900 bls.n 21c0 <usbdc_cb_ctl_req+0x1a4>
|
|
|
|
21be: e744 b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
21c0: f000 f9b6 bl 2530 <__gnu_thumb1_case_shi>
|
|
|
|
21c4: ff430062 .word 0xff430062
|
|
|
|
21c8: ff43ff43 .word 0xff43ff43
|
|
|
|
21cc: ff43ff43 .word 0xff43ff43
|
|
|
|
21d0: ff43000b .word 0xff43000b
|
|
|
|
21d4: ff43005a .word 0xff43005a
|
|
|
|
21d8: 0083 .short 0x0083
|
|
|
|
uint8_t type = (uint8_t)(req->wValue >> 8);
|
|
|
|
21da: 78e9 ldrb r1, [r5, #3]
|
|
|
|
21dc: 78ab ldrb r3, [r5, #2]
|
|
|
|
21de: 0209 lsls r1, r1, #8
|
|
|
|
21e0: 430b orrs r3, r1
|
|
|
|
21e2: 0a09 lsrs r1, r1, #8
|
|
|
|
21e4: b2ca uxtb r2, r1
|
|
|
|
switch (type) {
|
|
|
|
21e6: 2902 cmp r1, #2
|
|
|
|
21e8: d017 beq.n 221a <usbdc_cb_ctl_req+0x1fe>
|
|
|
|
21ea: 2a03 cmp r2, #3
|
|
|
|
21ec: d034 beq.n 2258 <usbdc_cb_ctl_req+0x23c>
|
|
|
|
21ee: 2000 movs r0, #0
|
|
|
|
21f0: 2a01 cmp r2, #1
|
|
|
|
21f2: d1e0 bne.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
uint16_t length = req->wLength;
|
|
|
|
21f4: 79ab ldrb r3, [r5, #6]
|
|
|
|
21f6: 79ed ldrb r5, [r5, #7]
|
|
|
|
21f8: 022d lsls r5, r5, #8
|
|
|
|
21fa: 431d orrs r5, r3
|
|
|
|
dev_desc = usb_find_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, USB_DT_DEVICE);
|
|
|
|
21fc: 4b42 ldr r3, [pc, #264] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
21fe: 681b ldr r3, [r3, #0]
|
|
|
|
2200: cb03 ldmia r3!, {r0, r1}
|
|
|
|
2202: 4b43 ldr r3, [pc, #268] ; (2310 <usbdc_cb_ctl_req+0x2f4>)
|
|
|
|
2204: 4798 blx r3
|
|
|
|
2206: 1e01 subs r1, r0, #0
|
|
|
|
if (!dev_desc) {
|
|
|
|
2208: d100 bne.n 220c <usbdc_cb_ctl_req+0x1f0>
|
|
|
|
220a: e71e b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (ERR_NONE != usbdc_xfer(ep, dev_desc, length, false)) {
|
|
|
|
220c: 1c2a adds r2, r5, #0
|
|
|
|
220e: 2d12 cmp r5, #18
|
|
|
|
2210: d900 bls.n 2214 <usbdc_cb_ctl_req+0x1f8>
|
|
|
|
2212: 2212 movs r2, #18
|
|
|
|
2214: 2300 movs r3, #0
|
|
|
|
2216: b292 uxth r2, r2
|
|
|
|
2218: e72d b.n 2076 <usbdc_cb_ctl_req+0x5a>
|
|
|
|
uint16_t length = req->wLength;
|
|
|
|
221a: 79aa ldrb r2, [r5, #6]
|
|
|
|
221c: 79ed ldrb r5, [r5, #7]
|
|
|
|
cfg_desc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, index + 1);
|
|
|
|
221e: 3301 adds r3, #1
|
|
|
|
uint16_t length = req->wLength;
|
|
|
|
2220: 022d lsls r5, r5, #8
|
|
|
|
2222: 4315 orrs r5, r2
|
|
|
|
bool need_zlp = !(length & (usbdc.ctrl_size - 1));
|
|
|
|
2224: 4a38 ldr r2, [pc, #224] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
cfg_desc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, index + 1);
|
|
|
|
2226: 6810 ldr r0, [r2, #0]
|
|
|
|
bool need_zlp = !(length & (usbdc.ctrl_size - 1));
|
|
|
|
2228: 7f16 ldrb r6, [r2, #28]
|
|
|
|
cfg_desc = usb_find_cfg_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, index + 1);
|
|
|
|
222a: c803 ldmia r0, {r0, r1}
|
|
|
|
222c: b2da uxtb r2, r3
|
|
|
|
222e: 4b37 ldr r3, [pc, #220] ; (230c <usbdc_cb_ctl_req+0x2f0>)
|
|
|
|
2230: 4798 blx r3
|
|
|
|
2232: 1e01 subs r1, r0, #0
|
|
|
|
if (NULL == cfg_desc) {
|
|
|
|
2234: d100 bne.n 2238 <usbdc_cb_ctl_req+0x21c>
|
|
|
|
2236: e708 b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
return (ptr[0] + (ptr[1] << 8));
|
|
|
|
2238: 78c3 ldrb r3, [r0, #3]
|
|
|
|
223a: 7882 ldrb r2, [r0, #2]
|
|
|
|
223c: 021b lsls r3, r3, #8
|
|
|
|
223e: 18d2 adds r2, r2, r3
|
|
|
|
2240: b292 uxth r2, r2
|
|
|
|
need_zlp = false;
|
|
|
|
2242: 2300 movs r3, #0
|
|
|
|
if (length <= str_desc[0]) {
|
|
|
|
2244: 4295 cmp r5, r2
|
|
|
|
2246: d905 bls.n 2254 <usbdc_cb_ctl_req+0x238>
|
|
|
|
bool need_zlp = !(length & (usbdc.ctrl_size - 1));
|
|
|
|
2248: 3e01 subs r6, #1
|
|
|
|
224a: 4035 ands r5, r6
|
|
|
|
224c: 426b negs r3, r5
|
|
|
|
224e: 415d adcs r5, r3
|
|
|
|
2250: b2eb uxtb r3, r5
|
|
|
|
2252: 0015 movs r5, r2
|
|
|
|
if (ERR_NONE != usbdc_xfer(ep, str_desc, length, need_zlp)) {
|
|
|
|
2254: 002a movs r2, r5
|
|
|
|
2256: e70e b.n 2076 <usbdc_cb_ctl_req+0x5a>
|
|
|
|
uint16_t length = req->wLength;
|
|
|
|
2258: 79aa ldrb r2, [r5, #6]
|
|
|
|
225a: 79ed ldrb r5, [r5, #7]
|
|
|
|
225c: 022d lsls r5, r5, #8
|
|
|
|
225e: 4315 orrs r5, r2
|
|
|
|
bool need_zlp = !(length & (usbdc.ctrl_size - 1));
|
|
|
|
2260: 4a29 ldr r2, [pc, #164] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
str_desc = usb_find_str_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, index);
|
|
|
|
2262: 6810 ldr r0, [r2, #0]
|
|
|
|
bool need_zlp = !(length & (usbdc.ctrl_size - 1));
|
|
|
|
2264: 7f16 ldrb r6, [r2, #28]
|
|
|
|
str_desc = usb_find_str_desc(usbdc.desces.ls_fs->sod, usbdc.desces.ls_fs->eod, index);
|
|
|
|
2266: c803 ldmia r0, {r0, r1}
|
|
|
|
2268: b2da uxtb r2, r3
|
|
|
|
226a: 4b2b ldr r3, [pc, #172] ; (2318 <usbdc_cb_ctl_req+0x2fc>)
|
|
|
|
226c: 4798 blx r3
|
|
|
|
226e: 1e01 subs r1, r0, #0
|
|
|
|
if (NULL == str_desc) {
|
|
|
|
2270: d100 bne.n 2274 <usbdc_cb_ctl_req+0x258>
|
|
|
|
2272: e6ea b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (length <= str_desc[0]) {
|
|
|
|
2274: 7802 ldrb r2, [r0, #0]
|
|
|
|
2276: e7e4 b.n 2242 <usbdc_cb_ctl_req+0x226>
|
|
|
|
*(uint8_t *)usbdc.ctrl_buf = usbdc.cfg_value;
|
|
|
|
2278: 4923 ldr r1, [pc, #140] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
227a: 7ecb ldrb r3, [r1, #27]
|
|
|
|
227c: 694a ldr r2, [r1, #20]
|
|
|
|
227e: 7013 strb r3, [r2, #0]
|
|
|
|
usbdc_xfer(ep, usbdc.ctrl_buf, 1, false);
|
|
|
|
2280: 6949 ldr r1, [r1, #20]
|
|
|
|
2282: 2300 movs r3, #0
|
|
|
|
2284: 2201 movs r2, #1
|
|
|
|
2286: e73c b.n 2102 <usbdc_cb_ctl_req+0xe6>
|
|
|
|
switch (req->bmRequestType & USB_REQT_RECIP_MASK) {
|
|
|
|
2288: 211f movs r1, #31
|
|
|
|
228a: 221e movs r2, #30
|
|
|
|
228c: 0018 movs r0, r3
|
|
|
|
228e: 4019 ands r1, r3
|
|
|
|
2290: 4010 ands r0, r2
|
|
|
|
2292: 4213 tst r3, r2
|
|
|
|
2294: d00e beq.n 22b4 <usbdc_cb_ctl_req+0x298>
|
|
|
|
2296: 2902 cmp r1, #2
|
|
|
|
2298: d000 beq.n 229c <usbdc_cb_ctl_req+0x280>
|
|
|
|
229a: e6d6 b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
st = usb_d_ep_halt(req->wIndex & 0xFF, USB_EP_HALT_GET);
|
|
|
|
229c: 4b1d ldr r3, [pc, #116] ; (2314 <usbdc_cb_ctl_req+0x2f8>)
|
|
|
|
229e: 7928 ldrb r0, [r5, #4]
|
|
|
|
22a0: 4798 blx r3
|
|
|
|
22a2: 0003 movs r3, r0
|
|
|
|
return false;
|
|
|
|
22a4: 2000 movs r0, #0
|
|
|
|
if (st < 0) {
|
|
|
|
22a6: 4283 cmp r3, r0
|
|
|
|
22a8: da00 bge.n 22ac <usbdc_cb_ctl_req+0x290>
|
|
|
|
22aa: e784 b.n 21b6 <usbdc_cb_ctl_req+0x19a>
|
|
|
|
st = st & 0x1;
|
|
|
|
22ac: 3001 adds r0, #1
|
|
|
|
22ae: 4003 ands r3, r0
|
|
|
|
22b0: 9300 str r3, [sp, #0]
|
|
|
|
break;
|
|
|
|
22b2: e000 b.n 22b6 <usbdc_cb_ctl_req+0x29a>
|
|
|
|
st = 0;
|
|
|
|
22b4: 9000 str r0, [sp, #0]
|
|
|
|
memcpy(usbdc.ctrl_buf, &st, 2);
|
|
|
|
22b6: 4d14 ldr r5, [pc, #80] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
22b8: 2202 movs r2, #2
|
|
|
|
22ba: 4669 mov r1, sp
|
|
|
|
22bc: 4b17 ldr r3, [pc, #92] ; (231c <usbdc_cb_ctl_req+0x300>)
|
|
|
|
22be: 6968 ldr r0, [r5, #20]
|
|
|
|
22c0: 4798 blx r3
|
|
|
|
usbdc_xfer(ep, usbdc.ctrl_buf, 2, false);
|
|
|
|
22c2: 2300 movs r3, #0
|
|
|
|
22c4: 2202 movs r2, #2
|
|
|
|
22c6: 6969 ldr r1, [r5, #20]
|
|
|
|
22c8: e71b b.n 2102 <usbdc_cb_ctl_req+0xe6>
|
|
|
|
if (!(usbdc.ifc_alt_map & (1 << req->wIndex))) {
|
|
|
|
22ca: 4e0f ldr r6, [pc, #60] ; (2308 <usbdc_cb_ctl_req+0x2ec>)
|
|
|
|
22cc: 796b ldrb r3, [r5, #5]
|
|
|
|
22ce: 7929 ldrb r1, [r5, #4]
|
|
|
|
22d0: 7f72 ldrb r2, [r6, #29]
|
|
|
|
22d2: 021b lsls r3, r3, #8
|
|
|
|
22d4: 430b orrs r3, r1
|
|
|
|
22d6: 411a asrs r2, r3
|
|
|
|
22d8: 2401 movs r4, #1
|
|
|
|
22da: 0010 movs r0, r2
|
|
|
|
22dc: 4020 ands r0, r4
|
|
|
|
22de: 4222 tst r2, r4
|
|
|
|
22e0: d01e beq.n 2320 <usbdc_cb_ctl_req+0x304>
|
|
|
|
struct usbdf_driver *func = (struct usbdf_driver *)usbdc.func_list.head;
|
|
|
|
22e2: 6934 ldr r4, [r6, #16]
|
|
|
|
while (NULL != func) {
|
|
|
|
22e4: 2c00 cmp r4, #0
|
|
|
|
22e6: d100 bne.n 22ea <usbdc_cb_ctl_req+0x2ce>
|
|
|
|
22e8: e6af b.n 204a <usbdc_cb_ctl_req+0x2e>
|
|
|
|
if (0 > (rc = func->ctrl(func, USBDF_GET_IFACE, req))) {
|
|
|
|
22ea: 002a movs r2, r5
|
|
|
|
22ec: 2102 movs r1, #2
|
|
|
|
22ee: 0020 movs r0, r4
|
|
|
|
22f0: 6863 ldr r3, [r4, #4]
|
|
|
|
22f2: 4798 blx r3
|
|
|
|
22f4: 2800 cmp r0, #0
|
|
|
|
22f6: da1b bge.n 2330 <usbdc_cb_ctl_req+0x314>
|
|
|
|
func = func->next;
|
|
|
|
22f8: 6824 ldr r4, [r4, #0]
|
|
|
|
22fa: e7f3 b.n 22e4 <usbdc_cb_ctl_req+0x2c8>
|
|
|
|
22fc: 00001ec1 .word 0x00001ec1
|
|
|
|
2300: 00001e7d .word 0x00001e7d
|
|
|
|
2304: 00002001 .word 0x00002001
|
|
|
|
2308: 20000650 .word 0x20000650
|
|
|
|
230c: 00001665 .word 0x00001665
|
|
|
|
2310: 0000162d .word 0x0000162d
|
|
|
|
2314: 00001afd .word 0x00001afd
|
|
|
|
2318: 000016a1 .word 0x000016a1
|
|
|
|
231c: 0000261d .word 0x0000261d
|
|
|
|
usbdc.ctrl_buf[0] = 0;
|
|
|
|
2320: 6973 ldr r3, [r6, #20]
|
|
|
|
usbdc_xfer(0, usbdc.ctrl_buf, 1, false);
|
|
|
|
2322: 0022 movs r2, r4
|
|
|
|
usbdc.ctrl_buf[0] = 0;
|
|
|
|
2324: 7018 strb r0, [r3, #0]
|
|
|
|
usbdc_xfer(0, usbdc.ctrl_buf, 1, false);
|
|
|
|
2326: 6971 ldr r1, [r6, #20]
|
|
|
|
2328: 0003 movs r3, r0
|
|
|
|
232a: 4d05 ldr r5, [pc, #20] ; (2340 <usbdc_cb_ctl_req+0x324>)
|
|
|
|
232c: 47a8 blx r5
|
|
|
|
return true;
|
|
|
|
232e: e741 b.n 21b4 <usbdc_cb_ctl_req+0x198>
|
|
|
|
usbdc.ctrl_buf[0] = (uint8_t)rc;
|
|
|
|
2330: 6973 ldr r3, [r6, #20]
|
|
|
|
usbdc_xfer(0, usbdc.ctrl_buf, 1, false);
|
|
|
|
2332: 2201 movs r2, #1
|
|
|
|
usbdc.ctrl_buf[0] = (uint8_t)rc;
|
|
|
|
2334: 7018 strb r0, [r3, #0]
|
|
|
|
usbdc_xfer(0, usbdc.ctrl_buf, 1, false);
|
|
|
|
2336: 2300 movs r3, #0
|
|
|
|
2338: 6971 ldr r1, [r6, #20]
|
|
|
|
233a: 0018 movs r0, r3
|
|
|
|
233c: e738 b.n 21b0 <usbdc_cb_ctl_req+0x194>
|
|
|
|
233e: 46c0 nop ; (mov r8, r8)
|
|
|
|
2340: 00002001 .word 0x00002001
|
|
|
|
|
|
|
|
00002344 <usbdc_register_handler>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Register the handler
|
|
|
|
*/
|
|
|
|
void usbdc_register_handler(enum usbdc_handler_type type, const struct usbdc_handler *h)
|
|
|
|
{
|
|
|
|
2344: b510 push {r4, lr}
|
|
|
|
switch (type) {
|
|
|
|
2346: 2801 cmp r0, #1
|
|
|
|
2348: d008 beq.n 235c <usbdc_register_handler+0x18>
|
|
|
|
234a: 2802 cmp r0, #2
|
|
|
|
234c: d009 beq.n 2362 <usbdc_register_handler+0x1e>
|
|
|
|
234e: 2800 cmp r0, #0
|
|
|
|
2350: d103 bne.n 235a <usbdc_register_handler+0x16>
|
|
|
|
case USBDC_HDL_SOF:
|
|
|
|
list_insert_at_end(&usbdc.handlers.sof_list, (void *)h);
|
|
|
|
2352: 4805 ldr r0, [pc, #20] ; (2368 <usbdc_register_handler+0x24>)
|
|
|
|
2354: 3004 adds r0, #4
|
|
|
|
break;
|
|
|
|
case USBDC_HDL_REQ:
|
|
|
|
list_insert_at_end(&usbdc.handlers.req_list, (void *)h);
|
|
|
|
break;
|
|
|
|
case USBDC_HDL_CHANGE:
|
|
|
|
list_insert_at_end(&usbdc.handlers.change_list, (void *)h);
|
|
|
|
2356: 4b05 ldr r3, [pc, #20] ; (236c <usbdc_register_handler+0x28>)
|
|
|
|
2358: 4798 blx r3
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
235a: bd10 pop {r4, pc}
|
|
|
|
list_insert_at_end(&usbdc.handlers.req_list, (void *)h);
|
|
|
|
235c: 4802 ldr r0, [pc, #8] ; (2368 <usbdc_register_handler+0x24>)
|
|
|
|
235e: 3008 adds r0, #8
|
|
|
|
2360: e7f9 b.n 2356 <usbdc_register_handler+0x12>
|
|
|
|
list_insert_at_end(&usbdc.handlers.change_list, (void *)h);
|
|
|
|
2362: 4801 ldr r0, [pc, #4] ; (2368 <usbdc_register_handler+0x24>)
|
|
|
|
2364: 300c adds r0, #12
|
|
|
|
2366: e7f6 b.n 2356 <usbdc_register_handler+0x12>
|
|
|
|
2368: 20000650 .word 0x20000650
|
|
|
|
236c: 00001399 .word 0x00001399
|
|
|
|
|
|
|
|
00002370 <usbdc_init>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Initialize the USB device core driver
|
|
|
|
*/
|
|
|
|
int32_t usbdc_init(uint8_t *ctrl_buf)
|
|
|
|
{
|
|
|
|
2370: b570 push {r4, r5, r6, lr}
|
|
|
|
2372: 0004 movs r4, r0
|
|
|
|
ASSERT(ctrl_buf);
|
|
|
|
2374: 1e43 subs r3, r0, #1
|
|
|
|
2376: 4198 sbcs r0, r3
|
|
|
|
2378: 4a0c ldr r2, [pc, #48] ; (23ac <usbdc_init+0x3c>)
|
|
|
|
237a: 4b0d ldr r3, [pc, #52] ; (23b0 <usbdc_init+0x40>)
|
|
|
|
237c: 490d ldr r1, [pc, #52] ; (23b4 <usbdc_init+0x44>)
|
|
|
|
237e: b2c0 uxtb r0, r0
|
|
|
|
2380: 4798 blx r3
|
|
|
|
|
|
|
|
int32_t rc;
|
|
|
|
|
|
|
|
rc = usb_d_init();
|
|
|
|
2382: 4b0d ldr r3, [pc, #52] ; (23b8 <usbdc_init+0x48>)
|
|
|
|
2384: 4798 blx r3
|
|
|
|
if (rc < 0) {
|
|
|
|
2386: 2800 cmp r0, #0
|
|
|
|
2388: db0e blt.n 23a8 <usbdc_init+0x38>
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
memset(&usbdc, 0, sizeof(usbdc));
|
|
|
|
238a: 4d0c ldr r5, [pc, #48] ; (23bc <usbdc_init+0x4c>)
|
|
|
|
238c: 2220 movs r2, #32
|
|
|
|
238e: 4b0c ldr r3, [pc, #48] ; (23c0 <usbdc_init+0x50>)
|
|
|
|
2390: 2100 movs r1, #0
|
|
|
|
2392: 0028 movs r0, r5
|
|
|
|
2394: 4798 blx r3
|
|
|
|
usbdc.ctrl_buf = ctrl_buf;
|
|
|
|
usb_d_register_callback(USB_D_CB_SOF, (FUNC_PTR)usbd_sof_cb);
|
|
|
|
2396: 2000 movs r0, #0
|
|
|
|
2398: 490a ldr r1, [pc, #40] ; (23c4 <usbdc_init+0x54>)
|
|
|
|
usbdc.ctrl_buf = ctrl_buf;
|
|
|
|
239a: 616c str r4, [r5, #20]
|
|
|
|
usb_d_register_callback(USB_D_CB_SOF, (FUNC_PTR)usbd_sof_cb);
|
|
|
|
239c: 4c0a ldr r4, [pc, #40] ; (23c8 <usbdc_init+0x58>)
|
|
|
|
239e: 47a0 blx r4
|
|
|
|
usb_d_register_callback(USB_D_CB_EVENT, (FUNC_PTR)usbd_event_cb);
|
|
|
|
23a0: 2001 movs r0, #1
|
|
|
|
23a2: 490a ldr r1, [pc, #40] ; (23cc <usbdc_init+0x5c>)
|
|
|
|
23a4: 47a0 blx r4
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
23a6: 2000 movs r0, #0
|
|
|
|
}
|
|
|
|
23a8: bd70 pop {r4, r5, r6, pc}
|
|
|
|
23aa: 46c0 nop ; (mov r8, r8)
|
|
|
|
23ac: 00000355 .word 0x00000355
|
|
|
|
23b0: 000013e1 .word 0x000013e1
|
|
|
|
23b4: 00002f1b .word 0x00002f1b
|
|
|
|
23b8: 000018a1 .word 0x000018a1
|
|
|
|
23bc: 20000650 .word 0x20000650
|
|
|
|
23c0: 0000262f .word 0x0000262f
|
|
|
|
23c4: 00001efd .word 0x00001efd
|
|
|
|
23c8: 0000190d .word 0x0000190d
|
|
|
|
23cc: 00001fe1 .word 0x00001fe1
|
|
|
|
|
|
|
|
000023d0 <usbdc_register_function>:
|
|
|
|
* \brief Register/unregister function support of a USB device function
|
|
|
|
*
|
|
|
|
* Must be invoked when USB device is stopped.
|
|
|
|
*/
|
|
|
|
void usbdc_register_function(struct usbdf_driver *func)
|
|
|
|
{
|
|
|
|
23d0: b510 push {r4, lr}
|
|
|
|
23d2: 0001 movs r1, r0
|
|
|
|
list_insert_at_end(&usbdc.func_list, func);
|
|
|
|
23d4: 4802 ldr r0, [pc, #8] ; (23e0 <usbdc_register_function+0x10>)
|
|
|
|
23d6: 4b03 ldr r3, [pc, #12] ; (23e4 <usbdc_register_function+0x14>)
|
|
|
|
23d8: 3010 adds r0, #16
|
|
|
|
23da: 4798 blx r3
|
|
|
|
}
|
|
|
|
23dc: bd10 pop {r4, pc}
|
|
|
|
23de: 46c0 nop ; (mov r8, r8)
|
|
|
|
23e0: 20000650 .word 0x20000650
|
|
|
|
23e4: 00001399 .word 0x00001399
|
|
|
|
|
|
|
|
000023e8 <usbdc_start>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Start the USB device driver with specific descriptors set
|
|
|
|
*/
|
|
|
|
int32_t usbdc_start(struct usbd_descriptors *desces)
|
|
|
|
{
|
|
|
|
23e8: b510 push {r4, lr}
|
|
|
|
if (usbdc.state >= USBD_S_POWER) {
|
|
|
|
23ea: 4b0a ldr r3, [pc, #40] ; (2414 <usbdc_start+0x2c>)
|
|
|
|
23ec: 7e9c ldrb r4, [r3, #26]
|
|
|
|
23ee: 2c00 cmp r4, #0
|
|
|
|
23f0: d10b bne.n 240a <usbdc_start+0x22>
|
|
|
|
return ERR_BUSY;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (desces) {
|
|
|
|
23f2: 2800 cmp r0, #0
|
|
|
|
23f4: d00c beq.n 2410 <usbdc_start+0x28>
|
|
|
|
#endif
|
|
|
|
} else {
|
|
|
|
return ERR_BAD_DATA;
|
|
|
|
}
|
|
|
|
|
|
|
|
usbdc.ctrl_size = desces->sod[7];
|
|
|
|
23f6: 6802 ldr r2, [r0, #0]
|
|
|
|
usbdc.desces.ls_fs = desces;
|
|
|
|
23f8: 6018 str r0, [r3, #0]
|
|
|
|
usbdc.ctrl_size = desces->sod[7];
|
|
|
|
23fa: 79d2 ldrb r2, [r2, #7]
|
|
|
|
23fc: 771a strb r2, [r3, #28]
|
|
|
|
usbdc.state = USBD_S_POWER;
|
|
|
|
23fe: 2201 movs r2, #1
|
|
|
|
2400: 769a strb r2, [r3, #26]
|
|
|
|
usb_d_enable();
|
|
|
|
2402: 4b05 ldr r3, [pc, #20] ; (2418 <usbdc_start+0x30>)
|
|
|
|
2404: 4798 blx r3
|
|
|
|
return ERR_NONE;
|
|
|
|
2406: 0020 movs r0, r4
|
|
|
|
}
|
|
|
|
2408: bd10 pop {r4, pc}
|
|
|
|
return ERR_BUSY;
|
|
|
|
240a: 2004 movs r0, #4
|
|
|
|
return ERR_BAD_DATA;
|
|
|
|
240c: 4240 negs r0, r0
|
|
|
|
240e: e7fb b.n 2408 <usbdc_start+0x20>
|
|
|
|
2410: 2009 movs r0, #9
|
|
|
|
2412: e7fb b.n 240c <usbdc_start+0x24>
|
|
|
|
2414: 20000650 .word 0x20000650
|
|
|
|
2418: 00001919 .word 0x00001919
|
|
|
|
|
|
|
|
0000241c <usbdc_attach>:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Attach the USB device to host
|
|
|
|
*/
|
|
|
|
void usbdc_attach(void)
|
|
|
|
{
|
|
|
|
241c: b510 push {r4, lr}
|
|
|
|
usb_d_attach();
|
|
|
|
241e: 4b01 ldr r3, [pc, #4] ; (2424 <usbdc_attach+0x8>)
|
|
|
|
2420: 4798 blx r3
|
|
|
|
}
|
|
|
|
2422: bd10 pop {r4, pc}
|
|
|
|
2424: 00001925 .word 0x00001925
|
|
|
|
|
|
|
|
00002428 <usbdc_get_ctrl_buffer>:
|
|
|
|
/**
|
|
|
|
* \brief Return USB Device endpoint0 buffer
|
|
|
|
*/
|
|
|
|
uint8_t *usbdc_get_ctrl_buffer(void)
|
|
|
|
{
|
|
|
|
return usbdc.ctrl_buf;
|
|
|
|
2428: 4b01 ldr r3, [pc, #4] ; (2430 <usbdc_get_ctrl_buffer+0x8>)
|
|
|
|
242a: 6958 ldr r0, [r3, #20]
|
|
|
|
}
|
|
|
|
242c: 4770 bx lr
|
|
|
|
242e: 46c0 nop ; (mov r8, r8)
|
|
|
|
2430: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00002434 <usbdc_get_state>:
|
|
|
|
/**
|
|
|
|
* \brief Return current USB state
|
|
|
|
*/
|
|
|
|
uint8_t usbdc_get_state(void)
|
|
|
|
{
|
|
|
|
if (usbdc.state & USBD_S_SUSPEND) {
|
|
|
|
2434: 4b03 ldr r3, [pc, #12] ; (2444 <usbdc_get_state+0x10>)
|
|
|
|
2436: 7e98 ldrb r0, [r3, #26]
|
|
|
|
2438: 2310 movs r3, #16
|
|
|
|
243a: 4218 tst r0, r3
|
|
|
|
243c: d000 beq.n 2440 <usbdc_get_state+0xc>
|
|
|
|
return USBD_S_SUSPEND;
|
|
|
|
243e: 0018 movs r0, r3
|
|
|
|
}
|
|
|
|
return usbdc.state;
|
|
|
|
}
|
|
|
|
2440: 4770 bx lr
|
|
|
|
2442: 46c0 nop ; (mov r8, r8)
|
|
|
|
2444: 20000650 .word 0x20000650
|
|
|
|
|
|
|
|
00002448 <atomic_enter_critical>:
|
|
|
|
*/
|
|
|
|
__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void)
|
|
|
|
{
|
|
|
|
uint32_t result;
|
|
|
|
|
|
|
|
__ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
|
|
|
|
2448: f3ef 8310 mrs r3, PRIMASK
|
|
|
|
/**
|
|
|
|
* \brief Disable interrupts, enter critical section
|
|
|
|
*/
|
|
|
|
void atomic_enter_critical(hal_atomic_t volatile *atomic)
|
|
|
|
{
|
|
|
|
*atomic = __get_PRIMASK();
|
|
|
|
244c: 6003 str r3, [r0, #0]
|
|
|
|
__ASM volatile ("cpsid i" : : : "memory");
|
|
|
|
244e: b672 cpsid i
|
|
|
|
\details Ensures the apparent order of the explicit memory operations before
|
|
|
|
and after the instruction, without ensuring their completion.
|
|
|
|
*/
|
|
|
|
__STATIC_FORCEINLINE void __DMB(void)
|
|
|
|
{
|
|
|
|
__ASM volatile ("dmb 0xF":::"memory");
|
|
|
|
2450: f3bf 8f5f dmb sy
|
|
|
|
__disable_irq();
|
|
|
|
__DMB();
|
|
|
|
}
|
|
|
|
2454: 4770 bx lr
|
|
|
|
|
|
|
|
00002456 <atomic_leave_critical>:
|
|
|
|
2456: f3bf 8f5f dmb sy
|
|
|
|
* \brief Exit atomic section
|
|
|
|
*/
|
|
|
|
void atomic_leave_critical(hal_atomic_t volatile *atomic)
|
|
|
|
{
|
|
|
|
__DMB();
|
|
|
|
__set_PRIMASK(*atomic);
|
|
|
|
245a: 6803 ldr r3, [r0, #0]
|
|
|
|
__ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
|
|
|
|
245c: f383 8810 msr PRIMASK, r3
|
|
|
|
}
|
|
|
|
2460: 4770 bx lr
|
|
|
|
...
|
|
|
|
|
|
|
|
00002464 <usb_cb_state_c>:
|
|
|
|
static uint32_t printf_buffer[MAX_PRINTF_BUFFER / 4];
|
|
|
|
static volatile bool b_usb_ready = false;
|
|
|
|
|
|
|
|
static bool usb_cb_state_c(usb_cdc_control_signal_t state)
|
|
|
|
{
|
|
|
|
if(state.rs232.DTR)
|
|
|
|
2464: 2301 movs r3, #1
|
|
|
|
{
|
|
|
|
2466: b082 sub sp, #8
|
|
|
|
if(state.rs232.DTR)
|
|
|
|
2468: 4203 tst r3, r0
|
|
|
|
246a: d001 beq.n 2470 <usb_cb_state_c+0xc>
|
|
|
|
{
|
|
|
|
b_usb_ready = true;
|
|
|
|
246c: 4a02 ldr r2, [pc, #8] ; (2478 <usb_cb_state_c+0x14>)
|
|
|
|
246e: 7013 strb r3, [r2, #0]
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
2470: 2000 movs r0, #0
|
|
|
|
2472: b002 add sp, #8
|
|
|
|
2474: 4770 bx lr
|
|
|
|
2476: 46c0 nop ; (mov r8, r8)
|
|
|
|
2478: 20000670 .word 0x20000670
|
|
|
|
|
|
|
|
0000247c <arc_serial_init>:
|
|
|
|
|
|
|
|
void arc_serial_init()
|
|
|
|
{
|
|
|
|
247c: b510 push {r4, lr}
|
|
|
|
memset(printf_buffer, '\0', MAX_PRINTF_BUFFER);
|
|
|
|
247e: 4c0b ldr r4, [pc, #44] ; (24ac <arc_serial_init+0x30>)
|
|
|
|
2480: 4b0b ldr r3, [pc, #44] ; (24b0 <arc_serial_init+0x34>)
|
|
|
|
2482: 2240 movs r2, #64 ; 0x40
|
|
|
|
2484: 2100 movs r1, #0
|
|
|
|
2486: 1d20 adds r0, r4, #4
|
|
|
|
2488: 4798 blx r3
|
|
|
|
usb_init();
|
|
|
|
248a: 4b0a ldr r3, [pc, #40] ; (24b4 <arc_serial_init+0x38>)
|
|
|
|
248c: 4798 blx r3
|
|
|
|
while(!cdcdf_acm_is_enabled()){}
|
|
|
|
248e: 4b0a ldr r3, [pc, #40] ; (24b8 <arc_serial_init+0x3c>)
|
|
|
|
2490: 4798 blx r3
|
|
|
|
2492: 2800 cmp r0, #0
|
|
|
|
2494: d0fb beq.n 248e <arc_serial_init+0x12>
|
|
|
|
cdcdf_acm_register_callback(CDCDF_ACM_CB_STATE_C, (FUNC_PTR)usb_cb_state_c);
|
|
|
|
2496: 2003 movs r0, #3
|
|
|
|
2498: 4908 ldr r1, [pc, #32] ; (24bc <arc_serial_init+0x40>)
|
|
|
|
249a: 4b09 ldr r3, [pc, #36] ; (24c0 <arc_serial_init+0x44>)
|
|
|
|
249c: 4798 blx r3
|
|
|
|
while(!b_usb_ready){}
|
|
|
|
249e: 7823 ldrb r3, [r4, #0]
|
|
|
|
24a0: 2b00 cmp r3, #0
|
|
|
|
24a2: d0fc beq.n 249e <arc_serial_init+0x22>
|
|
|
|
delay_ms(100);
|
|
|
|
24a4: 4b07 ldr r3, [pc, #28] ; (24c4 <arc_serial_init+0x48>)
|
|
|
|
24a6: 2064 movs r0, #100 ; 0x64
|
|
|
|
24a8: 4798 blx r3
|
|
|
|
}
|
|
|
|
24aa: bd10 pop {r4, pc}
|
|
|
|
24ac: 20000670 .word 0x20000670
|
|
|
|
24b0: 0000262f .word 0x0000262f
|
|
|
|
24b4: 00001419 .word 0x00001419
|
|
|
|
24b8: 000004c9 .word 0x000004c9
|
|
|
|
24bc: 00002465 .word 0x00002465
|
|
|
|
24c0: 00000491 .word 0x00000491
|
|
|
|
24c4: 00001319 .word 0x00001319
|
|
|
|
|
|
|
|
000024c8 <arc_printf>:
|
|
|
|
|
|
|
|
uint8_t arc_printf(const char* fmt, ...)
|
|
|
|
{
|
|
|
|
24c8: b40f push {r0, r1, r2, r3}
|
|
|
|
24ca: b513 push {r0, r1, r4, lr}
|
|
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
|
|
vsprintf((uint8_t*)printf_buffer, fmt, args);
|
|
|
|
24cc: 4c0a ldr r4, [pc, #40] ; (24f8 <arc_printf+0x30>)
|
|
|
|
{
|
|
|
|
24ce: aa04 add r2, sp, #16
|
|
|
|
24d0: ca02 ldmia r2!, {r1}
|
|
|
|
vsprintf((uint8_t*)printf_buffer, fmt, args);
|
|
|
|
24d2: 3404 adds r4, #4
|
|
|
|
va_start(args, fmt);
|
|
|
|
24d4: 9200 str r2, [sp, #0]
|
|
|
|
vsprintf((uint8_t*)printf_buffer, fmt, args);
|
|
|
|
24d6: 0020 movs r0, r4
|
|
|
|
24d8: 4b08 ldr r3, [pc, #32] ; (24fc <arc_printf+0x34>)
|
|
|
|
24da: 4798 blx r3
|
|
|
|
va_end(args);
|
|
|
|
volatile int32_t ret = cdcdf_acm_write((uint8_t*)printf_buffer, strlen((const char*)printf_buffer));
|
|
|
|
24dc: 4b08 ldr r3, [pc, #32] ; (2500 <arc_printf+0x38>)
|
|
|
|
24de: 0020 movs r0, r4
|
|
|
|
24e0: 4798 blx r3
|
|
|
|
24e2: 4b08 ldr r3, [pc, #32] ; (2504 <arc_printf+0x3c>)
|
|
|
|
24e4: 0001 movs r1, r0
|
|
|
|
24e6: 0020 movs r0, r4
|
|
|
|
24e8: 4798 blx r3
|
|
|
|
24ea: 9001 str r0, [sp, #4]
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
24ec: 2000 movs r0, #0
|
|
|
|
24ee: bc16 pop {r1, r2, r4}
|
|
|
|
24f0: bc08 pop {r3}
|
|
|
|
24f2: b004 add sp, #16
|
|
|
|
24f4: 4718 bx r3
|
|
|
|
24f6: 46c0 nop ; (mov r8, r8)
|
|
|
|
24f8: 20000670 .word 0x20000670
|
|
|
|
24fc: 00002679 .word 0x00002679
|
|
|
|
2500: 0000263f .word 0x0000263f
|
|
|
|
2504: 00000469 .word 0x00000469
|
|
|
|
|
|
|
|
00002508 <__gnu_thumb1_case_sqi>:
|
|
|
|
2508: b402 push {r1}
|
|
|
|
250a: 4671 mov r1, lr
|
|
|
|
250c: 0849 lsrs r1, r1, #1
|
|
|
|
250e: 0049 lsls r1, r1, #1
|
|
|
|
2510: 5609 ldrsb r1, [r1, r0]
|
|
|
|
2512: 0049 lsls r1, r1, #1
|
|
|
|
2514: 448e add lr, r1
|
|
|
|
2516: bc02 pop {r1}
|
|
|
|
2518: 4770 bx lr
|
|
|
|
251a: 46c0 nop ; (mov r8, r8)
|
|
|
|
|
|
|
|
0000251c <__gnu_thumb1_case_uqi>:
|
|
|
|
251c: b402 push {r1}
|
|
|
|
251e: 4671 mov r1, lr
|
|
|
|
2520: 0849 lsrs r1, r1, #1
|
|
|
|
2522: 0049 lsls r1, r1, #1
|
|
|
|
2524: 5c09 ldrb r1, [r1, r0]
|
|
|
|
2526: 0049 lsls r1, r1, #1
|
|
|
|
2528: 448e add lr, r1
|
|
|
|
252a: bc02 pop {r1}
|
|
|
|
252c: 4770 bx lr
|
|
|
|
252e: 46c0 nop ; (mov r8, r8)
|
|
|
|
|
|
|
|
00002530 <__gnu_thumb1_case_shi>:
|
|
|
|
2530: b403 push {r0, r1}
|
|
|
|
2532: 4671 mov r1, lr
|
|
|
|
2534: 0849 lsrs r1, r1, #1
|
|
|
|
2536: 0040 lsls r0, r0, #1
|
|
|
|
2538: 0049 lsls r1, r1, #1
|
|
|
|
253a: 5e09 ldrsh r1, [r1, r0]
|
|
|
|
253c: 0049 lsls r1, r1, #1
|
|
|
|
253e: 448e add lr, r1
|
|
|
|
2540: bc03 pop {r0, r1}
|
|
|
|
2542: 4770 bx lr
|
|
|
|
|
|
|
|
00002544 <__udivsi3>:
|
|
|
|
2544: 2900 cmp r1, #0
|
|
|
|
2546: d034 beq.n 25b2 <.udivsi3_skip_div0_test+0x6a>
|
|
|
|
|
|
|
|
00002548 <.udivsi3_skip_div0_test>:
|
|
|
|
2548: 2301 movs r3, #1
|
|
|
|
254a: 2200 movs r2, #0
|
|
|
|
254c: b410 push {r4}
|
|
|
|
254e: 4288 cmp r0, r1
|
|
|
|
2550: d32c bcc.n 25ac <.udivsi3_skip_div0_test+0x64>
|
|
|
|
2552: 2401 movs r4, #1
|
|
|
|
2554: 0724 lsls r4, r4, #28
|
|
|
|
2556: 42a1 cmp r1, r4
|
|
|
|
2558: d204 bcs.n 2564 <.udivsi3_skip_div0_test+0x1c>
|
|
|
|
255a: 4281 cmp r1, r0
|
|
|
|
255c: d202 bcs.n 2564 <.udivsi3_skip_div0_test+0x1c>
|
|
|
|
255e: 0109 lsls r1, r1, #4
|
|
|
|
2560: 011b lsls r3, r3, #4
|
|
|
|
2562: e7f8 b.n 2556 <.udivsi3_skip_div0_test+0xe>
|
|
|
|
2564: 00e4 lsls r4, r4, #3
|
|
|
|
2566: 42a1 cmp r1, r4
|
|
|
|
2568: d204 bcs.n 2574 <.udivsi3_skip_div0_test+0x2c>
|
|
|
|
256a: 4281 cmp r1, r0
|
|
|
|
256c: d202 bcs.n 2574 <.udivsi3_skip_div0_test+0x2c>
|
|
|
|
256e: 0049 lsls r1, r1, #1
|
|
|
|
2570: 005b lsls r3, r3, #1
|
|
|
|
2572: e7f8 b.n 2566 <.udivsi3_skip_div0_test+0x1e>
|
|
|
|
2574: 4288 cmp r0, r1
|
|
|
|
2576: d301 bcc.n 257c <.udivsi3_skip_div0_test+0x34>
|
|
|
|
2578: 1a40 subs r0, r0, r1
|
|
|
|
257a: 431a orrs r2, r3
|
|
|
|
257c: 084c lsrs r4, r1, #1
|
|
|
|
257e: 42a0 cmp r0, r4
|
|
|
|
2580: d302 bcc.n 2588 <.udivsi3_skip_div0_test+0x40>
|
|
|
|
2582: 1b00 subs r0, r0, r4
|
|
|
|
2584: 085c lsrs r4, r3, #1
|
|
|
|
2586: 4322 orrs r2, r4
|
|
|
|
2588: 088c lsrs r4, r1, #2
|
|
|
|
258a: 42a0 cmp r0, r4
|
|
|
|
258c: d302 bcc.n 2594 <.udivsi3_skip_div0_test+0x4c>
|
|
|
|
258e: 1b00 subs r0, r0, r4
|
|
|
|
2590: 089c lsrs r4, r3, #2
|
|
|
|
2592: 4322 orrs r2, r4
|
|
|
|
2594: 08cc lsrs r4, r1, #3
|
|
|
|
2596: 42a0 cmp r0, r4
|
|
|
|
2598: d302 bcc.n 25a0 <.udivsi3_skip_div0_test+0x58>
|
|
|
|
259a: 1b00 subs r0, r0, r4
|
|
|
|
259c: 08dc lsrs r4, r3, #3
|
|
|
|
259e: 4322 orrs r2, r4
|
|
|
|
25a0: 2800 cmp r0, #0
|
|
|
|
25a2: d003 beq.n 25ac <.udivsi3_skip_div0_test+0x64>
|
|
|
|
25a4: 091b lsrs r3, r3, #4
|
|
|
|
25a6: d001 beq.n 25ac <.udivsi3_skip_div0_test+0x64>
|
|
|
|
25a8: 0909 lsrs r1, r1, #4
|
|
|
|
25aa: e7e3 b.n 2574 <.udivsi3_skip_div0_test+0x2c>
|
|
|
|
25ac: 0010 movs r0, r2
|
|
|
|
25ae: bc10 pop {r4}
|
|
|
|
25b0: 4770 bx lr
|
|
|
|
25b2: b501 push {r0, lr}
|
|
|
|
25b4: 2000 movs r0, #0
|
|
|
|
25b6: f000 f80b bl 25d0 <__aeabi_idiv0>
|
|
|
|
25ba: bd02 pop {r1, pc}
|
|
|
|
|
|
|
|
000025bc <__aeabi_uidivmod>:
|
|
|
|
25bc: 2900 cmp r1, #0
|
|
|
|
25be: d0f8 beq.n 25b2 <.udivsi3_skip_div0_test+0x6a>
|
|
|
|
25c0: b503 push {r0, r1, lr}
|
|
|
|
25c2: f7ff ffc1 bl 2548 <.udivsi3_skip_div0_test>
|
|
|
|
25c6: bc0e pop {r1, r2, r3}
|
|
|
|
25c8: 4342 muls r2, r0
|
|
|
|
25ca: 1a89 subs r1, r1, r2
|
|
|
|
25cc: 4718 bx r3
|
|
|
|
25ce: 46c0 nop ; (mov r8, r8)
|
|
|
|
|
|
|
|
000025d0 <__aeabi_idiv0>:
|
|
|
|
25d0: 4770 bx lr
|
|
|
|
25d2: 46c0 nop ; (mov r8, r8)
|
|
|
|
|
|
|
|
000025d4 <__libc_init_array>:
|
|
|
|
25d4: b570 push {r4, r5, r6, lr}
|
|
|
|
25d6: 2600 movs r6, #0
|
|
|
|
25d8: 4d0c ldr r5, [pc, #48] ; (260c <__libc_init_array+0x38>)
|
|
|
|
25da: 4c0d ldr r4, [pc, #52] ; (2610 <__libc_init_array+0x3c>)
|
|
|
|
25dc: 1b64 subs r4, r4, r5
|
|
|
|
25de: 10a4 asrs r4, r4, #2
|
|
|
|
25e0: 42a6 cmp r6, r4
|
|
|
|
25e2: d109 bne.n 25f8 <__libc_init_array+0x24>
|
|
|
|
25e4: 2600 movs r6, #0
|
|
|
|
25e6: f000 fcef bl 2fc8 <_init>
|
|
|
|
25ea: 4d0a ldr r5, [pc, #40] ; (2614 <__libc_init_array+0x40>)
|
|
|
|
25ec: 4c0a ldr r4, [pc, #40] ; (2618 <__libc_init_array+0x44>)
|
|
|
|
25ee: 1b64 subs r4, r4, r5
|
|
|
|
25f0: 10a4 asrs r4, r4, #2
|
|
|
|
25f2: 42a6 cmp r6, r4
|
|
|
|
25f4: d105 bne.n 2602 <__libc_init_array+0x2e>
|
|
|
|
25f6: bd70 pop {r4, r5, r6, pc}
|
|
|
|
25f8: 00b3 lsls r3, r6, #2
|
|
|
|
25fa: 58eb ldr r3, [r5, r3]
|
|
|
|
25fc: 4798 blx r3
|
|
|
|
25fe: 3601 adds r6, #1
|
|
|
|
2600: e7ee b.n 25e0 <__libc_init_array+0xc>
|
|
|
|
2602: 00b3 lsls r3, r6, #2
|
|
|
|
2604: 58eb ldr r3, [r5, r3]
|
|
|
|
2606: 4798 blx r3
|
|
|
|
2608: 3601 adds r6, #1
|
|
|
|
260a: e7f2 b.n 25f2 <__libc_init_array+0x1e>
|
|
|
|
260c: 00002fd4 .word 0x00002fd4
|
|
|
|
2610: 00002fd4 .word 0x00002fd4
|
|
|
|
2614: 00002fd4 .word 0x00002fd4
|
|
|
|
2618: 00002fd8 .word 0x00002fd8
|
|
|
|
|
|
|
|
0000261c <memcpy>:
|
|
|
|
261c: 2300 movs r3, #0
|
|
|
|
261e: b510 push {r4, lr}
|
|
|
|
2620: 429a cmp r2, r3
|
|
|
|
2622: d100 bne.n 2626 <memcpy+0xa>
|
|
|
|
2624: bd10 pop {r4, pc}
|
|
|
|
2626: 5ccc ldrb r4, [r1, r3]
|
|
|
|
2628: 54c4 strb r4, [r0, r3]
|
|
|
|
262a: 3301 adds r3, #1
|
|
|
|
262c: e7f8 b.n 2620 <memcpy+0x4>
|
|
|
|
|
|
|
|
0000262e <memset>:
|
|
|
|
262e: 0003 movs r3, r0
|
|
|
|
2630: 1882 adds r2, r0, r2
|
|
|
|
2632: 4293 cmp r3, r2
|
|
|
|
2634: d100 bne.n 2638 <memset+0xa>
|
|
|
|
2636: 4770 bx lr
|
|
|
|
2638: 7019 strb r1, [r3, #0]
|
|
|
|
263a: 3301 adds r3, #1
|
|
|
|
263c: e7f9 b.n 2632 <memset+0x4>
|
|
|
|
|
|
|
|
0000263e <strlen>:
|
|
|
|
263e: 2300 movs r3, #0
|
|
|
|
2640: 5cc2 ldrb r2, [r0, r3]
|
|
|
|
2642: 3301 adds r3, #1
|
|
|
|
2644: 2a00 cmp r2, #0
|
|
|
|
2646: d1fb bne.n 2640 <strlen+0x2>
|
|
|
|
2648: 1e58 subs r0, r3, #1
|
|
|
|
264a: 4770 bx lr
|
|
|
|
|
|
|
|
0000264c <_vsiprintf_r>:
|
|
|
|
264c: b500 push {lr}
|
|
|
|
264e: b09b sub sp, #108 ; 0x6c
|
|
|
|
2650: 9100 str r1, [sp, #0]
|
|
|
|
2652: 9104 str r1, [sp, #16]
|
|
|
|
2654: 4906 ldr r1, [pc, #24] ; (2670 <_vsiprintf_r+0x24>)
|
|
|
|
2656: 9105 str r1, [sp, #20]
|
|
|
|
2658: 9102 str r1, [sp, #8]
|
|
|
|
265a: 4906 ldr r1, [pc, #24] ; (2674 <_vsiprintf_r+0x28>)
|
|
|
|
265c: 9103 str r1, [sp, #12]
|
|
|
|
265e: 4669 mov r1, sp
|
|
|
|
2660: f000 f8d8 bl 2814 <_svfiprintf_r>
|
|
|
|
2664: 2300 movs r3, #0
|
|
|
|
2666: 9a00 ldr r2, [sp, #0]
|
|
|
|
2668: 7013 strb r3, [r2, #0]
|
|
|
|
266a: b01b add sp, #108 ; 0x6c
|
|
|
|
266c: bd00 pop {pc}
|
|
|
|
266e: 46c0 nop ; (mov r8, r8)
|
|
|
|
2670: 7fffffff .word 0x7fffffff
|
|
|
|
2674: ffff0208 .word 0xffff0208
|
|
|
|
|
|
|
|
00002678 <vsiprintf>:
|
|
|
|
2678: b510 push {r4, lr}
|
|
|
|
267a: 0013 movs r3, r2
|
|
|
|
267c: 000a movs r2, r1
|
|
|
|
267e: 0001 movs r1, r0
|
|
|
|
2680: 4802 ldr r0, [pc, #8] ; (268c <vsiprintf+0x14>)
|
|
|
|
2682: 6800 ldr r0, [r0, #0]
|
|
|
|
2684: f7ff ffe2 bl 264c <_vsiprintf_r>
|
|
|
|
2688: bd10 pop {r4, pc}
|
|
|
|
268a: 46c0 nop ; (mov r8, r8)
|
|
|
|
268c: 20000068 .word 0x20000068
|
|
|
|
|
|
|
|
00002690 <__retarget_lock_acquire_recursive>:
|
|
|
|
2690: 4770 bx lr
|
|
|
|
|
|
|
|
00002692 <__retarget_lock_release_recursive>:
|
|
|
|
2692: 4770 bx lr
|
|
|
|
|
|
|
|
00002694 <_malloc_r>:
|
|
|
|
2694: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
2696: 2303 movs r3, #3
|
|
|
|
2698: 1ccd adds r5, r1, #3
|
|
|
|
269a: 439d bics r5, r3
|
|
|
|
269c: 3508 adds r5, #8
|
|
|
|
269e: 0006 movs r6, r0
|
|
|
|
26a0: 2d0c cmp r5, #12
|
|
|
|
26a2: d21f bcs.n 26e4 <_malloc_r+0x50>
|
|
|
|
26a4: 250c movs r5, #12
|
|
|
|
26a6: 42a9 cmp r1, r5
|
|
|
|
26a8: d81e bhi.n 26e8 <_malloc_r+0x54>
|
|
|
|
26aa: 0030 movs r0, r6
|
|
|
|
26ac: f000 fb64 bl 2d78 <__malloc_lock>
|
|
|
|
26b0: 4925 ldr r1, [pc, #148] ; (2748 <_malloc_r+0xb4>)
|
|
|
|
26b2: 680a ldr r2, [r1, #0]
|
|
|
|
26b4: 0014 movs r4, r2
|
|
|
|
26b6: 2c00 cmp r4, #0
|
|
|
|
26b8: d11a bne.n 26f0 <_malloc_r+0x5c>
|
|
|
|
26ba: 4f24 ldr r7, [pc, #144] ; (274c <_malloc_r+0xb8>)
|
|
|
|
26bc: 683b ldr r3, [r7, #0]
|
|
|
|
26be: 2b00 cmp r3, #0
|
|
|
|
26c0: d104 bne.n 26cc <_malloc_r+0x38>
|
|
|
|
26c2: 0021 movs r1, r4
|
|
|
|
26c4: 0030 movs r0, r6
|
|
|
|
26c6: f000 fb27 bl 2d18 <_sbrk_r>
|
|
|
|
26ca: 6038 str r0, [r7, #0]
|
|
|
|
26cc: 0029 movs r1, r5
|
|
|
|
26ce: 0030 movs r0, r6
|
|
|
|
26d0: f000 fb22 bl 2d18 <_sbrk_r>
|
|
|
|
26d4: 1c43 adds r3, r0, #1
|
|
|
|
26d6: d12b bne.n 2730 <_malloc_r+0x9c>
|
|
|
|
26d8: 230c movs r3, #12
|
|
|
|
26da: 0030 movs r0, r6
|
|
|
|
26dc: 6033 str r3, [r6, #0]
|
|
|
|
26de: f000 fb53 bl 2d88 <__malloc_unlock>
|
|
|
|
26e2: e003 b.n 26ec <_malloc_r+0x58>
|
|
|
|
26e4: 2d00 cmp r5, #0
|
|
|
|
26e6: dade bge.n 26a6 <_malloc_r+0x12>
|
|
|
|
26e8: 230c movs r3, #12
|
|
|
|
26ea: 6033 str r3, [r6, #0]
|
|
|
|
26ec: 2000 movs r0, #0
|
|
|
|
26ee: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
26f0: 6823 ldr r3, [r4, #0]
|
|
|
|
26f2: 1b5b subs r3, r3, r5
|
|
|
|
26f4: d419 bmi.n 272a <_malloc_r+0x96>
|
|
|
|
26f6: 2b0b cmp r3, #11
|
|
|
|
26f8: d903 bls.n 2702 <_malloc_r+0x6e>
|
|
|
|
26fa: 6023 str r3, [r4, #0]
|
|
|
|
26fc: 18e4 adds r4, r4, r3
|
|
|
|
26fe: 6025 str r5, [r4, #0]
|
|
|
|
2700: e003 b.n 270a <_malloc_r+0x76>
|
|
|
|
2702: 6863 ldr r3, [r4, #4]
|
|
|
|
2704: 42a2 cmp r2, r4
|
|
|
|
2706: d10e bne.n 2726 <_malloc_r+0x92>
|
|
|
|
2708: 600b str r3, [r1, #0]
|
|
|
|
270a: 0030 movs r0, r6
|
|
|
|
270c: f000 fb3c bl 2d88 <__malloc_unlock>
|
|
|
|
2710: 0020 movs r0, r4
|
|
|
|
2712: 2207 movs r2, #7
|
|
|
|
2714: 300b adds r0, #11
|
|
|
|
2716: 1d23 adds r3, r4, #4
|
|
|
|
2718: 4390 bics r0, r2
|
|
|
|
271a: 1ac2 subs r2, r0, r3
|
|
|
|
271c: 4298 cmp r0, r3
|
|
|
|
271e: d0e6 beq.n 26ee <_malloc_r+0x5a>
|
|
|
|
2720: 1a1b subs r3, r3, r0
|
|
|
|
2722: 50a3 str r3, [r4, r2]
|
|
|
|
2724: e7e3 b.n 26ee <_malloc_r+0x5a>
|
|
|
|
2726: 6053 str r3, [r2, #4]
|
|
|
|
2728: e7ef b.n 270a <_malloc_r+0x76>
|
|
|
|
272a: 0022 movs r2, r4
|
|
|
|
272c: 6864 ldr r4, [r4, #4]
|
|
|
|
272e: e7c2 b.n 26b6 <_malloc_r+0x22>
|
|
|
|
2730: 2303 movs r3, #3
|
|
|
|
2732: 1cc4 adds r4, r0, #3
|
|
|
|
2734: 439c bics r4, r3
|
|
|
|
2736: 42a0 cmp r0, r4
|
|
|
|
2738: d0e1 beq.n 26fe <_malloc_r+0x6a>
|
|
|
|
273a: 1a21 subs r1, r4, r0
|
|
|
|
273c: 0030 movs r0, r6
|
|
|
|
273e: f000 faeb bl 2d18 <_sbrk_r>
|
|
|
|
2742: 1c43 adds r3, r0, #1
|
|
|
|
2744: d1db bne.n 26fe <_malloc_r+0x6a>
|
|
|
|
2746: e7c7 b.n 26d8 <_malloc_r+0x44>
|
|
|
|
2748: 200006b4 .word 0x200006b4
|
|
|
|
274c: 200006b8 .word 0x200006b8
|
|
|
|
|
|
|
|
00002750 <__ssputs_r>:
|
|
|
|
2750: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
2752: 688e ldr r6, [r1, #8]
|
|
|
|
2754: b085 sub sp, #20
|
|
|
|
2756: 0007 movs r7, r0
|
|
|
|
2758: 000c movs r4, r1
|
|
|
|
275a: 9203 str r2, [sp, #12]
|
|
|
|
275c: 9301 str r3, [sp, #4]
|
|
|
|
275e: 429e cmp r6, r3
|
|
|
|
2760: d83c bhi.n 27dc <__ssputs_r+0x8c>
|
|
|
|
2762: 2390 movs r3, #144 ; 0x90
|
|
|
|
2764: 898a ldrh r2, [r1, #12]
|
|
|
|
2766: 00db lsls r3, r3, #3
|
|
|
|
2768: 421a tst r2, r3
|
|
|
|
276a: d034 beq.n 27d6 <__ssputs_r+0x86>
|
|
|
|
276c: 2503 movs r5, #3
|
|
|
|
276e: 6909 ldr r1, [r1, #16]
|
|
|
|
2770: 6823 ldr r3, [r4, #0]
|
|
|
|
2772: 1a5b subs r3, r3, r1
|
|
|
|
2774: 9302 str r3, [sp, #8]
|
|
|
|
2776: 6963 ldr r3, [r4, #20]
|
|
|
|
2778: 9802 ldr r0, [sp, #8]
|
|
|
|
277a: 435d muls r5, r3
|
|
|
|
277c: 0feb lsrs r3, r5, #31
|
|
|
|
277e: 195d adds r5, r3, r5
|
|
|
|
2780: 9b01 ldr r3, [sp, #4]
|
|
|
|
2782: 106d asrs r5, r5, #1
|
|
|
|
2784: 3301 adds r3, #1
|
|
|
|
2786: 181b adds r3, r3, r0
|
|
|
|
2788: 42ab cmp r3, r5
|
|
|
|
278a: d900 bls.n 278e <__ssputs_r+0x3e>
|
|
|
|
278c: 001d movs r5, r3
|
|
|
|
278e: 0553 lsls r3, r2, #21
|
|
|
|
2790: d532 bpl.n 27f8 <__ssputs_r+0xa8>
|
|
|
|
2792: 0029 movs r1, r5
|
|
|
|
2794: 0038 movs r0, r7
|
|
|
|
2796: f7ff ff7d bl 2694 <_malloc_r>
|
|
|
|
279a: 1e06 subs r6, r0, #0
|
|
|
|
279c: d109 bne.n 27b2 <__ssputs_r+0x62>
|
|
|
|
279e: 230c movs r3, #12
|
|
|
|
27a0: 603b str r3, [r7, #0]
|
|
|
|
27a2: 2340 movs r3, #64 ; 0x40
|
|
|
|
27a4: 2001 movs r0, #1
|
|
|
|
27a6: 89a2 ldrh r2, [r4, #12]
|
|
|
|
27a8: 4240 negs r0, r0
|
|
|
|
27aa: 4313 orrs r3, r2
|
|
|
|
27ac: 81a3 strh r3, [r4, #12]
|
|
|
|
27ae: b005 add sp, #20
|
|
|
|
27b0: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
27b2: 9a02 ldr r2, [sp, #8]
|
|
|
|
27b4: 6921 ldr r1, [r4, #16]
|
|
|
|
27b6: f7ff ff31 bl 261c <memcpy>
|
|
|
|
27ba: 89a3 ldrh r3, [r4, #12]
|
|
|
|
27bc: 4a14 ldr r2, [pc, #80] ; (2810 <__ssputs_r+0xc0>)
|
|
|
|
27be: 401a ands r2, r3
|
|
|
|
27c0: 2380 movs r3, #128 ; 0x80
|
|
|
|
27c2: 4313 orrs r3, r2
|
|
|
|
27c4: 81a3 strh r3, [r4, #12]
|
|
|
|
27c6: 9b02 ldr r3, [sp, #8]
|
|
|
|
27c8: 6126 str r6, [r4, #16]
|
|
|
|
27ca: 18f6 adds r6, r6, r3
|
|
|
|
27cc: 6026 str r6, [r4, #0]
|
|
|
|
27ce: 6165 str r5, [r4, #20]
|
|
|
|
27d0: 9e01 ldr r6, [sp, #4]
|
|
|
|
27d2: 1aed subs r5, r5, r3
|
|
|
|
27d4: 60a5 str r5, [r4, #8]
|
|
|
|
27d6: 9b01 ldr r3, [sp, #4]
|
|
|
|
27d8: 429e cmp r6, r3
|
|
|
|
27da: d900 bls.n 27de <__ssputs_r+0x8e>
|
|
|
|
27dc: 9e01 ldr r6, [sp, #4]
|
|
|
|
27de: 0032 movs r2, r6
|
|
|
|
27e0: 9903 ldr r1, [sp, #12]
|
|
|
|
27e2: 6820 ldr r0, [r4, #0]
|
|
|
|
27e4: f000 fab5 bl 2d52 <memmove>
|
|
|
|
27e8: 68a3 ldr r3, [r4, #8]
|
|
|
|
27ea: 2000 movs r0, #0
|
|
|
|
27ec: 1b9b subs r3, r3, r6
|
|
|
|
27ee: 60a3 str r3, [r4, #8]
|
|
|
|
27f0: 6823 ldr r3, [r4, #0]
|
|
|
|
27f2: 199e adds r6, r3, r6
|
|
|
|
27f4: 6026 str r6, [r4, #0]
|
|
|
|
27f6: e7da b.n 27ae <__ssputs_r+0x5e>
|
|
|
|
27f8: 002a movs r2, r5
|
|
|
|
27fa: 0038 movs r0, r7
|
|
|
|
27fc: f000 fb16 bl 2e2c <_realloc_r>
|
|
|
|
2800: 1e06 subs r6, r0, #0
|
|
|
|
2802: d1e0 bne.n 27c6 <__ssputs_r+0x76>
|
|
|
|
2804: 0038 movs r0, r7
|
|
|
|
2806: 6921 ldr r1, [r4, #16]
|
|
|
|
2808: f000 fac6 bl 2d98 <_free_r>
|
|
|
|
280c: e7c7 b.n 279e <__ssputs_r+0x4e>
|
|
|
|
280e: 46c0 nop ; (mov r8, r8)
|
|
|
|
2810: fffffb7f .word 0xfffffb7f
|
|
|
|
|
|
|
|
00002814 <_svfiprintf_r>:
|
|
|
|
2814: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
2816: b0a1 sub sp, #132 ; 0x84
|
|
|
|
2818: 9003 str r0, [sp, #12]
|
|
|
|
281a: 001d movs r5, r3
|
|
|
|
281c: 898b ldrh r3, [r1, #12]
|
|
|
|
281e: 000f movs r7, r1
|
|
|
|
2820: 0016 movs r6, r2
|
|
|
|
2822: 061b lsls r3, r3, #24
|
|
|
|
2824: d511 bpl.n 284a <_svfiprintf_r+0x36>
|
|
|
|
2826: 690b ldr r3, [r1, #16]
|
|
|
|
2828: 2b00 cmp r3, #0
|
|
|
|
282a: d10e bne.n 284a <_svfiprintf_r+0x36>
|
|
|
|
282c: 2140 movs r1, #64 ; 0x40
|
|
|
|
282e: f7ff ff31 bl 2694 <_malloc_r>
|
|
|
|
2832: 6038 str r0, [r7, #0]
|
|
|
|
2834: 6138 str r0, [r7, #16]
|
|
|
|
2836: 2800 cmp r0, #0
|
|
|
|
2838: d105 bne.n 2846 <_svfiprintf_r+0x32>
|
|
|
|
283a: 230c movs r3, #12
|
|
|
|
283c: 9a03 ldr r2, [sp, #12]
|
|
|
|
283e: 3801 subs r0, #1
|
|
|
|
2840: 6013 str r3, [r2, #0]
|
|
|
|
2842: b021 add sp, #132 ; 0x84
|
|
|
|
2844: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
2846: 2340 movs r3, #64 ; 0x40
|
|
|
|
2848: 617b str r3, [r7, #20]
|
|
|
|
284a: 2300 movs r3, #0
|
|
|
|
284c: ac08 add r4, sp, #32
|
|
|
|
284e: 6163 str r3, [r4, #20]
|
|
|
|
2850: 3320 adds r3, #32
|
|
|
|
2852: 7663 strb r3, [r4, #25]
|
|
|
|
2854: 3310 adds r3, #16
|
|
|
|
2856: 76a3 strb r3, [r4, #26]
|
|
|
|
2858: 9507 str r5, [sp, #28]
|
|
|
|
285a: 0035 movs r5, r6
|
|
|
|
285c: 782b ldrb r3, [r5, #0]
|
|
|
|
285e: 2b00 cmp r3, #0
|
|
|
|
2860: d001 beq.n 2866 <_svfiprintf_r+0x52>
|
|
|
|
2862: 2b25 cmp r3, #37 ; 0x25
|
|
|
|
2864: d147 bne.n 28f6 <_svfiprintf_r+0xe2>
|
|
|
|
2866: 1bab subs r3, r5, r6
|
|
|
|
2868: 9305 str r3, [sp, #20]
|
|
|
|
286a: 42b5 cmp r5, r6
|
|
|
|
286c: d00c beq.n 2888 <_svfiprintf_r+0x74>
|
|
|
|
286e: 0032 movs r2, r6
|
|
|
|
2870: 0039 movs r1, r7
|
|
|
|
2872: 9803 ldr r0, [sp, #12]
|
|
|
|
2874: f7ff ff6c bl 2750 <__ssputs_r>
|
|
|
|
2878: 1c43 adds r3, r0, #1
|
|
|
|
287a: d100 bne.n 287e <_svfiprintf_r+0x6a>
|
|
|
|
287c: e0ae b.n 29dc <_svfiprintf_r+0x1c8>
|
|
|
|
287e: 6962 ldr r2, [r4, #20]
|
|
|
|
2880: 9b05 ldr r3, [sp, #20]
|
|
|
|
2882: 4694 mov ip, r2
|
|
|
|
2884: 4463 add r3, ip
|
|
|
|
2886: 6163 str r3, [r4, #20]
|
|
|
|
2888: 782b ldrb r3, [r5, #0]
|
|
|
|
288a: 2b00 cmp r3, #0
|
|
|
|
288c: d100 bne.n 2890 <_svfiprintf_r+0x7c>
|
|
|
|
288e: e0a5 b.n 29dc <_svfiprintf_r+0x1c8>
|
|
|
|
2890: 2201 movs r2, #1
|
|
|
|
2892: 2300 movs r3, #0
|
|
|
|
2894: 4252 negs r2, r2
|
|
|
|
2896: 6062 str r2, [r4, #4]
|
|
|
|
2898: a904 add r1, sp, #16
|
|
|
|
289a: 3254 adds r2, #84 ; 0x54
|
|
|
|
289c: 1852 adds r2, r2, r1
|
|
|
|
289e: 1c6e adds r6, r5, #1
|
|
|
|
28a0: 6023 str r3, [r4, #0]
|
|
|
|
28a2: 60e3 str r3, [r4, #12]
|
|
|
|
28a4: 60a3 str r3, [r4, #8]
|
|
|
|
28a6: 7013 strb r3, [r2, #0]
|
|
|
|
28a8: 65a3 str r3, [r4, #88] ; 0x58
|
|
|
|
28aa: 2205 movs r2, #5
|
|
|
|
28ac: 7831 ldrb r1, [r6, #0]
|
|
|
|
28ae: 4854 ldr r0, [pc, #336] ; (2a00 <_svfiprintf_r+0x1ec>)
|
|
|
|
28b0: f000 fa44 bl 2d3c <memchr>
|
|
|
|
28b4: 1c75 adds r5, r6, #1
|
|
|
|
28b6: 2800 cmp r0, #0
|
|
|
|
28b8: d11f bne.n 28fa <_svfiprintf_r+0xe6>
|
|
|
|
28ba: 6822 ldr r2, [r4, #0]
|
|
|
|
28bc: 06d3 lsls r3, r2, #27
|
|
|
|
28be: d504 bpl.n 28ca <_svfiprintf_r+0xb6>
|
|
|
|
28c0: 2353 movs r3, #83 ; 0x53
|
|
|
|
28c2: a904 add r1, sp, #16
|
|
|
|
28c4: 185b adds r3, r3, r1
|
|
|
|
28c6: 2120 movs r1, #32
|
|
|
|
28c8: 7019 strb r1, [r3, #0]
|
|
|
|
28ca: 0713 lsls r3, r2, #28
|
|
|
|
28cc: d504 bpl.n 28d8 <_svfiprintf_r+0xc4>
|
|
|
|
28ce: 2353 movs r3, #83 ; 0x53
|
|
|
|
28d0: a904 add r1, sp, #16
|
|
|
|
28d2: 185b adds r3, r3, r1
|
|
|
|
28d4: 212b movs r1, #43 ; 0x2b
|
|
|
|
28d6: 7019 strb r1, [r3, #0]
|
|
|
|
28d8: 7833 ldrb r3, [r6, #0]
|
|
|
|
28da: 2b2a cmp r3, #42 ; 0x2a
|
|
|
|
28dc: d016 beq.n 290c <_svfiprintf_r+0xf8>
|
|
|
|
28de: 0035 movs r5, r6
|
|
|
|
28e0: 2100 movs r1, #0
|
|
|
|
28e2: 200a movs r0, #10
|
|
|
|
28e4: 68e3 ldr r3, [r4, #12]
|
|
|
|
28e6: 782a ldrb r2, [r5, #0]
|
|
|
|
28e8: 1c6e adds r6, r5, #1
|
|
|
|
28ea: 3a30 subs r2, #48 ; 0x30
|
|
|
|
28ec: 2a09 cmp r2, #9
|
|
|
|
28ee: d94e bls.n 298e <_svfiprintf_r+0x17a>
|
|
|
|
28f0: 2900 cmp r1, #0
|
|
|
|
28f2: d111 bne.n 2918 <_svfiprintf_r+0x104>
|
|
|
|
28f4: e017 b.n 2926 <_svfiprintf_r+0x112>
|
|
|
|
28f6: 3501 adds r5, #1
|
|
|
|
28f8: e7b0 b.n 285c <_svfiprintf_r+0x48>
|
|
|
|
28fa: 4b41 ldr r3, [pc, #260] ; (2a00 <_svfiprintf_r+0x1ec>)
|
|
|
|
28fc: 6822 ldr r2, [r4, #0]
|
|
|
|
28fe: 1ac0 subs r0, r0, r3
|
|
|
|
2900: 2301 movs r3, #1
|
|
|
|
2902: 4083 lsls r3, r0
|
|
|
|
2904: 4313 orrs r3, r2
|
|
|
|
2906: 002e movs r6, r5
|
|
|
|
2908: 6023 str r3, [r4, #0]
|
|
|
|
290a: e7ce b.n 28aa <_svfiprintf_r+0x96>
|
|
|
|
290c: 9b07 ldr r3, [sp, #28]
|
|
|
|
290e: 1d19 adds r1, r3, #4
|
|
|
|
2910: 681b ldr r3, [r3, #0]
|
|
|
|
2912: 9107 str r1, [sp, #28]
|
|
|
|
2914: 2b00 cmp r3, #0
|
|
|
|
2916: db01 blt.n 291c <_svfiprintf_r+0x108>
|
|
|
|
2918: 930b str r3, [sp, #44] ; 0x2c
|
|
|
|
291a: e004 b.n 2926 <_svfiprintf_r+0x112>
|
|
|
|
291c: 425b negs r3, r3
|
|
|
|
291e: 60e3 str r3, [r4, #12]
|
|
|
|
2920: 2302 movs r3, #2
|
|
|
|
2922: 4313 orrs r3, r2
|
|
|
|
2924: 6023 str r3, [r4, #0]
|
|
|
|
2926: 782b ldrb r3, [r5, #0]
|
|
|
|
2928: 2b2e cmp r3, #46 ; 0x2e
|
|
|
|
292a: d10a bne.n 2942 <_svfiprintf_r+0x12e>
|
|
|
|
292c: 786b ldrb r3, [r5, #1]
|
|
|
|
292e: 2b2a cmp r3, #42 ; 0x2a
|
|
|
|
2930: d135 bne.n 299e <_svfiprintf_r+0x18a>
|
|
|
|
2932: 9b07 ldr r3, [sp, #28]
|
|
|
|
2934: 3502 adds r5, #2
|
|
|
|
2936: 1d1a adds r2, r3, #4
|
|
|
|
2938: 681b ldr r3, [r3, #0]
|
|
|
|
293a: 9207 str r2, [sp, #28]
|
|
|
|
293c: 2b00 cmp r3, #0
|
|
|
|
293e: db2b blt.n 2998 <_svfiprintf_r+0x184>
|
|
|
|
2940: 9309 str r3, [sp, #36] ; 0x24
|
|
|
|
2942: 4e30 ldr r6, [pc, #192] ; (2a04 <_svfiprintf_r+0x1f0>)
|
|
|
|
2944: 2203 movs r2, #3
|
|
|
|
2946: 0030 movs r0, r6
|
|
|
|
2948: 7829 ldrb r1, [r5, #0]
|
|
|
|
294a: f000 f9f7 bl 2d3c <memchr>
|
|
|
|
294e: 2800 cmp r0, #0
|
|
|
|
2950: d006 beq.n 2960 <_svfiprintf_r+0x14c>
|
|
|
|
2952: 2340 movs r3, #64 ; 0x40
|
|
|
|
2954: 1b80 subs r0, r0, r6
|
|
|
|
2956: 4083 lsls r3, r0
|
|
|
|
2958: 6822 ldr r2, [r4, #0]
|
|
|
|
295a: 3501 adds r5, #1
|
|
|
|
295c: 4313 orrs r3, r2
|
|
|
|
295e: 6023 str r3, [r4, #0]
|
|
|
|
2960: 7829 ldrb r1, [r5, #0]
|
|
|
|
2962: 2206 movs r2, #6
|
|
|
|
2964: 4828 ldr r0, [pc, #160] ; (2a08 <_svfiprintf_r+0x1f4>)
|
|
|
|
2966: 1c6e adds r6, r5, #1
|
|
|
|
2968: 7621 strb r1, [r4, #24]
|
|
|
|
296a: f000 f9e7 bl 2d3c <memchr>
|
|
|
|
296e: 2800 cmp r0, #0
|
|
|
|
2970: d03c beq.n 29ec <_svfiprintf_r+0x1d8>
|
|
|
|
2972: 4b26 ldr r3, [pc, #152] ; (2a0c <_svfiprintf_r+0x1f8>)
|
|
|
|
2974: 2b00 cmp r3, #0
|
|
|
|
2976: d125 bne.n 29c4 <_svfiprintf_r+0x1b0>
|
|
|
|
2978: 2207 movs r2, #7
|
|
|
|
297a: 9b07 ldr r3, [sp, #28]
|
|
|
|
297c: 3307 adds r3, #7
|
|
|
|
297e: 4393 bics r3, r2
|
|
|
|
2980: 3308 adds r3, #8
|
|
|
|
2982: 9307 str r3, [sp, #28]
|
|
|
|
2984: 6963 ldr r3, [r4, #20]
|
|
|
|
2986: 9a04 ldr r2, [sp, #16]
|
|
|
|
2988: 189b adds r3, r3, r2
|
|
|
|
298a: 6163 str r3, [r4, #20]
|
|
|
|
298c: e765 b.n 285a <_svfiprintf_r+0x46>
|
|
|
|
298e: 4343 muls r3, r0
|
|
|
|
2990: 0035 movs r5, r6
|
|
|
|
2992: 2101 movs r1, #1
|
|
|
|
2994: 189b adds r3, r3, r2
|
|
|
|
2996: e7a6 b.n 28e6 <_svfiprintf_r+0xd2>
|
|
|
|
2998: 2301 movs r3, #1
|
|
|
|
299a: 425b negs r3, r3
|
|
|
|
299c: e7d0 b.n 2940 <_svfiprintf_r+0x12c>
|
|
|
|
299e: 2300 movs r3, #0
|
|
|
|
29a0: 200a movs r0, #10
|
|
|
|
29a2: 001a movs r2, r3
|
|
|
|
29a4: 3501 adds r5, #1
|
|
|
|
29a6: 6063 str r3, [r4, #4]
|
|
|
|
29a8: 7829 ldrb r1, [r5, #0]
|
|
|
|
29aa: 1c6e adds r6, r5, #1
|
|
|
|
29ac: 3930 subs r1, #48 ; 0x30
|
|
|
|
29ae: 2909 cmp r1, #9
|
|
|
|
29b0: d903 bls.n 29ba <_svfiprintf_r+0x1a6>
|
|
|
|
29b2: 2b00 cmp r3, #0
|
|
|
|
29b4: d0c5 beq.n 2942 <_svfiprintf_r+0x12e>
|
|
|
|
29b6: 9209 str r2, [sp, #36] ; 0x24
|
|
|
|
29b8: e7c3 b.n 2942 <_svfiprintf_r+0x12e>
|
|
|
|
29ba: 4342 muls r2, r0
|
|
|
|
29bc: 0035 movs r5, r6
|
|
|
|
29be: 2301 movs r3, #1
|
|
|
|
29c0: 1852 adds r2, r2, r1
|
|
|
|
29c2: e7f1 b.n 29a8 <_svfiprintf_r+0x194>
|
|
|
|
29c4: ab07 add r3, sp, #28
|
|
|
|
29c6: 9300 str r3, [sp, #0]
|
|
|
|
29c8: 003a movs r2, r7
|
|
|
|
29ca: 0021 movs r1, r4
|
|
|
|
29cc: 4b10 ldr r3, [pc, #64] ; (2a10 <_svfiprintf_r+0x1fc>)
|
|
|
|
29ce: 9803 ldr r0, [sp, #12]
|
|
|
|
29d0: e000 b.n 29d4 <_svfiprintf_r+0x1c0>
|
|
|
|
29d2: bf00 nop
|
|
|
|
29d4: 9004 str r0, [sp, #16]
|
|
|
|
29d6: 9b04 ldr r3, [sp, #16]
|
|
|
|
29d8: 3301 adds r3, #1
|
|
|
|
29da: d1d3 bne.n 2984 <_svfiprintf_r+0x170>
|
|
|
|
29dc: 89bb ldrh r3, [r7, #12]
|
|
|
|
29de: 980d ldr r0, [sp, #52] ; 0x34
|
|
|
|
29e0: 065b lsls r3, r3, #25
|
|
|
|
29e2: d400 bmi.n 29e6 <_svfiprintf_r+0x1d2>
|
|
|
|
29e4: e72d b.n 2842 <_svfiprintf_r+0x2e>
|
|
|
|
29e6: 2001 movs r0, #1
|
|
|
|
29e8: 4240 negs r0, r0
|
|
|
|
29ea: e72a b.n 2842 <_svfiprintf_r+0x2e>
|
|
|
|
29ec: ab07 add r3, sp, #28
|
|
|
|
29ee: 9300 str r3, [sp, #0]
|
|
|
|
29f0: 003a movs r2, r7
|
|
|
|
29f2: 0021 movs r1, r4
|
|
|
|
29f4: 4b06 ldr r3, [pc, #24] ; (2a10 <_svfiprintf_r+0x1fc>)
|
|
|
|
29f6: 9803 ldr r0, [sp, #12]
|
|
|
|
29f8: f000 f87c bl 2af4 <_printf_i>
|
|
|
|
29fc: e7ea b.n 29d4 <_svfiprintf_r+0x1c0>
|
|
|
|
29fe: 46c0 nop ; (mov r8, r8)
|
|
|
|
2a00: 00002f94 .word 0x00002f94
|
|
|
|
2a04: 00002f9a .word 0x00002f9a
|
|
|
|
2a08: 00002f9e .word 0x00002f9e
|
|
|
|
2a0c: 00000000 .word 0x00000000
|
|
|
|
2a10: 00002751 .word 0x00002751
|
|
|
|
|
|
|
|
00002a14 <_printf_common>:
|
|
|
|
2a14: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
|
|
|
|
2a16: 0015 movs r5, r2
|
|
|
|
2a18: 9301 str r3, [sp, #4]
|
|
|
|
2a1a: 688a ldr r2, [r1, #8]
|
|
|
|
2a1c: 690b ldr r3, [r1, #16]
|
|
|
|
2a1e: 000c movs r4, r1
|
|
|
|
2a20: 9000 str r0, [sp, #0]
|
|
|
|
2a22: 4293 cmp r3, r2
|
|
|
|
2a24: da00 bge.n 2a28 <_printf_common+0x14>
|
|
|
|
2a26: 0013 movs r3, r2
|
|
|
|
2a28: 0022 movs r2, r4
|
|
|
|
2a2a: 602b str r3, [r5, #0]
|
|
|
|
2a2c: 3243 adds r2, #67 ; 0x43
|
|
|
|
2a2e: 7812 ldrb r2, [r2, #0]
|
|
|
|
2a30: 2a00 cmp r2, #0
|
|
|
|
2a32: d001 beq.n 2a38 <_printf_common+0x24>
|
|
|
|
2a34: 3301 adds r3, #1
|
|
|
|
2a36: 602b str r3, [r5, #0]
|
|
|
|
2a38: 6823 ldr r3, [r4, #0]
|
|
|
|
2a3a: 069b lsls r3, r3, #26
|
|
|
|
2a3c: d502 bpl.n 2a44 <_printf_common+0x30>
|
|
|
|
2a3e: 682b ldr r3, [r5, #0]
|
|
|
|
2a40: 3302 adds r3, #2
|
|
|
|
2a42: 602b str r3, [r5, #0]
|
|
|
|
2a44: 6822 ldr r2, [r4, #0]
|
|
|
|
2a46: 2306 movs r3, #6
|
|
|
|
2a48: 0017 movs r7, r2
|
|
|
|
2a4a: 401f ands r7, r3
|
|
|
|
2a4c: 421a tst r2, r3
|
|
|
|
2a4e: d027 beq.n 2aa0 <_printf_common+0x8c>
|
|
|
|
2a50: 0023 movs r3, r4
|
|
|
|
2a52: 3343 adds r3, #67 ; 0x43
|
|
|
|
2a54: 781b ldrb r3, [r3, #0]
|
|
|
|
2a56: 1e5a subs r2, r3, #1
|
|
|
|
2a58: 4193 sbcs r3, r2
|
|
|
|
2a5a: 6822 ldr r2, [r4, #0]
|
|
|
|
2a5c: 0692 lsls r2, r2, #26
|
|
|
|
2a5e: d430 bmi.n 2ac2 <_printf_common+0xae>
|
|
|
|
2a60: 0022 movs r2, r4
|
|
|
|
2a62: 9901 ldr r1, [sp, #4]
|
|
|
|
2a64: 9800 ldr r0, [sp, #0]
|
|
|
|
2a66: 9e08 ldr r6, [sp, #32]
|
|
|
|
2a68: 3243 adds r2, #67 ; 0x43
|
|
|
|
2a6a: 47b0 blx r6
|
|
|
|
2a6c: 1c43 adds r3, r0, #1
|
|
|
|
2a6e: d025 beq.n 2abc <_printf_common+0xa8>
|
|
|
|
2a70: 2306 movs r3, #6
|
|
|
|
2a72: 6820 ldr r0, [r4, #0]
|
|
|
|
2a74: 682a ldr r2, [r5, #0]
|
|
|
|
2a76: 68e1 ldr r1, [r4, #12]
|
|
|
|
2a78: 2500 movs r5, #0
|
|
|
|
2a7a: 4003 ands r3, r0
|
|
|
|
2a7c: 2b04 cmp r3, #4
|
|
|
|
2a7e: d103 bne.n 2a88 <_printf_common+0x74>
|
|
|
|
2a80: 1a8d subs r5, r1, r2
|
|
|
|
2a82: 43eb mvns r3, r5
|
|
|
|
2a84: 17db asrs r3, r3, #31
|
|
|
|
2a86: 401d ands r5, r3
|
|
|
|
2a88: 68a3 ldr r3, [r4, #8]
|
|
|
|
2a8a: 6922 ldr r2, [r4, #16]
|
|
|
|
2a8c: 4293 cmp r3, r2
|
|
|
|
2a8e: dd01 ble.n 2a94 <_printf_common+0x80>
|
|
|
|
2a90: 1a9b subs r3, r3, r2
|
|
|
|
2a92: 18ed adds r5, r5, r3
|
|
|
|
2a94: 2700 movs r7, #0
|
|
|
|
2a96: 42bd cmp r5, r7
|
|
|
|
2a98: d120 bne.n 2adc <_printf_common+0xc8>
|
|
|
|
2a9a: 2000 movs r0, #0
|
|
|
|
2a9c: e010 b.n 2ac0 <_printf_common+0xac>
|
|
|
|
2a9e: 3701 adds r7, #1
|
|
|
|
2aa0: 68e3 ldr r3, [r4, #12]
|
|
|
|
2aa2: 682a ldr r2, [r5, #0]
|
|
|
|
2aa4: 1a9b subs r3, r3, r2
|
|
|
|
2aa6: 42bb cmp r3, r7
|
|
|
|
2aa8: ddd2 ble.n 2a50 <_printf_common+0x3c>
|
|
|
|
2aaa: 0022 movs r2, r4
|
|
|
|
2aac: 2301 movs r3, #1
|
|
|
|
2aae: 9901 ldr r1, [sp, #4]
|
|
|
|
2ab0: 9800 ldr r0, [sp, #0]
|
|
|
|
2ab2: 9e08 ldr r6, [sp, #32]
|
|
|
|
2ab4: 3219 adds r2, #25
|
|
|
|
2ab6: 47b0 blx r6
|
|
|
|
2ab8: 1c43 adds r3, r0, #1
|
|
|
|
2aba: d1f0 bne.n 2a9e <_printf_common+0x8a>
|
|
|
|
2abc: 2001 movs r0, #1
|
|
|
|
2abe: 4240 negs r0, r0
|
|
|
|
2ac0: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc}
|
|
|
|
2ac2: 2030 movs r0, #48 ; 0x30
|
|
|
|
2ac4: 18e1 adds r1, r4, r3
|
|
|
|
2ac6: 3143 adds r1, #67 ; 0x43
|
|
|
|
2ac8: 7008 strb r0, [r1, #0]
|
|
|
|
2aca: 0021 movs r1, r4
|
|
|
|
2acc: 1c5a adds r2, r3, #1
|
|
|
|
2ace: 3145 adds r1, #69 ; 0x45
|
|
|
|
2ad0: 7809 ldrb r1, [r1, #0]
|
|
|
|
2ad2: 18a2 adds r2, r4, r2
|
|
|
|
2ad4: 3243 adds r2, #67 ; 0x43
|
|
|
|
2ad6: 3302 adds r3, #2
|
|
|
|
2ad8: 7011 strb r1, [r2, #0]
|
|
|
|
2ada: e7c1 b.n 2a60 <_printf_common+0x4c>
|
|
|
|
2adc: 0022 movs r2, r4
|
|
|
|
2ade: 2301 movs r3, #1
|
|
|
|
2ae0: 9901 ldr r1, [sp, #4]
|
|
|
|
2ae2: 9800 ldr r0, [sp, #0]
|
|
|
|
2ae4: 9e08 ldr r6, [sp, #32]
|
|
|
|
2ae6: 321a adds r2, #26
|
|
|
|
2ae8: 47b0 blx r6
|
|
|
|
2aea: 1c43 adds r3, r0, #1
|
|
|
|
2aec: d0e6 beq.n 2abc <_printf_common+0xa8>
|
|
|
|
2aee: 3701 adds r7, #1
|
|
|
|
2af0: e7d1 b.n 2a96 <_printf_common+0x82>
|
|
|
|
...
|
|
|
|
|
|
|
|
00002af4 <_printf_i>:
|
|
|
|
2af4: b5f0 push {r4, r5, r6, r7, lr}
|
|
|
|
2af6: b08b sub sp, #44 ; 0x2c
|
|
|
|
2af8: 9206 str r2, [sp, #24]
|
|
|
|
2afa: 000a movs r2, r1
|
|
|
|
2afc: 3243 adds r2, #67 ; 0x43
|
|
|
|
2afe: 9307 str r3, [sp, #28]
|
|
|
|
2b00: 9005 str r0, [sp, #20]
|
|
|
|
2b02: 9204 str r2, [sp, #16]
|
|
|
|
2b04: 7e0a ldrb r2, [r1, #24]
|
|
|
|
2b06: 000c movs r4, r1
|
|
|
|
2b08: 9b10 ldr r3, [sp, #64] ; 0x40
|
|
|
|
2b0a: 2a78 cmp r2, #120 ; 0x78
|
|
|
|
2b0c: d806 bhi.n 2b1c <_printf_i+0x28>
|
|
|
|
2b0e: 2a62 cmp r2, #98 ; 0x62
|
|
|
|
2b10: d808 bhi.n 2b24 <_printf_i+0x30>
|
|
|
|
2b12: 2a00 cmp r2, #0
|
|
|
|
2b14: d100 bne.n 2b18 <_printf_i+0x24>
|
|
|
|
2b16: e0c0 b.n 2c9a <_printf_i+0x1a6>
|
|
|
|
2b18: 2a58 cmp r2, #88 ; 0x58
|
|
|
|
2b1a: d052 beq.n 2bc2 <_printf_i+0xce>
|
|
|
|
2b1c: 0026 movs r6, r4
|
|
|
|
2b1e: 3642 adds r6, #66 ; 0x42
|
|
|
|
2b20: 7032 strb r2, [r6, #0]
|
|
|
|
2b22: e022 b.n 2b6a <_printf_i+0x76>
|
|
|
|
2b24: 0010 movs r0, r2
|
|
|
|
2b26: 3863 subs r0, #99 ; 0x63
|
|
|
|
2b28: 2815 cmp r0, #21
|
|
|
|
2b2a: d8f7 bhi.n 2b1c <_printf_i+0x28>
|
|
|
|
2b2c: f7ff fd00 bl 2530 <__gnu_thumb1_case_shi>
|
|
|
|
2b30: 001f0016 .word 0x001f0016
|
|
|
|
2b34: fff6fff6 .word 0xfff6fff6
|
|
|
|
2b38: fff6fff6 .word 0xfff6fff6
|
|
|
|
2b3c: fff6001f .word 0xfff6001f
|
|
|
|
2b40: fff6fff6 .word 0xfff6fff6
|
|
|
|
2b44: 00a8fff6 .word 0x00a8fff6
|
|
|
|
2b48: 009a0036 .word 0x009a0036
|
|
|
|
2b4c: fff6fff6 .word 0xfff6fff6
|
|
|
|
2b50: fff600b9 .word 0xfff600b9
|
|
|
|
2b54: fff60036 .word 0xfff60036
|
|
|
|
2b58: 009efff6 .word 0x009efff6
|
|
|
|
2b5c: 0026 movs r6, r4
|
|
|
|
2b5e: 681a ldr r2, [r3, #0]
|
|
|
|
2b60: 3642 adds r6, #66 ; 0x42
|
|
|
|
2b62: 1d11 adds r1, r2, #4
|
|
|
|
2b64: 6019 str r1, [r3, #0]
|
|
|
|
2b66: 6813 ldr r3, [r2, #0]
|
|
|
|
2b68: 7033 strb r3, [r6, #0]
|
|
|
|
2b6a: 2301 movs r3, #1
|
|
|
|
2b6c: e0a7 b.n 2cbe <_printf_i+0x1ca>
|
|
|
|
2b6e: 6808 ldr r0, [r1, #0]
|
|
|
|
2b70: 6819 ldr r1, [r3, #0]
|
|
|
|
2b72: 1d0a adds r2, r1, #4
|
|
|
|
2b74: 0605 lsls r5, r0, #24
|
|
|
|
2b76: d50b bpl.n 2b90 <_printf_i+0x9c>
|
|
|
|
2b78: 680d ldr r5, [r1, #0]
|
|
|
|
2b7a: 601a str r2, [r3, #0]
|
|
|
|
2b7c: 2d00 cmp r5, #0
|
|
|
|
2b7e: da03 bge.n 2b88 <_printf_i+0x94>
|
|
|
|
2b80: 232d movs r3, #45 ; 0x2d
|
|
|
|
2b82: 9a04 ldr r2, [sp, #16]
|
|
|
|
2b84: 426d negs r5, r5
|
|
|
|
2b86: 7013 strb r3, [r2, #0]
|
|
|
|
2b88: 4b61 ldr r3, [pc, #388] ; (2d10 <_printf_i+0x21c>)
|
|
|
|
2b8a: 270a movs r7, #10
|
|
|
|
2b8c: 9303 str r3, [sp, #12]
|
|
|
|
2b8e: e032 b.n 2bf6 <_printf_i+0x102>
|
|
|
|
2b90: 680d ldr r5, [r1, #0]
|
|
|
|
2b92: 601a str r2, [r3, #0]
|
|
|
|
2b94: 0641 lsls r1, r0, #25
|
|
|
|
2b96: d5f1 bpl.n 2b7c <_printf_i+0x88>
|
|
|
|
2b98: b22d sxth r5, r5
|
|
|
|
2b9a: e7ef b.n 2b7c <_printf_i+0x88>
|
|
|
|
2b9c: 680d ldr r5, [r1, #0]
|
|
|
|
2b9e: 6819 ldr r1, [r3, #0]
|
|
|
|
2ba0: 1d08 adds r0, r1, #4
|
|
|
|
2ba2: 6018 str r0, [r3, #0]
|
|
|
|
2ba4: 062e lsls r6, r5, #24
|
|
|
|
2ba6: d501 bpl.n 2bac <_printf_i+0xb8>
|
|
|
|
2ba8: 680d ldr r5, [r1, #0]
|
|
|
|
2baa: e003 b.n 2bb4 <_printf_i+0xc0>
|
|
|
|
2bac: 066d lsls r5, r5, #25
|
|
|
|
2bae: d5fb bpl.n 2ba8 <_printf_i+0xb4>
|
|
|
|
2bb0: 680d ldr r5, [r1, #0]
|
|
|
|
2bb2: b2ad uxth r5, r5
|
|
|
|
2bb4: 4b56 ldr r3, [pc, #344] ; (2d10 <_printf_i+0x21c>)
|
|
|
|
2bb6: 270a movs r7, #10
|
|
|
|
2bb8: 9303 str r3, [sp, #12]
|
|
|
|
2bba: 2a6f cmp r2, #111 ; 0x6f
|
|
|
|
2bbc: d117 bne.n 2bee <_printf_i+0xfa>
|
|
|
|
2bbe: 2708 movs r7, #8
|
|
|
|
2bc0: e015 b.n 2bee <_printf_i+0xfa>
|
|
|
|
2bc2: 3145 adds r1, #69 ; 0x45
|
|
|
|
2bc4: 700a strb r2, [r1, #0]
|
|
|
|
2bc6: 4a52 ldr r2, [pc, #328] ; (2d10 <_printf_i+0x21c>)
|
|
|
|
2bc8: 9203 str r2, [sp, #12]
|
|
|
|
2bca: 681a ldr r2, [r3, #0]
|
|
|
|
2bcc: 6821 ldr r1, [r4, #0]
|
|
|
|
2bce: ca20 ldmia r2!, {r5}
|
|
|
|
2bd0: 601a str r2, [r3, #0]
|
|
|
|
2bd2: 0608 lsls r0, r1, #24
|
|
|
|
2bd4: d550 bpl.n 2c78 <_printf_i+0x184>
|
|
|
|
2bd6: 07cb lsls r3, r1, #31
|
|
|
|
2bd8: d502 bpl.n 2be0 <_printf_i+0xec>
|
|
|
|
2bda: 2320 movs r3, #32
|
|
|
|
2bdc: 4319 orrs r1, r3
|
|
|
|
2bde: 6021 str r1, [r4, #0]
|
|
|
|
2be0: 2710 movs r7, #16
|
|
|
|
2be2: 2d00 cmp r5, #0
|
|
|
|
2be4: d103 bne.n 2bee <_printf_i+0xfa>
|
|
|
|
2be6: 2320 movs r3, #32
|
|
|
|
2be8: 6822 ldr r2, [r4, #0]
|
|
|
|
2bea: 439a bics r2, r3
|
|
|
|
2bec: 6022 str r2, [r4, #0]
|
|
|
|
2bee: 0023 movs r3, r4
|
|
|
|
2bf0: 2200 movs r2, #0
|
|
|
|
2bf2: 3343 adds r3, #67 ; 0x43
|
|
|
|
2bf4: 701a strb r2, [r3, #0]
|
|
|
|
2bf6: 6863 ldr r3, [r4, #4]
|
|
|
|
2bf8: 60a3 str r3, [r4, #8]
|
|
|
|
2bfa: 2b00 cmp r3, #0
|
|
|
|
2bfc: db03 blt.n 2c06 <_printf_i+0x112>
|
|
|
|
2bfe: 2204 movs r2, #4
|
|
|
|
2c00: 6821 ldr r1, [r4, #0]
|
|
|
|
2c02: 4391 bics r1, r2
|
|
|
|
2c04: 6021 str r1, [r4, #0]
|
|
|
|
2c06: 2d00 cmp r5, #0
|
|
|
|
2c08: d102 bne.n 2c10 <_printf_i+0x11c>
|
|
|
|
2c0a: 9e04 ldr r6, [sp, #16]
|
|
|
|
2c0c: 2b00 cmp r3, #0
|
|
|
|
2c0e: d00c beq.n 2c2a <_printf_i+0x136>
|
|
|
|
2c10: 9e04 ldr r6, [sp, #16]
|
|
|
|
2c12: 0028 movs r0, r5
|
|
|
|
2c14: 0039 movs r1, r7
|
|
|
|
2c16: f7ff fcd1 bl 25bc <__aeabi_uidivmod>
|
|
|
|
2c1a: 9b03 ldr r3, [sp, #12]
|
|
|
|
2c1c: 3e01 subs r6, #1
|
|
|
|
2c1e: 5c5b ldrb r3, [r3, r1]
|
|
|
|
2c20: 7033 strb r3, [r6, #0]
|
|
|
|
2c22: 002b movs r3, r5
|
|
|
|
2c24: 0005 movs r5, r0
|
|
|
|
2c26: 429f cmp r7, r3
|
|
|
|
2c28: d9f3 bls.n 2c12 <_printf_i+0x11e>
|
|
|
|
2c2a: 2f08 cmp r7, #8
|
|
|
|
2c2c: d109 bne.n 2c42 <_printf_i+0x14e>
|
|
|
|
2c2e: 6823 ldr r3, [r4, #0]
|
|
|
|
2c30: 07db lsls r3, r3, #31
|
|
|
|
2c32: d506 bpl.n 2c42 <_printf_i+0x14e>
|
|
|
|
2c34: 6863 ldr r3, [r4, #4]
|
|
|
|
2c36: 6922 ldr r2, [r4, #16]
|
|
|
|
2c38: 4293 cmp r3, r2
|
|
|
|
2c3a: dc02 bgt.n 2c42 <_printf_i+0x14e>
|
|
|
|
2c3c: 2330 movs r3, #48 ; 0x30
|
|
|
|
2c3e: 3e01 subs r6, #1
|
|
|
|
2c40: 7033 strb r3, [r6, #0]
|
|
|
|
2c42: 9b04 ldr r3, [sp, #16]
|
|
|
|
2c44: 1b9b subs r3, r3, r6
|
|
|
|
2c46: 6123 str r3, [r4, #16]
|
|
|
|
2c48: 9b07 ldr r3, [sp, #28]
|
|
|
|
2c4a: 0021 movs r1, r4
|
|
|
|
2c4c: 9300 str r3, [sp, #0]
|
|
|
|
2c4e: 9805 ldr r0, [sp, #20]
|
|
|
|
2c50: 9b06 ldr r3, [sp, #24]
|
|
|
|
2c52: aa09 add r2, sp, #36 ; 0x24
|
|
|
|
2c54: f7ff fede bl 2a14 <_printf_common>
|
|
|
|
2c58: 1c43 adds r3, r0, #1
|
|
|
|
2c5a: d135 bne.n 2cc8 <_printf_i+0x1d4>
|
|
|
|
2c5c: 2001 movs r0, #1
|
|
|
|
2c5e: 4240 negs r0, r0
|
|
|
|
2c60: b00b add sp, #44 ; 0x2c
|
|
|
|
2c62: bdf0 pop {r4, r5, r6, r7, pc}
|
|
|
|
2c64: 2220 movs r2, #32
|
|
|
|
2c66: 6809 ldr r1, [r1, #0]
|
|
|
|
2c68: 430a orrs r2, r1
|
|
|
|
2c6a: 6022 str r2, [r4, #0]
|
|
|
|
2c6c: 0022 movs r2, r4
|
|
|
|
2c6e: 2178 movs r1, #120 ; 0x78
|
|
|
|
2c70: 3245 adds r2, #69 ; 0x45
|
|
|
|
2c72: 7011 strb r1, [r2, #0]
|
|
|
|
2c74: 4a27 ldr r2, [pc, #156] ; (2d14 <_printf_i+0x220>)
|
|
|
|
2c76: e7a7 b.n 2bc8 <_printf_i+0xd4>
|
|
|
|
2c78: 0648 lsls r0, r1, #25
|
|
|
|
2c7a: d5ac bpl.n 2bd6 <_printf_i+0xe2>
|
|
|
|
2c7c: b2ad uxth r5, r5
|
|
|
|
2c7e: e7aa b.n 2bd6 <_printf_i+0xe2>
|
|
|
|
2c80: 681a ldr r2, [r3, #0]
|
|
|
|
2c82: 680d ldr r5, [r1, #0]
|
|
|
|
2c84: 1d10 adds r0, r2, #4
|
|
|
|
2c86: 6949 ldr r1, [r1, #20]
|
|
|
|
2c88: 6018 str r0, [r3, #0]
|
|
|
|
2c8a: 6813 ldr r3, [r2, #0]
|
|
|
|
2c8c: 062e lsls r6, r5, #24
|
|
|
|
2c8e: d501 bpl.n 2c94 <_printf_i+0x1a0>
|
|
|
|
2c90: 6019 str r1, [r3, #0]
|
|
|
|
2c92: e002 b.n 2c9a <_printf_i+0x1a6>
|
|
|
|
2c94: 066d lsls r5, r5, #25
|
|
|
|
2c96: d5fb bpl.n 2c90 <_printf_i+0x19c>
|
|
|
|
2c98: 8019 strh r1, [r3, #0]
|
|
|
|
2c9a: 2300 movs r3, #0
|
|
|
|
2c9c: 9e04 ldr r6, [sp, #16]
|
|
|
|
2c9e: 6123 str r3, [r4, #16]
|
|
|
|
2ca0: e7d2 b.n 2c48 <_printf_i+0x154>
|
|
|
|
2ca2: 681a ldr r2, [r3, #0]
|
|
|
|
2ca4: 1d11 adds r1, r2, #4
|
|
|
|
2ca6: 6019 str r1, [r3, #0]
|
|
|
|
2ca8: 6816 ldr r6, [r2, #0]
|
|
|
|
2caa: 2100 movs r1, #0
|
|
|
|
2cac: 0030 movs r0, r6
|
|
|
|
2cae: 6862 ldr r2, [r4, #4]
|
|
|
|
2cb0: f000 f844 bl 2d3c <memchr>
|
|
|
|
2cb4: 2800 cmp r0, #0
|
|
|
|
2cb6: d001 beq.n 2cbc <_printf_i+0x1c8>
|
|
|
|
2cb8: 1b80 subs r0, r0, r6
|
|
|
|
2cba: 6060 str r0, [r4, #4]
|
|
|
|
2cbc: 6863 ldr r3, [r4, #4]
|
|
|
|
2cbe: 6123 str r3, [r4, #16]
|
|
|
|
2cc0: 2300 movs r3, #0
|
|
|
|
2cc2: 9a04 ldr r2, [sp, #16]
|
|
|
|
2cc4: 7013 strb r3, [r2, #0]
|
|
|
|
2cc6: e7bf b.n 2c48 <_printf_i+0x154>
|
|
|
|
2cc8: 6923 ldr r3, [r4, #16]
|
|
|
|
2cca: 0032 movs r2, r6
|
|
|
|
2ccc: 9906 ldr r1, [sp, #24]
|
|
|
|
2cce: 9805 ldr r0, [sp, #20]
|
|
|
|
2cd0: 9d07 ldr r5, [sp, #28]
|
|
|
|
2cd2: 47a8 blx r5
|
|
|
|
2cd4: 1c43 adds r3, r0, #1
|
|
|
|
2cd6: d0c1 beq.n 2c5c <_printf_i+0x168>
|
|
|
|
2cd8: 6823 ldr r3, [r4, #0]
|
|
|
|
2cda: 079b lsls r3, r3, #30
|
|
|
|
2cdc: d415 bmi.n 2d0a <_printf_i+0x216>
|
|
|
|
2cde: 9b09 ldr r3, [sp, #36] ; 0x24
|
|
|
|
2ce0: 68e0 ldr r0, [r4, #12]
|
|
|
|
2ce2: 4298 cmp r0, r3
|
|
|
|
2ce4: dabc bge.n 2c60 <_printf_i+0x16c>
|
|
|
|
2ce6: 0018 movs r0, r3
|
|
|
|
2ce8: e7ba b.n 2c60 <_printf_i+0x16c>
|
|
|
|
2cea: 0022 movs r2, r4
|
|
|
|
2cec: 2301 movs r3, #1
|
|
|
|
2cee: 9906 ldr r1, [sp, #24]
|
|
|
|
2cf0: 9805 ldr r0, [sp, #20]
|
|
|
|
2cf2: 9e07 ldr r6, [sp, #28]
|
|
|
|
2cf4: 3219 adds r2, #25
|
|
|
|
2cf6: 47b0 blx r6
|
|
|
|
2cf8: 1c43 adds r3, r0, #1
|
|
|
|
2cfa: d0af beq.n 2c5c <_printf_i+0x168>
|
|
|
|
2cfc: 3501 adds r5, #1
|
|
|
|
2cfe: 68e3 ldr r3, [r4, #12]
|
|
|
|
2d00: 9a09 ldr r2, [sp, #36] ; 0x24
|
|
|
|
2d02: 1a9b subs r3, r3, r2
|
|
|
|
2d04: 42ab cmp r3, r5
|
|
|
|
2d06: dcf0 bgt.n 2cea <_printf_i+0x1f6>
|
|
|
|
2d08: e7e9 b.n 2cde <_printf_i+0x1ea>
|
|
|
|
2d0a: 2500 movs r5, #0
|
|
|
|
2d0c: e7f7 b.n 2cfe <_printf_i+0x20a>
|
|
|
|
2d0e: 46c0 nop ; (mov r8, r8)
|
|
|
|
2d10: 00002fa5 .word 0x00002fa5
|
|
|
|
2d14: 00002fb6 .word 0x00002fb6
|
|
|
|
|
|
|
|
00002d18 <_sbrk_r>:
|
|
|
|
2d18: 2300 movs r3, #0
|
|
|
|
2d1a: b570 push {r4, r5, r6, lr}
|
|
|
|
2d1c: 4d06 ldr r5, [pc, #24] ; (2d38 <_sbrk_r+0x20>)
|
|
|
|
2d1e: 0004 movs r4, r0
|
|
|
|
2d20: 0008 movs r0, r1
|
|
|
|
2d22: 602b str r3, [r5, #0]
|
|
|
|
2d24: f7fd fbd6 bl 4d4 <_sbrk>
|
|
|
|
2d28: 1c43 adds r3, r0, #1
|
|
|
|
2d2a: d103 bne.n 2d34 <_sbrk_r+0x1c>
|
|
|
|
2d2c: 682b ldr r3, [r5, #0]
|
|
|
|
2d2e: 2b00 cmp r3, #0
|
|
|
|
2d30: d000 beq.n 2d34 <_sbrk_r+0x1c>
|
|
|
|
2d32: 6023 str r3, [r4, #0]
|
|
|
|
2d34: bd70 pop {r4, r5, r6, pc}
|
|
|
|
2d36: 46c0 nop ; (mov r8, r8)
|
|
|
|
2d38: 200006c8 .word 0x200006c8
|
|
|
|
|
|
|
|
00002d3c <memchr>:
|
|
|
|
2d3c: b2c9 uxtb r1, r1
|
|
|
|
2d3e: 1882 adds r2, r0, r2
|
|
|
|
2d40: 4290 cmp r0, r2
|
|
|
|
2d42: d101 bne.n 2d48 <memchr+0xc>
|
|
|
|
2d44: 2000 movs r0, #0
|
|
|
|
2d46: 4770 bx lr
|
|
|
|
2d48: 7803 ldrb r3, [r0, #0]
|
|
|
|
2d4a: 428b cmp r3, r1
|
|
|
|
2d4c: d0fb beq.n 2d46 <memchr+0xa>
|
|
|
|
2d4e: 3001 adds r0, #1
|
|
|
|
2d50: e7f6 b.n 2d40 <memchr+0x4>
|
|
|
|
|
|
|
|
00002d52 <memmove>:
|
|
|
|
2d52: b510 push {r4, lr}
|
|
|
|
2d54: 4288 cmp r0, r1
|
|
|
|
2d56: d902 bls.n 2d5e <memmove+0xc>
|
|
|
|
2d58: 188b adds r3, r1, r2
|
|
|
|
2d5a: 4298 cmp r0, r3
|
|
|
|
2d5c: d303 bcc.n 2d66 <memmove+0x14>
|
|
|
|
2d5e: 2300 movs r3, #0
|
|
|
|
2d60: e007 b.n 2d72 <memmove+0x20>
|
|
|
|
2d62: 5c8b ldrb r3, [r1, r2]
|
|
|
|
2d64: 5483 strb r3, [r0, r2]
|
|
|
|
2d66: 3a01 subs r2, #1
|
|
|
|
2d68: d2fb bcs.n 2d62 <memmove+0x10>
|
|
|
|
2d6a: bd10 pop {r4, pc}
|
|
|
|
2d6c: 5ccc ldrb r4, [r1, r3]
|
|
|
|
2d6e: 54c4 strb r4, [r0, r3]
|
|
|
|
2d70: 3301 adds r3, #1
|
|
|
|
2d72: 429a cmp r2, r3
|
|
|
|
2d74: d1fa bne.n 2d6c <memmove+0x1a>
|
|
|
|
2d76: e7f8 b.n 2d6a <memmove+0x18>
|
|
|
|
|
|
|
|
00002d78 <__malloc_lock>:
|
|
|
|
2d78: b510 push {r4, lr}
|
|
|
|
2d7a: 4802 ldr r0, [pc, #8] ; (2d84 <__malloc_lock+0xc>)
|
|
|
|
2d7c: f7ff fc88 bl 2690 <__retarget_lock_acquire_recursive>
|
|
|
|
2d80: bd10 pop {r4, pc}
|
|
|
|
2d82: 46c0 nop ; (mov r8, r8)
|
|
|
|
2d84: 200006c0 .word 0x200006c0
|
|
|
|
|
|
|
|
00002d88 <__malloc_unlock>:
|
|
|
|
2d88: b510 push {r4, lr}
|
|
|
|
2d8a: 4802 ldr r0, [pc, #8] ; (2d94 <__malloc_unlock+0xc>)
|
|
|
|
2d8c: f7ff fc81 bl 2692 <__retarget_lock_release_recursive>
|
|
|
|
2d90: bd10 pop {r4, pc}
|
|
|
|
2d92: 46c0 nop ; (mov r8, r8)
|
|
|
|
2d94: 200006c0 .word 0x200006c0
|
|
|
|
|
|
|
|
00002d98 <_free_r>:
|
|
|
|
2d98: b570 push {r4, r5, r6, lr}
|
|
|
|
2d9a: 0005 movs r5, r0
|
|
|
|
2d9c: 2900 cmp r1, #0
|
|
|
|
2d9e: d010 beq.n 2dc2 <_free_r+0x2a>
|
|
|
|
2da0: 1f0c subs r4, r1, #4
|
|
|
|
2da2: 6823 ldr r3, [r4, #0]
|
|
|
|
2da4: 2b00 cmp r3, #0
|
|
|
|
2da6: da00 bge.n 2daa <_free_r+0x12>
|
|
|
|
2da8: 18e4 adds r4, r4, r3
|
|
|
|
2daa: 0028 movs r0, r5
|
|
|
|
2dac: f7ff ffe4 bl 2d78 <__malloc_lock>
|
|
|
|
2db0: 4a1d ldr r2, [pc, #116] ; (2e28 <_free_r+0x90>)
|
|
|
|
2db2: 6813 ldr r3, [r2, #0]
|
|
|
|
2db4: 2b00 cmp r3, #0
|
|
|
|
2db6: d105 bne.n 2dc4 <_free_r+0x2c>
|
|
|
|
2db8: 6063 str r3, [r4, #4]
|
|
|
|
2dba: 6014 str r4, [r2, #0]
|
|
|
|
2dbc: 0028 movs r0, r5
|
|
|
|
2dbe: f7ff ffe3 bl 2d88 <__malloc_unlock>
|
|
|
|
2dc2: bd70 pop {r4, r5, r6, pc}
|
|
|
|
2dc4: 42a3 cmp r3, r4
|
|
|
|
2dc6: d908 bls.n 2dda <_free_r+0x42>
|
|
|
|
2dc8: 6821 ldr r1, [r4, #0]
|
|
|
|
2dca: 1860 adds r0, r4, r1
|
|
|
|
2dcc: 4283 cmp r3, r0
|
|
|
|
2dce: d1f3 bne.n 2db8 <_free_r+0x20>
|
|
|
|
2dd0: 6818 ldr r0, [r3, #0]
|
|
|
|
2dd2: 685b ldr r3, [r3, #4]
|
|
|
|
2dd4: 1841 adds r1, r0, r1
|
|
|
|
2dd6: 6021 str r1, [r4, #0]
|
|
|
|
2dd8: e7ee b.n 2db8 <_free_r+0x20>
|
|
|
|
2dda: 001a movs r2, r3
|
|
|
|
2ddc: 685b ldr r3, [r3, #4]
|
|
|
|
2dde: 2b00 cmp r3, #0
|
|
|
|
2de0: d001 beq.n 2de6 <_free_r+0x4e>
|
|
|
|
2de2: 42a3 cmp r3, r4
|
|
|
|
2de4: d9f9 bls.n 2dda <_free_r+0x42>
|
|
|
|
2de6: 6811 ldr r1, [r2, #0]
|
|
|
|
2de8: 1850 adds r0, r2, r1
|
|
|
|
2dea: 42a0 cmp r0, r4
|
|
|
|
2dec: d10b bne.n 2e06 <_free_r+0x6e>
|
|
|
|
2dee: 6820 ldr r0, [r4, #0]
|
|
|
|
2df0: 1809 adds r1, r1, r0
|
|
|
|
2df2: 1850 adds r0, r2, r1
|
|
|
|
2df4: 6011 str r1, [r2, #0]
|
|
|
|
2df6: 4283 cmp r3, r0
|
|
|
|
2df8: d1e0 bne.n 2dbc <_free_r+0x24>
|
|
|
|
2dfa: 6818 ldr r0, [r3, #0]
|
|
|
|
2dfc: 685b ldr r3, [r3, #4]
|
|
|
|
2dfe: 1841 adds r1, r0, r1
|
|
|
|
2e00: 6011 str r1, [r2, #0]
|
|
|
|
2e02: 6053 str r3, [r2, #4]
|
|
|
|
2e04: e7da b.n 2dbc <_free_r+0x24>
|
|
|
|
2e06: 42a0 cmp r0, r4
|
|
|
|
2e08: d902 bls.n 2e10 <_free_r+0x78>
|
|
|
|
2e0a: 230c movs r3, #12
|
|
|
|
2e0c: 602b str r3, [r5, #0]
|
|
|
|
2e0e: e7d5 b.n 2dbc <_free_r+0x24>
|
|
|
|
2e10: 6821 ldr r1, [r4, #0]
|
|
|
|
2e12: 1860 adds r0, r4, r1
|
|
|
|
2e14: 4283 cmp r3, r0
|
|
|
|
2e16: d103 bne.n 2e20 <_free_r+0x88>
|
|
|
|
2e18: 6818 ldr r0, [r3, #0]
|
|
|
|
2e1a: 685b ldr r3, [r3, #4]
|
|
|
|
2e1c: 1841 adds r1, r0, r1
|
|
|
|
2e1e: 6021 str r1, [r4, #0]
|
|
|
|
2e20: 6063 str r3, [r4, #4]
|
|
|
|
2e22: 6054 str r4, [r2, #4]
|
|
|
|
2e24: e7ca b.n 2dbc <_free_r+0x24>
|
|
|
|
2e26: 46c0 nop ; (mov r8, r8)
|
|
|
|
2e28: 200006b4 .word 0x200006b4
|
|
|
|
|
|
|
|
00002e2c <_realloc_r>:
|
|
|
|
2e2c: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
2e2e: 0007 movs r7, r0
|
|
|
|
2e30: 000d movs r5, r1
|
|
|
|
2e32: 0016 movs r6, r2
|
|
|
|
2e34: 2900 cmp r1, #0
|
|
|
|
2e36: d105 bne.n 2e44 <_realloc_r+0x18>
|
|
|
|
2e38: 0011 movs r1, r2
|
|
|
|
2e3a: f7ff fc2b bl 2694 <_malloc_r>
|
|
|
|
2e3e: 0004 movs r4, r0
|
|
|
|
2e40: 0020 movs r0, r4
|
|
|
|
2e42: bdf8 pop {r3, r4, r5, r6, r7, pc}
|
|
|
|
2e44: 2a00 cmp r2, #0
|
|
|
|
2e46: d103 bne.n 2e50 <_realloc_r+0x24>
|
|
|
|
2e48: f7ff ffa6 bl 2d98 <_free_r>
|
|
|
|
2e4c: 0034 movs r4, r6
|
|
|
|
2e4e: e7f7 b.n 2e40 <_realloc_r+0x14>
|
|
|
|
2e50: f000 f812 bl 2e78 <_malloc_usable_size_r>
|
|
|
|
2e54: 002c movs r4, r5
|
|
|
|
2e56: 42b0 cmp r0, r6
|
|
|
|
2e58: d2f2 bcs.n 2e40 <_realloc_r+0x14>
|
|
|
|
2e5a: 0031 movs r1, r6
|
|
|
|
2e5c: 0038 movs r0, r7
|
|
|
|
2e5e: f7ff fc19 bl 2694 <_malloc_r>
|
|
|
|
2e62: 1e04 subs r4, r0, #0
|
|
|
|
2e64: d0ec beq.n 2e40 <_realloc_r+0x14>
|
|
|
|
2e66: 0029 movs r1, r5
|
|
|
|
2e68: 0032 movs r2, r6
|
|
|
|
2e6a: f7ff fbd7 bl 261c <memcpy>
|
|
|
|
2e6e: 0029 movs r1, r5
|
|
|
|
2e70: 0038 movs r0, r7
|
|
|
|
2e72: f7ff ff91 bl 2d98 <_free_r>
|
|
|
|
2e76: e7e3 b.n 2e40 <_realloc_r+0x14>
|
|
|
|
|
|
|
|
00002e78 <_malloc_usable_size_r>:
|
|
|
|
2e78: 1f0b subs r3, r1, #4
|
|
|
|
2e7a: 681b ldr r3, [r3, #0]
|
|
|
|
2e7c: 1f18 subs r0, r3, #4
|
|
|
|
2e7e: 2b00 cmp r3, #0
|
|
|
|
2e80: da01 bge.n 2e86 <_malloc_usable_size_r+0xe>
|
|
|
|
2e82: 580b ldr r3, [r1, r0]
|
|
|
|
2e84: 18c0 adds r0, r0, r3
|
|
|
|
2e86: 4770 bx lr
|
|
|
|
|
|
|
|
00002e88 <_usb_ep_cfgs>:
|
|
|
|
2e88: 0420 2000 0000 0000 0040 0000 03e0 2000 .. ....@......
|
|
|
|
2e98: 0000 0000 0040 0000 03a0 2000 0000 0000 ....@...... ....
|
|
|
|
2ea8: 0040 0000 2e2e 682f 6c61 752f 6974 736c @...../hal/utils
|
|
|
|
2eb8: 732f 6372 752f 6974 736c 6c5f 7369 2e74 /src/utils_list.
|
|
|
|
2ec8: 0063 2e2e 682f 6c61 732f 6372 682f 6c61 c.../hal/src/hal
|
|
|
|
2ed8: 755f 6173 7472 735f 6e79 2e63 0063 _usart_sync.c.
|
|
|
|
|
|
|
|
00002ee6 <CSWTCH.37>:
|
|
|
|
2ee6: 01ed 0101 0201 .......
|
|
|
|
|
|
|
|
00002eed <CSWTCH.40>:
|
|
|
|
2eed: 00ed 0101 0201 48f0 6c65 6f6c 5720 726f .......Hello Wor
|
|
|
|
2efd: 646c 2e00 2f2e 7068 2f6c 6573 6372 6d6f ld.../hpl/sercom
|
|
|
|
2f0d: 682f 6c70 735f 7265 6f63 2e6d 0063 2e2e /hpl_sercom.c...
|
|
|
|
2f1d: 752f 6273 642f 7665 6369 2f65 7375 6462 /usb/device/usbd
|
|
|
|
2f2d: 2e63 0063 0000 c.c....
|
|
|
|
|
|
|
|
00002f34 <__sf_fake_stderr>:
|
|
|
|
...
|
|
|
|
|
|
|
|
00002f54 <__sf_fake_stdin>:
|
|
|
|
...
|
|
|
|
|
|
|
|
00002f74 <__sf_fake_stdout>:
|
|
|
|
...
|
|
|
|
2f94: 2d23 2b30 0020 6c68 004c 6665 4567 4746 #-0+ .hlL.efgEFG
|
|
|
|
2fa4: 3000 3231 3433 3635 3837 4139 4342 4544 .0123456789ABCDE
|
|
|
|
2fb4: 0046 3130 3332 3534 3736 3938 6261 6463 F.0123456789abcd
|
|
|
|
2fc4: 6665 0000 ef..
|
|
|
|
|
|
|
|
00002fc8 <_init>:
|
|
|
|
2fc8: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
2fca: 46c0 nop ; (mov r8, r8)
|
|
|
|
2fcc: bcf8 pop {r3, r4, r5, r6, r7}
|
|
|
|
2fce: bc08 pop {r3}
|
|
|
|
2fd0: 469e mov lr, r3
|
|
|
|
2fd2: 4770 bx lr
|
|
|
|
|
|
|
|
00002fd4 <__frame_dummy_init_array_entry>:
|
|
|
|
2fd4: 00dd 0000 ....
|
|
|
|
|
|
|
|
00002fd8 <_fini>:
|
|
|
|
2fd8: b5f8 push {r3, r4, r5, r6, r7, lr}
|
|
|
|
2fda: 46c0 nop ; (mov r8, r8)
|
|
|
|
2fdc: bcf8 pop {r3, r4, r5, r6, r7}
|
|
|
|
2fde: bc08 pop {r3}
|
|
|
|
2fe0: 469e mov lr, r3
|
|
|
|
2fe2: 4770 bx lr
|
|
|
|
|
|
|
|
00002fe4 <__do_global_dtors_aux_fini_array_entry>:
|
|
|
|
2fe4: 00b5 0000 ....
|