stefan 10 месяцев назад
Родитель
Сommit
6531e17eb8
31 измененных файлов с 332 добавлено и 33 удалено
  1. 3 0
      README.md
  2. 5 5
      api/shellmatta.h
  3. 0 5
      doc/shellmatta_transport_layer.dox
  4. 16 0
      doc/shellmatta_ymodem.dox
  5. 1 0
      example/main.c
  6. 1 1
      src/shellmatta.c
  7. 9 1
      src/shellmatta_transport.c
  8. 8 1
      src/shellmatta_transport.h
  9. 1 2
      src/shellmatta_utils.c
  10. 1 1
      src/shellmatta_utils.h
  11. 9 3
      src/shellmatta_ymodem.c
  12. 8 1
      src/shellmatta_ymodem.h
  13. 14 3
      test/unittest/shellmatta/test_shellmatta_doInit.cpp
  14. 14 2
      test/unittest/shellmatta_autocomplete/test_autocomplete_run.cpp
  15. 15 1
      test/unittest/shellmatta_escape/test_escape_processArrowKeys.cpp
  16. 16 4
      test/unittest/shellmatta_history/test_appendHistoryByte.cpp
  17. 14 0
      test/unittest/shellmatta_opt/test_opt_findNextHunk.cpp
  18. 14 0
      test/unittest/shellmatta_opt/test_opt_peekNextHunk.cpp
  19. 14 0
      test/unittest/shellmatta_utils/test_utils_clearInput.cpp
  20. 14 0
      test/unittest/shellmatta_utils/test_utils_eraseLine.cpp
  21. 14 2
      test/unittest/shellmatta_utils/test_utils_forwardCursor.cpp
  22. 14 0
      test/unittest/shellmatta_utils/test_utils_insertChars.cpp
  23. 14 0
      test/unittest/shellmatta_utils/test_utils_removeChars.cpp
  24. 14 0
      test/unittest/shellmatta_utils/test_utils_restoreCursorPos.cpp
  25. 14 0
      test/unittest/shellmatta_utils/test_utils_rewindCursor.cpp
  26. 14 0
      test/unittest/shellmatta_utils/test_utils_saveCursorPos.cpp
  27. 14 0
      test/unittest/shellmatta_utils/test_utils_shellAsciiToUInt32.cpp
  28. 14 0
      test/unittest/shellmatta_utils/test_utils_shellItoa.cpp
  29. 14 0
      test/unittest/shellmatta_utils/test_utils_terminateInput.cpp
  30. 14 0
      test/unittest/shellmatta_utils/test_utils_writeEcho.cpp
  31. 15 1
      test/unittest/shellmatta_ymodem/test_ymodem.cpp

+ 3 - 0
README.md

@@ -149,6 +149,9 @@ There are some defines you can use to change the behaviour of the shellmatta:
 | SHELLMATTA_HELP_HELP_TEXT              | string to overwrite the help command help      |
 | SHELLMATTA_HELP_USAGE_TEXT             | string to overwrite the help command usage     |
 | SHELLMATTA_AUTHENTICATION              | if defined this enables the authentication     |
+| SHELLMATTA_TRANSPORT                   | if defined this enables the transport layer    |
+| SHELLMATTA_TRANSPORT_CRC_NO_LOOKUP     | disables lookup for transport layer crc32      |
+| SHELLMATTA_YMODEM_CRC_NO_LOOKUP        | disables lookup for ymodem crc16               |
 
 ## Example
 

+ 5 - 5
api/shellmatta.h

