|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Enumerations | Functions | Variables
adc1.c File Reference
MPLABX MCC Melody Code Generator » ADC Multicore Driver

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 }

## 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.

## Enumeration Type Documentation

## ◆ ADC_PWM_TRIG_SRCS

enum ADC_PWM_TRIG_SRCS

Enumerator
PWM8_TRIGGER2 |
PWM8_TRIGGER1 |
PWM7_TRIGGER2 |
PWM7_TRIGGER1 |
PWM6_TRIGGER2 |
PWM6_TRIGGER1 |
PWM5_TRIGGER2 |
PWM5_TRIGGER1 |
PWM4_TRIGGER2 |
PWM4_TRIGGER1 |
PWM3_TRIGGER2 |
PWM3_TRIGGER1 |
PWM2_TRIGGER2 |
PWM2_TRIGGER1 |
PWM1_TRIGGER2 |
PWM1_TRIGGER1 |

Definition at line 55 of file adc1.c.

## Function Documentation

## ◆ __attribute__() [1/2]

void __attribute__ | ( | (__interrupt__, auto_psv, weak) |  | ) |

Definition at line 575 of file adc1.c.

## ◆ __attribute__() [2/2]

void __attribute__ | ( | (weak) |  | ) |

Definition at line 569 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 438 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
}
ADC1_IndividualChannelInterruptPrioritySet
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:476
ADC1_IndividualChannelInterruptDisable
static void ADC1_IndividualChannelInterruptDisable(enum ADC_CHANNEL channel)
This inline function disables individual channel interrupt.
Definition adc1.h:396
ADC1_PWMTriggerSourceSet
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:529
ADC1_SharedCorePowerEnable
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:429
ADC1_IndividualChannelInterruptEnable
static void ADC1_IndividualChannelInterruptEnable(enum ADC_CHANNEL channel)
This inline function enables individual channel interrupt.
Definition adc1.h:353
ADC1_ComparatorCallbackRegister
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:889
ADC1_IndividualChannelInterruptFlagClear
static void ADC1_IndividualChannelInterruptFlagClear(enum ADC_CHANNEL channel)
This inline function clears individual channel interrupt flag.
Definition adc1.h:439
ADC1_ChannelTasks
void ADC1_ChannelTasks(enum ADC_CHANNEL channel)
This function call used only in polling mode, if channel conversion is done for requested channel,...
ADC1_CorePowerEnable
void ADC1_CorePowerEnable(enum ADC_DEDICATED_CORE core)
Enables analog and digital power for ADC1 dedicated core.
Definition adc1.c:405
ADC1_ChannelCallbackRegister
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:672

Definition at line 75 of file adc1.c.