arch/arm/include/samd2l2/sam_adc.h: I was wrong... this header file does belong in the samd2l2 include directory. It contains IOCTL definitions that are needed by applications. Usage of a chip-specific header file is, however, not really a good portable design because it requires that the application know that it is running on a specific chip. But still, if we are going to do that, the include directory is where the header file belongs. My apologies for the bad judgement.

This commit is contained in:
Gregory Nutt 2019-12-16 03:53:05 -06:00
parent 77eea3dd66
commit 6bff1f4df4
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/************************************************************************************
* arch/arm/src/samd2l2/adc.h
* arch/arm/src/samd2l2/sam_adc.h
*
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,8 +33,8 @@
*
************************************************************************************/
#ifndef __ARCH_ARM_SRC_SAMD2L2_ADC_H
#define __ARCH_ARM_SRC_SAMD2L2_ADC_H
#ifndef __ARCH_ARM_SRC_SAMD2L2_SAM_ADC_H
#define __ARCH_ARM_SRC_SAMD2L2_SAM_ADC_H
/****************************************************************************
* Pre-processor Definitions
@ -58,4 +58,4 @@ struct sam_adc_param_s
uint8_t averaging; /* number of samples to be collected */
};
#endif /* __ARCH_ARM_SRC_SAMD2L2_ADC_H */
#endif /* __ARCH_ARM_SRC_SAMD2L2_SAM_ADC_H */

View File

@ -57,10 +57,9 @@
#include <nuttx/analog/adc.h>
#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
#include <arch/chip/sam_adc.h>
#include "up_arch.h"
#include "adc.h"
#include "sam_adc.h"
#include "sam_pinmap.h"
#include "sam_gclk.h"
@ -68,6 +67,8 @@
#include "sam_fuses.h"
#include "samd_periphclks.h"
#include <arch/board/board.h>
/****************************************************************************
* Private Function Prototypes
****************************************************************************/