⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lss

📁 example lis302 lpc2142
💻 LSS
📖 第 1 页 / 共 5 页
字号:
    2570:	e5832000 	str	r2, [r3]
	return register_contents;
    2574:	e55b300d 	ldrb	r3, [fp, #-13]
}
    2578:	e1a00003 	mov	r0, r3
    257c:	e24bd00c 	sub	sp, fp, #12	; 0xc
    2580:	e89d6800 	ldmia	sp, {fp, sp, lr}
    2584:	e12fff1e 	bx	lr

00002588 <WriteLis302Register>:

void WriteLis302Register(char register_name, char register_value){
    2588:	e1a0c00d 	mov	ip, sp
    258c:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    2590:	e24cb004 	sub	fp, ip, #4	; 0x4
    2594:	e24dd008 	sub	sp, sp, #8	; 0x8
    2598:	e1a03000 	mov	r3, r0
    259c:	e1a02001 	mov	r2, r1
    25a0:	e54b3010 	strb	r3, [fp, #-16]
    25a4:	e1a03002 	mov	r3, r2
    25a8:	e54b3014 	strb	r3, [fp, #-20]
	SelectAccel();
    25ac:	e3a032ce 	mov	r3, #-536870900	; 0xe000000c
    25b0:	e283390a 	add	r3, r3, #163840	; 0x28000
    25b4:	e3a02080 	mov	r2, #128	; 0x80
    25b8:	e5832000 	str	r2, [r3]
	SPI0_send(WRITE | register_name);
    25bc:	e55b3010 	ldrb	r3, [fp, #-16]
    25c0:	e1a00003 	mov	r0, r3
    25c4:	eb000027 	bl	2668 <SPI0_send>
	SPI0_send(register_value);
    25c8:	e55b3014 	ldrb	r3, [fp, #-20]
    25cc:	e1a00003 	mov	r0, r3
    25d0:	eb000024 	bl	2668 <SPI0_send>
	UnselectAccel();
    25d4:	e3a0324e 	mov	r3, #-536870908	; 0xe0000004
    25d8:	e283390a 	add	r3, r3, #163840	; 0x28000
    25dc:	e3a02080 	mov	r2, #128	; 0x80
    25e0:	e5832000 	str	r2, [r3]
}
    25e4:	e24bd00c 	sub	sp, fp, #12	; 0xc
    25e8:	e89d6800 	ldmia	sp, {fp, sp, lr}
    25ec:	e12fff1e 	bx	lr

000025f0 <SPI0_Init>:
#include "LPC214x.h"
#include <stdio.h>

void SPI0_Init(void)		//This function needs to go in bootup() of Main.c
{
    25f0:	e1a0c00d 	mov	ip, sp
    25f4:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    25f8:	e24cb004 	sub	fp, ip, #4	; 0x4

	PINSEL0 = (PINSEL0 & ~(3 << 8)) | (1 << 8); // Enable SCLK0 on P0.4   - Serial Clock
    25fc:	e3a0220e 	mov	r2, #-536870912	; 0xe0000000
    2600:	e282290b 	add	r2, r2, #180224	; 0x2c000
    2604:	e3a0320e 	mov	r3, #-536870912	; 0xe0000000
    2608:	e283390b 	add	r3, r3, #180224	; 0x2c000
    260c:	e5933000 	ldr	r3, [r3]
    2610:	e3c33c03 	bic	r3, r3, #768	; 0x300
    2614:	e3833c01 	orr	r3, r3, #256	; 0x100
    2618:	e5823000 	str	r3, [r2]
	PINSEL0 = (PINSEL0 & ~(3 << 10)) | (1 << 10); // Enable MISO0 on P0.5 - Master In Slave Out
    261c:	e3a0220e 	mov	r2, #-536870912	; 0xe0000000
    2620:	e282290b 	add	r2, r2, #180224	; 0x2c000
    2624:	e3a0320e 	mov	r3, #-536870912	; 0xe0000000
    2628:	e283390b 	add	r3, r3, #180224	; 0x2c000
    262c:	e5933000 	ldr	r3, [r3]
    2630:	e3c33b03 	bic	r3, r3, #3072	; 0xc00
    2634:	e3833b01 	orr	r3, r3, #1024	; 0x400
    2638:	e5823000 	str	r3, [r2]
	PINSEL0 = (PINSEL0 & ~(3 << 12)) | (1 << 12); // Enable MOSI0 on P0.6 - Master Out Slave In
    263c:	e3a0220e 	mov	r2, #-536870912	; 0xe0000000
    2640:	e282290b 	add	r2, r2, #180224	; 0x2c000
    2644:	e3a0320e 	mov	r3, #-536870912	; 0xe0000000
    2648:	e283390b 	add	r3, r3, #180224	; 0x2c000
    264c:	e5933000 	ldr	r3, [r3]
    2650:	e3c33a03 	bic	r3, r3, #12288	; 0x3000
    2654:	e3833a01 	orr	r3, r3, #4096	; 0x1000
    2658:	e5823000 	str	r3, [r2]

}
    265c:	e24bd00c 	sub	sp, fp, #12	; 0xc
    2660:	e89d6800 	ldmia	sp, {fp, sp, lr}
    2664:	e12fff1e 	bx	lr

00002668 <SPI0_send>:

void SPI0_send(char c)
{
    2668:	e1a0c00d 	mov	ip, sp
    266c:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    2670:	e24cb004 	sub	fp, ip, #4	; 0x4
    2674:	e24dd004 	sub	sp, sp, #4	; 0x4
    2678:	e1a03000 	mov	r3, r0
    267c:	e54b3010 	strb	r3, [fp, #-16]
    SPI0_send_recv(c);
    2680:	e55b3010 	ldrb	r3, [fp, #-16]
    2684:	e1a00003 	mov	r0, r3
    2688:	eb00000c 	bl	26c0 <SPI0_send_recv>
}
    268c:	e24bd00c 	sub	sp, fp, #12	; 0xc
    2690:	e89d6800 	ldmia	sp, {fp, sp, lr}
    2694:	e12fff1e 	bx	lr

00002698 <SPI0_recv>:

char SPI0_recv(void)
{
    2698:	e1a0c00d 	mov	ip, sp
    269c:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    26a0:	e24cb004 	sub	fp, ip, #4	; 0x4
    return SPI0_send_recv(0xff);
    26a4:	e3a000ff 	mov	r0, #255	; 0xff
    26a8:	eb000004 	bl	26c0 <SPI0_send_recv>
    26ac:	e1a03000 	mov	r3, r0
}
    26b0:	e1a00003 	mov	r0, r3
    26b4:	e24bd00c 	sub	sp, fp, #12	; 0xc
    26b8:	e89d6800 	ldmia	sp, {fp, sp, lr}
    26bc:	e12fff1e 	bx	lr

000026c0 <SPI0_send_recv>:

char SPI0_send_recv(char c)
{
    26c0:	e1a0c00d 	mov	ip, sp
    26c4:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    26c8:	e24cb004 	sub	fp, ip, #4	; 0x4
    26cc:	e24dd008 	sub	sp, sp, #8	; 0x8
    26d0:	e1a03000 	mov	r3, r0
    26d4:	e54b3014 	strb	r3, [fp, #-20]
    int in;

    S0SPDR = c;						//Place data to be sent into SPI data register
    26d8:	e3a0328e 	mov	r3, #-536870904	; 0xe0000008
    26dc:	e2833802 	add	r3, r3, #131072	; 0x20000
    26e0:	e55b2014 	ldrb	r2, [fp, #-20]
    26e4:	e1c320b0 	strh	r2, [r3]
    while(!(S0SPSR & SPIF));			//Wait for transfer to complete
    26e8:	e3a0324e 	mov	r3, #-536870908	; 0xe0000004
    26ec:	e2833802 	add	r3, r3, #131072	; 0x20000
    26f0:	e5d33000 	ldrb	r3, [r3]
    26f4:	e20330ff 	and	r3, r3, #255	; 0xff
    26f8:	e1a03c03 	mov	r3, r3, lsl #24
    26fc:	e1a03c43 	mov	r3, r3, asr #24
    2700:	e3530000 	cmp	r3, #0	; 0x0
    2704:	aafffff7 	bge	26e8 <SPI0_send_recv+0x28>
    in = S0SPDR&0xff;				//Return the character placed in the SPI data register by the slave
    2708:	e3a0328e 	mov	r3, #-536870904	; 0xe0000008
    270c:	e2833802 	add	r3, r3, #131072	; 0x20000
    2710:	e1d330b0 	ldrh	r3, [r3]
    2714:	e1a03803 	mov	r3, r3, lsl #16
    2718:	e1a03823 	mov	r3, r3, lsr #16
    271c:	e20330ff 	and	r3, r3, #255	; 0xff
    2720:	e50b3010 	str	r3, [fp, #-16]
    return in;
    2724:	e51b3010 	ldr	r3, [fp, #-16]
    2728:	e20330ff 	and	r3, r3, #255	; 0xff
}
    272c:	e1a00003 	mov	r0, r3
    2730:	e24bd00c 	sub	sp, fp, #12	; 0xc
    2734:	e89d6800 	ldmia	sp, {fp, sp, lr}
    2738:	e12fff1e 	bx	lr

0000273c <BulkOut>:
    273c:	e1a0c00d 	mov	ip, sp
    2740:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    2744:	e24cb004 	sub	fp, ip, #4	; 0x4
    2748:	e24dd010 	sub	sp, sp, #16	; 0x10
    274c:	e1a03000 	mov	r3, r0
    2750:	e1a02001 	mov	r2, r1
    2754:	e54b3018 	strb	r3, [fp, #-24]
    2758:	e1a03002 	mov	r3, r2
    275c:	e54b301c 	strb	r3, [fp, #-28]
    2760:	e59f0080 	ldr	r0, [pc, #128]	; 27e8 <.text+0x7e8>
    2764:	eb000195 	bl	2dc0 <fifo_free>
    2768:	e1a03000 	mov	r3, r0
    276c:	e353003f 	cmp	r3, #63	; 0x3f
    2770:	da000019 	ble	27dc <BulkOut+0xa0>
    2774:	e55b3018 	ldrb	r3, [fp, #-24]
    2778:	e1a00003 	mov	r0, r3
    277c:	e59f1068 	ldr	r1, [pc, #104]	; 27ec <.text+0x7ec>
    2780:	e3a02040 	mov	r2, #64	; 0x40
    2784:	eb00025e 	bl	3104 <USBHwEPRead>
    2788:	e1a03000 	mov	r3, r0
    278c:	e50b3010 	str	r3, [fp, #-16]
    2790:	e3a03000 	mov	r3, #0	; 0x0
    2794:	e50b3014 	str	r3, [fp, #-20]
    2798:	ea00000b 	b	27cc <BulkOut+0x90>
    279c:	e51b2014 	ldr	r2, [fp, #-20]
    27a0:	e59f3044 	ldr	r3, [pc, #68]	; 27ec <.text+0x7ec>
    27a4:	e7d33002 	ldrb	r3, [r3, r2]
    27a8:	e59f0038 	ldr	r0, [pc, #56]	; 27e8 <.text+0x7e8>
    27ac:	e1a01003 	mov	r1, r3
    27b0:	eb00014a 	bl	2ce0 <fifo_put>
    27b4:	e1a03000 	mov	r3, r0
    27b8:	e3530000 	cmp	r3, #0	; 0x0
    27bc:	0a000006 	beq	27dc <BulkOut+0xa0>
    27c0:	e51b3014 	ldr	r3, [fp, #-20]
    27c4:	e2833001 	add	r3, r3, #1	; 0x1
    27c8:	e50b3014 	str	r3, [fp, #-20]
    27cc:	e51b2014 	ldr	r2, [fp, #-20]
    27d0:	e51b3010 	ldr	r3, [fp, #-16]
    27d4:	e1520003 	cmp	r2, r3
    27d8:	baffffef 	blt	279c <BulkOut+0x60>
    27dc:	e24bd00c 	sub	sp, fp, #12	; 0xc
    27e0:	e89d6800 	ldmia	sp, {fp, sp, lr}
    27e4:	e12fff1e 	bx	lr
    27e8:	4000016c 	andmi	r0, r0, ip, ror #2
    27ec:	40000018 	andmi	r0, r0, r8, lsl r0

000027f0 <BulkIn>:
    27f0:	e1a0c00d 	mov	ip, sp
    27f4:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    27f8:	e24cb004 	sub	fp, ip, #4	; 0x4
    27fc:	e24dd010 	sub	sp, sp, #16	; 0x10
    2800:	e1a03000 	mov	r3, r0
    2804:	e1a02001 	mov	r2, r1
    2808:	e54b3018 	strb	r3, [fp, #-24]
    280c:	e1a03002 	mov	r3, r2
    2810:	e54b301c 	strb	r3, [fp, #-28]
    2814:	e59f0098 	ldr	r0, [pc, #152]	; 28b4 <.text+0x8b4>
    2818:	eb00015c 	bl	2d90 <fifo_avail>
    281c:	e1a03000 	mov	r3, r0
    2820:	e3530000 	cmp	r3, #0	; 0x0
    2824:	1a000002 	bne	2834 <BulkIn+0x44>
    2828:	e3a00000 	mov	r0, #0	; 0x0
    282c:	eb0001fe 	bl	302c <USBHwNakIntEnable>
    2830:	ea00001c 	b	28a8 <BulkIn+0xb8>
    2834:	e3a03000 	mov	r3, #0	; 0x0
    2838:	e50b3014 	str	r3, [fp, #-20]
    283c:	ea00000c 	b	2874 <BulkIn+0x84>
    2840:	e51b3014 	ldr	r3, [fp, #-20]
    2844:	e1a02003 	mov	r2, r3
    2848:	e59f3068 	ldr	r3, [pc, #104]	; 28b8 <.text+0x8b8>
    284c:	e0823003 	add	r3, r2, r3
    2850:	e59f005c 	ldr	r0, [pc, #92]	; 28b4 <.text+0x8b4>
    2854:	e1a01003 	mov	r1, r3
    2858:	eb000136 	bl	2d38 <fifo_get>
    285c:	e1a03000 	mov	r3, r0
    2860:	e3530000 	cmp	r3, #0	; 0x0
    2864:	0a000005 	beq	2880 <BulkIn+0x90>
    2868:	e51b3014 	ldr	r3, [fp, #-20]
    286c:	e2833001 	add	r3, r3, #1	; 0x1
    2870:	e50b3014 	str	r3, [fp, #-20]
    2874:	e51b3014 	ldr	r3, [fp, #-20]
    2878:	e353003f 	cmp	r3, #63	; 0x3f
    287c:	daffffef 	ble	2840 <BulkIn+0x50>
    2880:	e51b3014 	ldr	r3, [fp, #-20]
    2884:	e50b3010 	str	r3, [fp, #-16]
    2888:	e51b3010 	ldr	r3, [fp, #-16]
    288c:	e3530000 	cmp	r3, #0	; 0x0
    2890:	da000004 	ble	28a8 <BulkIn+0xb8>
    2894:	e55b3018 	ldrb	r3, [fp, #-24]
    2898:	e1a00003 	mov	r0, r3
    289c:	e59f1014 	ldr	r1, [pc, #20]	; 28b8 <.text+0x8b8>
    28a0:	e51b2010 	ldr	r2, [fp, #-16]
    28a4:	eb0001f4 	bl	307c <USBHwEPWrite>
    28a8:	e24bd00c 	sub	sp, fp, #12	; 0xc
    28ac:	e89d6800 	ldmia	sp, {fp, sp, lr}
    28b0:	e12fff1e 	bx	lr
    28b4:	40000160 	andmi	r0, r0, r0, ror #2
    28b8:	40000018 	andmi	r0, r0, r8, lsl r0

000028bc <HandleClassRequest>:
    28bc:	e1a0c00d 	mov	ip, sp
    28c0:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    28c4:	e24cb004 	sub	fp, ip, #4	; 0x4
    28c8:	e24dd014 	sub	sp, sp, #20	; 0x14
    28cc:	e50b0010 	str	r0, [fp, #-16]
    28d0:	e50b1014 	str	r1, [fp, #-20]
    28d4:	e50b2018 	str	r2, [fp, #-24]
    28d8:	e51b3010 	ldr	r3, [fp, #-16]
    28dc:	e5d33001 	ldrb	r3, [r3, #1]
    28e0:	e50b3020 	str	r3, [fp, #-32]
    28e4:	e51b3020 	ldr	r3, [fp, #-32]
    28e8:	e3530021 	cmp	r3, #33	; 0x21
    28ec:	0a000012 	beq	293c <HandleClassRequest+0x80>
    28f0:	e51b3020 	ldr	r3, [fp, #-32]
    28f4:	e3530022 	cmp	r3, #34	; 0x22
    28f8:	0a000019 	beq	2964 <HandleClassRequest+0xa8>
    28fc:	e51b3020 	ldr	r3, [fp, #-32]
    2900:	e3530020 	cmp	r3, #32	; 0x20
    2904:	0a000000 	beq	290c <HandleClassRequest+0x50>
    2908:	ea000012 	b	2958 <HandleClassRequest+0x9c>
    290c:	e59f206c 	ldr	r2, [pc, #108]	; 2980 <.text+0x980>
    2910:	e51b3018 	ldr	r3, [fp, #-24]
    2914:	e5933000 	ldr	r3, [r3]
    2918:	e3a0c007 	mov	ip, #7	; 0x7
    291c:	e1a00002 	mov	r0, r2
    2920:	e1a01003 	mov	r1, r3
    2924:	e1a0200c 	mov	r2, ip
    2928:	eb000534 	bl	3e00 <__memcpy_from_arm>
    292c:	e51b2014 	ldr	r2, [fp, #-20]
    2930:	e3a03007 	mov	r3, #7	; 0x7
    2934:	e5823000 	str	r3, [r2]
    2938:	ea000009 	b	2964 <HandleClassRequest+0xa8>
    293c:	e59f203c 	ldr	r2, [pc, #60]	; 2980 <.text+0x980>
    2940:	e51b3018 	ldr	r3, [fp, #-24]
    2944:	e5832000 	str	r2, [r3]
    2948:	e51b2014 	ldr	r2, [fp, #-20]
    294c:	e3a03007 	mov	r3, #7	; 0x7
    2950:	e5823000 	str	r3, [r2]
    2954:	ea000002 	b	2964 <HandleClassRequest+0xa8>
    2958:	e3a03000 	mov	r3, #0	; 0x0
    295c:	e50b301c 	str	r3, [fp, #-28]
    2960:	ea000001 	b	296c <HandleClassRequest+0xb0>
    2964:	e3a03001 	mov	r3, #1	; 0x1
    2968:	e50b301c 	str	r3, [fp, #-28]
    296c:	e51b301c 	ldr	r3, [fp, #-28]
    2970:	e1a00003 	mov	r0, r3
    2974:	e24bd00c 	sub	sp, fp, #12	; 0xc
    2978:	e89d6800 	ldmia	sp, {fp, sp, lr}
    297c:	e12fff1e 	bx	lr
    2980:	40000000 	andmi	r0, r0, r0

00002984 <VCOM_init_internal>:
    2984:	e1a0c00d 	mov	ip, sp
    2988:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    298c:	e24cb004 	sub	fp, ip, #4	; 0x4
    2990:	e59f001c 	ldr	r0, [pc, #28]	; 29b4 <.text+0x9b4>
    2994:	e59f101c 	ldr	r1, [pc, #28]	; 29b8 <.text+0x9b8>
    2998:	eb0000cb 	bl	2ccc <fifo_init>
    299c:	e59f0018 	ldr	r0, [pc, #24]	; 29bc <.text+0x9bc>
    29a0:	e59f1018 	ldr	r1, [pc, #24]	; 29c0 <.text+0x9c0>
    29a4:	eb0000c8 	bl	2ccc <fifo_init>
    29a8:	e24bd00c 	sub	sp, fp, #12	; 0xc
    29ac:	e89d6800 	ldmia	sp, {fp, sp, lr}
    29b0:	e12fff1e 	bx	lr
    29b4:	40000160 	andmi	r0, r0, r0, ror #2
    29b8:	40000060 	andmi	r0, r0, r0, rrx
    29bc:	4000016c 	andmi	r0, r0, ip, ror #2
    29c0:	400000e0 	andmi	r0, r0, r0, ror #1

000029c4 <VCOM_putchar_nonblock>:
    29c4:	e1a0c00d 	mov	ip, sp
    29c8:	e92dd800 	stmdb	sp!, {fp, ip, lr, pc}
    29cc:	e24cb004 	sub	fp, ip, #4	; 0x4
    29d0:	e24dd008 	sub	sp, sp, #8	; 0x8
    29d4:	e50b0010 	str	r0, [fp, #-16]
    29d8:	e51b3010 	ldr	r3, [fp, #-16]
    29dc:	e20330ff 	and	r3, r3, #255	; 0xff
    29e0:	e59f0038 	ldr	r0, [pc, #56]	; 2a20 <.text+0xa20>
    29e4:	e1a01003 	mov	r1, r3
    29e8:	eb0000bc 	bl	2ce0 <fifo_put>
    29ec:	e1a03000 	mov	r3, r0
    29f0:	e3530000 	cmp	r3, #0	; 0x0
    29f4:	0a000002 	beq	2a04 <VCOM_putchar_nonblock+0x40>
    29f8:	e51b3010 	ldr	r3, [fp, #-16]
    29fc:	e50b3014 	str	r3, [fp, #-20]
    2a00:	ea000001 	b	2a0c <VCOM_putchar_nonblock+0x48>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -