Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements relating to SAMA5 TSD driver #12131

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion arch/arm/src/sama5/sam_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,10 @@ static void sam_adc_gain(struct sam_adc_s *priv);
static void sam_adc_analogchange(struct sam_adc_s *priv);
static void sam_adc_sequencer(struct sam_adc_s *priv);
static void sam_adc_channels(struct sam_adc_s *priv);
#if defined(CONFIG_SAMA5_ADC_PERIODIC_TRIG)
static void sam_adc_trigperiod(struct sam_adc_s *priv, uint32_t period);
#endif
#endif

/****************************************************************************
* Private Data
Expand Down Expand Up @@ -858,7 +860,7 @@ static int sam_adc_dmasetup(struct sam_adc_s *priv, uint8_t *buffer,
* None
*
****************************************************************************/

#if defined(CONFIG_SAMA5_ADC_PERIODIC_TRIG)
static void sam_adc_trigperiod(struct sam_adc_s *priv, uint32_t period)
{
uint32_t trigper;
Expand Down Expand Up @@ -909,6 +911,7 @@ static void sam_adc_trigperiod(struct sam_adc_s *priv, uint32_t period)
regval |= ADC_TRGR_TRGPER(trigper);
sam_adc_putreg(priv, SAM_ADC_TRGR, regval);
}
#endif

/****************************************************************************
* ADC interrupt handling
Expand Down Expand Up @@ -1103,7 +1106,11 @@ static int sam_adc_bind(struct adc_dev_s *dev,

static void sam_adc_reset(struct adc_dev_s *dev)
{
#if defined(CONFIG_SAMA5_ADC_REGDEBUG) || \
defined(CONFIG_SAMA5_ADC_DMA) || \
defined(CONFIG_SAMA5_ADC_TIOATRIG)
struct sam_adc_s *priv = (struct sam_adc_s *)dev->ad_priv;
#endif
uint32_t regval;

ainfo("Resetting..\n");
Expand Down
Loading
Loading