ADCdriverimplement0718v10Word格式.docx
- 文档编号:4770251
- 上传时间:2023-05-04
- 格式:DOCX
- 页数:7
- 大小:53.20KB
ADCdriverimplement0718v10Word格式.docx
《ADCdriverimplement0718v10Word格式.docx》由会员分享,可在线阅读,更多相关《ADCdriverimplement0718v10Word格式.docx(7页珍藏版)》请在冰点文库上搜索。
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ADCdriverimplement0718v10