![pico Technology PicoScope 3425 User Manual Download Page 47](http://html1.mh-extra.com/html/pico-technology/picoscope-3425/picoscope-3425_user-manual_1555395047.webp)
Programmer's reference
43
Copyright © 2007 Pico Technology Limited. All rights reserved.
ps3425.en
3.2.8.23 Callback function to copy data to buffer
void my_get_overview_buffers (
short ** overviewBuffers,
short overflow,
unsigned long triggeredAt,
short triggered,
short auto_stop,
unsigned long nValues )
This is the callback function in your application that receives data from the driver in
mode. You pass a pointer to this function to
ps3000_get_streaming_last_values()
, which then calls it back when the data is
ready. Your callback function should do nothing more than copy the data to another
buffer within your application. To maintain the best application performance, the
function should return as quickly as possible without attempting to process or display
the data.
The function name
my_get_overview_buffers()
is just for illustration. When you
write this function, you can give it any name you wish. The PicoScope driver does not
need to know your function's name, as it refers to it only by the address that you pass
to
ps3000_get_streaming_last_values()
.
For an example of a suitable callback function, see the
included
in your PicoScope installation.
Applicability
mode only
Arguments
overviewBuffers,
a pointer to a location where
ps3000_get_streaming_last_values()
will store a pointer to its
that contain the sampled data. The driver
creates the overview buffers when you call
to start fast streaming.
overflow,
a bit field that indicates whether there has been a
voltage overflow on any channel. The bit assignments are as
follows:
15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
D
C
B
A
D
C
B
A
common-mode
overflow
differential
overflow
triggeredAt,
an index into the overview buffers, indicating the
sample at the trigger event. Valid only when triggered is
TRUE
.
triggered,
a Boolean indicating whether a trigger event has
occurred and
triggeredAt
is valid. Any non-zero value
signifies
TRUE
.
auto_stop,
a Boolean indicating whether streaming data
capture has automatically stopped. Any non-zero value signifies
TRUE
.
nValues,
the number of values in each overview buffer.
15
42
42
52
15
42
57
41
Summary of Contents for PicoScope 3425
Page 2: ......
Page 66: ......
Page 67: ...63 Copyright 2007 Pico Technology Limited All rights reserved ps3425 en ...