Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_port_hal.h File Reference

The port features such as digital filter, pull, and so on are valid when they are available in one of the pins. More...

#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include "fsl_device_registers.h"

Enumerations

enum  port_pull_t {
  kPortPullDown = 0U,
  kPortPullUp = 1U
}
 Internal resistor pull feature selection. More...
 
enum  port_slew_rate_t {
  kPortFastSlewRate = 0U,
  kPortSlowSlewRate = 1U
}
 Slew rate selection. More...
 
enum  port_drive_strength_t {
  kPortLowDriveStrength = 0U,
  kPortHighDriveStrength = 1U
}
 Configures the drive strength. More...
 
enum  port_mux_t {
  kPortPinDisabled = 0U,
  kPortMuxAsGpio = 1U,
  kPortMuxAlt2 = 2U,
  kPortMuxAlt3 = 3U,
  kPortMuxAlt4 = 4U,
  kPortMuxAlt5 = 5U,
  kPortMuxAlt6 = 6U,
  kPortMuxAlt7 = 7U
}
 Pin mux selection. More...
 
enum  port_interrupt_config_t {
  kPortIntDisabled = 0x0U,
  kPortIntLogicZero = 0x8U,
  kPortIntRisingEdge = 0x9U,
  kPortIntFallingEdge = 0xAU,
  kPortIntEitherEdge = 0xBU,
  kPortIntLogicOne = 0xCU
}
 Digital filter clock source selection. More...
 

Functions

Configuration
static void PORT_HAL_SetMuxMode (PORT_Type *base, uint32_t pin, port_mux_t mux)
 Configures the pin muxing. More...
 
void PORT_HAL_SetLowGlobalPinCtrl (PORT_Type *base, uint16_t lowPinSelect, uint16_t config)
 Configures the low half of the pin control register for the same settings. More...
 
void PORT_HAL_SetHighGlobalPinCtrl (PORT_Type *base, uint16_t highPinSelect, uint16_t config)
 Configures the high half of the pin control register for the same settings. More...
 
Interrupt
static void PORT_HAL_SetPinIntMode (PORT_Type *base, uint32_t pin, port_interrupt_config_t intConfig)
 Configures the port pin interrupt/DMA request. More...
 
static port_interrupt_config_t PORT_HAL_GetPinIntMode (PORT_Type *base, uint32_t pin)
 Gets the current port pin interrupt/DMA request configuration. More...
 
static bool PORT_HAL_IsPinIntPending (PORT_Type *base, uint32_t pin)
 Reads the individual pin-interrupt status flag. More...
 
static void PORT_HAL_ClearPinIntFlag (PORT_Type *base, uint32_t pin)
 Clears the individual pin-interrupt status flag. More...
 
static uint32_t PORT_HAL_GetPortIntFlag (PORT_Type *base)
 Reads the entire port interrupt status flag. More...
 
static void PORT_HAL_ClearPortIntFlag (PORT_Type *base)
 Clears the entire port interrupt status flag. More...
 

Detailed Description

However, that doesn't mean that all pins have the capabilities to use such features. Please see the related reference manual for accurate pin features.