ADCdriverimplement0718v10Word格式.docx

上传人:b****2 文档编号:4770251 上传时间:2023-05-04 格式:DOCX 页数:7 大小:53.20KB
下载 相关 举报
ADCdriverimplement0718v10Word格式.docx_第1页
第1页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第2页
第2页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第3页
第3页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第4页
第4页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第5页
第5页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第6页
第6页 / 共7页
ADCdriverimplement0718v10Word格式.docx_第7页
第7页 / 共7页
亲,该文档总共7页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

ADCdriverimplement0718v10Word格式.docx

《ADCdriverimplement0718v10Word格式.docx》由会员分享,可在线阅读,更多相关《ADCdriverimplement0718v10Word格式.docx(7页珍藏版)》请在冰点文库上搜索。

ADCdriverimplement0718v10Word格式.docx

Creation

Contents

1Introduction4

1.1Overview4

1.2Reference4

2.Typedefinition5

3GlobalVariable6

4FunctionDefinitions7

4.1InitSync7

4.2DeInitSync8

4.3GetVersionOfDriver9

4.4ADC0_StartSampleSync10

4.5ADC0_StartSampleAllSync10

4.6ADC0_GetSync10

4.7ADC0_GetStateSync11

4.8ADC_StopSampleSync11

5ResourcesConfiguration12

5.1PeriperalConfig12

5.2InterruptConfig12

6CompileEnvironment13

1Introduction

1.1Overview

ThisdocumentdescribestheimplementationsoftheADCdrivertobedevelopedintheframeoftheGEMS-K1project.

TheADCdriverconfiguresconvertinganalogsignalstodigitalsignals.

1.2Reference

[1]ADCdrivertestreport

2.Typedefinition

Type

Description

Range

IO_ErrorType

Recommendedtype:

16bitunsignedvalue.Numbersfrom0to15arereservedfortheHISIOLibraryitself,numbersbetween16and63aredefinedintheHISIODriverdocument.Errorcodesfrom64to127arefordriverspecificerrorcodesnotdefinedintheHISIODriverdocumentandnumbersstartingfrom128arereservedforfutureuse.

IO_E_OK

IO_E_BUSY1

IO_E_UNKNOWN_MODE

IO_U32

16bitunsignedvalue.

100

IO_ValueType

16bitunsignedvalue.

IO_DeviceStateType

IO_STATE_IDLE

IO_STATE_ACTIVE

3GlobalVariable

Thischapterdescribestheglobalvariable.

Varialbes

4FunctionDefinitions

4.1InitSync

Syntax

IO_ErrorTypeInitSync(void);

Parameters

none

Return

IO_E_OK:

initializationwassuccessful.

Notification

ThisistheinitializationfunctionoftheADCfunctionlibrary.ItisassumedthattheSFRsusedbythislibraryareintheirresetstate.

Reentrancy

No

Remarks

4.2

DeInitSync

IO_ErrorTypeDeInitSync(void)

None

deinitializationwassuccessful.

ThisisthedeinitializationfunctionoftheADCfunctionlibrary.ItisassumedthattheSFRsusedbythislibraryareintheirresetstate.

4.3

GetVersionOfDriver

IO_U32GetVersionOfDriver(void)

ThisisthegettingdriverversionfunctionoftheADCfunctionlibrary.ItisassumedthattheSFRsusedbythislibraryareintheirresetstate.

4.4

ADC0_StartSampleSync

IO_ErrorTypeADC0_StartSampleSync(ubyteChannels)

ADC0_StartSampleSyncwassuccessful.

ThisfunctionstartsthemeasurementofanaloguevalueofthespecifiedADCchannelandstoresthevaluestoaninternalbuffer.

 

4.5ADC0_StartSampleAllSync

IO_ErrorTypeADC0_StartSampleAllSync(void)

ADC0_StartSampleAllSyncwassuccessful.

ThisfunctionstartsthemeasurementofanaloguevaluesofallADCchannelsandstoresthevaluestoaninternalbuffer.

4.6ADC0_GetSync

IO_ValueTypeADC0_GetSync(IO_ChannelTypeChannel)

ThisfunctionreturnstheanaloguevaluespecifiedbytheADCchannelADC0_GetSyncwassuccessful.

4.7ADC0_GetStateSync

IO_DeviceStateTypeADC0_GetStateSync(void)

IO_STATE_IDLE:

anewADCsamplecanbestarted

IO_STATE_ACTIVE:

thedriverisbusy.

ThisfunctionreturnsthedevicestateoftheADCdriver.

4.8ADC_StopSampleSync

voidADC_StopSampleSync(void)

ThisfunctionstopsameasurementstartedwithADC0_StartSampleSyncorADC0_StartSampleAllSync.

5ResourcesConfiguration

TheresourceusedbyADCdriver

5.1PeriperalConfig

Source

AN0~AN31

AsADCdriverinputpins

5.2InterruptConfig

SRN

TOS

Priority

Name

ADC0

ADC0_SRN0INT

72

ADC0_viSRN0

ThisistheinterruptserviceroutinefortheServiceRequestNode0oftheADC0module.

6CompileEnvironment

CompileTool:

TaskingforTricore

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2