]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - apps/rpp-test-suite/main.c
Change license to MIT
[pes-rpp/rpp-lib.git] / apps / rpp-test-suite / main.c
index 430eb81a3eaec6364ae95937a730b346473ffc52..7113be37747d4f1b9f997dcc55284f5632b9209a 100644 (file)
@@ -1,12 +1,28 @@
-/* Copyright (C) 2013, 2014 Czech Technical University in Prague
+/* Copyright (C) 2013, 2014, 2015 Czech Technical University in Prague
  *
  * Authors:
  *     - Carlos Jenkins <carlos@jenkins.co.cr>
  *
- * This document contains proprietary information belonging to Czech
- * Technical University in Prague. Passing on and copying of this
- * document, and communication of its contents is not permitted
- * without prior written authorization.
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  *
  * File : main.c
  * Abstract:
@@ -38,12 +54,11 @@ static const char *newline = "\r\n";
 void execute_cmd(char *string)
 {
 #ifndef TARGET_POSIX
-       if (       strncmp(string, "adc", BUF_SIZE) == 0)
+       if (     strncmp(string, "adc", BUF_SIZE) == 0)
                test_adc();
-       else if (strncmp(string, "can", BUF_SIZE) == 0)
-#else /* TARGET_POSIX */
-       if (strncmp(string, "can", BUF_SIZE) == 0)
+       else
 #endif /* TARGET_POSIX */
+       if (     strncmp(string, "can", BUF_SIZE) == 0)
                test_can();
 #ifdef TARGET_POSIX
        else if (strncmp(string, "eth", BUF_SIZE) == 0)
@@ -192,17 +207,17 @@ void busy_infinite_loop()
  */
 int main(void)
 {
-#ifndef TARGET_POSIX
        // Initialize library
        rpp_init();
 
+#ifndef TARGET_POSIX
        // Speed up the SCI
        rpp_sci_setup(115200);
 #endif /* ! TARGET_POSIX */
        // Spawn tasks
        portBASE_TYPE task_created =
                xTaskCreate(test_cmdproc,
-                                       (const signed char *)"test_cmdproc",
+                                       "test_cmdproc",
                                        1024, NULL, TEST_TASK_PRIORITY, NULL
                                        );