Zephyr Project API 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mspm0-pinctrl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Texas Instruments
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef _MSPM0_DT_BINDINGS_PINCTRL_H_
8#define _MSPM0_DT_BINDINGS_PINCTRL_H_
9
10#define MSP_PORT_INDEX_BY_NAME(x) ((x == "PORTA") ? 0 : 1)
11
12#define MSPM0_PIN_FUNCTION_ANALOG (0x00000000)
13#define MSPM0_PIN_FUNCTION_GPIO (0x00000001)
14#define MSPM0_PIN_FUNCTION_2 (0x00000002)
15#define MSPM0_PIN_FUNCTION_3 (0x00000003)
16#define MSPM0_PIN_FUNCTION_4 (0x00000004)
17#define MSPM0_PIN_FUNCTION_5 (0x00000005)
18#define MSPM0_PIN_FUNCTION_6 (0x00000006)
19#define MSPM0_PIN_FUNCTION_7 (0x00000007)
20#define MSPM0_PIN_FUNCTION_8 (0x00000008)
21#define MSPM0_PIN_FUNCTION_9 (0x00000009)
22#define MSPM0_PIN_FUNCTION_10 (0x0000000A)
23
24/* Creates a concatenation of the correct pin function based on the pin control
25 * management register offset and the function suffix.
26 */
27#define MSP_PINMUX(pincm, function) (((pincm - 1) << 0x10) | function)
28
29#endif