资源简介
AUTOSAR这个架构有利于车辆电子系统软件的交换与更新,并为高效管理愈来愈复杂的车辆电子、软件系统提供了一个基础。此外,AUTOSAR在确保产品及服务质量的同时,提高了成本效率
代码片段和文件信息
/* -------------------------------- Arctic Core ------------------------------
* Arctic Core - the open source AUTOSAR platform http://arccore.com
*
* Copyright (C) 2009 ArcCore AB
*
* This source code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation; See .
*
* This program is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
* -------------------------------- Arctic Core ------------------------------*/
#include
#include
//#include “System.h“
//#include “Modules.h“
#include “Mcu.h“
#include “Adc.h“
#include “stm32f10x_adc.h“
#include “stm32f10x_dma.h“
#if defined(USE_DET)
#include “Det.h“
#endif
#if defined(USE_KERNEL)
#include “Os.h“
#include “isr.h“
#endif
#include “Adc_Internal.h“
/* Conversion result register for ADC1. */
#define ADC1_DR_Address ((u32)0x4001244C)
/* Function prototypes. */
static void Adc_Group0ConversionComplete (void);
static Adc_StateType adcState = ADC_UNINIT;
/* Pointer to configuration structure. */
static const Adc_ConfigType *AdcConfigPtr;
#if (ADC_DEINIT_API == STD_ON)
void Adc_DeInit ()
{
if (E_OK == Adc_CheckDeInit(adcState AdcConfigPtr))
{
DMA_DeInit(DMA1_Channel1);
ADC_DeInit(ADC1);
adcState = ADC_UNINIT;
}
}
#endif
void Adc_Init (const Adc_ConfigType *ConfigPtr)
{
Adc_GroupType group;
ADC_InitTypeDef ADC_InitStructure;
DMA_InitTypeDef DMA_InitStructure;
ADC_TempSensorVrefintCmd(ENABLE);
if (E_OK == Adc_CheckInit(adcState ConfigPtr))
{
/* First of all store the location of the configuration data. */
AdcConfigPtr = ConfigPtr;
/* DMA1 channel1 configuration ---------------------------------------------*/
DMA_DeInit(DMA1_Channel1);
DMA_InitStructure.DMA_PeripheralbaseAddr = ADC1_DR_Address;
DMA_InitStructure.DMA_MemorybaseAddr = (u32)ConfigPtr->groupConfigPtr->resultBuffer;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
DMA_InitStructure.DMA_BufferSize = ConfigPtr->groupConfigPtr->numberOfChannels;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_Init(DMA1_Channel1 &DMA_InitStructure);
// Connect interrupt to correct isr
ISR_INSTALL_ISR2( “DMA1“ Adc_Gr
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 150 2014-03-19 10:12 arc-008318eebe50\.hg_archival.txt
文件 252 2014-03-19 10:12 arc-008318eebe50\.hgignore
文件 3597 2014-03-19 10:12 arc-008318eebe50\.hgtags
文件 10407 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Adc.c
文件 25248 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Can.c
文件 5668 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Dio.c
文件 2755 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Fls.c
文件 12531 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Gpt.c
文件 14564 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Mcu.c
文件 6461 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Port.c
文件 12267 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\Pwm.c
文件 25616 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\Release_Notes_for_STM32F10x_StdPeriph_Driver.html
文件 8893 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\misc.h
文件 21601 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h
文件 7466 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_bkp.h
文件 23230 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h
文件 6483 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_cec.h
文件 2073 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_crc.h
文件 15145 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dac.h
文件 3729 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dbgmcu.h
文件 20661 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h
文件 6735 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h
文件 25356 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h
文件 26927 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_fsmc.h
文件 20086 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h
文件 29501 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_i2c.h
文件 3739 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_iwdg.h
文件 4294 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_pwr.h
文件 30363 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h
文件 3768 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rtc.h
文件 21774 2014-03-19 10:12 arc-008318eebe50\arch\arm\arm_cm3\drivers\STM32F10x_StdPeriph_Driver\inc\stm32f10x_sdio.h
............此处省略1200个文件信息
- 上一篇:Qt远程控制软件源码
- 下一篇:STM32的SPI通信总结(含DMA).pdf
相关资源
-
rali
nk.bin(hg255d网页刷uboot所需固件 - Shell Programming in Unix Linux and OS X(4th)
- DELL Md3600F linux配置多路径_rac
- lindo6.0软件安装包
- PGP Command Line 使用教程
- Linux笔记 liunx入门教程
- LINUX内核总结PPT课件(修改版)
- BT软件开发完整版
- FPGA数字信号处理实现原理及方法-清华
- 精通Linux_第2版清晰完整pdf
- sonixC51-8051&keil;-C51设置-V012
- MacPorts-2.6.2-10.15-Catalina.pkg
- lv_pc_simulator.rar
- [数学建模方法与分析].(新西兰)M
- onlineShopping.rar
- Zabbix分布式监控配置使用手册v3
- 西门子PN-CANOPEN网关技术手册.pdf
- Zedboard_linaro
- BCM2837- 树莓派3B 芯片手册.pdf
- kotlin-学习
- rpm-4.11.2
- ZV138A_V1.1原理图 天豹 DSP+FPGA xlinx sp3
- 老男孩Linux运维笔记高清版,实用有价
- Structural Sensitivity Analysis and Optimizati
-
适用于D-li
nk DIR-605 B1/B1G型号的DDWR - 山东大学linux实验.zip
- SilverLining Skies 3D Clouds v1.9.unitypackage
- Linear Algebra Done Right 3th edition
- Xilinx SRIO详解.pptx
- Advanced Tool Kit软件(FSL_ATK_TOOL_WINS_ST
评论
共有 条评论