]> sigrok.org Git - libsigrok.git/blobdiff - src/libsigrok-internal.h
Define our own constant for PI.
[libsigrok.git] / src / libsigrok-internal.h
index a12b8d535d33633c26023a6471eb988e7e396d29..9060e2a77b707a913363aa4ea1662b317b6699a0 100644 (file)
                          ((uint8_t*)(p))[2] = (uint8_t)((x)>>16); \
                          ((uint8_t*)(p))[3] = (uint8_t)((x)>>24); } while (0)
 
+#define PI 3.1415926535897932384626433832795
+
 /* Portability fixes for FreeBSD. */
 #ifdef __FreeBSD__
 #define LIBUSB_CLASS_APPLICATION 0xfe
 #endif
 
 struct sr_context {
+       struct sr_dev_driver **driver_list;
 #ifdef HAVE_LIBUSB_1_0
        libusb_context *libusb_ctx;
        gboolean usb_source_present;
@@ -645,9 +648,11 @@ SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc);
 
 /*--- hwdriver.c ------------------------------------------------------------*/
 
+extern SR_PRIV struct sr_dev_driver **drivers_lists[];
+
 SR_PRIV const GVariantType *sr_variant_type_get(int datatype);
 SR_PRIV int sr_variant_type_check(uint32_t key, GVariant *data);
-SR_PRIV void sr_hw_cleanup_all(void);
+SR_PRIV void sr_hw_cleanup_all(const struct sr_context *ctx);
 SR_PRIV struct sr_config *sr_config_new(uint32_t key, GVariant *data);
 SR_PRIV void sr_config_free(struct sr_config *src);
 SR_PRIV int sr_source_remove(int fd);
@@ -663,6 +668,8 @@ SR_PRIV int sr_source_add_channel(GIOChannel *channel, int events, int timeout,
 /*--- session.c -------------------------------------------------------------*/
 
 struct sr_session {
+       /** Context this session exists in. */
+       struct sr_context *ctx;
        /** List of struct sr_dev_inst pointers. */
        GSList *devs;
        /** List of struct sr_dev_inst pointers owned by this session. */