You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by st...@apache.org on 2016/10/01 18:45:27 UTC

incubator-mynewt-core git commit: remove blinky from core to avoid confusion with projects. remove adc_dev from bsp HAL headers.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 5fce0086c -> 33cdc60bc


remove blinky from core to avoid confusion with projects.  remove adc_dev from bsp HAL headers.


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/33cdc60b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/33cdc60b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/33cdc60b

Branch: refs/heads/develop
Commit: 33cdc60bc6e78e786c879c0b5dd59a5d80369ee8
Parents: 5fce008
Author: Sterling Hughes <st...@apache.org>
Authored: Sat Oct 1 11:45:10 2016 -0700
Committer: Sterling Hughes <st...@apache.org>
Committed: Sat Oct 1 11:45:10 2016 -0700

----------------------------------------------------------------------
 apps/blinky/pkg.yml          |  38 -----------
 apps/blinky/src/main.c       | 138 --------------------------------------
 hw/hal/include/hal/hal_bsp.h |   1 -
 3 files changed, 177 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/33cdc60b/apps/blinky/pkg.yml
----------------------------------------------------------------------
diff --git a/apps/blinky/pkg.yml b/apps/blinky/pkg.yml
deleted file mode 100644
index 3b536cf..0000000
--- a/apps/blinky/pkg.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: apps/blinky
-pkg.type: app
-pkg.description: Basic example application which blinks an LED.
-pkg.author: "Apache Mynewt <de...@mynewt.incubator.apache.org>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-
-pkg.deps:
-    - sys/console/full
-    - libs/newtmgr
-    - kernel/os
-    - sys/shell
-    - sys/config
-    - sys/log
-    - sys/stats
-
-pkg.syscfg_vals:
-    # Enable the shell task.
-    SHELL_TASK: 1

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/33cdc60b/apps/blinky/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blinky/src/main.c b/apps/blinky/src/main.c
deleted file mode 100755
index 717bac8..0000000
--- a/apps/blinky/src/main.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include "os/os.h"
-#include "bsp/bsp.h"
-#include "hal/hal_gpio.h"
-#include "console/console.h"
-#include "shell/shell.h"
-#include "log/log.h"
-#include "stats/stats.h"
-#include "config/config.h"
-#include <assert.h>
-#include <string.h>
-#ifdef ARCH_sim
-#include <mcu/mcu_sim.h>
-#endif
-
-/* Task 1 */
-#define TASK1_PRIO (1)
-#define TASK1_STACK_SIZE    OS_STACK_ALIGN(256)
-struct os_task task1;
-os_stack_t stack1[TASK1_STACK_SIZE];
-static volatile int g_task1_loops;
-
-/* Task 2 */
-#define TASK2_PRIO (2)
-#define TASK2_STACK_SIZE    OS_STACK_ALIGN(256)
-struct os_task task2;
-os_stack_t stack2[TASK2_STACK_SIZE];
-
-struct log my_log;
-
-static volatile int g_task2_loops;
-
-/* Global test semaphore */
-struct os_sem g_test_sem;
-
-/* For LED toggling */
-int g_led_pin;
-
-void
-task1_handler(void *arg)
-{
-    struct os_task *t;
-
-    /* Set the led pin for the E407 devboard */
-    g_led_pin = LED_BLINK_PIN;
-    hal_gpio_init_out(g_led_pin, 1);
-
-    while (1) {
-        t = os_sched_get_current_task();
-        assert(t->t_func == task1_handler);
-
-        ++g_task1_loops;
-
-        /* Wait one second */
-        os_time_delay(OS_TICKS_PER_SEC);
-
-        /* Toggle the LED */
-        hal_gpio_toggle(g_led_pin);
-
-        /* Release semaphore to task 2 */
-        os_sem_release(&g_test_sem);
-    }
-}
-
-void
-task2_handler(void *arg)
-{
-    struct os_task *t;
-
-    while (1) {
-        /* just for debug; task 2 should be the running task */
-        t = os_sched_get_current_task();
-        assert(t->t_func == task2_handler);
-
-        /* Increment # of times we went through task loop */
-        ++g_task2_loops;
-
-        /* Wait for semaphore from ISR */
-        os_sem_pend(&g_test_sem, OS_TIMEOUT_NEVER);
-    }
-}
-
-/**
- * main
- *
- * The main function for the project. This function initializes the os, calls
- * init_tasks to initialize tasks (and possibly other objects), then starts the
- * OS. We should not return from os start.
- *
- * @return int NOTE: this function should never return!
- */
-int
-main(int argc, char **argv)
-{
-    int rc;
-
-#ifdef ARCH_sim
-    mcu_sim_parse_args(argc, argv);
-#endif
-
-    os_init();
-
-    /* Initialize global test semaphore */
-    rc = os_sem_init(&g_test_sem, 0);
-    assert(rc == 0);
-
-    rc = os_task_init(&task1, "task1", task1_handler, NULL,
-            TASK1_PRIO, OS_WAIT_FOREVER, stack1, TASK1_STACK_SIZE);
-    assert(rc == 0);
-
-    rc = os_task_init(&task2, "task2", task2_handler, NULL,
-            TASK2_PRIO, OS_WAIT_FOREVER, stack2, TASK2_STACK_SIZE);
-    assert(rc == 0);
-
-    os_start();
-
-    /* os start should never return. If it does, this should be an error */
-    assert(0);
-
-    return 0;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/33cdc60b/hw/hal/include/hal/hal_bsp.h
----------------------------------------------------------------------
diff --git a/hw/hal/include/hal/hal_bsp.h b/hw/hal/include/hal/hal_bsp.h
index 0b4a39c..46a4166 100644
--- a/hw/hal/include/hal/hal_bsp.h
+++ b/hw/hal/include/hal/hal_bsp.h
@@ -66,7 +66,6 @@ const struct bsp_mem_dump *bsp_core_dump(int *area_cnt);
 #define BSP_MAX_ID_LEN  32
 int bsp_hw_id(uint8_t *id, int max_len);
 
-struct adc_dev;
 uint16_t bsp_get_refmv(void *cfgdata);
 
 #define HAL_BSP_POWER_ON (1)