X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Flibsigrok-internal.h;h=b0df768c82b57297f74d0226c78aedb560e69821;hb=af945a6625474e039fb7730483c5d07aa7f45969;hp=092d7d534ec7ccc0b3ca3c6eeec542472fd5b00c;hpb=5bf0dd6aff6cc0ef1f18362faa0c6185a50996a4;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 092d7d53..b0df768c 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -79,7 +79,7 @@ * @return the corresponding signed integer */ #define RL16S(x) ((int16_t) \ - (((unsigned)((const uint8_t*)(x))[1] << 8) | \ + (((unsigned)((const uint8_t*)(x))[1] << 8) | \ (unsigned)((const uint8_t*)(x))[0])) /** @@ -263,8 +263,13 @@ struct sr_input_module { * * @param[in] metadata Metadata the module can use to identify the stream. * - * @retval TRUE This module knows the format. - * @retval FALSE This module does not know the format. + * @retval SR_OK This module knows the format. + * @retval SR_OK_CONTINUE There wasn't enough data for this module to + * positively identify the format. + * @retval SR_ERR_DATA This module knows the format, but cannot handle it. + * This means the stream is either corrupt, or indicates a feature + * that the module does not support. + * @retval SR_ERR This module does not know the format. */ int (*format_match) (GHashTable *metadata); @@ -511,8 +516,10 @@ SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc); /*--- hwdriver.c ------------------------------------------------------------*/ +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 struct sr_config *sr_config_new(int key, GVariant *data); +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); SR_PRIV int sr_source_remove_pollfd(GPollFD *pollfd);