STM32 CubeMX USB_MSC(存储设备U盘)

STM32 CubeMX


STM32 CubeMX USB_MSC(存储设备U盘)

  • STM32 CubeMX
    • 前言
  • 《使用内部Flash》——U盘
  • 一、STM32 CubeMX 设置
    • USB时钟设置
    • USB使能
    • UBS功能选择
    • FATFS功能
  • 二、代码部分
    • 修改代码"usbd_storage_if.c"
    • 修改代码"user_diskio.c"
    • main函数初始化
    • 插上USB实验效果
  • 《SPI_SD卡》——U盘



前言

STM32 CubeMX 配置USB将STM32设置可以作为存储设备或者IAP升级功能

《使用内部Flash》——U盘

一、STM32 CubeMX 设置

USB时钟设置

在这里插入图片描述

USB使能

在这里插入图片描述

UBS功能选择

要注意:stm32f103c8t6内部Flash的1页为1024(1kb)
在这里插入图片描述

FATFS功能

在这里插入图片描述

二、代码部分

需要修改两个部分:usbd_storage_if.c文件和user_diskio.c文件
在这里插入图片描述

修改代码"usbd_storage_if.c"

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : usbd_storage_if.c* @version        : v2.0_Cube* @brief          : Memory management layer.******************************************************************************* @attention** Copyright (c) 2023 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header *//* Includes ------------------------------------------------------------------*/
#include "usbd_storage_if.h"/* USER CODE BEGIN INCLUDE *//* USER CODE END INCLUDE *//* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*//* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*//* USER CODE END PV *//** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY* @brief Usb device.* @{*//** @defgroup USBD_STORAGE* @brief Usb mass storage device module* @{*//** @defgroup USBD_STORAGE_Private_TypesDefinitions* @brief Private types.* @{*//* USER CODE BEGIN PRIVATE_TYPES *//* USER CODE END PRIVATE_TYPES *//*** @}*//** @defgroup USBD_STORAGE_Private_Defines* @brief Private defines.* @{*/
#define     FLASH_SIZE                  128
#define     FMC_SECTOR_SIZE             1024
#define     FLASH_PAGE_NBR              64
#define     FLASH_START_ADDR        	(0x08000000+((FLASH_SIZE-FLASH_PAGE_NBR)*1024))#define STORAGE_LUN_NBR                  1
#define STORAGE_BLK_NBR                  0x10000
#define STORAGE_BLK_SIZ                  0x200/* USER CODE BEGIN PRIVATE_DEFINES *//* USER CODE END PRIVATE_DEFINES *//*** @}*//** @defgroup USBD_STORAGE_Private_Macros* @brief Private macros.* @{*//* USER CODE BEGIN PRIVATE_MACRO *//* USER CODE END PRIVATE_MACRO *//*** @}*//** @defgroup USBD_STORAGE_Private_Variables* @brief Private variables.* @{*//* USER CODE BEGIN INQUIRY_DATA_FS */
/** USB Mass storage Standard Inquiry Data. */
const int8_t STORAGE_Inquirydata_FS[] = {/* 36 *//* LUN 0 */0x00,0x80,0x02,0x02,(STANDARD_INQUIRY_DATA_LEN - 5),0x00,0x00,0x00,'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ', /* Manufacturer : 8 bytes */'P', 'r', 'o', 'd', 'u', 'c', 't', ' ', /* Product      : 16 Bytes */' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ','0', '.', '0' ,'1'                      /* Version      : 4 Bytes */
};
/* USER CODE END INQUIRY_DATA_FS *//* USER CODE BEGIN PRIVATE_VARIABLES *//* USER CODE END PRIVATE_VARIABLES *//*** @}*//** @defgroup USBD_STORAGE_Exported_Variables* @brief Public variables.* @{*/extern USBD_HandleTypeDef hUsbDeviceFS;/* USER CODE BEGIN EXPORTED_VARIABLES *//* USER CODE END EXPORTED_VARIABLES *//*** @}*//** @defgroup USBD_STORAGE_Private_FunctionPrototypes* @brief Private functions declaration.* @{*/static int8_t STORAGE_Init_FS(uint8_t lun);
static int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size);
static int8_t STORAGE_IsReady_FS(uint8_t lun);
static int8_t STORAGE_IsWriteProtected_FS(uint8_t lun);
static int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
static int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
static int8_t STORAGE_GetMaxLun_FS(void);/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION *//* USER CODE END PRIVATE_FUNCTIONS_DECLARATION *//*** @}*/USBD_StorageTypeDef USBD_Storage_Interface_fops_FS =
{STORAGE_Init_FS,STORAGE_GetCapacity_FS,STORAGE_IsReady_FS,STORAGE_IsWriteProtected_FS,STORAGE_Read_FS,STORAGE_Write_FS,STORAGE_GetMaxLun_FS,(int8_t *)STORAGE_Inquirydata_FS
};/* Private functions ---------------------------------------------------------*/
/*** @brief  Initializes over USB FS IP* @param  lun:* @retval USBD_OK if all operations are OK else USBD_FAIL*/
int8_t STORAGE_Init_FS(uint8_t lun)
{/* USER CODE BEGIN 2 */return (USBD_OK);/* USER CODE END 2 */
}/*** @brief  .* @param  lun: .* @param  block_num: .* @param  block_size: .* @retval USBD_OK if all operations are OK else USBD_FAIL*/
//int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size)
//{
//  /* USER CODE BEGIN 3 */
//  *block_num  = STORAGE_BLK_NBR;
//  *block_size = STORAGE_BLK_SIZ;
//  return (USBD_OK);
//  /* USER CODE END 3 */
//}
//修改1
int8_t STORAGE_GetCapacity_FS(uint8_t lun, uint32_t *block_num, uint16_t *block_size)
{/* USER CODE BEGIN 3 */*block_num  = FLASH_PAGE_NBR;*block_size = FLASH_PAGE_SIZE;return (USBD_OK);/* USER CODE END 3 */
}
/*** @brief  .* @param  lun: .* @retval USBD_OK if all operations are OK else USBD_FAIL*/
int8_t STORAGE_IsReady_FS(uint8_t lun)
{/* USER CODE BEGIN 4 */return (USBD_OK);/* USER CODE END 4 */
}/*** @brief  .* @param  lun: .* @retval USBD_OK if all operations are OK else USBD_FAIL*/
int8_t STORAGE_IsWriteProtected_FS(uint8_t lun)
{/* USER CODE BEGIN 5 */return (USBD_OK);/* USER CODE END 5 */
}/*** @brief  .* @param  lun: .* @retval USBD_OK if all operations are OK else USBD_FAIL*/
//int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
//{
//  /* USER CODE BEGIN 6 */
//  return (USBD_OK);
//  /* USER CODE END 6 */
//}
//修改2
int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
{/* USER CODE BEGIN 6 */if(lun == 0){memcpy(buf,(uint8_t *)(FLASH_START_ADDR + blk_addr*FLASH_PAGE_SIZE),blk_len*FLASH_PAGE_SIZE);return USBD_OK;}return USBD_FAIL;/* USER CODE END 6 */
}
/*** @brief  .* @param  lun: .* @retval USBD_OK if all operations are OK else USBD_FAIL*/
//int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
//{
//  /* USER CODE BEGIN 7 */
//  return (USBD_OK);
//  /* USER CODE END 7 */
//}
//修改3
int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
{/* USER CODE BEGIN 7 */uint16_t i;uint32_t PageError = 0;FLASH_EraseInitTypeDef Flash;if(lun == 0){HAL_FLASH_Unlock();Flash.TypeErase = FLASH_TYPEERASE_PAGES;Flash.PageAddress = FLASH_START_ADDR + blk_addr*FLASH_PAGE_SIZE ;Flash.NbPages = blk_len;HAL_FLASHEx_Erase(&Flash, &PageError);for(i=0;i<blk_len*FLASH_PAGE_SIZE;i+=4){HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD,FLASH_START_ADDR + blk_addr*FLASH_PAGE_SIZE + i , *(uint32_t *)(&buf[i]));}HAL_FLASH_Lock();return USBD_OK;}return USBD_FAIL;/* USER CODE END 7 */
}/*** @brief  .* @param  None* @retval .*/
int8_t STORAGE_GetMaxLun_FS(void)
{/* USER CODE BEGIN 8 */return (STORAGE_LUN_NBR - 1);/* USER CODE END 8 */
}/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION *//* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION *//*** @}*//*** @}*/

