Add branch for the conversion of demos to use standard C header files for configurati...
[pub/USBasp.git] / Bootloaders / CDC / BootloaderAPITable.S
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2011.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.lufa-lib.org
7 */
8
9 /*
10 Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 ; Bootloader API Jump Table
32 .section .apitable, "ax"
33
34 ; Trampolines to actual API implementations if the target address is outside the
35 ; range of a rjmp instruction (can happen with large bootloader sections)
36 .org 0
37 BootloaderAPI_ErasePage_Trampoline:
38 jmp BootloaderAPI_ErasePage
39 BootloaderAPI_WritePage_Trampoline:
40 jmp BootloaderAPI_WritePage
41 BootloaderAPI_FillWord_Trampoline:
42 jmp BootloaderAPI_FillWord
43 BootloaderAPI_ReadSignature_Trampoline:
44 jmp BootloaderAPI_ReadSignature
45 BootloaderAPI_ReadFuse_Trampoline:
46 jmp BootloaderAPI_ReadFuse
47 BootloaderAPI_ReadLock_Trampoline:
48 jmp BootloaderAPI_ReadLock
49 BootloaderAPI_WriteLock_Trampoline:
50 jmp BootloaderAPI_WriteLock
51 BootloaderAPU_UNUSED:
52 ret
53
54 ; API function jump table
55 .org (96 - 32)
56 .global BootloaderAPI_JumpTable
57 BootloaderAPI_JumpTable:
58 rjmp BootloaderAPI_ErasePage_Trampoline
59 rjmp BootloaderAPI_WritePage_Trampoline
60 rjmp BootloaderAPI_FillWord_Trampoline
61 rjmp BootloaderAPI_ReadSignature_Trampoline
62 rjmp BootloaderAPI_ReadFuse_Trampoline
63 rjmp BootloaderAPI_ReadLock_Trampoline
64 rjmp BootloaderAPI_WriteLock_Trampoline
65 rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
66 rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
67 rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
68 rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
69 rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
70
71 ; Bootloader table signatures and information
72 .org (96 - 8)
73 BootloaderAPI_Signatures:
74 .global BootloaderAPI_Signatures
75 .long BOOT_START_ADDR ; Start address of the bootloader
76 .word 0xCDC1 ; Signature for the CDC class bootloader, V1
77 .word 0xDCFB ; Signature for a LUFA class bootloader