Skip to content

Commit

Permalink
style: Beautify devicetree pre-macro
Browse files Browse the repository at this point in the history
Pre-macros to beautify 'freq.h' and 'mem.h'
in 'dts/common'.

Signed-off-by: James Roy <[email protected]>
  • Loading branch information
rruuaanng committed Nov 27, 2024
1 parent 87139cf commit e3c3bfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dts/common/freq.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __DT_FREQ_H
#define __DT_FREQ_H
#ifndef ZEPHYR_DTS_COMMON_FREQ_H_
#define ZEPHYR_DTS_COMMON_FREQ_H_

#define DT_FREQ_K(x) ((x) * 1000)
#define DT_FREQ_M(x) (DT_FREQ_K(x) * 1000)

#endif /* __DT_FREQ_H */
#endif /* ZEPHYR_DTS_COMMON_FREQ_H_ */
6 changes: 3 additions & 3 deletions dts/common/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __DT_MEM_H
#define __DT_MEM_H
#ifndef ZEPHYR_DTS_COMMON_MEM_H_
#define ZEPHYR_DTS_COMMON_MEM_H_

#define DT_SIZE_K(x) ((x) * 1024)
#define DT_SIZE_M(x) (DT_SIZE_K(x) * 1024)
Expand All @@ -15,4 +15,4 @@

#define DT_ADDR(a) _DT_DO_CONCAT(0x, a)

#endif /* __DT_MEM_H */
#endif /* ZEPHYR_DTS_COMMON_MEM_H_ */

0 comments on commit e3c3bfe

Please sign in to comment.