Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sf32lb-clocks-common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Teslabs Engineering S.L.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_SF32LB_CLOCKS_COMMON_H_
8#define _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_SF32LB_CLOCKS_COMMON_H_
9
11
12#define SF32LB_CLOCK_OFFSET_POS 0U
13#define SF32LB_CLOCK_OFFSET_MSK 0xFFU
14#define SF32LB_CLOCK_BIT_POS 8U
15#define SF32LB_CLOCK_BIT_MSK 0x1F00U
16
18
30#define SF32LB_CLOCK_CONFIG(offset, bit) \
31 ((((offset) & SF32LB_CLOCK_OFFSET_MSK) << SF32LB_CLOCK_OFFSET_POS) | \
32 (((bit) & SF32LB_CLOCK_BIT_MSK) << SF32LB_CLOCK_BIT_POS))
33
34#endif /* _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_SF32LB_CLOCKS_COMMON_H_ */