2022-08-18 21:41:19 +08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, sakumisu
|
2021-10-25 21:20:22 +08:00
|
|
|
*
|
2022-08-18 21:41:19 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2021-10-25 21:20:22 +08:00
|
|
|
*/
|
2022-08-18 21:41:19 +08:00
|
|
|
#ifndef USBD_DFU_H
|
|
|
|
|
#define USBD_DFU_H
|
2021-10-25 21:20:22 +08:00
|
|
|
|
2021-11-26 23:41:59 +08:00
|
|
|
#include "usb_dfu.h"
|
|
|
|
|
|
2021-10-25 21:20:22 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-10-20 21:22:08 +08:00
|
|
|
/* Init dfu interface driver */
|
|
|
|
|
struct usbd_interface *usbd_dfu_init_intf(struct usbd_interface *intf);
|
2021-10-25 21:20:22 +08:00
|
|
|
|
2022-09-18 12:00:44 +08:00
|
|
|
/* Interface functions that need to be implemented by the user */
|
|
|
|
|
uint8_t *dfu_read_flash(uint8_t *src, uint8_t *dest, uint32_t len);
|
|
|
|
|
uint16_t dfu_write_flash(uint8_t *src, uint8_t *dest, uint32_t len);
|
|
|
|
|
uint16_t dfu_erase_flash(uint32_t add);
|
|
|
|
|
void dfu_leave(void);
|
2021-10-25 21:20:22 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-08-18 21:41:19 +08:00
|
|
|
#endif /* USBD_DFU_H */
|