Files
CherryUSB/class/dfu/usbd_dfu.h

28 lines
605 B
C
Raw Normal View History

/*
* Copyright (c) 2022, sakumisu
2021-10-25 21:20:22 +08:00
*
* SPDX-License-Identifier: Apache-2.0
2021-10-25 21:20:22 +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
#endif /* USBD_DFU_H */