Browse Source

dont truncate error enum returned by gbprinter_detect

Thomas B 1 month ago
parent
commit
6d0c162ca0
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/gbprinter.c

+ 3
- 3
src/gbprinter.c View File

154
 
154
 
155
 enum PRN_STATUS gbprinter_detect(void) BANKED {
155
 enum PRN_STATUS gbprinter_detect(void) BANKED {
156
     printer_send_command(PRN_CMD_INIT, NULL, 0);
156
     printer_send_command(PRN_CMD_INIT, NULL, 0);
157
-    uint8_t r = printer_wait(PRN_DETECT_TIMEOUT, PRN_STATUS_MASK_ANY, PRN_STATUS_OK);
157
+    enum PRN_STATUS r = printer_wait(PRN_DETECT_TIMEOUT, PRN_STATUS_MASK_ANY, PRN_STATUS_OK);
158
 
158
 
159
 #ifdef DEBUG
159
 #ifdef DEBUG
160
-    EMU_printf("%s: %hu\n",  __func__, (uint8_t)r);
160
+    EMU_printf("%s: 0x%04x\n",  __func__, (uint16_t)r);
161
 #endif // DEBUG
161
 #endif // DEBUG
162
     return r;
162
     return r;
163
 }
163
 }
236
 
236
 
237
 end:
237
 end:
238
 #ifdef DEBUG
238
 #ifdef DEBUG
239
-    EMU_printf("%s: %hu\n",  __func__, (uint8_t)r);
239
+    EMU_printf("%s: 0x%04x\n",  __func__, (uint16_t)r);
240
 #endif // DEBUG
240
 #endif // DEBUG
241
     return r;
241
     return r;
242
 }
242
 }

Loading…
Cancel
Save