PicoScope 3000A Series Prog rammer's Guide 69
Copyright © 2011-2013 Pico Technology Limited. All rights reserved. ps3000abpg.en r9
2.12.41
ps3000aSetDataBuffer
PICO_STATUS ps3000aSetDataBuffer
(
short handle,
PS3000A_CHANNEL channel,
short * buffer,
long bufferLth,
unsigned short segmentIndex,
PS3000A_RATIO_MODE mode
)
This function tells the driver where to store the data, either unprocessed or
downsampled, that will be returned after the next call to one of the GetValues
functions. The function allows you to specify only a single buffer, so for aggregation
mode, which requires two buffers, you need to call ps3000aSetDataBuffers instead.
You must allocate memory for the buffer before calling this function.
Block, rapid block and streaming modes. All downsampling modes
except aggregation.
handle, the handle of the required device
channel, the channel you want to use with the buffer. Use one of
these values:
PS3000A_CHANNEL_A
PS3000A_CHANNEL_B
PS3000A_CHANNEL_C
PS3000A_CHANNEL_D
To set the buffer for a digital port, use one of these values:
PS3000A_DIGITAL_PORT0 = 0x80
PS3000A_DIGITAL_PORT1 = 0x81
* buffer, the location of the buffer
bufferLth, the size of the buffer array
segmentIndex, the number of the memory segment to be used
mode, the downsampling mode. See ps3000aGetValues for the
available modes, but note that a single call to ps3000aSetDataBuffer
can only associate one buffer with one downsampling mode. If you
intend to call ps3000aGetValues with more than one downsampling
mode activated, then you must call ps3000aSetDataBuffer several
times to associate a separate buffer with each downsampling mode.
PICO_OK
PICO_INVALID_HANDLE
PICO_INVALID_CHANNEL
PICO_RATIO_MODE_NOT_SUPPORTED
PICO_SEGMENT_OUT_OF_RANGE
PICO_DRIVER_FUNCTION
PICO_INVALID_PARAMETER