修改代码"user_diskio.c"

/* USER CODE BEGIN Header */
/********************************************************************************* @file    user_diskio.c* @brief   This file includes a diskio driver skeleton to be completed by the user.******************************************************************************* @attention** Copyright (c) 2023 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************//* USER CODE END Header */#ifdef USE_OBSOLETE_USER_CODE_SECTION_0
/** Warning: the user section 0 is no more in use (starting from CubeMx version 4.16.0)* To be suppressed in the future.* Kept to ensure backward compatibility with previous CubeMx versions when* migrating projects.* User code previously added there should be copied in the new user sections before* the section contents can be deleted.*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
#endif/* USER CODE BEGIN DECL *//* Includes ------------------------------------------------------------------*/
#include <string.h>
#include "ff_gen_drv.h"/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*//* Private variables ---------------------------------------------------------*/
/* Disk status */
static volatile DSTATUS Stat = STA_NOINIT;
#define     FLASH_SIZE                  128
#define     FMC_SECTOR_SIZE             1024
#define     FLASH_PAGE_NBR              64
#define     FLASH_START_ADDR        	(0x08000000+((FLASH_SIZE-FLASH_PAGE_NBR)*1024))
/* USER CODE END DECL *//* Private function prototypes -----------------------------------------------*/
DSTATUS USER_initialize (BYTE pdrv);
DSTATUS USER_status (BYTE pdrv);
DRESULT USER_read (BYTE pdrv, BYTE *buff, DWORD sector, UINT count);
#if _USE_WRITE == 1DRESULT USER_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count);
#endif /* _USE_WRITE == 1 */
#if _USE_IOCTL == 1DRESULT USER_ioctl (BYTE pdrv, BYTE cmd, void *buff);
#endif /* _USE_IOCTL == 1 */Diskio_drvTypeDef  USER_Driver =
{USER_initialize,USER_status,USER_read,
#if  _USE_WRITEUSER_write,
#endif  /* _USE_WRITE == 1 */
#if  _USE_IOCTL == 1USER_ioctl,
#endif /* _USE_IOCTL == 1 */
};/* Private functions ---------------------------------------------------------*//*** @brief  Initializes a Drive* @param  pdrv: Physical drive number (0..)* @retval DSTATUS: Operation status*/
DSTATUS USER_initialize (BYTE pdrv           /* Physical drive nmuber to identify the drive */
)
{/* USER CODE BEGIN INIT */Stat = STA_NOINIT;return Stat;/* USER CODE END INIT */
}/*** @brief  Gets Disk Status* @param  pdrv: Physical drive number (0..)* @retval DSTATUS: Operation status*/
//DSTATUS USER_status (
//	BYTE pdrv       /* Physical drive number to identify the drive */
//)
//{
//  /* USER CODE BEGIN STATUS */
//    Stat = STA_NOINIT;
//    return Stat;
//  /* USER CODE END STATUS */
//}
// 修改1
DSTATUS USER_status (BYTE pdrv       /* Physical drive number to identify the drive */
)
{/* USER CODE BEGIN STATUS */Stat = STA_NOINIT;Stat &= ~STA_NOINIT;return Stat;/* USER CODE END STATUS */
}
/*** @brief  Reads Sector(s)* @param  pdrv: Physical drive number (0..)* @param  *buff: Data buffer to store read data* @param  sector: Sector address (LBA)* @param  count: Number of sectors to read (1..128)* @retval DRESULT: Operation result*/
//DRESULT USER_read (
//	BYTE pdrv,      /* Physical drive nmuber to identify the drive */
//	BYTE *buff,     /* Data buffer to store read data */
//	DWORD sector,   /* Sector address in LBA */
//	UINT count      /* Number of sectors to read */
//)
//{
//  /* USER CODE BEGIN READ */
//    return RES_OK;
//  /* USER CODE END READ */
//}
//修改2
DRESULT USER_read (BYTE pdrv,      /* Physical drive nmuber to identify the drive */BYTE *buff,     /* Data buffer to store read data */DWORD sector,   /* Sector address in LBA */UINT count      /* Number of sectors to read */
)
{/* USER CODE BEGIN READ */uint8_t *s = (uint8_t *)(FLASH_START_ADDR);  s+=(sector*FMC_SECTOR_SIZE);for(int i=0; i<count*FMC_SECTOR_SIZE ;i++){*(buff++) = *(s++ );}return RES_OK;/* USER CODE END READ */
}
/*** @brief  Writes Sector(s)* @param  pdrv: Physical drive number (0..)* @param  *buff: Data to be written* @param  sector: Sector address (LBA)* @param  count: Number of sectors to write (1..128)* @retval DRESULT: Operation result*/
#if _USE_WRITE == 1
//DRESULT USER_write (
//	BYTE pdrv,          /* Physical drive nmuber to identify the drive */
//	const BYTE *buff,   /* Data to be written */
//	DWORD sector,       /* Sector address in LBA */
//	UINT count          /* Number of sectors to write */
//)
//{
//  /* USER CODE BEGIN WRITE */
//  /* USER CODE HERE */
//    return RES_OK;
//  /* USER CODE END WRITE */
//}
//修改3
DRESULT USER_write (BYTE pdrv,          /* Physical drive nmuber to identify the drive */const BYTE *buff,   /* Data to be written */DWORD sector,       /* Sector address in LBA */UINT count          /* Number of sectors to write */
)
{/* USER CODE BEGIN WRITE *//* USER CODE HERE */uint16_t i;	HAL_FLASH_Unlock();FLASH_EraseInitTypeDef f;f.TypeErase = FLASH_TYPEERASE_PAGES;f.PageAddress = FLASH_START_ADDR + sector*FLASH_PAGE_SIZE ;f.NbPages = count;uint32_t PageError = 0;HAL_FLASHEx_Erase(&f, &PageError);for(i=0;i<count*FLASH_PAGE_SIZE;i+=4)HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD,FLASH_START_ADDR + sector*FLASH_PAGE_SIZE + i , *(uint32_t *)(&buff[i]));HAL_FLASH_Lock();return RES_OK;/* USER CODE END WRITE */
}
#endif /* _USE_WRITE == 1 *//*** @brief  I/O control operation* @param  pdrv: Physical drive number (0..)* @param  cmd: Control code* @param  *buff: Buffer to send/receive control data* @retval DRESULT: Operation result*/
#if _USE_IOCTL == 1
//DRESULT USER_ioctl (
//	BYTE pdrv,      /* Physical drive nmuber (0..) */
//	BYTE cmd,       /* Control code */
//	void *buff      /* Buffer to send/receive control data */
//)
//{
//  /* USER CODE BEGIN IOCTL */
//    DRESULT res = RES_ERROR;
//    return res;
//  /* USER CODE END IOCTL */
//}
//修改4
DRESULT USER_ioctl (BYTE pdrv,      /* Physical drive nmuber (0..) */BYTE cmd,       /* Control code */void *buff      /* Buffer to send/receive control data */
)
{/* USER CODE BEGIN IOCTL */DRESULT res = RES_ERROR;switch(cmd){case CTRL_SYNC :res = RES_OK;break;	case CTRL_TRIM:res = RES_OK;break;case GET_BLOCK_SIZE:*(DWORD*)buff = 1; break;case GET_SECTOR_SIZE:*(DWORD*)buff = FMC_SECTOR_SIZE;break;case GET_SECTOR_COUNT:*(DWORD*)buff =  FLASH_PAGE_NBR;break;default:res = RES_PARERR;break;}return res;/* USER CODE END IOCTL */
}
#endif /* _USE_IOCTL == 1 */

