Zephyr Project API  3.3.0
A Scalable Open Source RTOS
gecko-pinctrl.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. More...
 
#define GECKO_LOC(fun, loc)
 Utility macro to build GECKO_psels property entry. More...
 
GECKO_pin configuration bit field positions and masks.
#define GECKO_FUN_POS   24U
 
#define GECKO_FUN_MSK   0xFFFU
 
#define GECKO_PIN_POS   0U
 
#define GECKO_PIN_MSK   0xFFU
 
#define GECKO_PORT_POS   8U
 
#define GECKO_PORT_MSK   0xFFU
 
#define GECKO_LOC_POS   0U
 
#define GECKO_LOC_MSK   0xFFU
 
GECKO_pinctrl pin functions.
#define GECKO_FUN_UART_TX   0U
 
#define GECKO_FUN_UART_RX   1U
 
#define GECKO_FUN_UART_RTS   2U
 
#define GECKO_FUN_UART_CTS   3U
 
#define GECKO_FUN_UART_LOC   4U
 
#define GECKO_FUN_SPI_MISO   5U
 
#define GECKO_FUN_SPI_MOSI   6U
 
#define GECKO_FUN_SPI_CSN   7U
 
#define GECKO_FUN_SPI_SCK   8U
 

Macro Definition Documentation

◆ GECKO_FUN_MSK

#define GECKO_FUN_MSK   0xFFFU

Mask for the function field.

◆ GECKO_FUN_POS

#define GECKO_FUN_POS   24U

Position of the function field.

◆ GECKO_FUN_SPI_CSN

#define GECKO_FUN_SPI_CSN   7U

◆ GECKO_FUN_SPI_MISO

#define GECKO_FUN_SPI_MISO   5U

◆ GECKO_FUN_SPI_MOSI

#define GECKO_FUN_SPI_MOSI   6U

◆ GECKO_FUN_SPI_SCK

#define GECKO_FUN_SPI_SCK   8U

◆ GECKO_FUN_UART_CTS

#define GECKO_FUN_UART_CTS   3U

UART CTS

◆ GECKO_FUN_UART_LOC

#define GECKO_FUN_UART_LOC   4U

UART LOCATION

◆ GECKO_FUN_UART_RTS

#define GECKO_FUN_UART_RTS   2U

UART RTS

◆ GECKO_FUN_UART_RX

#define GECKO_FUN_UART_RX   1U

UART RX

◆ GECKO_FUN_UART_TX

#define GECKO_FUN_UART_TX   0U

UART TX

◆ 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
Definition: gecko-pinctrl.h:42
#define GECKO_FUN_MSK
Definition: gecko-pinctrl.h:29
#define GECKO_LOC_MSK
Definition: gecko-pinctrl.h:44
#define GECKO_FUN_POS
Definition: gecko-pinctrl.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
Definition: gecko-pinctrl.h:39
#define GECKO_PIN_MSK
Definition: gecko-pinctrl.h:34
#define GECKO_PORT_POS
Definition: gecko-pinctrl.h:37
#define GECKO_PIN_POS
Definition: gecko-pinctrl.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).