CLASSIC
Modul: adc
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_ADC_SECTION_8_3_12_Adc_GetStreamLastPointer
Wortlaut
8.3.12 Adc_GetStreamLastPointer
[SWS_Adc_00375] Definition of API function Adc_GetStreamLastPointer ⌈
Service Name
Adc_GetStreamLastPointer
Syntax
Adc_StreamNumSampleType Adc_GetStreamLastPointer (
Adc_GroupType Group,
Adc_ValueGroupType** PtrToSamplePtr
)
Service ID [hex]
0x0b
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters (in)
Group
Numeric ID of requested ADC Channel group.
Parameters (inout)
None
Parameters (out)
PtrToSamplePtr
Pointer to result buffer pointer.
Return value
Adc_StreamNumSample
Type
Number of valid samples per channel.
Description
Returns the number of valid samples per channel, stored in the result buffer. Reads a pointer,
pointing to a position in the group result buffer. With the pointer position, the results of all group
channels of the last completed conversion round can be accessed. With the pointer and the
return value, all valid group conversion results can be accessed (the user has to take the layout
of the result buffer into account).
Available via
Adc.h
⌋
[SWS_Adc_00214]
Upstream requirements: SRS_Adc_12292, SRS_Adc_12802
⌈The function Adc_GetStreamLastPointer shall set the pointer, passed as parameter
(PtrToSamplePtr) to point in the ADC result buffer to the latest result of the first group
channel of the last completed conversion round.⌋
[SWS_Adc_00418] ⌈All values which the ADC driver stores in the ADC result buffer,
are left without further scaling and shall be aligned according the configuration parameter setting of ADC_RESULT_ALIGNMENT.⌋
[SWS_Adc_00387] ⌈The function Adc_GetStreamLastPointer shall return the number
of valid samples per channel, stored in the ADC result buffer.⌋
Note: Valid samples are in the ADC result buffer when the group is in state ADC_
COMPLETED or ADC_STREAM_COMPLETED. In state ADC_BUSY or ADC_IDLE
the value 0 is returned.
Note: The return value is 1 for groups with single access mode configuration, if valid
samples are stored in the ADC result buffer.
[SWS_Adc_00216]
Upstream requirements: SRS_Adc_12802
⌈When called while the group status is ADC_BUSY (a conversion of the group is in
progress), the function Adc_GetStreamLastPointer shall set the pointer, passed as parameter (PtrToSamplePtr), to NULL and return 0.⌋
[SWS_Adc_00219]
Upstream requirements: SRS_Adc_12291, SRS_Adc_12802
⌈The ADC module’s environment shall guarantee the consistency of the data that has
been read by checking the return value of Adc_GetGroupStatus.⌋
Note: See also SWS_Adc_00140.
[SWS_Adc_00326]
Upstream requirements: SRS_Adc_12291
⌈Calling function Adc_GetStreamLastPointer while group status is ADC_STREAM_
COMPLETED shall trigger a state transition to ADC_BUSY for continuous conversion
modes (single access mode or circular streaming buffer mode) and hardware triggered
groups in single access mode or circular streaming access mode.⌋
[SWS_Adc_00327]
Upstream requirements: SRS_Adc_12291
⌈Calling function Adc_GetStreamLastPointer while group status is ADC_STREAM_
COMPLETED shall trigger a state transition to ADC_IDLE for software conversion
modes which automatically stop the conversion (streaming buffer with linear access
mode or one-shot conversion mode with single access) and for the hardware triggered
conversion mode in combination with linear streaming access mode.⌋
[SWS_Adc_00328]
Upstream requirements: SRS_Adc_12291
⌈Calling function Adc_GetStreamLastPointer while group status is ADC_COMPLETED
shall trigger a state transition to ADC_BUSY.⌋
[SWS_Adc_00215] ⌈When called while the group status is ADC_IDLE and the group
conversion was not started (no results are available from previous conversions) , the
function Adc_GetStreamLastPointer shall report a runtime error ADC_E_IDLE.⌋
[SWS_Adc_00218]
Upstream requirements: SRS_BSW_00386
⌈If development error detection for the ADC moduleis enabled: if the group ID is non-existent, the function Adc_GetStreamLastPointer shall raise development error ADC_
E_PARAM_GROUP, set the pointer, passed as parameter (PtrToSamplePtr), to NULL
and return 0 without any further action.⌋
[SWS_Adc_00302]
Upstream requirements: SRS_BSW_00406
⌈If development error detection for the ADC moduleis enabled:if called prior to initializing the driver, the function Adc_GetStreamLastPointer shall raise development error
ADC_E_UNINIT, set the pointer, passed as parameter (PtrToSamplePtr), to NULL and
return 0 without any further action.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_ADCDriver.pdf |
|---|---|
| Dokumentseite | Seite 72 |
| Ziel-Modul | adc (classic) |
| Ziel-Anforderung | SWS_Adc_00518 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |