mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 09:41:36 +08:00
WIP: device tree MVP
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __DT_FREQ_H
|
||||
#define __DT_FREQ_H
|
||||
|
||||
#define DT_FREQ_K(x) ((x) * 1000)
|
||||
#define DT_FREQ_M(x) ((x) * 1000 * 1000)
|
||||
|
||||
#endif /* __DT_FREQ_H */
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __DT_MEM_H
|
||||
#define __DT_MEM_H
|
||||
|
||||
#define DT_SIZE_K(x) ((x) * 1024)
|
||||
#define DT_SIZE_M(x) ((x) * 1024 * 1024)
|
||||
|
||||
/* concatenate the values of the arguments into one */
|
||||
#define _DT_DO_CONCAT(x, y) x ## y
|
||||
|
||||
#define DT_ADDR(a) _DT_DO_CONCAT(0x, a)
|
||||
|
||||
#endif /* __DT_MEM_H */
|
||||
@@ -0,0 +1,14 @@
|
||||
/* SPDX-License-Identifier: Apache-2.0 */
|
||||
|
||||
/*
|
||||
* Skeleton device tree; the bare minimum needed to boot; just include and
|
||||
* add a compatible value. The bootloader will typically populate the memory
|
||||
* node.
|
||||
*/
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
chosen { };
|
||||
aliases { };
|
||||
};
|
||||
Reference in New Issue
Block a user