Line data Source code
1 0 : /*
2 : * Copyright (c) 2025 Ambiq Micro Inc.
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 :
7 : #ifndef __APOLLO5_PINCTRL_H__
8 : #define __APOLLO5_PINCTRL_H__
9 :
10 0 : #define APOLLO5_ALT_FUNC_POS 0
11 0 : #define APOLLO5_ALT_FUNC_MASK 0xf
12 :
13 0 : #define APOLLO5_PIN_NUM_POS 4
14 0 : #define APOLLO5_PIN_NUM_MASK 0xff
15 :
16 0 : #define APOLLO5_PINMUX(pin_num, alt_func) \
17 : (pin_num << APOLLO5_PIN_NUM_POS | \
18 : alt_func << APOLLO5_ALT_FUNC_POS)
19 :
20 : #endif /* __APOLLO5_PINCTRL_H__ */
|