STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Port modes

Macros

#define PORT_MODE_INPUT   0x00u
 
#define PORT_MODE_OUTPUT   0x10u
 
#define PORT_MODE_ANALOG   0x30u
 
#define PORT_MODE_ALT_AF0   0x20u
 
#define PORT_MODE_ALT_AF1   0x21u
 
#define PORT_MODE_ALT_AF2   0x22u
 
#define PORT_MODE_ALT_AF3   0x23u
 
#define PORT_MODE_ALT_AF4   0x24u
 
#define PORT_MODE_ALT_AF5   0x25u
 
#define PORT_MODE_ALT_AF6   0x26u
 
#define PORT_MODE_ALT_AF7   0x27u
 

Detailed Description

Symbols to specify the mode value of PORT pins on init function and also when use in Port_SetPinMode function. most significant nibble represent the mode and less significant the altern mode

Macro Definition Documentation

◆ PORT_MODE_ALT_AF0

#define PORT_MODE_ALT_AF0   0x20u

Alternarive funcion 0

◆ PORT_MODE_ALT_AF1

#define PORT_MODE_ALT_AF1   0x21u

Alternarive funcion 1

◆ PORT_MODE_ALT_AF2

#define PORT_MODE_ALT_AF2   0x22u

Alternarive funcion 2

◆ PORT_MODE_ALT_AF3

#define PORT_MODE_ALT_AF3   0x23u

Alternarive funcion 3

◆ PORT_MODE_ALT_AF4

#define PORT_MODE_ALT_AF4   0x24u

Alternarive funcion 4

◆ PORT_MODE_ALT_AF5

#define PORT_MODE_ALT_AF5   0x25u

Alternarive funcion 5

◆ PORT_MODE_ALT_AF6

#define PORT_MODE_ALT_AF6   0x26u

Alternarive funcion 6

◆ PORT_MODE_ALT_AF7

#define PORT_MODE_ALT_AF7   0x27u

Alternarive funcion 7

◆ PORT_MODE_ANALOG

#define PORT_MODE_ANALOG   0x30u

Analog mode (reset state) value

◆ PORT_MODE_INPUT

#define PORT_MODE_INPUT   0x00u

Input mode value

◆ PORT_MODE_OUTPUT

#define PORT_MODE_OUTPUT   0x10u

General purpose output mode value