RTEMS 6.1-rc4
|
Data Structures | |
struct | _gpt_init_config |
Structure to configure the running mode. More... | |
Driver version | |
enum | _gpt_clock_source { kGPT_ClockSource_Off = 0U , kGPT_ClockSource_Periph = 1U , kGPT_ClockSource_HighFreq = 2U , kGPT_ClockSource_Ext = 3U , kGPT_ClockSource_LowFreq = 4U , kGPT_ClockSource_Osc = 5U } |
List of clock sources. More... | |
enum | _gpt_input_capture_channel { kGPT_InputCapture_Channel1 = 0U , kGPT_InputCapture_Channel2 = 1U } |
List of input capture channel number. More... | |
enum | _gpt_input_operation_mode { kGPT_InputOperation_Disabled = 0U , kGPT_InputOperation_RiseEdge = 1U , kGPT_InputOperation_FallEdge = 2U , kGPT_InputOperation_BothEdge = 3U } |
List of input capture operation mode. More... | |
enum | _gpt_output_compare_channel { kGPT_OutputCompare_Channel1 = 0U , kGPT_OutputCompare_Channel2 = 1U , kGPT_OutputCompare_Channel3 = 2U } |
List of output compare channel number. More... | |
enum | _gpt_output_operation_mode { kGPT_OutputOperation_Disconnected = 0U , kGPT_OutputOperation_Toggle = 1U , kGPT_OutputOperation_Clear = 2U , kGPT_OutputOperation_Set = 3U , kGPT_OutputOperation_Activelow = 4U } |
List of output compare operation mode. More... | |
enum | _gpt_interrupt_enable { kGPT_OutputCompare1InterruptEnable = GPT_IR_OF1IE_MASK , kGPT_OutputCompare2InterruptEnable = GPT_IR_OF2IE_MASK , kGPT_OutputCompare3InterruptEnable = GPT_IR_OF3IE_MASK , kGPT_InputCapture1InterruptEnable = GPT_IR_IF1IE_MASK , kGPT_InputCapture2InterruptEnable = GPT_IR_IF2IE_MASK , kGPT_RollOverFlagInterruptEnable = GPT_IR_ROVIE_MASK } |
List of GPT interrupts. More... | |
enum | _gpt_status_flag { kGPT_OutputCompare1Flag = GPT_SR_OF1_MASK , kGPT_OutputCompare2Flag = GPT_SR_OF2_MASK , kGPT_OutputCompare3Flag = GPT_SR_OF3_MASK , kGPT_InputCapture1Flag = GPT_SR_IF1_MASK , kGPT_InputCapture2Flag = GPT_SR_IF2_MASK , kGPT_RollOverFlag = GPT_SR_ROV_MASK } |
Status flag. More... | |
typedef enum _gpt_clock_source | gpt_clock_source_t |
List of clock sources. | |
typedef enum _gpt_input_capture_channel | gpt_input_capture_channel_t |
List of input capture channel number. | |
typedef enum _gpt_input_operation_mode | gpt_input_operation_mode_t |
List of input capture operation mode. | |
typedef enum _gpt_output_compare_channel | gpt_output_compare_channel_t |
List of output compare channel number. | |
typedef enum _gpt_output_operation_mode | gpt_output_operation_mode_t |
List of output compare operation mode. | |
typedef enum _gpt_interrupt_enable | gpt_interrupt_enable_t |
List of GPT interrupts. | |
typedef enum _gpt_status_flag | gpt_status_flag_t |
Status flag. | |
typedef struct _gpt_init_config | gpt_config_t |
Structure to configure the running mode. | |
#define | FSL_GPT_DRIVER_VERSION (MAKE_VERSION(2, 0, 4)) |
Initialization and deinitialization | |
void | GPT_Init (GPT_Type *base, const gpt_config_t *initConfig) |
Initialize GPT to reset state and initialize running mode. | |
void | GPT_Deinit (GPT_Type *base) |
Disables the module and gates the GPT clock. | |
void | GPT_GetDefaultConfig (gpt_config_t *config) |
Fills in the GPT configuration structure with default settings. | |
typedef enum _gpt_clock_source gpt_clock_source_t |
List of clock sources.
enum _gpt_clock_source |
List of clock sources.
List of GPT interrupts.
List of output compare operation mode.
enum _gpt_status_flag |
Status flag.
void GPT_Deinit | ( | GPT_Type * | base | ) |
Disables the module and gates the GPT clock.
base | GPT peripheral base address. |
brief Disables the module and gates the GPT clock.
param base GPT peripheral base address.
void GPT_GetDefaultConfig | ( | gpt_config_t * | config | ) |
Fills in the GPT configuration structure with default settings.
The default values are:
config | Pointer to the user configuration structure. |
brief Fills in the GPT configuration structure with default settings.
The default values are: code config->clockSource = kGPT_ClockSource_Periph; config->divider = 1U; config->enableRunInStop = true; config->enableRunInWait = true; config->enableRunInDoze = false; config->enableRunInDbg = false; config->enableFreeRun = false; config->enableMode = true; endcode param config Pointer to the user configuration structure.
void GPT_Init | ( | GPT_Type * | base, |
const gpt_config_t * | initConfig | ||
) |
Initialize GPT to reset state and initialize running mode.
base | GPT peripheral base address. |
initConfig | GPT mode setting configuration. |
brief Initialize GPT to reset state and initialize running mode.
param base GPT peripheral base address. param initConfig GPT mode setting configuration.
gpt_clock_source_t _gpt_init_config::clockSource |
clock source for GPT module.
uint32_t _gpt_init_config::divider |
clock divider (prescaler+1) from clock source to counter.
bool _gpt_init_config::enableFreeRun |
true: FreeRun mode, false: Restart mode.
bool _gpt_init_config::enableMode |
true: counter reset to 0 when enabled; false: counter retain its value when enabled.
bool _gpt_init_config::enableRunInDbg |
GPT enabled in debug mode.
bool _gpt_init_config::enableRunInDoze |
GPT enabled in doze mode.
bool _gpt_init_config::enableRunInStop |
GPT enabled in stop mode.
bool _gpt_init_config::enableRunInWait |
GPT enabled in wait mode.