main函数初始化

int main(void)
{/* USER CODE BEGIN 1 */char path[4]= {"0:"};FRESULT FATFS_Status;	/* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init *//* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_FATFS_Init();MX_USB_DEVICE_Init();/* USER CODE BEGIN 2 */FATFS_Status = f_mount(&USERFatFS, path, 1);f_mkdir("0:/FW");/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */}/* USER CODE END 3 */
}

插上USB实验效果

在这里插入图片描述
在这里插入图片描述
新建一个TXT文档:
在这里插入图片描述

《SPI_SD卡》——U盘

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/30256.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

杭州企业可以用DV https证书吗

DV https证书是入门级的https证书&#xff0c;也可以叫DV基础型https证书&#xff0c;这款https证书企业是可以用的&#xff0c;甚至商城网站、金融网站都可以使用&#xff0c;不限制申请者&#xff0c;个人或者企事业单位都可以申请。DV基础型https证书虽然只是入门级的https证…

全开源跨境电商一键铺货货源平台--后台数据采集功能

数据库设计在设计数据库时&#xff0c;需要考虑到以下信息&#xff1a; 货源信息&#xff1a;包括货源标题、价格、描述、图片等信息。 用户信息&#xff1a;包括用户名、密码、邮箱、电话等信息。 订单信息&#xff1a;包括订单号、用户信息、货源信息、支付信息等。 支付信息…

idea中提示Unsupported characters for the charset ‘ISO-8859-1‘

application.properties中文注释拉黄线 &#xff0c;提示Unsupported characters for the charset ISO-8859-1 解决办法&#xff1a; 注意&#xff1a; 改完之后之前输入的中文就变成“ &#xff1f;&#xff1f;&#xff1f;”了&#xff0c;建议备份一下 1、打开setti…

kubernetes基于helm部署gitlab-operator

kubernetes基于helm部署gitlab-operator 这篇博文介绍如何在 Kubernetes 中使用helm部署 GitLab-operator。 先决条件 已运行的 Kubernetes 集群负载均衡器&#xff0c;为ingress-nginx控制器提供EXTERNAL-IP&#xff0c;本示例使用metallb默认存储类&#xff0c;为gitlab p…

从前序与中序遍历序列构造二叉树,从中序与后序遍历序列构造二叉树

目录 从前序与中序遍历序列构造二叉树从中序与后序遍历序列构造二叉树 从前序与中序遍历序列构造二叉树 题目链接 给定两个整数数组 preorder 和 inorder &#xff0c;其中 preorder 是二叉树的先序遍历&#xff0c; inorder 是同一棵树的中序遍历&#xff0c;请构造二叉树并返…

基于kubeadm部署K8S集群

