Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gecko-pinctrl-s1.h File Reference

Go to the source code of this file.

Macros

#define GECKO_PSEL(fun, port, pin)
 Utility macro to build GECKO psels property entry.
 
#define GECKO_LOC(fun, loc)
 Utility macro to build GECKO_psels property entry.
 
GECKO_pin configuration bit field positions and masks.
#define GECKO_FUN_POS   24U
 Position of the function field.
 
#define GECKO_FUN_MSK   0xFFU
 Mask for the function field.
 
#define GECKO_PIN_POS   0U
 Position of the pin field.
 
#define GECKO_PIN_MSK   0xFFU
 Mask for the pin field.
 
#define GECKO_PORT_POS   8U
 Position of the port field.
 
#define GECKO_PORT_MSK   0xFFU
 Mask for the port field.
 
#define GECKO_LOC_POS   0U
 Position of the loc field.
 
#define GECKO_LOC_MSK   0xFFU
 Mask for the pin field.
 
GECKO_pinctrl pin functions.
#define GECKO_FUN_UART_TX   0U
 UART TX.
 
#define GECKO_FUN_UART_RX   1U
 UART RX.
 
#define GECKO_FUN_UART_RTS   2U
 UART RTS.
 
#define GECKO_FUN_UART_CTS   3U
 UART CTS.
 
#define GECKO_FUN_UART_RX_LOC   4U
 UART RX LOCATION.
 
#define GECKO_FUN_UART_TX_LOC   5U
 UART TX LOCATION.
 
#define GECKO_FUN_UART_RTS_LOC   6U
 UART RTS LOCATION.
 
#define GECKO_FUN_UART_CTS_LOC   7U
 UART CTS LOCATION.
 
#define GECKO_FUN_SPIM_MISO   8U
 
#define GECKO_FUN_SPIM_MOSI   9U
 
#define GECKO_FUN_SPIM_CS   10U
 
#define GECKO_FUN_SPIM_SCK   11U
 
#define GECKO_FUN_LEUART_RX_LOC   12U
 
#define GECKO_FUN_LEUART_TX_LOC   13U
 
#define GECKO_FUN_SPIS_MISO   14U
 
#define GECKO_FUN_SPIS_MOSI   15U
 
#define GECKO_FUN_SPIS_CS   16U
 
#define GECKO_FUN_SPIS_SCK   17U
 
#define GECKO_FUN_SPI_MISO_LOC   18U
 
#define GECKO_FUN_SPI_MOSI_LOC   19U
 
#define GECKO_FUN_SPI_CS_LOC   20U
 
#define GECKO_FUN_SPI_SCK_LOC   21U
 
#define GECKO_FUN_I2C_SDA   22U
 
#define GECKO_FUN_I2C_SCL   23U
 
#define GECKO_FUN_I2C_SDA_LOC   24U
 
#define GECKO_FUN_I2C_SCL_LOC   25U
 

Macro Definition Documentation

◆ GECKO_FUN_I2C_SCL

#define GECKO_FUN_I2C_SCL   23U

◆ GECKO_FUN_I2C_SCL_LOC

#define GECKO_FUN_I2C_SCL_LOC   25U

◆ GECKO_FUN_I2C_SDA

#define GECKO_FUN_I2C_SDA   22U

◆ GECKO_FUN_I2C_SDA_LOC

#define GECKO_FUN_I2C_SDA_LOC   24U

◆ GECKO_FUN_LEUART_RX_LOC

#define GECKO_FUN_LEUART_RX_LOC   12U

◆ GECKO_FUN_LEUART_TX_LOC

#define GECKO_FUN_LEUART_TX_LOC   13U

◆ GECKO_FUN_MSK

#define GECKO_FUN_MSK   0xFFU

Mask for the function field.

◆ GECKO_FUN_POS

#define GECKO_FUN_POS   24U

Position of the function field.

◆ GECKO_FUN_SPI_CS_LOC

#define GECKO_FUN_SPI_CS_LOC   20U

◆ GECKO_FUN_SPI_MISO_LOC

#define GECKO_FUN_SPI_MISO_LOC   18U

◆ GECKO_FUN_SPI_MOSI_LOC

#define GECKO_FUN_SPI_MOSI_LOC   19U

◆ GECKO_FUN_SPI_SCK_LOC

#define GECKO_FUN_SPI_SCK_LOC   21U

◆ GECKO_FUN_SPIM_CS

#define GECKO_FUN_SPIM_CS   10U

