1.5wuling_zhuanjietou/UDS/bootloader.h

36 lines
1.1 KiB
C
Raw Normal View History

2024-10-17 01:06:51 +00:00
#ifndef __BOOTLOADER_H__
#define __BOOTLOADER_H__
#include "uds_config.h"
#define BOOTLOADER_PROGRAMMING_FLAG 0xAA55BA5C
typedef enum
{
/* Generic error codes */
STATUS_SUCCESS = 0x000U, /*!< Generic operation success status */
STATUS_ERROR = 0x001U, /*!< Generic operation failure status */
STATUS_BUSY = 0x002U, /*!< Generic operation busy status */
STATUS_TIMEOUT = 0x003U, /*!< Generic operation timeout status */
} status_t;
extern void JumpToApplicationSW(void);
extern status_t EraseApplicationSoftwareCode(uint32_t address, uint32_t length);
extern status_t ProgramApplicationSoftware(uint32_t address, uint8_t *pdata, uint32_t length);
extern void BootloaderInit(void);
extern uint8_t GetUdsUpdataFlag(void);
void ClearExternProgrammingRequest(void);
void SetExternProgrammingRequest(void);
void SetBootloaderSwVersionAddress(void);
uint32_t GetBootloaderSwVersionAddress(void);
bool IsExternProgrammingRequestValid(void);
#endif