VSF Documented
vsf_usbh_dfu.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_USBH_DFU_H__
19#define __VSF_USBH_DFU_H__
20
21
22/*============================ INCLUDES ======================================*/
24
25#if VSF_USE_USB_HOST == ENABLED && VSF_USBH_USE_DFU == ENABLED
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/*============================ MACROS ========================================*/
32
33#define vk_usbh_dfu_downlaod(__dfu, __buffer, __size) \
34 __vk_usbh_dfu_operate((__dfu), (__buffer), (__size), USB_DFUREQ_DNLOAD)
35#define vk_usbh_dfu_uplaod(__dfu, __buffer, __size) \
36 __vk_usbh_dfu_operate((__dfu), (__buffer), (__size), USB_DFUREQ_UPLOAD)
37
38/*============================ MACROFIED FUNCTIONS ===========================*/
39/*============================ TYPES =========================================*/
40/*============================ GLOBAL VARIABLES ==============================*/
41
43
44/*============================ PROTOTYPES ====================================*/
45
47vsf_err_t __vk_usbh_dfu_operate(void *dfu_ptr, uint8_t *buffer, uint_fast32_t size, uint8_t request);
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif
54#endif
vsf_err_t
Definition __type.h:42
Definition vsf_usbh.h:268
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned char uint8_t
Definition stdint.h:5
uint32_t size
Definition vsf_memfs.h:50
vsf_err_t __vk_usbh_dfu_operate(void *dfu_ptr, uint8_t *buffer, uint_fast32_t size, uint8_t request)
Definition vsf_usbh_dfu.c:249
vsf_err_t vk_usbh_dfu_get_result(void *dfu_ptr)
Definition vsf_usbh_dfu.c:244
const vk_usbh_class_drv_t vk_usbh_dfu_drv
Definition vsf_usbh_dfu.c:77