sr: Drop analog left-overs from sigrok.h.
For now, there's no analog/scope support in sigrok yet (will be added later), so remove any such items from the public API (sigrok.h). Having '#if defined(HAVE_LA_ALSA)' in sigrok.h is a bug anyway, the API must not have anything device-dependent in general, and sigrok.h specifically must not have any #ifdefs for specific hardware.
This commit is contained in:
parent
a141db8c4a
commit
a4cfb10f7f
|
@ -18,6 +18,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Note: This driver doesn't compile, analog support in sigrok is WIP. */
|
||||||
|
|
||||||
#include "config.h" /* Must come before sigrok.h */
|
#include "config.h" /* Must come before sigrok.h */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -30,6 +32,17 @@
|
||||||
#define SAMPLE_WIDTH 16
|
#define SAMPLE_WIDTH 16
|
||||||
#define AUDIO_DEV "plughw:0,0"
|
#define AUDIO_DEV "plughw:0,0"
|
||||||
|
|
||||||
|
struct sr_analog_probe {
|
||||||
|
uint8_t att;
|
||||||
|
uint8_t res; /* Needs to be a power of 2, FIXME */
|
||||||
|
uint16_t val; /* Max hardware ADC width is 16bits */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sr_analog_sample {
|
||||||
|
uint8_t num_probes; /* Max hardware probes is 256 */
|
||||||
|
struct sr_analog_probe probes[];
|
||||||
|
};
|
||||||
|
|
||||||
static int capabilities[] = {
|
static int capabilities[] = {
|
||||||
SR_HWCAP_SAMPLERATE,
|
SR_HWCAP_SAMPLERATE,
|
||||||
SR_HWCAP_LIMIT_SAMPLES,
|
SR_HWCAP_LIMIT_SAMPLES,
|
||||||
|
|
13
sigrok.h.in
13
sigrok.h.in
|
@ -118,19 +118,6 @@ struct sr_datafeed_logic {
|
||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(HAVE_LA_ALSA)
|
|
||||||
struct sr_analog_probe {
|
|
||||||
uint8_t att;
|
|
||||||
uint8_t res; /* Needs to be a power of 2, FIXME */
|
|
||||||
uint16_t val; /* Max hardware ADC width is 16bits */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sr_analog_sample {
|
|
||||||
uint8_t num_probes; /* Max hardware probes is 256 */
|
|
||||||
struct sr_analog_probe probes[];
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sr_input {
|
struct sr_input {
|
||||||
struct sr_input_format *format;
|
struct sr_input_format *format;
|
||||||
char *param;
|
char *param;
|
||||||
|
|
Loading…
Reference in New Issue