RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures
fsl_lpadc.h File Reference
#include "fsl_common.h"

Go to the source code of this file.

Data Structures

struct  lpadc_config_t
 LPADC global configuration. More...
 
struct  lpadc_conv_command_config_t
 Define structure to keep the configuration for conversion command. More...
 
struct  lpadc_conv_trigger_config_t
 Define structure to keep the configuration for conversion trigger. More...
 
struct  lpadc_conv_result_t
 Define the structure to keep the conversion result. More...
 

Functions

Initialization & de-initialization.
void LPADC_Init (ADC_Type *base, const lpadc_config_t *config)
 Initializes the LPADC module.
 
void LPADC_GetDefaultConfig (lpadc_config_t *config)
 Gets an available pre-defined settings for initial configuration.
 
void LPADC_Deinit (ADC_Type *base)
 De-initializes the LPADC module.
 
Status
Interrupts
DMA Control
Trigger and conversion with FIFO.
bool LPADC_GetConvResult (ADC_Type *base, lpadc_conv_result_t *result)
 Get the result in conversion FIFO.
 
void LPADC_SetConvTriggerConfig (ADC_Type *base, uint32_t triggerId, const lpadc_conv_trigger_config_t *config)
 Configure the conversion trigger source.
 
void LPADC_GetDefaultConvTriggerConfig (lpadc_conv_trigger_config_t *config)
 Gets an available pre-defined settings for trigger's configuration.
 
void LPADC_SetConvCommandConfig (ADC_Type *base, uint32_t commandId, const lpadc_conv_command_config_t *config)
 Configure conversion command.
 
void LPADC_GetDefaultConvCommandConfig (lpadc_conv_command_config_t *config)
 Gets an available pre-defined settings for conversion command's configuration.
 

Driver version

#define FSL_LPADC_DRIVER_VERSION   (MAKE_VERSION(2, 6, 1))
 LPADC driver version 2.6.1.
 
#define LPADC_GET_ACTIVE_COMMAND_STATUS(statusVal)   ((statusVal & ADC_STAT_CMDACT_MASK) >> ADC_STAT_CMDACT_SHIFT)
 Define the MACRO function to get command status from status value.
 
#define LPADC_GET_ACTIVE_TRIGGER_STATUE(statusVal)   ((statusVal & ADC_STAT_TRGACT_MASK) >> ADC_STAT_TRGACT_SHIFT)
 Define the MACRO function to get trigger status from status value.
 
enum  _lpadc_status_flags { kLPADC_ResultFIFOOverflowFlag = ADC_STAT_FOF_MASK , kLPADC_ResultFIFOReadyFlag = ADC_STAT_RDY_MASK }
 Define hardware flags of the module. More...
 
enum  _lpadc_interrupt_enable { kLPADC_ResultFIFOOverflowInterruptEnable = ADC_IE_FOFIE_MASK , kLPADC_FIFOWatermarkInterruptEnable = ADC_IE_FWMIE_MASK }
 Define interrupt switchers of the module. More...
 
enum  _lpadc_sample_scale_mode { kLPADC_SamplePartScale , kLPADC_SampleFullScale = 1U }
 Define enumeration of sample scale mode. More...
 
enum  _lpadc_sample_channel_mode { kLPADC_SampleChannelSingleEndSideA = 0U , kLPADC_SampleChannelSingleEndSideB = 1U }
 Define enumeration of channel sample mode. More...
 
enum  _lpadc_hardware_average_mode {
  kLPADC_HardwareAverageCount1 = 0U , kLPADC_HardwareAverageCount2 = 1U , kLPADC_HardwareAverageCount4 = 2U , kLPADC_HardwareAverageCount8 = 3U ,
  kLPADC_HardwareAverageCount16 = 4U , kLPADC_HardwareAverageCount32 = 5U , kLPADC_HardwareAverageCount64 = 6U , kLPADC_HardwareAverageCount128 = 7U
}
 Define enumeration of hardware average selection. More...
 
enum  _lpadc_sample_time_mode {
  kLPADC_SampleTimeADCK3 = 0U , kLPADC_SampleTimeADCK5 = 1U , kLPADC_SampleTimeADCK7 = 2U , kLPADC_SampleTimeADCK11 = 3U ,
  kLPADC_SampleTimeADCK19 = 4U , kLPADC_SampleTimeADCK35 = 5U , kLPADC_SampleTimeADCK67 = 6U , kLPADC_SampleTimeADCK131 = 7U
}
 Define enumeration of sample time selection. More...
 
enum  _lpadc_hardware_compare_mode { kLPADC_HardwareCompareDisabled = 0U , kLPADC_HardwareCompareStoreOnTrue = 2U , kLPADC_HardwareCompareRepeatUntilTrue = 3U }
 Define enumeration of hardware compare mode. More...
 
enum  _lpadc_reference_voltage_mode { kLPADC_ReferenceVoltageAlt1 = 0U , kLPADC_ReferenceVoltageAlt2 = 1U , kLPADC_ReferenceVoltageAlt3 = 2U }
 Define enumeration of reference voltage source. More...
 
enum  _lpadc_power_level_mode { kLPADC_PowerLevelAlt1 = 0U , kLPADC_PowerLevelAlt2 = 1U , kLPADC_PowerLevelAlt3 = 2U , kLPADC_PowerLevelAlt4 = 3U }
 Define enumeration of power configuration. More...
 
enum  _lpadc_trigger_priority_policy { kLPADC_TriggerPriorityPreemptImmediately = 0U , kLPADC_TriggerPriorityPreemptSoftly = 1U }
 Define enumeration of trigger priority policy. More...
 
typedef enum _lpadc_sample_scale_mode lpadc_sample_scale_mode_t
 Define enumeration of sample scale mode.
 
typedef enum _lpadc_sample_channel_mode lpadc_sample_channel_mode_t
 Define enumeration of channel sample mode.
 
typedef enum _lpadc_hardware_average_mode lpadc_hardware_average_mode_t
 Define enumeration of hardware average selection.
 
typedef enum _lpadc_sample_time_mode lpadc_sample_time_mode_t
 Define enumeration of sample time selection.
 
typedef enum _lpadc_hardware_compare_mode lpadc_hardware_compare_mode_t
 Define enumeration of hardware compare mode.
 
typedef enum _lpadc_reference_voltage_mode lpadc_reference_voltage_source_t
 Define enumeration of reference voltage source.
 
typedef enum _lpadc_power_level_mode lpadc_power_level_mode_t
 Define enumeration of power configuration.
 
typedef enum _lpadc_trigger_priority_policy lpadc_trigger_priority_policy_t
 Define enumeration of trigger priority policy.