Skip to content

Commit 60f4c2b

Browse files
committed
code synchronization at 2018-01-05@19:16
1 parent 7263986 commit 60f4c2b

File tree

1,188 files changed

+318743
-21227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,188 files changed

+318743
-21227
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ example/flash/flash.mk
2424
example/flash/main.c
2525
example/flash/README.md
2626
settings.json
27+
build/cmd/win32/Python27/Lib/encodings/*.pyc

app/usyscall/syscall_fapi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifdef WITH_LWIP
88
#include <aos/network.h>
99
#endif
10+
#include "aos/uData.h"
1011

1112
#include <syscall_fnum.h>
1213

board/.DS_Store

6 KB
Binary file not shown.

board/b_l475e/atcmd_config_platform.h

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,10 @@
22
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
33
*/
44

5-
#ifndef _ATCMD_DEFINES_MK3060_H_
6-
#define _ATCMD_DEFINES_MK3060_H_
7-
8-
#include <hal/soc/uart.h>
9-
10-
/**
11-
* AT related platform-dependent things are here, including:
12-
* 1. AT command;
13-
* 2. AT response code;
14-
* 3. AT delimiter;
15-
* 4. AT event;
16-
* 5. Uart port used by AT;
17-
* 6. ...
18-
*/
19-
20-
// AT command
21-
#define AT_CMD_ENET_SEND "AT+ENETRAWSEND"
22-
#define AT_CMD_ENTER_ENET_MODE "AT+ENETRAWMODE=ON"
23-
#define AT_CMD_EHCO_OFF "AT+UARTE=OFF"
24-
#define AT_CMD_TEST "AT"
25-
26-
// Delimiter
27-
#define AT_RECV_DELIMITER "\r\n"
28-
#define AT_SEND_DELIMITER "\r"
29-
30-
// AT event
31-
#define AT_EVENT_ENET_DATA "+ENETEVENT:"
5+
#ifndef _ATCMD_CONFIG_PLATFORM_H_
6+
#define _ATCMD_CONFIG_PLATFORM_H_
327

338
// AT uart
349
#define AT_UART_PORT 1
35-
#define AT_UART_BAUDRATE 921600
36-
#define AT_UART_DATA_WIDTH DATA_WIDTH_8BIT
37-
#define AT_UART_PARITY NO_PARITY
38-
#define AT_UART_STOP_BITS STOP_BITS_1
39-
#define AT_UART_FLOW_CONTROL FLOW_CONTROL_DISABLED
40-
#define AT_UART_LINUX_DEV "/dev/ttyUSB1" // required by linuxhost
4110

4211
#endif

board/b_l475e/b_l475e.mk

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,30 @@ SUPPORT_BINS := no
1111
$(NAME)_SOURCES := board.c osa_flash.c
1212

1313
GLOBAL_INCLUDES += .
14-
GLOBAL_DEFINES += STDIO_UART=0 CONFIG_NO_TCPIP
15-
GLOBAL_DEFINES += RHINO_CONFIG_TICK_TASK=0 RHINO_CONFIG_WORKQUEUE=0
16-
17-
ifeq ($(sal),1)
18-
GLOBAL_DEFINES += RHINO_CONFIG_WORKQUEUE=1
14+
GLOBAL_DEFINES += STDIO_UART=0
15+
GLOBAL_DEFINES += RHINO_CONFIG_TICK_TASK=0
16+
17+
sal ?= 1
18+
ifeq (1,$(sal))
19+
$(NAME)_COMPONENTS += sal
20+
$(NAME)_COMPONENTS += sal.wifi.mk3060
21+
else
22+
GLOBAL_DEFINES += CONFIG_NO_TCPIP
1923
endif
2024

25+
2126
CONFIG_SYSINFO_PRODUCT_MODEL := ALI_AOS_B-L475E
2227
CONFIG_SYSINFO_DEVICE_NAME := B-L475E
2328

