mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
CC3200 Launchpad: Should not include apps/nsh.h; also fix a warning
This commit is contained in:
@@ -2,12 +2,14 @@
|
|||||||
* configs/cc3200-launchpad/src/cc3200_boot.c
|
* configs/cc3200-launchpad/src/cc3200_boot.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Droidifi LLC. All rights reserved.
|
* Copyright (C) 2014 Droidifi LLC. All rights reserved.
|
||||||
|
* Copyright (C) 2014, 2016 Gregory Nutt.
|
||||||
* Author: Jim Ewing <jim@droidifi.com>
|
* Author: Jim Ewing <jim@droidifi.com>
|
||||||
|
* Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Adapted for the cc3200 from code:
|
* Adapted for the cc3200 from code:
|
||||||
*
|
*
|
||||||
* Copyright (C) Gregory Nutt.
|
* Copyright (C) 2014 Gregory Nutt.
|
||||||
* Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -48,7 +50,6 @@
|
|||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <arch/board/cc3200_utils.h>
|
#include <arch/board/cc3200_utils.h>
|
||||||
#include <apps/nsh.h>
|
|
||||||
|
|
||||||
#include "cc3200_launchpad.h"
|
#include "cc3200_launchpad.h"
|
||||||
|
|
||||||
@@ -56,13 +57,8 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
#define CC3200_SRAM1_BASE 0x20000000
|
||||||
* Public Data
|
#define CC3200_SRAM1_SIZE 0x4000
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -133,13 +129,8 @@ void tiva_boardinitialize(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
#if CONFIG_MM_REGIONS > 1
|
||||||
|
|
||||||
#define CC3200_SRAM1_BASE 0x20000000
|
|
||||||
#define CC3200_SRAM1_SIZE 0x4000
|
|
||||||
|
|
||||||
void up_addregion(void)
|
void up_addregion(void)
|
||||||
{
|
{
|
||||||
kumm_addregion((FAR void*)CC3200_SRAM1_BASE, CC3200_SRAM1_SIZE);
|
kumm_addregion((FAR void*)CC3200_SRAM1_BASE, CC3200_SRAM1_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/cc3200-launchpad/src/cc3200_launchpad.h
|
* configs/cc3200-launchpad/src/cc3200_launchpad.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -71,6 +71,12 @@ void cc3200_uart_init(void);
|
|||||||
|
|
||||||
void cc3200_led_init(void);
|
void cc3200_led_init(void);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: cc3200_led_initialize
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void cc3200_led_initialize(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: cc3200_ledon
|
* Name: cc3200_ledon
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -1,3 +1,41 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/cc3200-launchpad/src/cc3200_leds.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 Droidifi LLC. All rights reserved.
|
||||||
|
* Copyright (C) 2016 Gregory Nutt.
|
||||||
|
* Author: Jim Ewing <jim@droidifi.com>
|
||||||
|
* Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -18,6 +56,10 @@
|
|||||||
#define LED2_GPIO 10
|
#define LED2_GPIO 10
|
||||||
#define LED3_GPIO 11
|
#define LED3_GPIO 11
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: cc3200_led_initialize
|
* Name: cc3200_led_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -33,7 +75,7 @@ void cc3200_led_initialize(void)
|
|||||||
uint8_t x=16;
|
uint8_t x=16;
|
||||||
|
|
||||||
putreg32(getreg32(0x44025000 + 0x00000058) | 0x00000001, 0x44025000 + 0x00000058);
|
putreg32(getreg32(0x44025000 + 0x00000058) | 0x00000001, 0x44025000 + 0x00000058);
|
||||||
while(--x)
|
while (--x)
|
||||||
;
|
;
|
||||||
|
|
||||||
cc3200_pin_type_gpio(PIN_01, PIN_MODE_0, false);
|
cc3200_pin_type_gpio(PIN_01, PIN_MODE_0, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user