◆ GECKO_FUN_SPIM_MISO

#define GECKO_FUN_SPIM_MISO   8U

◆ GECKO_FUN_SPIM_MOSI

#define GECKO_FUN_SPIM_MOSI   9U

◆ GECKO_FUN_SPIM_SCK

#define GECKO_FUN_SPIM_SCK   11U

◆ GECKO_FUN_SPIS_CS

#define GECKO_FUN_SPIS_CS   16U

◆ GECKO_FUN_SPIS_MISO

#define GECKO_FUN_SPIS_MISO   14U

◆ GECKO_FUN_SPIS_MOSI

#define GECKO_FUN_SPIS_MOSI   15U

◆ GECKO_FUN_SPIS_SCK

#define GECKO_FUN_SPIS_SCK   17U

◆ GECKO_FUN_UART_CTS

#define GECKO_FUN_UART_CTS   3U

UART CTS.

◆ GECKO_FUN_UART_CTS_LOC

#define GECKO_FUN_UART_CTS_LOC   7U

UART CTS LOCATION.

◆ GECKO_FUN_UART_RTS

#define GECKO_FUN_UART_RTS   2U

UART RTS.

◆ GECKO_FUN_UART_RTS_LOC

#define GECKO_FUN_UART_RTS_LOC   6U

UART RTS LOCATION.

◆ GECKO_FUN_UART_RX

#define GECKO_FUN_UART_RX   1U

UART RX.

◆ GECKO_FUN_UART_RX_LOC

#define GECKO_FUN_UART_RX_LOC   4U

UART RX LOCATION.

◆ GECKO_FUN_UART_TX

#define GECKO_FUN_UART_TX   0U

UART TX.

◆ GECKO_FUN_UART_TX_LOC

#define GECKO_FUN_UART_TX_LOC   5U

UART TX LOCATION.

◆ GECKO_LOC

#define GECKO_LOC ( fun,
loc )
Value:
(((GECKO_LOCATION(##loc##) & GECKO_LOC_MSK) << GECKO_LOC_POS) | \
((GECKO_FUN_##fun##_LOC & GECKO_FUN_MSK) << GECKO_FUN_POS))
#define GECKO_LOC_POS
Position of the loc field.
Definition gecko-pinctrl-s1.h:42
#define GECKO_FUN_MSK
Mask for the function field.
Definition gecko-pinctrl-s1.h:29
#define GECKO_LOC_MSK
Mask for the pin field.
Definition gecko-pinctrl-s1.h:44
#define GECKO_FUN_POS
Position of the function field.
Definition gecko-pinctrl-s1.h:27

Utility macro to build GECKO_psels property entry.

Parameters
funPin function configuration (see GECKO_FUNC_{name} macros).
locLocation.

◆ GECKO_LOC_MSK

#define GECKO_LOC_MSK   0xFFU

Mask for the pin field.

◆ GECKO_LOC_POS

#define GECKO_LOC_POS   0U

Position of the loc field.

◆ GECKO_PIN_MSK

#define GECKO_PIN_MSK   0xFFU

Mask for the pin field.

◆ GECKO_PIN_POS

#define GECKO_PIN_POS   0U

Position of the pin field.

◆ GECKO_PORT_MSK

#define GECKO_PORT_MSK   0xFFU

Mask for the port field.

◆ GECKO_PORT_POS

#define GECKO_PORT_POS   8U

Position of the port field.

◆ GECKO_PSEL

#define GECKO_PSEL ( fun,
port,
pin )
Value:
(((GECKO_PORT_##port & GECKO_PORT_MSK) << GECKO_PORT_POS) | \
((GECKO_PIN(##pin##) & GECKO_PIN_MSK) << GECKO_PIN_POS) | \
((GECKO_FUN_##fun & GECKO_FUN_MSK) << GECKO_FUN_POS))
#define GECKO_PORT_MSK
Mask for the port field.
Definition gecko-pinctrl-s1.h:39
#define GECKO_PIN_MSK
Mask for the pin field.
Definition gecko-pinctrl-s1.h:34
#define GECKO_PORT_POS
Position of the port field.
Definition gecko-pinctrl-s1.h:37
#define GECKO_PIN_POS
Position of the pin field.
Definition gecko-pinctrl-s1.h:32

Utility macro to build GECKO psels property entry.

Parameters
funPin function configuration (see GECKO_FUNC_{name} macros).
portPort (0 or 1).
pinPin (0..31).