DEENESPTFRRUARHIKOZHNL
CLASSIC Modul: adc Rolle: heuristic Konfidenz: 90%

SNIP_CLASSIC_ADC_SECTION_7_1_3_3_Example_Adc_GetStreamLastPointer_Usage

Quelle: SWS_ADCDriver.pdf (Seite 27) • Ziel-Anforderung: SWS_Adc_00387

Wortlaut

7.1.3.3 Example: Adc_GetStreamLastPointer Usage The ADC driver stores the conversion results of group G1, G2 and G3 in the according result buffer G1_ResultBuffer[], G2_ResultBuffer[] and G3_ResultBuffer[]. A direct access from the ADC API functions to the ADC hardware result register is not supported from the ADC driver. The user provides three pointers G1_SamplePtr, G2_SamplePtr and G3_SamplePtr which will point to the ADC application result buffer after calling Adc_GetStream LastPointer.Precisely pointer G1_SamplePtr points, after calling Adc_GetStreamLast Pointer, to the latest G1_CH0 result of the latest completed conversion round (G1_CH0 is the first channel in G1 group definition).The application result buffer layout is shown in Figure 2. The application result buffer of group 1 holds three times the streaming results of G1_CH0 and then three times the streaming results of G1_CH1. Knowing the application result buffer layout, the user is able to access all group channel results of the latest conversion round. G2_SamplePtr and G3_SamplePtr are also aligned, after calling Adc_GetStreamLastPointer, to point to the latest result of the first group channel of the according group. Both groups have only one channel. G2_SamplePtr points to one of the G2_CH2 results (the latest result). Because group 3 is configured in single access mode, G3_SamplePtr points always to G3_CH3. Adc_GetStreamLastPointer returns the number of valid samples per channel, stored in the application result buffer (number of complete group conversion rounds). If the return value is equal to the configured parameter ’number of streaming samples’, all conversion results in the streaming buffer are valid. If the return value is 0, no conversion results are available in the streaming buffer (the sample pointer will be aligned to NULL). To enable Adc_GetStreamLastPointer to align the sample pointer (G1_SamplePtr, G2_ SamplePtr and G3_SamplePtr) to point to the latest channel result, the API is defined to pass a pointer to the result pointer instead the result pointer itself.

Versionen & Provenienz · Zugeordnete Anforderungen

Diese Angaben zeigt der Versions-Explorer.

Begründung & Zuweisungs-Evidenz

Describes return value representing valid samples count

Dokumenten-Herkunft & Rückverfolgbarkeit

Spezifikations-Dokument SWS_ADCDriver.pdf
Dokumentseite Seite 27
Ziel-Modul adc (classic)
Ziel-Anforderung SWS_Adc_00387
Semantische Rolle heuristic
Automatisierungs-Konfidenz 0.90