目录 基于kubeadm部署K8S集群 一、环境准备 1、主机初始化配置 2、配置主机名并绑定hosts&#xff0c;不同主机名称不同 3、主机配置初始化 二、部署docker环境 1、三台主机上分别部署 Docker 环境 2、镜像加速器&#xff08;所有主机配置&#xff09; 三、部署kubern…

valgrind检测内存泄漏

#include <stdio.h> #include <stdlib.h>int main(){int *q (int *)malloc(sizeof(int));*q 1;// int i 1;// if(i 1){// int *p (int *)malloc(sizeof(int));// *p 1;// free(p);// }// free(q)return 0; } 运行查看 valgrind --leak-checkfu…

ChatGLM2-6B在windows下的部署

2023-08-10 ChatGLM2-6B在windows下的部署 一、部署环境 1、Windows 10 专业版&#xff0c; 64位&#xff0c;版本号&#xff1a;22H2&#xff0c;内存&#xff1a;32GB 2、已安装CUDA11.3 3、已安装Anaconda3 64bit版本 4、有显卡NVIDIA GeForce RTX 3060 Laptop GPU …

(leecode)设计循环队列

&#xff08;温馨提示&#xff1a;这是博主最最喜欢的歌曲哦&#xff0c;没有之一&#xff09; 题目&#xff1a; 题解&#xff1a; 思路&#xff1a; 方法一(数组)&#xff1a; 方法二(链表)&#xff1a; 题目&#xff1a; 设计你的循环队列实现。 循环队列是一种线性数…

MATLAB|信号处理的Simulink搭建与研究

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

PostgreSQL技术沙龙|PPT合集速来下载

