mirror of
https://github.com/openharmony/device_board_lango.git
synced 2026-06-30 21:17:56 -04:00
@@ -18,6 +18,7 @@ if (ohos_kernel_type == "liteos_m") {
|
||||
modules = [
|
||||
"dev_wifi_a",
|
||||
"shields",
|
||||
"hcs",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Regular → Executable
Regular → Executable
+12
-7
@@ -45,6 +45,7 @@ if (product_path != "") {
|
||||
product_conf = read_file("${product_path}/config.json", "json")
|
||||
product_name = product_conf.product_name
|
||||
xts_list = product_conf.xts_list
|
||||
tests_list = product_conf.tests_list
|
||||
}
|
||||
|
||||
# Board related common compile flags.
|
||||
@@ -78,11 +79,16 @@ board_cflags = [
|
||||
#"-DLWIP_DHCP",
|
||||
#"-D_POSIX_SOURCE",
|
||||
#"-D_GNU_SOURCE=1",
|
||||
"-DCFG_NAN_CONFIG",
|
||||
"-D__LITEOS_M__",
|
||||
#"-Wno-unused-parameter",
|
||||
#"-Wno-sign-compare",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-parentheses",
|
||||
"-Wno-cast-function-type",
|
||||
]
|
||||
board_cxx_flags = [ "-mfloat-abi=softfp" ]
|
||||
|
||||
board_cxx_flags = board_cflags
|
||||
|
||||
board_ld_flags = [
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
@@ -115,9 +121,10 @@ board_include_dirs = [
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/kv/include/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/inc/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/common/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/include/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/iperf/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/config/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/liteos_m/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/lwip/include/",
|
||||
"//device/soc/asrmicro/asr582x/liteos_m/sdk/lwip/port/include/",
|
||||
"//kernel/liteos_m/kernel/arch/arm/cortex-m4/gcc/",
|
||||
"//kernel/liteos_m/kernel/arch/include/",
|
||||
"//kernel/liteos_m/utils/",
|
||||
@@ -133,8 +140,6 @@ board_include_dirs = [
|
||||
"//third_party/openssl/include",
|
||||
"//third_party/openssl/crypto/include",
|
||||
"//third_party/openssl/crypto/ec",
|
||||
"//third_party/musl/porting/liteos_m/kernel/include",
|
||||
"//third_party/musl/porting/liteos_m/kernel/src/internal",
|
||||
]
|
||||
board_include_dirs += []
|
||||
|
||||
|
||||
Regular → Executable
Executable
+24
@@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2022 ASR Microelectronics (Shanghai) Co., Ltd. All rights reserved.
|
||||
# Licensed 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.
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
import("//drivers/adapter/khdf/liteos_m/hdf.gni")
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
hdf_driver(module_name) {
|
||||
hcs_sources = [ "asr582x.hcs" ]
|
||||
visibility += [
|
||||
"$device_path",
|
||||
".",
|
||||
]
|
||||
}
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2022 ASR Microelectronics (Shanghai) Co., Ltd. All rights reserved.
|
||||
* Licensed 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 "hdf.hcs"
|
||||
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
root {
|
||||
module = "asrmicro,asr582x";
|
||||
device_info {
|
||||
match_attr = "hdf_manager";
|
||||
template host {
|
||||
hostName = "";
|
||||
priority = 100;
|
||||
template device {
|
||||
template deviceNode {
|
||||
policy = 0;
|
||||
priority = 100;
|
||||
preload = 0;
|
||||
permission = 0664;
|
||||
moduleName = "";
|
||||
serviceName = "";
|
||||
deviceMatchAttr = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
platform :: host {
|
||||
hostName = "platform_host";
|
||||
priority = 50;
|
||||
device_gpio :: device {
|
||||
gpio0 :: deviceNode {
|
||||
policy = 0;
|
||||
priority = 100;
|
||||
moduleName = "ASR_GPIO_MODULE_HDF";
|
||||
serviceName = "HDF_PLATFORM_GPIO";
|
||||
deviceMatchAttr = "gpio_config";
|
||||
}
|
||||
}
|
||||
device_uart :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 40;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_UART";
|
||||
serviceName = "HDF_PLATFORM_UART_0";
|
||||
deviceMatchAttr = "asr582x_uart_0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
root {
|
||||
platform {
|
||||
gpio_config {
|
||||
match_attr = "gpio_config";
|
||||
pin = [0, 1];
|
||||
// led3: GPIO9
|
||||
// user key: GPIO7
|
||||
realPin = [9, 7];
|
||||
config = [5, 1];
|
||||
pinNum = 2;
|
||||
}
|
||||
controller_uart0 :: uart_controller {
|
||||
match_attr = "goodix_gr55xx_uart_0";
|
||||
id = 0; /* APP_UART_ID_0 */
|
||||
baudrate = 115200;
|
||||
pin_tx_type = 0; /* APP_IO_TYPE_NORMAL */
|
||||
pin_tx_pin = 10; /* APP_IO_PIN_10 */
|
||||
pin_tx_mux = 2; /* APP_IO_MUX_2 */
|
||||
pin_tx_pull = 1; /* APP_IO_PULLUP */
|
||||
|
||||
pin_rx_type = 0; /* APP_IO_TYPE_NORMAL */
|
||||
pin_rx_pin = 11; /* APP_IO_PIN_11 */
|
||||
pin_rx_mux = 2; /* APP_IO_MUX_2 */
|
||||
pin_rx_pull = 1; /* APP_IO_PULLUP */
|
||||
|
||||
use_mode_type = 0; /* APP_UART_TYPE_INTERRUPT */
|
||||
use_mode_tx_dma_ch = 0; /* DMA_Channel0 */
|
||||
use_mode_rx_dma_ch = 1; /* DMA_Channel1 */
|
||||
|
||||
rx_timeout_mode = 1; /* UART_RECEIVER_TIMEOUT_ENABLE */
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#include "device_info.hcs"
|
||||
#include "gpio.hcs"
|
||||
#include "uart.hcs"
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
root {
|
||||
platform {
|
||||
template uart_controller {
|
||||
match_attr = "";
|
||||
id = 0;
|
||||
baudrate = 115200;
|
||||
|
||||
pin_tx_type = 0;
|
||||
pin_tx_pin = 0;
|
||||
pin_tx_mux = 0;
|
||||
pin_tx_pull = 0;
|
||||
|
||||
pin_rx_type = 0;
|
||||
pin_rx_pin = 0;
|
||||
pin_rx_mux = 0;
|
||||
pin_rx_pull = 0;
|
||||
|
||||
use_mode_type = 0;
|
||||
use_mode_tx_dma_ch = 0;
|
||||
use_mode_rx_dma_ch = 0;
|
||||
|
||||
rx_timeout_mode = 1;
|
||||
}
|
||||
controller_uart0 :: uart_controller {
|
||||
match_attr = "asr582x_uart_0";
|
||||
port = 0; /* UART_ID_0 */
|
||||
|
||||
pin_tx_pin = 0; /* IO_PIN_10 */
|
||||
pin_tx_mux = 25; /* IO_MUX_2 */
|
||||
|
||||
pin_rx_pin = 1; /* IO_PIN_11 */
|
||||
pin_rx_mux = 25; /* IO_MUX_2 */
|
||||
tx_rx = 3; /* TX_RX MODE */
|
||||
}
|
||||
}
|
||||
}
|
||||
Regular → Executable
|
Before Width: | Height: | Size: 707 KiB After Width: | Height: | Size: 707 KiB |
Regular → Executable
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
Regular → Executable
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
Reference in New Issue
Block a user