![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
Collaboration diagram for PORT Peripheral driver:Data Structures | |
| struct | port_digital_filter_config_t |
| PORT digital filter feature configuration definition. More... | |
| struct | port_pin_config_t |
| PORT pin config structure. More... | |
Configuration | |
| static void | PORT_SetPinConfig (PORT_Type *base, uint32_t pin, const port_pin_config_t *config) |
| Sets the port PCR register. More... | |
| static void | PORT_SetMultiplePinsConfig (PORT_Type *base, uint32_t mask, const port_pin_config_t *config) |
| Sets the port PCR register. More... | |
| static void | PORT_SetPinMux (PORT_Type *base, uint32_t pin, port_mux_t mux) |
| Configures the pin muxing. More... | |
| static void | PORT_EnablePinsDigitalFilter (PORT_Type *base, uint32_t mask, bool enable) |
| Enables the digital filter in one port. Each bit of the 32-bit register represents one pin. More... | |
| static void | PORT_SetDigitalFilterConfig (PORT_Type *base, const port_digital_filter_config_t *config) |
| set the digital filter in one port. Each bit of the 32-bit register represents one pin. More... | |
Interrupt | |
| static void | PORT_SetPinInterruptConfig (PORT_Type *base, uint32_t pin, const port_interrupt_t config) |
| Configures the port pin interrupt/DMA request. More... | |
| static uint32_t | PORT_GetPinsInterruptFlags (PORT_Type *base) |
| Reads the whole port status flag. More... | |
| static void | PORT_ClearPinsInterruptFlags (PORT_Type *base, uint32_t mask) |
| Clears the multiple pins' interrupt status flag. More... | |
This section describes the programming interface of the PORT Peripheral driver. The PORT driver configures PORT module to support other IPs.
This function group configures the PORT PCR of a pin.
This function sets the PORT pin interrupt configuration and gets and clears the interrupt status of a PORT.
| struct port_digital_filter_config_t |
PORT digital filter feature configuration definition.
| Data Fields | ||
|---|---|---|
| port_digital_filter_clock_source_t | clockSource |
Set digital filter clockSource |
| uint32_t | digitalFilterWidth |
Set digital filter width |
| struct port_pin_config_t |
PORT pin config structure.
| enum _port_drive_strength |
| enum _port_lock_register |
| enum _port_pull |
| enum _port_slew_rate |
| enum port_interrupt_t |
Configures the interrupt generation condition.
| enum port_mux_t |
Pin mux selection.
|
inlinestatic |
Clears the multiple pins' interrupt status flag.
| base | PORT peripheral base pointer. |
| mask | PORT pins' numbers macro. |
|
inlinestatic |
Enables the digital filter in one port. Each bit of the 32-bit register represents one pin.
| base | PORT peripheral base pointer. |
| mask | PORT pins' numbers macro. |
|
inlinestatic |
Reads the whole port status flag.
If a pin is configured to generate the DMA request, the corresponding flag is cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to that flag. If configured for a level sensitive interrupt that remains asserted, the flag is set again immediately.
| base | PORT peripheral base pointer. |
| Current | port interrupt status flags, for example, 0x00010001 means the pin 0 and 17 have the interrupt. |
|
inlinestatic |
set the digital filter in one port. Each bit of the 32-bit register represents one pin.
| base | PORT peripheral base pointer. |
| config | PORT digital filter configuration structure. |
|
inlinestatic |
Sets the port PCR register.
This is an example to define an input pin or output pin PCR configuration:
| base | PORT peripheral base pointer. |
| mask | PORT pin mask. |
| config | PORT PCR register configure structure. |
|
inlinestatic |
Sets the port PCR register.
This is an example to define an input pin or output pin PCR configuration:
| base | PORT peripheral base pointer. |
| pin | PORT pin number. |
| config | PORT PCR register configure structure. |
|
inlinestatic |
Configures the port pin interrupt/DMA request.
| base | PORT peripheral base pointer. |
| pin | PORT pin number. |
| config | PORT pin interrupt configuration.
|
|
inlinestatic |
Configures the pin muxing.
| base | PORT peripheral base pointer. |
| pin | PORT pin number. |
| mux | pin muxing slot selection.
|
Note : This function is NOT recommended to use together with the PORT_SetPinsConfig, because the PORT_SetPinsConfig need to configure the pin mux anyway(Otherwise the pin mux will be reset to zero : kPORT_PinDisabledOrAnalog). This function is recommended to use in the case you just need to reset the pin mux