mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU
This commit is contained in:
parent
daca9e520b
commit
3960beece0
@ -148,7 +148,7 @@ uint32_t tud_dfu_get_timeout_cb(uint8_t alt, uint8_t state)
|
|||||||
void tud_dfu_download_cb(uint8_t alt, uint16_t wBlockNum, uint8_t const* data, uint16_t length)
|
void tud_dfu_download_cb(uint8_t alt, uint16_t wBlockNum, uint8_t const* data, uint16_t length)
|
||||||
{
|
{
|
||||||
(void) data;
|
(void) data;
|
||||||
printf("\r\nReceived Alt %u BlockNum %u of length %u\r\n", alt, wBlockNum, length);
|
//printf("\r\nReceived Alt %u BlockNum %u of length %u\r\n", alt, wBlockNum, length);
|
||||||
|
|
||||||
for(uint16_t i=0; i<length; i++)
|
for(uint16_t i=0; i<length; i++)
|
||||||
{
|
{
|
||||||
|
@ -77,9 +77,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
|
#define CFG_TUD_DFU 1
|
||||||
#define CFG_TUD_DFU_RUNTIME 0
|
|
||||||
#define CFG_TUD_DFU_MODE 1
|
|
||||||
|
|
||||||
// DFU buffer size, it has to be set to the buffer size used in TUD_DFU_DESCRIPTOR
|
// DFU buffer size, it has to be set to the buffer size used in TUD_DFU_DESCRIPTOR
|
||||||
#define CFG_TUD_DFU_TRANSFER_BUFSIZE 512
|
#define CFG_TUD_DFU_TRANSFER_BUFSIZE 512
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "tusb_option.h"
|
#include "tusb_option.h"
|
||||||
|
|
||||||
#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_DFU_MODE)
|
#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_DFU)
|
||||||
|
|
||||||
#include "device/usbd.h"
|
#include "device/usbd.h"
|
||||||
#include "device/usbd_pvt.h"
|
#include "device/usbd_pvt.h"
|
||||||
|
@ -188,7 +188,7 @@ static usbd_class_driver_t const _usbd_driver[] =
|
|||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG_TUD_DFU_MODE
|
#if CFG_TUD_DFU
|
||||||
{
|
{
|
||||||
DRIVER_NAME("DFU")
|
DRIVER_NAME("DFU")
|
||||||
.init = dfu_moded_init,
|
.init = dfu_moded_init,
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
#include "class/dfu/dfu_rt_device.h"
|
#include "class/dfu/dfu_rt_device.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG_TUD_DFU_MODE
|
#if CFG_TUD_DFU
|
||||||
#include "class/dfu/dfu_device.h"
|
#include "class/dfu/dfu_device.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -249,8 +249,8 @@
|
|||||||
#define CFG_TUD_DFU_RUNTIME 0
|
#define CFG_TUD_DFU_RUNTIME 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUD_DFU_MODE
|
#ifndef CFG_TUD_DFU
|
||||||
#define CFG_TUD_DFU_MODE 0
|
#define CFG_TUD_DFU 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUD_NET
|
#ifndef CFG_TUD_NET
|
||||||
|
Loading…
x
Reference in New Issue
Block a user