2429
GLOBAL_CFLAGS += -DSYSINFO_OS_VERSION=\"$(CONFIG_SYSINFO_OS_VERSION)\"
2530
GLOBAL_CFLAGS += -DSYSINFO_PRODUCT_MODEL=\"$(CONFIG_SYSINFO_PRODUCT_MODEL)\"
2631
GLOBAL_CFLAGS += -DSYSINFO_DEVICE_NAME=\"$(CONFIG_SYSINFO_DEVICE_NAME)\"
2732

33+
ifeq ($(COMPILER),armcc)
34+
else ifeq ($(COMPILER),iar)
35+
else
2836
GLOBAL_LDFLAGS += -L $(SOURCE_ROOT)/board/b_l475e
37+
endif
2938

3039
# Global defines
3140
# HSE_VALUE = STM32 crystal frequency = 26MHz (needed to make UART work correctly)
@@ -43,4 +52,6 @@ EXTRA_TARGET_MAKEFILES += $(MAKEFILES_PATH)/aos_standard_targets.mk
4352
ifeq (, $(findstring yts, $(BUILD_STRING)))
4453
GLOBAL_DEFINES += RHINO_CONFIG_WORKQUEUE=1
4554
TEST_COMPONENTS += basic api wifi_hal rhino vcall kv yloop alicrypto cjson digest_algorithm hashtable
55+
else
56+
GLOBAL_DEFINES += RHINO_CONFIG_WORKQUEUE=0
4657
endif

board/esp32devkitc/esp32devkitc.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ SUPPORT_BINS := no
88
# todo: remove these after rhino/lwip ready
99
vcall ?= rhino
1010

11-
CURRENT_TIME = $(shell /bin/date +%Y%m%d.%H%M)
1211
define get-os-version
1312
"AOS-R"-$(CURRENT_TIME)
1413
endef

board/hobbit1_evb/hobbit1_evb.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ $(NAME)_SOURCES := board_init.c
1212
GLOBAL_INCLUDES += .
1313
GLOBAL_DEFINES += STDIO_UART=1
1414

15-
CURRENT_TIME = $(shell /bin/date +%Y%m%d.%H%M)
1615
define get-os-version
1716
"AOS-R"-$(CURRENT_TIME)
1817
endef

board/linuxhost/atcmd_config_platform.h

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,10 @@
22
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
33
*/
44

5-
#ifndef _ATCMD_DEFINES_MK3060_H_
6-
#define _ATCMD_DEFINES_MK3060_H_
5+
#ifndef _ATCMD_PLATFORM_CONFIG_H_
6+
#define _ATCMD_PLATFORM_CONFIG_H_
77

8-
#include <hal/soc/uart.h>
9-
10-
/**
11-
* AT related platform-dependent things are here, including:
12-
* 1. AT command;
13-
* 2. AT response code;
14-
* 3. AT delimiter;
15-
* 4. AT event;
16-
* 5. Uart port used by AT;
17-
* 6. ...
18-
*/
19-
20-
// AT command
21-
#define AT_CMD_ENET_SEND "AT+ENETRAWSEND"
22-
#define AT_CMD_ENTER_ENET_MODE "AT+ENETRAWMODE=ON"
23-
#define AT_CMD_EHCO_OFF "AT+UARTE=OFF"
24-
#define AT_CMD_TEST "AT"
25-
26-
// Delimiter
27-
#define AT_RECV_DELIMITER "\r\n"
28-
#define AT_SEND_DELIMITER "\r"
29-
30-
// AT event
31-
#define AT_EVENT_ENET_DATA "+ENETEVENT:"
32-
33-
// AT uart
348
#define AT_UART_PORT 1
35-
#define AT_UART_BAUDRATE 921600
36-
#define AT_UART_DATA_WIDTH DATA_WIDTH_8BIT
37-
#define AT_UART_PARITY NO_PARITY
38-
#define AT_UART_STOP_BITS STOP_BITS_1
39-
#define AT_UART_FLOW_CONTROL FLOW_CONTROL_DISABLED
409
#define AT_UART_LINUX_DEV "/dev/ttyUSB1" // required by linuxhost
4110

4211
#endif

