Skip to content

Commit

Permalink
Added duplets bootloader defines for user bootloader types
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Nov 1, 2023
1 parent 8067f13 commit d75c560
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
22 changes: 22 additions & 0 deletions src/vscp/common/mdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1738,18 +1738,36 @@ class CMDF_BootLoaderInfo : public CMDF_Object {
*/
uint8_t getAlgorithm(void) { return m_nAlgorithm; };

/*!
Set bootloader algorithm
@param nAlgorithm Code for Bootloader algorithm
*/
void setAlgorithm(uint8_t nAlgorithm) { m_nAlgorithm = nAlgorithm; }

/*!
get bootloader block size
@return Bootloader block size
*/
uint32_t getBlockSize(void) { return m_nBlockSize; };

/*!
Set bootloader blocksize
@param size Blocksize to set
*/
void setBlocksize(uint32_t size) { m_nBlockSize = size; };

/*!
Get bootloader block count
@return Bootloader block count
*/
uint32_t getBlockCount(void) { return m_nBlockCount; };

/*!
Set block count
@param cnt Number of bootloader blocks
*/
void setBlockCount(uint32_t cnt) { m_nBlockCount = cnt; };

private:
uint8_t m_nAlgorithm; // Bootloader algorithm used by device
uint32_t m_nBlockSize; // Size for one boot block
Expand Down Expand Up @@ -3187,6 +3205,8 @@ class CMDF : public CMDF_Object {
*/
std::string getManufacturerCountryAddress(void) { return m_manufacturer.m_address.m_strCountry; };

// ---------------------------------------------------------------------------------------------

/*!
Get number of module pictures
@return Number of pictures available.
Expand All @@ -3203,6 +3223,8 @@ class CMDF : public CMDF_Object {
return ((m_list_picture.size() <= index) ? nullptr : m_list_picture[index]);
};

std::deque<CMDF_Picture *> getPictureObj(void) { return m_list_picture; };

/*!
Get number of module videos
@return Number of videos available.
Expand Down
18 changes: 17 additions & 1 deletion src/vscp/common/vscp.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,26 +384,42 @@ typedef VSCPChannelInfo *PVSCPCHANNELINFO;
#define VSCP_BOOTLOADER_PIC1 0x01 /* PIC algorithm 0 */
#define VSCP_BOOTLOADER_AVR1 0x10 /* AVR algorithm 0 */
#define VSCP_BOOTLOADER_LPC1 0x20 /* NXP/Philips/Freescale algorithm 0 */
#define VSPP_BOOTLOADER_NXP1 0x20 /* NXP/Philips/Freescale algorithm 0 */
#define VSCP_BOOTLOADER_NXP1 0x20 /* NXP/Philips/Freescale algorithm 0 */
#define VSCP_BOOTLOADER_ST 0x30 /* ST STR algorithm 0 */
#define VSCP_BOOTLOADER_FREESCALE 0x40 /* Freescale Kinetics algorithm 0 */
#define VSCP_BOOTLOADER_ESP 0x50 /* Espressif algorithm 0 */
#define VSCP_BOOTLOADER_NONE0 0xf0 /* Used defined bootloader 0 */
#define VSCP_BOOTLOADER_USER0 0xf0
#define VSCP_BOOTLOADER_NONE1 0xf1 /* Used defined bootloader 1 */
#define VSCP_BOOTLOADER_USER1 0xf1
#define VSCP_BOOTLOADER_NONE2 0xf2 /* Used defined bootloader 2 */
#define VSCP_BOOTLOADER_USER2 0xf2
#define VSCP_BOOTLOADER_NONE3 0xf3 /* Used defined bootloader 3 */
#define VSCP_BOOTLOADER_USER3 0xf3
#define VSCP_BOOTLOADER_NONE4 0xf4 /* Used defined bootloader 4 */
#define VSCP_BOOTLOADER_USER4 0xf4
#define VSCP_BOOTLOADER_NONE5 0xf5 /* Used defined bootloader 5 */
#define VSCP_BOOTLOADER_USER5 0xf5
#define VSCP_BOOTLOADER_NONE6 0xf6 /* Used defined bootloader 6 */
#define VSCP_BOOTLOADER_USER6 0xf6
#define VSCP_BOOTLOADER_NONE7 0xf7 /* Used defined bootloader 7 */
#define VSCP_BOOTLOADER_USER7 0xf7
#define VSCP_BOOTLOADER_NONE8 0xf8 /* Used defined bootloader 8 */
#define VSCP_BOOTLOADER_USER8 0xf8
#define VSCP_BOOTLOADER_NONE9 0xf9 /* Used defined bootloader 9 */
#define VSCP_BOOTLOADER_USER9 0xf9
#define VSCP_BOOTLOADER_NONE10 0xfa /* Used defined bootloader 10 */
#define VSCP_BOOTLOADER_USER10 0xfa
#define VSCP_BOOTLOADER_NONE11 0xfb /* Used defined bootloader 11 */
#define VSCP_BOOTLOADER_USER11 0xfb
#define VSCP_BOOTLOADER_NONE12 0xfc /* Used defined bootloader 12 */
#define VSCP_BOOTLOADER_USER12 0xfc
#define VSCP_BOOTLOADER_NONE13 0xfd /* Used defined bootloader 13 */
#define VSCP_BOOTLOADER_USER13 0xfd
#define VSCP_BOOTLOADER_NONE14 0xfe /* Used defined bootloader 14 */
#define VSCP_BOOTLOADER_USER14 0xfe
#define VSCP_BOOTLOADER_NONE15 0xff /* No bootloader available */
#define VSCP_BOOTLOADER_USER15 0xff

/* * * * Data Coding for VSCP packets * * * */

Expand Down

0 comments on commit d75c560

Please sign in to comment.