@@ -245,7 +245,7 @@ typedef enum
 /** @brief packet structure that holds several information about its content */
 typedef struct
 {
-    uint16_t size;          /**< site of the packet (128 or 1024)     */
+    uint16_t size;          /**< size of the packet (128 or 1024)     */
     uint8_t packetNumber;   /**< packet number in this packet         */
     uint8_t* packetData;    /**< pointer to the data of this packet   */
     uint16_t crc;           /**< crc checksum in this packet          */
@@ -256,13 +256,13 @@ typedef struct
  */
 typedef struct
 {
-    shellmatta_ymodem_state_t state;                            /**< current stat of the ymodem module              */
+    shellmatta_ymodem_state_t state;                            /**< current state of the ymodem module             */
     uint32_t byteCounter;                                       /**< internal counter for processing input data     */
-    uint32_t packetCounter;                                     /**< counter of the totally received packets        */
-    uint32_t totalBytesReceived;                                /**< counter of the totally received bytes          */
+    uint32_t packetCounter;                                     /**< counter of received packets                    */
+    uint32_t totalBytesReceived;                                /**< counter of received bytes                      */
     uint32_t fileSize;                                          /**< size of the file received in packet 0          */
     bool pauseRequested;                                        /**< pause requested from the application           */
-    uint32_t pollCyclesLeft;                                    /**< number of poll cycles left before ending       */
+    uint32_t pollCyclesLeft;                                    /**< number of poll cycles left before finish       */
     uint32_t cancelCounter;                                     /**< counter to count the amount of cancels         */
     shellmatta_ymodem_packet_t packet;                          /**< currently processed packet                     */
     shellmatta_ymodem_cancel_t cancelCallback;                  /**< callback to pass cancel events                 */

+ 0 - 5
doc/shellmatta_transport_layer.dox

@@ -149,9 +149,4 @@
     To enable the lookup table less CRC just define
     ``SHELLMATTA_TRANSPORT_CRC_NO_LOOKUP`` during compilation.
 
-
-    @section shellmatta_transport_layer_control Controlling the transport layer
-
-    @todo Not implemented yet
-
 */

+ 16 - 0
doc/shellmatta_ymodem.dox

@@ -83,4 +83,20 @@
 
     When the processing is done just call #shellmatta_ymodem_resume.
 
+    @section shellmatta_ymodem_crc CRC calculation
+
+    The shellmatta ymodem uses the CRC16 algorithm to secure the
+    transmission (0x1021).
+
+    By default the shellmatta crc implementation uses a lookup table to
+    calculate the crc in a performant way.
+
+    This uses quite a lot of read only memory on the device. If the memory
+    consumption is an Issue you can switch to a slower implementation without
+    the lookup table. This will increase CPU load quite a bit, but saves nearly
+    0.5K of read only memory.
+
+    To enable the lookup table less CRC just define
+    ``SHELLMATTA_YMODEM_CRC_NO_LOOKUP`` during compilation.
+
 */

+ 1 - 0
example/main.c

@@ -180,6 +180,7 @@ shellmatta_retCode_t ret = SHELLMATTA_OK;
 void ymodemCallbackCancel(shellmatta_handle_t handle) {
 
     (void)handle;
+    printf("Received cancel callback\n");
 
     return;
 }

+ 1 - 1
src/shellmatta.c

@@ -78,7 +78,7 @@ static shellmatta_retCode_t shellmatta_processDataInt(shellmatta_handle_t     ha
             utils_terminateInput(inst);
         }
     }
-    /** -# poll shellmatta ymomdem to send out the request to the sender */
+    /** -# poll shellmatta ymodem to send out the request to the sender */
     if((0u == size) && (SHELLMATTA_YMODEM_INACTIVE != inst->ymodem.state))
     {
         (void)shellmatta_ymodem_poll(handle);

+ 9 - 1
src/shellmatta_transport.c

@@ -9,8 +9,14 @@
 /**
  * @file    shellmatta_transport.c
  * @brief   transport layer functions of shellmatta
- * @author  Simon Fischer <fischer.simon.1991@gmail.com>
+ * @authors Simon Fischer <dev@s-fischer.net> Stefan Strobel <stefan.strobel@shimatta.net>
  */
+
+/**
+ * @addtogroup shellmatta_transport
+ * @{
+ */
+
 #ifdef SHELLMATTA_TRANSPORT
 #include "shellmatta_transport.h"
 #include "shellmatta.h"
@@ -517,3 +523,5 @@ shellmatta_retCode_t shellmatta_transport_flush(shellmatta_handle_t handle)
     return ret;
 }
 #endif
+
+/** @} */

+ 8 - 1
src/shellmatta_transport.h

@@ -9,7 +9,12 @@
 /**
  * @file    shellmatta_transport.h
  * @brief   transport layer functions of shellmatta
- * @author  Simon Fischer <fischer.simon.1991@gmail.com>
+ * @authors Simon Fischer <dev@s-fischer.net> Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
+/**
+ * @addtogroup shellmatta_transport
+ * @{
  */
 
 #ifndef _SHELLMATTA_TRANSPORT_H_
@@ -78,3 +83,5 @@ shellmatta_retCode_t shellmatta_transport_write(shellmatta_transport_layer_t *tr
                                                 uint32_t length);
 
 #endif /* _SHELLMATTA_TRANSPORT_H_ */
+
+/** @} */

+ 1 - 2
src/shellmatta_utils.c

@@ -90,13 +90,12 @@ uint32_t utils_shellItoa(int32_t value, char *buffer, uint32_t base)
 
 /**
  * @brief       turns a string of digits into an unsigned 32-bit integer
- * @warning     will overflow if number is larger than UINT32_MAX
  * @param[in]   str     pointer to the string
  * @param[out]  result  the value of the string as unsigned 32-bit integer
  * @param[in]   base    base of the conversion
  * @return      errorcode   #SHELLMATTA_OK
  *                          #SHELLMATTA_USE_FAULT (param err)
- *                          #SHELLMATTA_ERROR (invalid characters)
+ *                          #SHELLMATTA_ERROR (invalid characters or overflow)
 */
 shellmatta_retCode_t utils_shellAsciiToUInt32(char* str, uint32_t *result, uint32_t base)
 {

+ 1 - 1
src/shellmatta_utils.h

@@ -16,6 +16,7 @@
  * @addtogroup shellmatta_utils
  * @{
  */
+
 #ifndef _SHELLMATTA_UTILS_H_
 #define _SHELLMATTA_UTILS_H_
 
@@ -144,4 +145,3 @@ void utils_terminateInput(          shellmatta_instance_t *inst);
 #endif
 
 /** @} */
-

+ 9 - 3
src/shellmatta_ymodem.c

@@ -9,7 +9,12 @@
 /**
  * @file    shellmatta_ymodem.c
  * @brief   ymodem functions of shellmatta
- * @author  Simon Fischer <dev@s-fischer.net>
+ * @authors Simon Fischer <dev@s-fischer.net> Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
+/**
+ * @addtogroup shellmatta_ymodem
+ * @{
  */
 
 #include "shellmatta_ymodem.h"
@@ -160,7 +165,6 @@ static shellmatta_retCode_t ymodem_stateMachine(shellmatta_handle_t handle, uint
                     inst->ymodem.packet.size = YMODEM_PACKET_SIZE_1K;
                     inst->ymodem.state = SHELLMATTA_YMODEM_RECEIVE_HEADER;
                     break;
-
                 case YMODEM_EOT:
                     /** -# ACK the successful file reception */
                     shellmatta_ymodem_control(handle, YMODEM_ACK);
@@ -202,7 +206,7 @@ static shellmatta_retCode_t ymodem_stateMachine(shellmatta_handle_t handle, uint
         case SHELLMATTA_YMODEM_RECEIVE_DATA:
             inst->ymodem.packet.packetData[inst->ymodem.byteCounter] = byte;
             inst->ymodem.byteCounter ++;
-            
+
             /** -# load payload until the packet is full */
             if(inst->ymodem.byteCounter >= inst->ymodem.packet.size)
             {
@@ -523,3 +527,5 @@ shellmatta_retCode_t shellmatta_ymodem_cancel(shellmatta_handle_t handle, bool d
 
     return ret;
 }
+
+/** @} */

+ 8 - 1
src/shellmatta_ymodem.h

@@ -9,7 +9,12 @@
 /**
  * @file    shellmatta_ymodem.h
  * @brief   ymodem functions of shellmatta
- * @author  Simon Fischer <dev@s-fischer.net>
+ * @authors Simon Fischer <dev@s-fischer.net> Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
+/**
+ * @addtogroup shellmatta_transport
+ * @{
  */
 
 #ifndef _SHELLMATTA_YMODEM_H_
@@ -24,3 +29,5 @@ shellmatta_retCode_t shellmatta_ymodem_processByte( shellmatta_handle_t handle,
 shellmatta_retCode_t shellmatta_ymodem_poll(        shellmatta_handle_t handle);
 
 #endif /* _SHELLMATTA_YMODEM_H_ */
+
+/** @} */

+ 14 - 3
test/unittest/shellmatta/test_shellmatta_doInit.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_shellmatta_doInit.c
+ * @brief   unittest for shellmatta doInit function - currently not implemented
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta.c"
 #include "src/shellmatta_transport.c"
@@ -7,10 +21,7 @@
 TEST_CASE( "shellmatta dummy" ) {
 
     shellmatta_instance_t inst;
-    //shellmatta_handle_t handle;
     inst.inputCount = 0u;
 
-    //shellmatta_doInit(&inst, &handle, )
-
     REQUIRE( inst.inputCount == 0u);
 }

+ 14 - 2
test/unittest/shellmatta_autocomplete/test_autocomplete_run.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_autodomplete_run.c
+ * @brief   unittest for shellmatta aurocomplete_run function - currently not implemented
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_autocomplete.c"
 #include <string.h>
@@ -7,7 +21,5 @@ TEST_CASE( "shellmatta_autocomplete_run dummy" ) {
     shellmatta_instance_t inst;
     inst.inputCount = 0u;
 
-    // autocomplete_run(&inst);
-
     REQUIRE( inst.inputCount == 0u);
 }

+ 15 - 1
test/unittest/shellmatta_escape/test_escape_processArrowKeys.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_escape_processArrowKeys.c
+ * @brief   unittest for shellmatta escape_processArrowKeys - currently not implemented
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_escape.c"
 #include <string.h>
@@ -9,5 +23,5 @@ TEST_CASE( "shellmatta_escape dummy" ) {
 
     escape_processArrowKeys(&inst);
 
-    REQUIRE( inst.inputCount == 0u);
+    REQUIRE(inst.inputCount == 0u);
 }

+ 16 - 4
test/unittest/shellmatta_history/test_appendHistoryByte.cpp

@@ -1,13 +1,25 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_appendHistoryByte.c
+ * @brief   unittest for shellmatta appendHistoryByte - currently not implemented
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_history.c"
 #include <string.h>
 
-TEST_CASE( "shellmatta_history dummy" ) {
+TEST_CASE("shellmatta_history dummy" ) {
 
     shellmatta_instance_t inst;
     inst.inputCount = 0u;
 
-    //appendHistoryByte(&inst, 'a');
-
-    REQUIRE( inst.inputCount == 0u);
+    REQUIRE(inst.inputCount == 0u);
 }

+ 14 - 0
test/unittest/shellmatta_opt/test_opt_findNextHunk.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_opt_findNextHunk.c
+ * @brief   unittest for shellmatta opt_findNextHunk
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_opt.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_opt/test_opt_peekNextHunk.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_opt_peekNextHunk.c
+ * @brief   unittest for shellmatta opt_peekNextHunk
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_opt.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_clearInput.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_clearInput.c
+ * @brief   unittest for shellmatta utils_clearInput
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_eraseLine.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_eraseLine.c
+ * @brief   unittest for shellmatta utils_eraseLine
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 2
test/unittest/shellmatta_utils/test_utils_forwardCursor.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_forwardCursor.c
+ * @brief   unittest for shellmatta utils_forwardCursor
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>
@@ -14,7 +28,6 @@ static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
     return SHELLMATTA_OK;
 }
 
-
 TEST_CASE( "shellmatta_utils_forwardCursor normal" ) {
 
     shellmatta_instance_t inst;
@@ -63,7 +76,6 @@ TEST_CASE( "shellmatta_utils_forwardCursor normal echo off" ) {
     REQUIRE( strncmp("\0\0\0\0", write_data, 4u) == 0);
 }
 
-
 TEST_CASE( "shellmatta_utils_forwardCursor forward by 12 with cursor at 5 and input count at 10" ) {
 
     shellmatta_instance_t inst;

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_insertChars.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_insertChars.c
+ * @brief   unittest for shellmatta utils_insertChars
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_removeChars.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_removeChars.c
+ * @brief   unittest for shellmatta utils_removeChars
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.h"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_restoreCursorPos.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_restoreCursorPos.c
+ * @brief   unittest for shellmatta utils_restoreCursorPos
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_rewindCursor.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_rewindCursor.c
+ * @brief   unittest for shellmatta utils_rewindCursor
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_saveCursorPos.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_saveCursorPos.c
+ * @brief   unittest for shellmatta utils_saveCursorPos
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_shellAsciiToUInt32.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_shellAsciiToUInt32.c
+ * @brief   unittest for shellmatta utils_shellAsciiToUInt32
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_shellItoa.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_shellItoa.c
+ * @brief   unittest for shellmatta utils_shellItoa
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_terminateInput.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_terminateInput.c
+ * @brief   unittest for shellmatta utils_terminateInput
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 14 - 0
test/unittest/shellmatta_utils/test_utils_writeEcho.cpp

@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_utils_writeEcho.c
+ * @brief   unittest for shellmatta utils_writeEcho
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_utils.c"
 #include <string.h>

+ 15 - 1
test/unittest/shellmatta_ymodem/test_ymodem.cpp

@@ -1,4 +1,18 @@
+/*
+ * Copyright (c) 2019 - 2024 Stefan Strobel <stefan.strobel@shimatta.net>
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * @file    test_ymodem.c
+ * @brief   unittest for shellmatta ymodem - currently not implemented
+ * @author  Stefan Strobel <stefan.strobel@shimatta.net>
+ */
+
 #include "test/framework/catch.hpp"
 #include "src/shellmatta_ymodem.c"
 
-/* empty unittest - just added to fix linking issues - no unittests for ymodem right now */
+/* empty unittest - just added to fix linking issues - no unittests for ymodem right now */