board/lpcxpresso54102/board.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright 2017 NXP
3+
*
4+
* Redistribution and use in source and binary forms, with or without modification,
5+
* are permitted provided that the following conditions are met:
6+
*
7+
* o Redistributions of source code must retain the above copyright notice, this list
8+
* of conditions and the following disclaimer.
9+
*
10+
* o Redistributions in binary form must reproduce the above copyright notice, this
11+
* list of conditions and the following disclaimer in the documentation and/or
12+
* other materials provided with the distribution.
13+
*
14+
* o Neither the name of the copyright holder nor the names of its
15+
* contributors may be used to endorse or promote products derived from this
16+
* software without specific prior written permission.
17+
*
18+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
30+
#include <stdint.h>
31+
#include "fsl_common.h"
32+
#include "clock_config.h"
33+
#include "board.h"
34+
#include "fsl_debug_console.h"
35+
36+
/*******************************************************************************
37+
* Variables
38+
******************************************************************************/
39+
40+
/* Clock rate on the CLKIN pin */
41+
const uint32_t ExtClockIn = BOARD_EXTCLKINRATE;
42+
43+
/*******************************************************************************
44+
* Code
45+
******************************************************************************/
46+
/* Initialize debug console. */
47+
status_t BOARD_InitDebugConsole(void)
48+
{
49+
status_t result;
50+
RESET_PeripheralReset(BOARD_DEBUG_UART_RST);
51+
result = DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, BOARD_DEBUG_UART_BAUDRATE, DEBUG_CONSOLE_DEVICE_TYPE_VUSART,
52+
BOARD_DEBUG_UART_CLK_FREQ);
53+
assert(kStatus_Success == result);
54+
return result;
55+
}

