* 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, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBSIGROK_HARDWARE_MIC_985XX_PROTOCOL_H
#include <string.h>
#include <ctype.h>
#include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "mic-985xx"
};
struct mic_dev_info {
- char *vendor;
- char *device;
- char *conn;
+ const char *vendor;
+ const char *device;
+ const char *conn;
uint32_t max_sample_points;
gboolean has_temperature;
gboolean has_humidity;
#define SERIAL_BUFSIZE 256
-/** Private, per-device-instance driver context. */
struct dev_context {
- /** The current sampling limit (in number of samples). */
- uint64_t limit_samples;
-
- /** The current sampling limit (in ms). */
- uint64_t limit_msec;
-
- /** Opaque pointer passed in by the frontend. */
- void *cb_data;
-
- /** The current number of already received samples. */
- uint64_t num_samples;
-
- int64_t starttime;
+ struct sr_sw_limits limits;
uint8_t buf[SERIAL_BUFSIZE];
int bufoffset;