新机遇&#xff0c;新态势&#xff0c;新发展 2023年8月5日&#xff0c;由中国开源软件推进联盟PG分会&#xff08;中国PG分会&#xff09;联合杭州云贝教育共同举办的“PostgreSQL技术沙龙杭州站”圆满举行。本次活动结合当下去O、国产化趋势&#xff0c;邀请社群技术专家围…

服务器数据恢复-断电导致ext4文件系统文件丢失的数据恢复案例

服务器数据恢复环境&#xff1a; 一台服务器挂载一台存储设备&#xff0c;存储中划分一个Lun&#xff1b;服务器操作系统是Linux centos&#xff0c;EXT4文件系统。 服务器故障&分析&#xff1a; 意外断电导致服务器操作系统无法启动&#xff0c;系统在修复后可以正常启动&…

C语言函数详解(1)

目录 函数是什么 C语言中函数的分类 库函数 自定义函数 函数的参数 实际参数&#xff08;实参&#xff09; 形式参数&#xff08;形参&#xff09; 函数的调用 传值调用 传址调用 练习 函数的嵌套调用和链式访问 嵌套调用 链式访问 函数是什么 数学中我们常见到函…

揭秘浏览器键入URI到页面显示的过程: 浏览器键入URI,到页面显示,中间发生什么?

&#x1f337;&#x1f341; 博主猫头虎 带您 Go to New World.✨&#x1f341; &#x1f984; 博客首页——猫头虎的博客&#x1f390; &#x1f433;《面试题大全专栏》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33a; &a…

TypeScript学习笔记

1.ts和js的区别 2. ts的优势 3. ts下载后报错解决方法 报错: PS C:\Users\\Desktop> tsc -v tsc : 无法加载文件 C:\Users\32173\AppData\Roaming\npm\tsc.ps1&#xff0c;因为在此系统上禁止运行脚本。有关详细信息&#xff0c;请参阅 https:/ go.microsoft.com/fwlink/?…

【LeetCode每日一题】——205.同构字符串

文章目录 一【题目类别】二【题目难度】三【题目编号】四【题目描述】五【题目示例】六【题目提示】七【解题思路】八【时间频度】九【代码实现】十【提交结果】 一【题目类别】 哈希表 二【题目难度】 简单 三【题目编号】 205.同构字符串 四【题目描述】 给定两个字符…

资深媒体人宋繁银加入《数据猿》任总编辑,全面负责公司整体内容工作

大数据产业创新服务媒体 ——聚焦数据 改变商业 2023年7月北京&#xff0c;《数据猿》宣布正式任命宋繁银为总编辑&#xff0c;全面负责公司整体内容工作。此次重要的人事任命标志着《数据猿》的发展迈上了一个新的台阶&#xff0c;对于《数据猿》团队而言&#xff0c;不仅是一…

redis的事务和watch机制

这里写目录标题 第一章、redis事务和watch机制1.1&#xff09;redis事务&#xff0c;事务的三大命令语法&#xff1a;开启事务 multi语法&#xff1a;执行事务 exec语法&#xff1a;取消事务 discard 1.2&#xff09;redis事务的错误和回滚的情况1.3&#xff09;watch机制语法&…

VS Code安装使用教程

目录 1. VS Code是什么&#xff1f; 2. VS Code的下载和安装 下载&#xff1a; 安装&#xff1a; 2.2 环境的介绍 3. VS Code配置C/C开发环境 3.1 下载和配置MinGW-w64编译器套件 下载&#xff1a; 配置&#xff1a; 3.2 安装C/C插件 3.3 重启VSCode 4. 在VSCode上编…

06-3_Qt 5.9 C++开发指南_多窗体应用程序的设计(主要的窗体类及其用途;窗体类重要特性设置;多窗口应用程序设计)

文章目录 1. 主要的窗体类及其用途2. 窗体类重要特性的设置2.1 setAttribute()函数2.2 setWindowFlags()函数2.3 setWindowState()函数2.4 setWindowModality()函数2.5 setWindowOpacity()函数 3. 多窗口应用程序设计3.1 主窗口设计3.2 QFormDoc类的设计3.3 QFormDoc类的使用3.…