1、CreationContents1 Introduction 41.1 Overview 41.2 Reference 42. Type definition 53 Global Variable 64 Function Definitions 74.1 InitSync 74.2 DeInitSync 84.3 GetVersionOfDriver 94.4 ADC0_StartSampleSync 104.5 ADC0_StartSampleAllSync 104.6 ADC0_GetSync 104.7 ADC0_GetStateSync 114.8 ADC_StopSampleSync
2、 115 Resources Configuration 125.1 Periperal Config 125.2 Interrupt Config 126 Compile Environment 131 Introduction1.1 OverviewThis document describes the implementations of the ADC driver to be developed in the frame of the GEMS-K1 project. The ADC driver configures converting analog signals to dig
3、ital signals. 1.2 Reference1 ADC driver test report2. Type definitionTypeDescriptionRangeIO_ErrorTypeRecommended type: 16 bit unsigned value. Numbers from 0 to 15 are reserved for the HIS IO Library itself, numbers between 16 and 63 are defined in the HIS IO Driver document. Error codes from 64 to 1
4、27 are for driver specific error codes not defined in the HIS IO Driver document and numbers starting from 128 are reserved for future use.IO_E_OK IO_E_BUSY 1IO_E_UNKNOWN_MODE IO_U32 16 bit unsigned value. 100IO_ValueType 16 bit unsigned value.IO_DeviceStateTypeIO_STATE_IDLEIO_STATE_ACTIVE3 Global V
5、ariableThis chapter describes the global variable.Varialbes4 Function Definitions4.1 InitSyncSyntaxIO_ErrorType InitSync (void);ParametersnoneReturnIO_E_OK: initialization was successful.NotificationThis is the initialization function of the ADC function library. It is assumed that the SFRs used by
6、this library are in their reset state.ReentrancyNoRemarks4.2 DeInitSyncIO_ErrorType DeInitSync (void)None deinitialization was successful.This is the deinitialization function of the ADC function library. It is assumed that the SFRs used by this library are in their reset state.4.3 GetVersionOfDrive
7、rIO_U32 GetVersionOfDriver(void) This is the getting driver version function of the ADC function library. It is assumed that the SFRs used by this library are in their reset state.4.4 ADC0_StartSampleSyncIO_ErrorType ADC0_StartSampleSync(ubyte Channels) ADC0_StartSampleSync was successful.This funct
8、ion starts the measurement of analogue value of the specified ADC channel and stores the values to an internal buffer.4.5 ADC0_StartSampleAllSyncIO_ErrorType ADC0_StartSampleAllSync(void) ADC0_StartSampleAllSync was successful.This function starts the measurement of analogue values of all ADC channe
9、ls and stores the values to an internal buffer.4.6 ADC0_GetSyncIO_ValueType ADC0_GetSync(IO_ChannelType Channel)This function returns the analogue value specified by the ADC channel ADC0_GetSync was successful.4.7 ADC0_GetStateSyncIO_DeviceStateType ADC0_GetStateSync(void)IO_STATE_IDLE: a new ADC sa
10、mple can be startedIO_STATE_ACTIVE: the driver is busy.This function returns the device state of the ADC driver.4.8 ADC_StopSampleSyncvoid ADC_StopSampleSync(void)This function stops a measurement started with ADC0_StartSampleSync or ADC0_StartSampleAllSync.5 Resources ConfigurationThe resource used by ADC driver5.1 Periperal ConfigSourceAN0AN31As ADC driver input pins5.2 Interrupt ConfigSRNTOSPriorityNameADC0ADC0_SRN0INT72ADC0_viSRN0This is the interrupt service routine for the Service Request Node 0 of the ADC0 module.6 Compile EnvironmentCompile Tool: Tasking for Tricore
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2