LCOV - code coverage report
Current view: top level - zephyr/dt-bindings/pinctrl - smartbond-pinctrl.h Coverage Total Hit
Test: new.info Lines: 4.8 % 63 3
Test Date: 2025-09-05 16:43:28

            Line data    Source code
       1            0 : /*
       2              :  * Copyright (c) 2022, Renesas Electronics Corporation
       3              :  *
       4              :  * SPDX-License-Identifier: Apache-2.0
       5              :  */
       6              : 
       7              : #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_
       8              : #define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_
       9              : 
      10              : /** Definitions of pin functions */
      11            1 : #define SMARTBOND_FUNC_GPIO             0
      12            0 : #define SMARTBOND_FUNC_UART_RX          1
      13            0 : #define SMARTBOND_FUNC_UART_TX          2
      14            0 : #define SMARTBOND_FUNC_UART2_RX         3
      15            0 : #define SMARTBOND_FUNC_UART2_TX         4
      16            0 : #define SMARTBOND_FUNC_UART2_CTSN       5
      17            0 : #define SMARTBOND_FUNC_UART2_RTSN       6
      18            0 : #define SMARTBOND_FUNC_UART3_RX         7
      19            0 : #define SMARTBOND_FUNC_UART3_TX         8
      20            0 : #define SMARTBOND_FUNC_UART3_CTSN       9
      21            0 : #define SMARTBOND_FUNC_UART3_RTSN       10
      22            0 : #define SMARTBOND_FUNC_ISO_CLK          11
      23            0 : #define SMARTBOND_FUNC_ISO_DATA         12
      24            0 : #define SMARTBOND_FUNC_SPI_DI           13
      25            0 : #define SMARTBOND_FUNC_SPI_DO           14
      26            0 : #define SMARTBOND_FUNC_SPI_CLK          15
      27            0 : #define SMARTBOND_FUNC_SPI_EN           16
      28            0 : #define SMARTBOND_FUNC_SPI2_DI          17
      29            0 : #define SMARTBOND_FUNC_SPI2_DO          18
      30            0 : #define SMARTBOND_FUNC_SPI2_CLK         19
      31            0 : #define SMARTBOND_FUNC_SPI2_EN          20
      32            0 : #define SMARTBOND_FUNC_I2C_SCL          21
      33            0 : #define SMARTBOND_FUNC_I2C_SDA          22
      34            0 : #define SMARTBOND_FUNC_I2C2_SCL         23
      35            0 : #define SMARTBOND_FUNC_I2C2_SDA         24
      36            0 : #define SMARTBOND_FUNC_USB_SOF          25
      37            0 : #define SMARTBOND_FUNC_ADC              26
      38            0 : #define SMARTBOND_FUNC_USB              27
      39            0 : #define SMARTBOND_FUNC_PCM_DI           28
      40            0 : #define SMARTBOND_FUNC_PCM_DO           29
      41            0 : #define SMARTBOND_FUNC_PCM_FSC          30
      42            0 : #define SMARTBOND_FUNC_PCM_CLK          31
      43            0 : #define SMARTBOND_FUNC_PDM_DATA         32
      44            0 : #define SMARTBOND_FUNC_PDM_CLK          33
      45            0 : #define SMARTBOND_FUNC_COEX_EXT_ACT     34
      46            0 : #define SMARTBOND_FUNC_COEX_SMART_ACT   35
      47            0 : #define SMARTBOND_FUNC_COEX_SMART_PRI   36
      48            0 : #define SMARTBOND_FUNC_PORT0_DCF        37
      49            0 : #define SMARTBOND_FUNC_PORT1_DCF        38
      50            0 : #define SMARTBOND_FUNC_PORT2_DCF        39
      51            0 : #define SMARTBOND_FUNC_PORT3_DCF        40
      52            0 : #define SMARTBOND_FUNC_PORT4_DCF        41
      53            0 : #define SMARTBOND_FUNC_CLOCK            42
      54            0 : #define SMARTBOND_FUNC_PG               43
      55            0 : #define SMARTBOND_FUNC_LCD              44
      56            0 : #define SMARTBOND_FUNC_LCD_SPI_DC       45
      57            0 : #define SMARTBOND_FUNC_LCD_SPI_DO       46
      58            0 : #define SMARTBOND_FUNC_LCD_SPI_CLK      47
      59            0 : #define SMARTBOND_FUNC_LCD_SPI_EN       48
      60            0 : #define SMARTBOND_FUNC_TIM_PWM          49
      61            0 : #define SMARTBOND_FUNC_TIM2_PWM         50
      62            0 : #define SMARTBOND_FUNC_TIM_1SHOT        51
      63            0 : #define SMARTBOND_FUNC_TIM2_1SHOT       52
      64            0 : #define SMARTBOND_FUNC_TIM3_PWM         53
      65            0 : #define SMARTBOND_FUNC_TIM4_PWM         54
      66              : 
      67              : /** Definitions of bit positions and bit masks in pinmux */
      68            1 : #define SMARTBOND_PINMUX_PIN_POS        0
      69            0 : #define SMARTBOND_PINMUX_PIN_MASK       0x1f
      70            0 : #define SMARTBOND_PINMUX_PORT_POS       5
      71            0 : #define SMARTBOND_PINMUX_PORT_MASK      0x01
      72            0 : #define SMARTBOND_PINMUX_FUNC_POS       6
      73            0 : #define SMARTBOND_PINMUX_FUNC_MASK      0xff
      74              : 
      75              : /** Utility macro to create pinmux */
      76            1 : #define SMARTBOND_PINMUX(func, port, pin)                               \
      77              :         (((SMARTBOND_FUNC_ ## func) << SMARTBOND_PINMUX_FUNC_POS) |       \
      78              :          ((port) << SMARTBOND_PINMUX_PORT_POS) |                  \
      79              :          (pin) << SMARTBOND_PINMUX_PIN_POS)
      80              : 
      81              : #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_ */
        

Generated by: LCOV version 2.0-1