资源简介
基于LIS3DH的简易倾角仪源码,控制主板为STM32 F030,使用keil5 打开工程,保护LIS3DH驱动源码和倾角仪实现
代码片段和文件信息
/**
******************************************************************************
* File Name : gpio.c
* Description : This file provides code for the configuration
* of all used GPIO pins.
******************************************************************************
*
* COPYRIGHT(c) 2016 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 “gpio.h“
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/*----------------------------------------------------------------------------*/
/* Configure GPIO */
/*----------------------------------------------------------------------------*/
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/** Configure pins as
* Analog
* Input
* Output
* EVENT_OUT
* EXTI
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = B1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_EV
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-12-05 16:21 Inclinometer-master\
文件 3874285 2016-12-05 16:21 Inclinometer-master\Drivers.zip
目录 0 2016-12-05 16:21 Inclinometer-master\Inc\
文件 2730 2016-12-05 16:21 Inclinometer-master\Inc\gpio.h
文件 3141 2016-12-05 16:21 Inclinometer-master\Inc\mxconstants.h
文件 2845 2016-12-05 16:21 Inclinometer-master\Inc\spi.h
文件 11868 2016-12-05 16:21 Inclinometer-master\Inc\stm32f0xx_hal_conf.h
文件 2781 2016-12-05 16:21 Inclinometer-master\Inc\stm32f0xx_it.h
目录 0 2016-12-05 16:21 Inclinometer-master\MDK-ARM\
目录 0 2016-12-05 16:21 Inclinometer-master\MDK-ARM\RTE\
文件 356 2016-12-05 16:21 Inclinometer-master\MDK-ARM\RTE\RTE_Components.h
文件 86000 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer.uvguix.bruno montanari
文件 18476 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer.uvoptx
文件 20023 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer.uvprojx
目录 0 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\
文件 353884 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\const_var.crf
文件 2484 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\const_var.d
文件 410508 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\const_var.o
文件 368094 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\controle.crf
文件 2670 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\controle.d
文件 426884 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\controle.o
文件 338509 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\gpio.crf
文件 2296 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\gpio.d
文件 399124 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\gpio.o
文件 344952 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.axf
文件 2829 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.build_log.htm
文件 54231 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.htm
文件 1196 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.lnp
文件 146464 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.map
文件 479 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer.sct
文件 70171 2016-12-05 16:21 Inclinometer-master\MDK-ARM\inclinometer\inclinometer_inclinometer.dep
............此处省略86个文件信息
- 上一篇:SWING大刀系列源码
- 下一篇:PanDownload_v2.0.5.zip
评论
共有 条评论