Parcourir la source

changed filesize datatype from uint16_t to uint32_t

Simon Fischer il y a 1 an
Parent
commit
6a51417d1f
3 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 1 1
      api/shellmatta.h
  2. 1 1
      src/shellmatta_ymodem.c
  3. 3 3
      src/shellmatta_ymodem.h

+ 1 - 1
api/shellmatta.h

@@ -330,7 +330,7 @@ shellmatta_retCode_t shellmatta_printf(     shellmatta_handle_t handle,
 
 uint8_t shellmatta_ymodem(  shellmatta_handle_t             handle,
                             uint8_t*                        buffer,
-                            uint16_t*                       fileSize,
+                            uint32_t*                       fileSize,
                             uint16_t*                       packetSize,
                             shellmatta_ymodem_callbacks_t   callbacks);
 

+ 1 - 1
src/shellmatta_ymodem.c

@@ -33,7 +33,7 @@ shellmatta_ymodem_callbacks_t shellmatta_ymodem_callbacks;
 */
 void shellmatta_ymodem_init(shellmatta_handle_t handle, 
                             uint8_t* recvBuffer, 
-                            uint16_t* fileSize,
+                            uint32_t* fileSize,
                             uint16_t* packetSize,
                             shellmatta_ymodem_callbacks_t callbacks)
 {

+ 3 - 3
src/shellmatta_ymodem.h

@@ -36,7 +36,7 @@ typedef struct
     uint16_t packetCrc;             /* crc checksum in this packet */
     uint8_t* packetData;            /* pointer to the data of this packet */
     uint16_t* packetSize;           /* pointer to the length of this packet */
-    uint16_t* fileSize;             /* pointer to the amount of bytes in this packet */
+    uint32_t* fileSize;             /* pointer to the amount of bytes in this packet */
 } shellmatta_ymodem_packet_t;
 
 /**
@@ -60,7 +60,7 @@ typedef enum {
 
 void shellmatta_ymodem_init(            shellmatta_handle_t             handle, 
                                         uint8_t*                        recvBuffer, 
-                                        uint16_t*                       fileSize,
+                                        uint32_t*                       fileSize,
                                         uint16_t*                       packetSize,
                                         shellmatta_ymodem_callbacks_t   callbacks);
 
@@ -87,4 +87,4 @@ void shellmatta_ymodem_check_packet(    shellmatta_handle_t handle);
 void shellmatta_ymodem_reset(           shellmatta_handle_t handle,
                                         bool                doCancel);
 
-#endif /* _SHELLMATTA_YMODEM_H_ */
+#endif /* _SHELLMATTA_YMODEM_H_ */