Improve bootloader documentation.
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 12 Oct 2014 05:58:42 +0000 (16:58 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 12 Oct 2014 05:58:42 +0000 (16:58 +1100)
16 files changed:
Bootloaders/CDC/BootloaderAPI.h
Bootloaders/CDC/BootloaderAPITable.S
Bootloaders/CDC/BootloaderCDC.txt
Bootloaders/CDC/doxyfile
Bootloaders/DFU/BootloaderAPI.h
Bootloaders/DFU/BootloaderAPITable.S
Bootloaders/DFU/BootloaderDFU.txt
Bootloaders/DFU/doxyfile
Bootloaders/MassStorage/BootloaderAPI.h
Bootloaders/MassStorage/BootloaderAPITable.S
Bootloaders/MassStorage/BootloaderMassStorage.txt
Bootloaders/MassStorage/doxyfile
Bootloaders/Printer/BootloaderAPI.h
Bootloaders/Printer/BootloaderAPITable.S
Bootloaders/Printer/BootloaderPrinter.txt
Bootloaders/Printer/doxyfile

index 2462cac..89ef46e 100644 (file)
 
                #include "Config/AppConfig.h"
 
+       /* User Application API: */
+               /** [User Application API] */
+               #define BOOTLOADER_API_TABLE_SIZE          32
+               #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
+               #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
+
+               void    (*BootAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
+               void    (*BootAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
+               void    (*BootAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
+               uint8_t (*BootAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
+               uint8_t (*BootAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
+               uint8_t (*BootAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
+               void    (*BootAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
+
+               #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
+               #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
+
+               #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
+               #define BOOTLOADER_CDC_SIGNATURE           0xDF00
+
+               #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
+               #define BOOTLOADER_ADDRESS_LENGTH          4
+               /** [User Application API] */
+
        /* Function Prototypes: */
                void    BootloaderAPI_ErasePage(const uint32_t Address);
                void    BootloaderAPI_WritePage(const uint32_t Address);
index 69ebd38..ebc514b 100644 (file)
@@ -87,5 +87,5 @@ BootloaderAPI_JumpTable:
 BootloaderAPI_Signatures:
 
        .long BOOT_START_ADDR ; Start address of the bootloader
-       .word 0xDF00 ; Signature for the CDC class bootloader
-       .word 0xDCFB ; Signature for a LUFA class bootloader
+       .word 0xDF00          ; Signature for the CDC class bootloader
+       .word 0xDCFB          ; Signature for a LUFA class bootloader
index f8c349c..bc3e9df 100644 (file)
  *  By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
  *  following layout:
  *
- *  \code
- *  #define BOOTLOADER_API_TABLE_SIZE          32
- *  #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
- *  #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
- *
- *  void    (*BootloaderAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
- *  void    (*BootloaderAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
- *  void    (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
- *  uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
- *  uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
- *  uint8_t (*BootloaderAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
- *  void    (*BootloaderAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
- *
- *  #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
- *  #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
- *
- *  #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
- *  #define BOOTLOADER_CDC_SIGNATURE           0xDF00
- *
- *  #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
- *  #define BOOTLOADER_ADDRESS_LENGTH          4
- *  \endcode
+ *  \snippet BootloaderAPI.h User Application API
  *
  *  From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address
  *  \c BOOTLOADER_MAGIC_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader
index 2dfb2a0..26fcc8a 100644 (file)
@@ -834,7 +834,7 @@ EXCLUDE_SYMBOLS        = __* \
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           =
+EXAMPLE_PATH           = .
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
index 2462cac..9502bd9 100644 (file)
 
                #include "Config/AppConfig.h"
 
+       /* User Application API: */
+               /** [User Application API] */
+               #define BOOTLOADER_API_TABLE_SIZE          32
+               #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
+               #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
+
+               void    (*BootAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
+               void    (*BootAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
+               void    (*BootAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
+               uint8_t (*BootAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
+               uint8_t (*BootAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
+               uint8_t (*BootAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
+               void    (*BootAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
+
+               #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
+               #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
+
+               #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
+               #define BOOTLOADER_CDC_SIGNATURE           0xDF10
+
+               #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
+               #define BOOTLOADER_ADDRESS_LENGTH          4
+               /** [User Application API] */
+
        /* Function Prototypes: */
                void    BootloaderAPI_ErasePage(const uint32_t Address);
                void    BootloaderAPI_WritePage(const uint32_t Address);
index 101dcbd..52bd6f8 100644 (file)
@@ -87,5 +87,5 @@ BootloaderAPI_JumpTable:
 BootloaderAPI_Signatures:
 
        .long BOOT_START_ADDR ; Start address of the bootloader
-       .word 0xDF10 ; Signature for the DFU class bootloader, V1
-       .word 0xDCFB ; Signature for a LUFA class bootloader
+       .word 0xDF10          ; Signature for the DFU class bootloader, V1
+       .word 0xDCFB          ; Signature for a LUFA class bootloader
index b2540a5..801b6df 100644 (file)
  *  By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
  *  following layout:
  *
- *  \code
- *  #define BOOTLOADER_API_TABLE_SIZE          32
- *  #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
- *  #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
- *
- *  void    (*BootloaderAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
- *  void    (*BootloaderAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
- *  void    (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
- *  uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
- *  uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
- *  uint8_t (*BootloaderAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
- *  void    (*BootloaderAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
- *
- *  #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
- *  #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
- *
- *  #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
- *  #define BOOTLOADER_DFU_SIGNATURE           0xDF10
- *
- *  #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
- *  #define BOOTLOADER_ADDRESS_LENGTH          4
- *  \endcode
+ *  \snippet BootloaderAPI.h User Application API
  *
  *  From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address
  *  \c BOOTLOADER_MAGIC_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader
index 6cc42af..07e331c 100644 (file)
@@ -834,7 +834,7 @@ EXCLUDE_SYMBOLS        = __* \
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           =
+EXAMPLE_PATH           = .
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
index 0f0cd70..56748b7 100644 (file)
                        #define AUX_BOOT_SECTION
                #endif
 
+       /* User Application API: */
+               /** [User Application API] */
+               #define BOOTLOADER_API_TABLE_SIZE          32
+               #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
+               #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
+
+               void    (*BootAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
+               void    (*BootAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
+               void    (*BootAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
+               uint8_t (*BootAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
+               uint8_t (*BootAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
+               uint8_t (*BootAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
+               void    (*BootAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
+
+               #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
+               #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
+
+               #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
+               #define BOOTLOADER_CDC_SIGNATURE           0xDF30
+
+               #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
+               #define BOOTLOADER_ADDRESS_LENGTH          4
+               /** [User Application API] */
+
        /* Function Prototypes: */
                void    BootloaderAPI_ErasePage(const uint32_t Address);
                void    BootloaderAPI_WritePage(const uint32_t Address);
index 6844d4b..02a3047 100644 (file)
@@ -98,5 +98,5 @@ BootloaderAPI_JumpTable:
 BootloaderAPI_Signatures:\r
 \r
        .long BOOT_START_ADDR ; Start address of the bootloader\r
-       .word 0xDF30 ; Signature for the MS class bootloader, V1\r
-       .word 0xDCFB ; Signature for a LUFA class bootloader\r
+       .word 0xDF30          ; Signature for the MS class bootloader, V1\r
+       .word 0xDCFB          ; Signature for a LUFA class bootloader\r
index 190ff4a..ab77c5d 100644 (file)
  *  By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
  *  following layout:
  *
- *  \code
- *  #define BOOTLOADER_API_TABLE_SIZE          32
- *  #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
- *  #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
- *
- *  void    (*BootloaderAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
- *  void    (*BootloaderAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
- *  void    (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
- *  uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
- *  uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
- *  uint8_t (*BootloaderAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
- *  void    (*BootloaderAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
- *
- *  #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
- *  #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
- *
- *  #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
- *  #define BOOTLOADER_MASS_STORAGE_SIGNATURE  0xDF30
- *
- *  #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
- *  #define BOOTLOADER_ADDRESS_LENGTH          4
- *  \endcode
+ *  \snippet BootloaderAPI.h User Application API
  *
  *  From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address
  *  \c BOOTLOADER_MAGIC_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader
index 9e81690..6f8bf9e 100644 (file)
@@ -834,7 +834,7 @@ EXCLUDE_SYMBOLS        = __* \
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           =
+EXAMPLE_PATH           = .
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
index f44ab06..990ffb9 100644 (file)
 
                #include <LUFA/Common/Common.h>
 
+       /* User Application API: */
+               /** [User Application API] */
+               #define BOOTLOADER_API_TABLE_SIZE          32
+               #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
+               #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
+
+               void    (*BootAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
+               void    (*BootAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
+               void    (*BootAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
+               uint8_t (*BootAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
+               uint8_t (*BootAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
+               uint8_t (*BootAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
+               void    (*BootAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
+
+               #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
+               #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
+
+               #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
+               #define BOOTLOADER_CDC_SIGNATURE           0xDF20
+
+               #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
+               #define BOOTLOADER_ADDRESS_LENGTH          4
+               /** [User Application API] */
+
        /* Function Prototypes: */
                void    BootloaderAPI_ErasePage(const uint32_t Address);
                void    BootloaderAPI_WritePage(const uint32_t Address);
index ec499b7..8e1badf 100644 (file)
@@ -87,5 +87,5 @@ BootloaderAPI_JumpTable:
 BootloaderAPI_Signatures:\r
 \r
        .long BOOT_START_ADDR ; Start address of the bootloader\r
-       .word 0xDF20 ; Signature for the Printer class bootloader\r
-       .word 0xDCFB ; Signature for a LUFA class bootloader\r
+       .word 0xDF20          ; Signature for the Printer class bootloader\r
+       .word 0xDCFB          ; Signature for a LUFA class bootloader\r
index d9aa796..68c3972 100644 (file)
  *  By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
  *  following layout:
  *
- *  \code
- *  #define BOOTLOADER_API_TABLE_SIZE          32
- *  #define BOOTLOADER_API_TABLE_START         ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
- *  #define BOOTLOADER_API_CALL(Index)         (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
- *
- *  void    (*BootloaderAPI_ErasePage)(uint32_t Address)               = BOOTLOADER_API_CALL(0);
- *  void    (*BootloaderAPI_WritePage)(uint32_t Address)               = BOOTLOADER_API_CALL(1);
- *  void    (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
- *  uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address)           = BOOTLOADER_API_CALL(3);
- *  uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address)                = BOOTLOADER_API_CALL(4);
- *  uint8_t (*BootloaderAPI_ReadLock)(void)                            = BOOTLOADER_API_CALL(5);
- *  void    (*BootloaderAPI_WriteLock)(uint8_t LockBits)               = BOOTLOADER_API_CALL(6);
- *
- *  #define BOOTLOADER_MAGIC_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
- *  #define BOOTLOADER_MAGIC_SIGNATURE         0xDCFB
- *
- *  #define BOOTLOADER_CLASS_SIGNATURE_START   (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
- *  #define BOOTLOADER_PRINTER_SIGNATURE       0xDF20
- *
- *  #define BOOTLOADER_ADDRESS_START           (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
- *  #define BOOTLOADER_ADDRESS_LENGTH          4
- *  \endcode
+ *  \snippet BootloaderAPI.h User Application API
  *
  *  From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address
  *  \c BOOTLOADER_MAGIC_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader
index a81be54..733512d 100644 (file)
@@ -834,7 +834,7 @@ EXCLUDE_SYMBOLS        = __* \
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           =
+EXAMPLE_PATH           = .
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and