board/lpcxpresso54102/board.h

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
* Copyright 2017 NXP
3+
*
4+
* Redistribution and use in source and binary forms, with or without modification,
5+
* are permitted provided that the following conditions are met:
6+
*
7+
* o Redistributions of source code must retain the above copyright notice, this list
8+
* of conditions and the following disclaimer.
9+
*
10+
* o Redistributions in binary form must reproduce the above copyright notice, this
11+
* list of conditions and the following disclaimer in the documentation and/or
12+
* other materials provided with the distribution.
13+
*
14+
* o Neither the name of the copyright holder nor the names of its
15+
* contributors may be used to endorse or promote products derived from this
16+
* software without specific prior written permission.
17+
*
18+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
30+
#ifndef _BOARD_H_
31+
#define _BOARD_H_
32+
33+
#include "clock_config.h"
34+
#include "fsl_common.h"
35+
#include "fsl_gpio.h"
36+
37+
/*******************************************************************************
38+
* Definitions
39+
******************************************************************************/
40+
/*! @brief The board name */
41+
#define BOARD_NAME "LPCXPRESSO54102"
42+
43+
#define BOARD_EXTCLKINRATE (0)
44+
45+
/*! @brief The UART to use for debug messages. */
46+
#define BOARD_DEBUG_UART_TYPE DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM
47+
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) USART0
48+
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_Usart)
49+
#define BOARD_DEBUG_UART_CLK_ATTACH kIRC12M_to_USART
50+
#define BOARD_DEBUG_UART_RST kUSART0_RST_SHIFT_RSTn
51+
52+
#define BOARD_DEBUG_SPI_CLK_FREQ 12000000
53+
54+
#ifndef BOARD_DEBUG_UART_BAUDRATE
55+
#define BOARD_DEBUG_UART_BAUDRATE 115200
56+
#endif /* BOARD_DEBUG_UART_BAUDRATE */
57+
58+
#define BOARD_LED_RED_GPIO GPIO
59+
#define BOARD_LED_RED_GPIO_PORT 0U
60+
#define BOARD_LED_RED_GPIO_PIN 29U
61+
#define BOARD_LED_GREEN_GPIO GPIO
62+
#define BOARD_LED_GREEN_GPIO_PORT 0U
63+
#define BOARD_LED_GREEN_GPIO_PIN 30U
64+
#define BOARD_LED_BLUE_GPIO GPIO
65+
#define BOARD_LED_BLUE_GPIO_PORT 0U
66+
#define BOARD_LED_BLUE_GPIO_PIN 31U
67+
68+
#define BOARD_SW1_GPIO GPIO
69+
#define BOARD_SW1_GPIO_PORT 0U
70+
#define BOARD_SW1_GPIO_PIN 24U
71+
#define BOARD_SW1_NAME "SW1"
72+
#define BOARD_SW1_IRQ PIN_INT0_IRQn
73+
#define BOARD_SW1_IRQ_HANDLER PIN_INT0_IRQHandler
74+
75+
#define BOARD_SW2_GPIO GPIO
76+
#define BOARD_SW2_GPIO_PORT 0U
77+
#define BOARD_SW2_GPIO_PIN 31U
78+
#define BOARD_SW2_NAME "SW2"
79+
#define BOARD_SW2_IRQ PIN_INT0_IRQn
80+
#define BOARD_SW2_IRQ_HANDLER PIN_INT0_IRQHandler
81+
82+
/* Board led color mapping */
83+
#define LOGIC_LED_ON 0U
84+
#define LOGIC_LED_OFF 1U
85+
86+
#define LED_RED_INIT(output) \
87+
GPIO_PinInit(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, BOARD_LED_RED_GPIO_PIN, \
88+
&(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}) /*!< Enable target LED_RED */
89+
#define LED_RED_ON() \
90+
GPIO_ClearPinsOutput(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \
91+
1U << BOARD_LED_RED_GPIO_PIN) /*!< Turn on target LED_RED */
92+
#define LED_RED_OFF() \
93+
GPIO_SetPinsOutput(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \
94+
1U << BOARD_LED_RED_GPIO_PIN) /*!< Turn off target LED_RED */
95+
#define LED_RED_TOGGLE() \
96+
GPIO_TogglePinsOutput(BOARD_LED_RED_GPIO, BOARD_LED_RED_GPIO_PORT, \
97+
1U << BOARD_LED_RED_GPIO_PIN) /*!< Toggle on target LED_RED */
98+
99+
#define LED_GREEN_INIT(output) \
100+
GPIO_PinInit(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, BOARD_LED_GREEN_GPIO_PIN, \
101+
&(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}) /*!< Enable target LED_GREEN */
102+
#define LED_GREEN_ON() \
103+
GPIO_ClearPinsOutput(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \
104+
1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Turn on target LED_GREEN */
105+
#define LED_GREEN_OFF() \
106+
GPIO_SetPinsOutput(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \
107+
1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Turn off target LED_GREEN */
108+
#define LED_GREEN_TOGGLE() \
109+
GPIO_TogglePinsOutput(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_GPIO_PORT, \
110+
1U << BOARD_LED_GREEN_GPIO_PIN) /*!< Toggle on target LED_GREEN */
111+
112+
#define LED_BLUE_INIT(output) \
113+
GPIO_PinInit(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, BOARD_LED_BLUE_GPIO_PIN, \
114+
&(gpio_pin_config_t){kGPIO_DigitalOutput, (output)}) /*!< Enable target LED_BLUE */
115+
#define LED_BLUE_ON() \
116+
GPIO_ClearPinsOutput(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \
117+
1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Turn on target LED_BLUE */
118+
#define LED_BLUE_OFF() \
119+
GPIO_SetPinsOutput(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \
120+
1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Turn off target LED_BLUE */
121+
#define LED_BLUE_TOGGLE() \
122+
GPIO_TogglePinsOutput(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_GPIO_PORT, \
123+
1U << BOARD_LED_BLUE_GPIO_PIN) /*!< Toggle on target LED_BLUE */
124+
125+
#if defined(__cplusplus)
126+
extern "C" {
127+
#endif /* __cplusplus */
128+
129+
/*******************************************************************************
130+
* API
131+
******************************************************************************/
132+
133+
status_t BOARD_InitDebugConsole(void);
134+
135+
#if defined(__cplusplus)
136+
}
137+
#endif /* __cplusplus */
138+
139+
#endif /* _BOARD_H_ */

0 commit comments

Comments
 (0)