61 #if (defined (DEV_ERROR_DETECT) || defined (CUSTOM_DEVASSERT))
62 bool porta_checked =
false;
63 bool portb_checked =
false;
64 bool portc_checked =
false;
65 bool portd_checked =
false;
66 bool porte_checked =
false;
69 for (i = 0U; i < pin_count; i++) {
71 #if (defined (DEV_ERROR_DETECT) || defined (CUSTOM_DEVASSERT))
72 if (config[i].base ==
PORTA)
74 if (porta_checked ==
false)
80 else if (config[i].base ==
PORTB)
82 if (portb_checked ==
false)
88 else if (config[i].base ==
PORTC)
90 if(portc_checked ==
false)
96 else if (config[i].base ==
PORTD)
98 if (portd_checked ==
false)
100 portd_checked =
true;
105 else if (config[i].base ==
PORTE)
107 if (porte_checked ==
false)
109 porte_checked =
true;
120 #if FEATURE_PORT_HAS_PULL_SELECTION
123 #if FEATURE_PORT_HAS_SLEW_RATE
124 PORT_HAL_SetSlewRateMode( config[i].base, config[i].pinPortIdx, config[i].rateSelect);
126 #if FEATURE_PORT_HAS_PASSIVE_FILTER
129 #if FEATURE_PORT_HAS_OPEN_DRAIN
130 PORT_HAL_SetOpenDrainMode( config[i].base, config[i].pinPortIdx, config[i].openDrain);
132 #if FEATURE_PORT_HAS_DRIVE_STRENGTH
136 #if FEATURE_PORT_HAS_PIN_CONTROL_LOCK
140 if(config[i].clearIntFlag){
145 switch(config[i].direction)
rtc_interrupt_config_t * intConfig
static void PORT_HAL_SetPassiveFilterMode(PORT_Type *const base, const uint32_t pin, const bool isPassiveFilterEnabled)
Configures the passive filter if the pin is used as a digital input.
static void PORT_HAL_SetDriveStrengthMode(PORT_Type *const base, const uint32_t pin, const port_drive_strength_t driveSelect)
Configures the drive strength if the pin is used as a digital output.
static void PORT_HAL_ClearPinIntFlagCmd(PORT_Type *const base, const uint32_t pin)
Clears the individual pin-interrupt status flag.
status_t CLOCK_SYS_GetFreq(clock_names_t clockName, uint32_t *frequency)
Gets the clock frequency for a specific clock name.
static void PORT_HAL_SetPinCtrlLockMode(PORT_Type *const base, const uint32_t pin, const bool isPinLockEnabled)
Locks or unlocks the pin control register bits[15:0].
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Defines the converter configuration.
static void PORT_HAL_SetMuxModeSel(PORT_Type *const base, const uint32_t pin, const port_mux_t mux)
Configures the pin muxing.
static void GPIO_HAL_SetPinDirection(GPIO_Type *const baseAddr, const uint32_t pinNumber, const uint32_t pinDirection)
Configure the direction for a certain pin from a port.
static void PORT_HAL_SetPinIntSel(PORT_Type *const base, const uint32_t pin, const port_interrupt_config_t intConfig)
Configures the port pin interrupt/DMA request.
static void PORT_HAL_SetPullSel(PORT_Type *const base, const uint32_t pin, const port_pull_config_t pullConfig)
Configures the internal resistor.
status_t PINS_DRV_Init(const uint32_t pin_count, const pin_settings_config_t config[])
Initializes the pins with the given configuration structure.