+ case USB_CTRL_REQ_DFU_UPLOAD: {
+ /*
+ void *buf;
+ size_t len = 0;
+
+ switch ( ctx->state )
+ {
+ case DFU_STATE_dfuIDLE:
+ break;
+ case DFU_STATE_dfuUPLOAD_IDLE:
+ break;
+ default:
+ goto err;
+ }
+
+ // Find which sector to read
+ ctx->status = ctx->setup_read(ctx->off, &len, &buf);
+ print("UPLOAD off:");
+ printHex( ctx->off );
+ print(" len:");
+ printHex( len );
+ print(" addr:");
+ printHex( (uint32_t)buf );
+ print( NL );
+
+ if ( ctx->status != DFU_STATUS_OK || len > req->wLength )
+ {
+ ctx->state = DFU_STATE_dfuERROR;
+ goto err_have_status;
+ }
+
+ // Send bytes to Host
+ if ( len > 0 )
+ {
+ usb_ep0_rx( buf, len, NULL, NULL );
+ }
+ else
+ {
+ ctx->state = DFU_STATE_dfuIDLE;
+ }
+
+ goto out_no_status;
+ */
+ return 0;
+ }