Start moving private stuff to sigrok-internal.h.
This is work-in-progress, unfinished.
This commit is contained in:
parent
f7606f9b75
commit
1483577eed
|
@ -39,6 +39,7 @@ libsigrok_la_LIBADD = \
|
||||||
output/libsigrokoutput.la
|
output/libsigrokoutput.la
|
||||||
|
|
||||||
include_HEADERS = sigrok.h sigrok-proto.h
|
include_HEADERS = sigrok.h sigrok-proto.h
|
||||||
|
noinst_HEADERS = sigrok-internal.h
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libsigrok.pc
|
pkgconfig_DATA = libsigrok.pc
|
||||||
|
|
|
@ -31,13 +31,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include <sigrok.h>
|
||||||
|
#include <sigrok-internal.h>
|
||||||
|
|
||||||
// FIXME: Must be moved, or rather passed as function argument.
|
// FIXME: Must be moved, or rather passed as function argument.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE hdl;
|
HANDLE hdl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *serial_port_glob[] = {
|
const char *serial_port_glob[] = {
|
||||||
/* Linux */
|
/* Linux */
|
||||||
"/dev/ttyS*",
|
"/dev/ttyS*",
|
||||||
"/dev/ttyUSB*",
|
"/dev/ttyUSB*",
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <libudev.h>
|
#include <libudev.h>
|
||||||
#include <sigrok.h>
|
#include <sigrok.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <sigrok-internal.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "link-mso19.h"
|
#include "link-mso19.h"
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sigrok.h>
|
#include <sigrok.h>
|
||||||
|
#include <sigrok-internal.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define O_NONBLOCK FIONBIO
|
#define O_NONBLOCK FIONBIO
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the sigrok project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Bert Vermeulen <bert@biot.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SIGROK_SIGROK_INTERNAL_H
|
||||||
|
#define SIGROK_SIGROK_INTERNAL_H
|
||||||
|
|
||||||
|
GSList *list_serial_ports(void);
|
||||||
|
int serial_open(const char *pathname, int flags);
|
||||||
|
int serial_close(int fd);
|
||||||
|
int serial_flush(int fd);
|
||||||
|
int serial_write(int fd, const void *buf, size_t count);
|
||||||
|
int serial_read(int fd, void *buf, size_t count);
|
||||||
|
void *serial_backup_params(int fd);
|
||||||
|
void serial_restore_params(int fd, void *backup);
|
||||||
|
int serial_set_params(int fd, int speed, int bits, int parity, int stopbits,
|
||||||
|
int flowcontrol);
|
||||||
|
|
||||||
|
#endif
|
|
@ -117,17 +117,6 @@ int ezusb_install_firmware(libusb_device_handle *hdl, char *filename);
|
||||||
int ezusb_upload_firmware(libusb_device *dev, int configuration,
|
int ezusb_upload_firmware(libusb_device *dev, int configuration,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
|
||||||
GSList *list_serial_ports(void);
|
|
||||||
int serial_open(const char *pathname, int flags);
|
|
||||||
int serial_close(int fd);
|
|
||||||
int serial_flush(int fd);
|
|
||||||
int serial_write(int fd, const void *buf, size_t count);
|
|
||||||
int serial_read(int fd, void *buf, size_t count);
|
|
||||||
void *serial_backup_params(int fd);
|
|
||||||
void serial_restore_params(int fd, void *backup);
|
|
||||||
int serial_set_params(int fd, int speed, int bits, int parity, int stopbits,
|
|
||||||
int flowcontrol);
|
|
||||||
|
|
||||||
/* libsigrok/hardware/common/misc.c */
|
/* libsigrok/hardware/common/misc.c */
|
||||||
/* TODO: Should not be public. */
|
/* TODO: Should not be public. */
|
||||||
int opendev2(int device_index, struct sigrok_device_instance **sdi,
|
int opendev2(int device_index, struct sigrok_device_instance **sdi,
|
||||||
|
|
Loading…
Reference in New Issue