Bar Logo 4kW dsPIC33C PSFB DC-DC DA (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

This is the generated driver source file for ADC1 driver. More...

#include <stddef.h>
#include "../adc1.h"
+ Include dependency graph for adc1.c:

Go to the source code of this file.

Enumerations

enum  ADC_PWM_TRIG_SRCS {
  PWM8_TRIGGER2 = 0x13 , PWM8_TRIGGER1 = 0x12 , PWM7_TRIGGER2 = 0x11 , PWM7_TRIGGER1 = 0x10 , PWM6_TRIGGER2 = 0xf , PWM6_TRIGGER1 = 0xe , PWM5_TRIGGER2 = 0xd , PWM5_TRIGGER1 = 0xc , PWM4_TRIGGER2 = 0xb , PWM4_TRIGGER1 = 0xa ,
  PWM3_TRIGGER2 = 0x9 , PWM3_TRIGGER1 = 0x8 , PWM2_TRIGGER2 = 0x7 , PWM2_TRIGGER1 = 0x6 , PWM1_TRIGGER2 = 0x5 , PWM1_TRIGGER1 = 0x4
}
 Defines the PWM ADC TRIGGER sources available for the module to use. More...
 

Functions

void ADC1_Initialize (void)
 Initializes ADC1 module, using the given initialization data This function must be called before any other ADC1 function is called.
 
void ADC1_Deinitialize (void)
 Deinitializes the ADC1 to POR values.
 
void ADC1_CorePowerEnable (enum ADC_DEDICATED_CORE core)
 Enables analog and digital power for ADC1 dedicated core.
 
void ADC1_SharedCorePowerEnable (void)
 Enables power for ADC1 shared Core This function is used to set the analog and digital power for ADC1 shared Core.
 
static uint16_t ADC1_TriggerSourceValueGet (enum ADC_PWM_INSTANCE pwmInstance, enum ADC_PWM_TRIGGERS triggerNumber)
 
void ADC1_PWMTriggerSourceSet (enum ADC_CHANNEL channel, enum ADC_PWM_INSTANCE pwmInstance, enum ADC_PWM_TRIGGERS triggerNumber)
 Sets PWM trigger source for corresponding analog input.
 
void ADC1_CommonCallbackRegister (void(*callback)(void))
 This function can be used to override default callback and to define custom callback for ADC1 Common event.
 
void __attribute__ ((weak))
 
void __attribute__ ((__interrupt__, auto_psv, weak))
 
void ADC1_ChannelCallbackRegister (void(*callback)(enum ADC_CHANNEL channel, uint16_t adcVal))
 This function can be used to override default callback ADC1_ChannelCallback and to define custom callback for ADC1 Channel event. Read the conversion result of the corresponding channel in the custom callback.
 
void ADC1_ComparatorCallbackRegister (void(*callback)(enum ADC_CMP comparator))
 This function can be used to override default callback and to define custom callback for ADC1_Comparator event.
 

Variables

static void(* ADC1_CommonHandler )(void) = NULL
 
static void(* ADC1_ChannelHandler )(enum ADC_CHANNEL channel, uint16_t adcVal) = NULL
 
static void(* ADC1_ComparatorHandler )(enum ADC_CMP comparator) = NULL
 
const struct ADC_MULTICORE adc1Multicore
 
const struct ADC_INTERFACE ADC1
 Structure object of type ADC_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. ADC1 can be changed by the user in the ADC user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
 

Detailed Description

ADC1 Generated Driver Source File

Definition in file adc1.c.

Function Documentation

◆ __attribute__() [1/2]

void __attribute__ ( (__interrupt__, auto_psv, weak) )

Definition at line 587 of file adc1.c.

◆ __attribute__() [2/2]

void __attribute__ ( (weak) )

Definition at line 581 of file adc1.c.

◆ ADC1_TriggerSourceValueGet()

static uint16_t ADC1_TriggerSourceValueGet ( enum ADC_PWM_INSTANCE pwmInstance,
enum ADC_PWM_TRIGGERS triggerNumber )
static

Definition at line 447 of file adc1.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ADC1_ChannelHandler

void(* ADC1_ChannelHandler) (enum ADC_CHANNEL channel, uint16_t adcVal) ( enum ADC_CHANNEL channel,
uint16_t adcVal ) = NULL
static

Definition at line 45 of file adc1.c.

◆ ADC1_CommonHandler

void(* ADC1_CommonHandler) (void) ( void ) = NULL
static

Definition at line 44 of file adc1.c.

◆ ADC1_ComparatorHandler

void(* ADC1_ComparatorHandler) (enum ADC_CMP comparator) ( enum ADC_CMP comparator) = NULL
static

Definition at line 46 of file adc1.c.

◆ adc1Multicore

const struct ADC_MULTICORE adc1Multicore
Initial value:
= {
.ChannelTasks = &ADC1_ChannelTasks,
.ComparatorTasks = NULL,
.IndividualChannelInterruptEnable = &ADC1_IndividualChannelInterruptEnable,
.IndividualChannelInterruptDisable = &ADC1_IndividualChannelInterruptDisable,
.IndividualChannelInterruptFlagClear = &ADC1_IndividualChannelInterruptFlagClear,
.IndividualChannelInterruptPrioritySet = &ADC1_IndividualChannelInterruptPrioritySet,
.ChannelCallbackRegister = &ADC1_ChannelCallbackRegister,
.ComparatorCallbackRegister = &ADC1_ComparatorCallbackRegister,
.CorePowerEnable = &ADC1_CorePowerEnable,
.SharedCorePowerEnable = &ADC1_SharedCorePowerEnable,
.PWMTriggerSourceSet = &ADC1_PWMTriggerSourceSet
}
static void ADC1_IndividualChannelInterruptPrioritySet(enum ADC_CHANNEL channel, enum INTERRUPT_PRIORITY priorityValue)
This inline function allows selection of priority for individual channel interrupt.
Definition adc1.h:493
static void ADC1_IndividualChannelInterruptDisable(enum ADC_CHANNEL channel)
This inline function disables individual channel interrupt.
Definition adc1.h:406
void ADC1_PWMTriggerSourceSet(enum ADC_CHANNEL channel, enum ADC_PWM_INSTANCE pwmInstance, enum ADC_PWM_TRIGGERS triggerNumber)
Sets PWM trigger source for corresponding analog input.
Definition adc1.c:538
void ADC1_SharedCorePowerEnable(void)
Enables power for ADC1 shared Core This function is used to set the analog and digital power for ADC1...
Definition adc1.c:438
static void ADC1_IndividualChannelInterruptEnable(enum ADC_CHANNEL channel)
This inline function enables individual channel interrupt.
Definition adc1.h:359
void ADC1_ComparatorCallbackRegister(void(*callback)(enum ADC_CMP comparator))
This function can be used to override default callback and to define custom callback for ADC1_Compara...
Definition adc1.c:938
static void ADC1_IndividualChannelInterruptFlagClear(enum ADC_CHANNEL channel)
This inline function clears individual channel interrupt flag.
Definition adc1.h:453
void ADC1_ChannelTasks(enum ADC_CHANNEL channel)
This function call used only in polling mode, if channel conversion is done for requested channel,...
void ADC1_CorePowerEnable(enum ADC_DEDICATED_CORE core)
Enables analog and digital power for ADC1 dedicated core.
Definition adc1.c:414
void ADC1_ChannelCallbackRegister(void(*callback)(enum ADC_CHANNEL channel, uint16_t adcVal))
This function can be used to override default callback ADC1_ChannelCallback and to define custom call...
Definition adc1.c:694

Definition at line 75 of file adc1.c.