]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
write one byte by read
authorBastian Dehn <hhaalo@arcor.de>
Sat, 3 Feb 2024 11:18:07 +0000 (12:18 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 3 Feb 2024 11:18:07 +0000 (12:18 +0100)
src/kds_s2000w_net.c

index dabebc2e03ba970c71e0253da3c57f47174aba91..d3f4c274bc008a1f6b217986c791e1fa3fb004e4 100644 (file)
@@ -152,7 +152,6 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor(
 SANE_Status _sane_kds_s2000w_net_control_option(SANE_Handle handle,
        SANE_Int option, SANE_Action action, void* value, SANE_Int* info)
 {
-
        if (action == SANE_ACTION_GET_VALUE)
                kds_s2000w_handler_get_option(option, value);
 
@@ -170,10 +169,10 @@ SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle,
 {
        params->format = SANE_FRAME_GRAY;
        params->last_frame = SANE_TRUE;
-       params->bytes_per_line = 0;
-       params->pixels_per_line = 0;
-       params->lines = 0;
-       params->depth = 0;
+       params->bytes_per_line = 1024;
+       params->pixels_per_line = 1;
+       params->lines = 1;
+       params->depth = 1;
 
        return SANE_STATUS_GOOD;
 }
@@ -186,6 +185,9 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle)
 SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data,
        SANE_Int max_length, SANE_Int* length)
 {
+       *data = 1;
+       *length = 1;
+
        return SANE_STATUS_GOOD;
 }