-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from kendryte/develop
Release 0.4.0
- Loading branch information
Showing
82 changed files
with
4,936 additions
and
4,469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
# Add lib headers | ||
macro(header_directories parent) | ||
file(GLOB_RECURSE newList ${parent}/*.h) | ||
set(dir_list "") | ||
foreach (file_path ${newList}) | ||
get_filename_component(dir_path ${file_path} DIRECTORY) | ||
set(dir_list ${dir_list} ${dir_path}) | ||
endforeach () | ||
list(REMOVE_DUPLICATES dir_list) | ||
|
||
include_directories(${dir_list}) | ||
include_directories(${parent}) | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,5 @@ | ||
#project(kendryte_drivers) | ||
#project(kendryte) | ||
|
||
# create driver library | ||
FILE(GLOB_RECURSE LIB_SRC_NOASM | ||
"${CMAKE_CURRENT_LIST_DIR}/*.h" | ||
"${CMAKE_CURRENT_LIST_DIR}/*.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/*.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/*.c" | ||
) | ||
|
||
FILE(GLOB_RECURSE ASSEMBLY_FILES | ||
"${CMAKE_CURRENT_LIST_DIR}/*.s" | ||
"${CMAKE_CURRENT_LIST_DIR}/*.S" | ||
) | ||
SET(LIB_SRC ${LIB_SRC_NOASM} ${ASSEMBLY_FILES}) | ||
|
||
include_directories(${CMAKE_CURRENT_LIST_DIR}/drivers/include ${CMAKE_CURRENT_LIST_DIR}/bsp/include) | ||
# | ||
#HEADER_DIRECTORIES(LIB_HEADERS) | ||
# | ||
#INCLUDE_DIRECTORIES(${LIB_HEADERS}) | ||
|
||
SET_PROPERTY(SOURCE ${ASSEMBLY_FILES} PROPERTY LANGUAGE C) | ||
SET_SOURCE_FILES_PROPERTIES(${ASSEMBLY_FILES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp -D __riscv64") | ||
|
||
#MESSAGE("CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") | ||
|
||
ADD_LIBRARY(kendryte STATIC ${LIB_SRC}) | ||
SET_TARGET_PROPERTIES(kendryte PROPERTIES LINKER_LANGUAGE C) | ||
|
||
# find headers files to INSTALL | ||
file(GLOB_RECURSE LIB_HEADERS | ||
"../lib/*.h" | ||
"../lib/*.hpp" | ||
) | ||
|
||
set_target_properties(kendryte PROPERTIES PUBLIC_HEADER "${LIB_HEADERS}") | ||
|
||
# copy .a file and headers | ||
install(TARGETS kendryte | ||
EXPORT kendryte | ||
ARCHIVE | ||
DESTINATION ${CMAKE_BINARY_DIR}/archive | ||
PUBLIC_HEADER DESTINATION ${CMAKE_BINARY_DIR}/archive/include | ||
) | ||
ADD_SUBDIRECTORY(drivers) | ||
ADD_SUBDIRECTORY(freertos) | ||
ADD_SUBDIRECTORY(bsp) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* Copyright 2018 Canaan Inc. | ||
* | ||
* 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. | ||
*/ | ||
#ifndef _PIN_CFG_H | ||
#define _PIN_CFG_H | ||
|
||
#include <platform.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
#define PIN_CFG_VERSION 1 | ||
|
||
typedef struct _fpioa_cfg_item | ||
{ | ||
int number; | ||
fpioa_function_t function; | ||
} fpioa_cfg_item_t; | ||
|
||
typedef struct _fpioa_cfg | ||
{ | ||
uint32_t version; | ||
uint32_t functions_count; | ||
fpioa_cfg_item_t functions[]; | ||
} fpioa_cfg_t; | ||
|
||
typedef struct _power_bank_item | ||
{ | ||
sysctl_power_bank_t power_bank; | ||
sysctl_io_power_mode_t io_power_mode; | ||
} power_bank_item_t; | ||
|
||
typedef struct _power_bank_cfg | ||
{ | ||
uint32_t version; | ||
uint32_t power_banks_count; | ||
power_bank_item_t power_banks[]; | ||
} power_bank_cfg_t; | ||
|
||
typedef struct _pin_cfg | ||
{ | ||
uint32_t version; | ||
bool set_spi0_dvp_data; | ||
} pin_cfg_t; | ||
|
||
extern const fpioa_cfg_t g_fpioa_cfg; | ||
extern const power_bank_cfg_t g_power_bank_cfg; | ||
extern const pin_cfg_t g_pin_cfg; | ||
|
||
#endif |
Oops, something went wrong.