• 大小: 22.69MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-15
  • 语言: 其他
  • 标签: USB  HID  /  MP  

资源简介

MCU用的是STM32F103C8T6芯片,USB HID程序。具体功能为获取MPU6050然后得到姿态角,再通过蓝牙串口发送。

资源截图

代码片段和文件信息

/**
  ******************************************************************************
  * @file    main.c
  * @author  MCD Application Team
  * @version V4.1.0
  * @date    26-May-2017
  * @brief   Custom HID demo main file
  ******************************************************************************
  * @attention
  *
  * 

© COPYRIGHT(c) 2017 STMicroelectronics


  *
  * Redistribution and use in source and binary forms with or without modification
  * are permitted provided that the following conditions are met:
  *   1. Redistributions of source code must retain the above copyright notice
  *      this list of conditions and the following disclaimer.
  *   2. Redistributions in binary form must reproduce the above copyright notice
  *      this list of conditions and the following disclaimer in the documentation
  *      and/or other materials provided with the distribution.
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
  *      may be used to endorse or promote products derived from this software
  *      without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
  * AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL
  * DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR
  * SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  * CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  ******************************************************************************
  */


/* Includes ------------------------------------------------------------------*/
#include “hw_config.h“
#include “usb_lib.h“
#include “usb_pwr.h“

#include “usart_init.h“
#include “biaozhundelay.h“
//#include “monii2cformpu6050.h“
#include “mpu6050test.h“
#include “getzhitai.h“
//#include “timepwm.h“

#include 

struct FILE 
{
int handle;
};
int fputc(int chFILE *f)
{
while(USART_GetFlagStatus(USART1USART_FLAG_TC) == RESET);
USART_SendData(USART1(uint16_t)ch);
return ch;
}


/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Extern variables ----------------------------------------------------------*

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-25 20:03  Keil_BS_Project\
     文件      144430  2018-06-25 20:03  Keil_BS_Project\BS_2018.5.3.uvguix.12455
     文件       30937  2018-06-09 14:00  Keil_BS_Project\BS_2018.5.3.uvoptx
     文件       38389  2018-05-23 11:37  Keil_BS_Project\BS_2018.5.3.uvprojx
     文件         782  2018-05-03 15:38  Keil_BS_Project\BS_2018.build_log.htm
     目录           0  2018-06-10 21:37  Keil_BS_Project\C_file\
     文件        8165  2018-06-10 21:37  Keil_BS_Project\C_file\main.c
     目录           0  2018-05-03 15:37  Keil_BS_Project\DebugConfig\
     文件        6956  2015-12-10 17:06  Keil_BS_Project\DebugConfig\Target_1_STM32F103C8.dbgconf
     目录           0  2018-06-09 18:42  Keil_BS_Project\delay\
     文件        1434  2018-06-09 18:42  Keil_BS_Project\delay\biaozhundelay.c
     文件         281  2018-05-23 15:26  Keil_BS_Project\delay\biaozhundelay.h
     文件        3366  2018-06-09 18:36  Keil_BS_Project\delay\getzhitai.c
     文件         691  2018-05-21 23:34  Keil_BS_Project\delay\getzhitai.h
     文件        2991  2018-05-23 18:26  Keil_BS_Project\delay\monii2cformpu6050.c
     文件         743  2018-05-21 23:51  Keil_BS_Project\delay\monii2cformpu6050.h
     文件        4645  2018-06-02 02:04  Keil_BS_Project\delay\mpu6050test.c
     文件        1739  2018-05-21 23:33  Keil_BS_Project\delay\mpu6050test.h
     文件       10108  2018-05-21 23:40  Keil_BS_Project\delay\timepwm.c
     文件         637  2018-05-21 23:42  Keil_BS_Project\delay\timepwm.h
     目录           0  2018-05-03 15:38  Keil_BS_Project\H_file\
     文件      252398  2018-06-09 18:53  Keil_BS_Project\JlinkLog.txt
     文件         671  2018-05-03 23:03  Keil_BS_Project\JlinkSettings.ini
     目录           0  2018-05-03 15:40  Keil_BS_Project\Listings\
     文件      165605  2018-06-09 18:53  Keil_BS_Project\Listings\BS_2018.5.map
     文件       43823  2018-05-21 22:57  Keil_BS_Project\Listings\startup_stm32f10x_md.lst
     目录           0  2018-06-09 18:53  Keil_BS_Project\objects\
     文件      361885  2018-06-09 18:43  Keil_BS_Project\objects\biaozhundelay.crf
     文件        3664  2018-06-09 18:43  Keil_BS_Project\objects\biaozhundelay.d
     文件      401336  2018-06-09 18:43  Keil_BS_Project\objects\biaozhundelay.o
     文件      550336  2018-06-09 18:53  Keil_BS_Project\objects\BS_2018.5.3
............此处省略465个文件信息

评论

共有 条评论