You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/01/12 23:13:07 UTC

[1/2] incubator-mynewt-core git commit: frdm-k64f; allow building without any of the UARTs enabled.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop b774aa1b1 -> d6ed9cf97


frdm-k64f; allow building without any of the UARTs enabled.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e034e17a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e034e17a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e034e17a

Branch: refs/heads/develop
Commit: e034e17ab7f484a9a7dcd60c673e391ec9c31c69
Parents: b774aa1
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Jan 12 15:05:59 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Jan 12 15:05:59 2017 -0800

----------------------------------------------------------------------
 hw/bsp/frdm-k64f/src/hal_bsp.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e034e17a/hw/bsp/frdm-k64f/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/frdm-k64f/src/hal_bsp.c b/hw/bsp/frdm-k64f/src/hal_bsp.c
index 0dd820f..bb4e1e9 100644
--- a/hw/bsp/frdm-k64f/src/hal_bsp.c
+++ b/hw/bsp/frdm-k64f/src/hal_bsp.c
@@ -29,9 +29,12 @@
 #include "hal/hal_flash_int.h"
 #include "flash_map/flash_map.h"
 #include "hal/hal_flash.h"
+#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1) || MYNEWT_VAL(UART_2) || \
+    MYNEWT_VAL(UART_3) || MYNEWT_VAL(UART_4) || MYNEWT_VAL(UART_5)
 #include "uart/uart.h"
 #include "uart_hal/uart_hal.h"
 #include "hal/hal_uart.h"
+#endif
 #include "bsp/cmsis_nvic.h"
 #include "mcu/frdm-k64f_hal.h"
 #include "fsl_device_registers.h"
@@ -158,6 +161,7 @@ hal_bsp_init(void)
 {
     int rc = 0;
 
+    (void)rc;
     // Init pinmux and other hardware setup.
     init_hardware();
     BOARD_BootClockRUN();


[2/2] incubator-mynewt-core git commit: oic unittest; don't filter out responses to discovery messages based on source address.

Posted by ma...@apache.org.
oic unittest; don't filter out responses to discovery messages
based on source address.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/d6ed9cf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d6ed9cf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d6ed9cf9

Branch: refs/heads/develop
Commit: d6ed9cf9780b48f8c66b4da96e4d2e8bedc3377e
Parents: e034e17
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Jan 12 15:12:09 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Jan 12 15:12:09 2017 -0800

----------------------------------------------------------------------
 net/oic/test/src/testcases/oic_discover.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d6ed9cf9/net/oic/test/src/testcases/oic_discover.c
----------------------------------------------------------------------
diff --git a/net/oic/test/src/testcases/oic_discover.c b/net/oic/test/src/testcases/oic_discover.c
index 8a7a69a..ae2f997 100644
--- a/net/oic/test/src/testcases/oic_discover.c
+++ b/net/oic/test/src/testcases/oic_discover.c
@@ -24,6 +24,11 @@
 #define OIC_TAPP_PRIO       9
 #define OIC_TAPP_STACK_SIZE 1024
 
+/*
+ * How long to wait before declaring discovery process failure.
+ */
+#define OIC_TEST_FAIL_DLY   (OS_TICKS_PER_SEC * 2)
+
 static int oic_test_state;
 
 static struct os_task oic_tapp;
@@ -58,18 +63,9 @@ static oc_discovery_flags_t
 discover_cb(const char *di, const char *uri, oc_string_array_t types,
             oc_interface_mask_t interfaces, oc_server_handle_t *server)
 {
-    uint8_t local_endpoint[] = { 0, 0, 0, 0, 0, 0, 0, 1 };
-
-    /*
-     * Only care about discovery responses from localhost.
-     */
     if ((server->endpoint.oe.flags & IP) == 0) {
         return 0;
     }
-    if (memcmp(&server->endpoint.oe_ip.v6.address[8], local_endpoint, 8)) {
-        return 0;
-    }
-    printf("%d %s %s\n", oic_test_state, di, uri);
     switch (oic_test_state) {
     case 1:
         TEST_ASSERT(!strcmp(uri, "/oic/p"));
@@ -148,13 +144,13 @@ oic_test_next_step(struct os_event *ev)
          * No resources registered yet.
          */
         oc_do_ip_discovery(NULL, discover_cb);
-        os_callout_reset(&oic_test_timer, OS_TICKS_PER_SEC);
+        os_callout_reset(&oic_test_timer, OIC_TEST_FAIL_DLY);
         break;
     case 2:
         oc_add_device("/oic/d", "oic.d.light", "TestDev", "1.0", "1.1",
           NULL, NULL);
         oc_do_ip_discovery(NULL, discover_cb);
-        os_callout_reset(&oic_test_timer, OS_TICKS_PER_SEC);
+        os_callout_reset(&oic_test_timer, OIC_TEST_FAIL_DLY);
         break;
     case 3: {
         oc_resource_t *res = oc_new_resource("/light/test", 1, 0);
@@ -167,7 +163,7 @@ oic_test_next_step(struct os_event *ev)
         oc_resource_set_request_handler(res, OC_GET, oic_light_get);
         oc_add_resource(res);
         oc_do_ip_discovery(NULL, discover_cb);
-        os_callout_reset(&oic_test_timer, OS_TICKS_PER_SEC);
+        os_callout_reset(&oic_test_timer, OIC_TEST_FAIL_DLY);
         break;
     }
     default: