summaryrefslogtreecommitdiff
path: root/bsp/efm32/drv_adc.h
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-05-28 16:20:08 +0800
committerGitHub <[email protected]>2021-05-28 16:20:08 +0800
commit92beddf3bccf6346e26aa097f82464456fb8e6bd (patch)
tree197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/efm32/drv_adc.h
parentb18a99b44240ec3152011e159cc24a5af8dff0ce (diff)
parent03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff)
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/efm32/drv_adc.h')
-rw-r--r--bsp/efm32/drv_adc.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/bsp/efm32/drv_adc.h b/bsp/efm32/drv_adc.h
index b3b81d94e1..f15d074835 100644
--- a/bsp/efm32/drv_adc.h
+++ b/bsp/efm32/drv_adc.h
@@ -1,8 +1,8 @@
/***************************************************************************//**
- * @file drv_adc.h
- * @brief ADC driver of RT-Thread RTOS for EFM32
+ * @file drv_adc.h
+ * @brief ADC driver of RT-Thread RTOS for EFM32
* COPYRIGHT (C) 2012, RT-Thread Development Team
- * @author onelife
+ * @author onelife
* @version 1.0
*******************************************************************************
* @section License
@@ -10,9 +10,9 @@
* LICENSE in this distribution or at http://www.rt-thread.org/license/LICENSE
*******************************************************************************
* @section Change Logs
- * Date Author Notes
- * 2011-02-21 onelife Initial creation for EFM32
- * 2011-07-14 onelife Add multiple channels support for scan mode
+ * Date Author Notes
+ * 2011-02-21 onelife Initial creation for EFM32
+ * 2011-07-14 onelife Add multiple channels support for scan mode
******************************************************************************/
#ifndef __DRV_ADC_H__
#define __DRV_ADC_H__
@@ -21,50 +21,50 @@
/* Exported types ------------------------------------------------------------*/
struct efm32_adc_device_t
{
- ADC_TypeDef *adc_device;
- rt_uint8_t mode;
- rt_uint8_t singleCount;
- rt_uint8_t singleDmaChannel;
- rt_uint8_t scanCount;
- rt_uint8_t scanDmaChannel;
+ ADC_TypeDef *adc_device;
+ rt_uint8_t mode;
+ rt_uint8_t singleCount;
+ rt_uint8_t singleDmaChannel;
+ rt_uint8_t scanCount;
+ rt_uint8_t scanDmaChannel;
};
struct efm32_adc_control_single_t
{
- rt_uint8_t count;
- rt_uint8_t dmaChannel;
- ADC_InitSingle_TypeDef *init;
+ rt_uint8_t count;
+ rt_uint8_t dmaChannel;
+ ADC_InitSingle_TypeDef *init;
};
struct efm32_adc_control_scan_t
{
- rt_uint8_t count;
- rt_uint8_t dmaChannel;
- ADC_InitScan_TypeDef *init;
+ rt_uint8_t count;
+ rt_uint8_t dmaChannel;
+ ADC_InitScan_TypeDef *init;
};
struct efm32_adc_control_t
{
- rt_uint8_t mode;
- struct efm32_adc_control_scan_t scan;
- struct efm32_adc_control_single_t single;
+ rt_uint8_t mode;
+ struct efm32_adc_control_scan_t scan;
+ struct efm32_adc_control_single_t single;
};
struct efm32_adc_result_t
{
- rt_uint8_t mode;
- void *buffer;
+ rt_uint8_t mode;
+ void *buffer;
};
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
-#define ADC_MODE_SINGLE (0x01)
-#define ADC_MODE_SCAN (0x02)
-#define ADC_MODE_TAILGATE (0x04)
-#define ADC_OP_SINGLE_REPEAT (0x10)
-#define ADC_OP_SCAN_REPEAT (0x20)
-#define ADC_MASK_MODE (0x0f)
-#define ADC_MASK_OP (0xf0)
+#define ADC_MODE_SINGLE (0x01)
+#define ADC_MODE_SCAN (0x02)
+#define ADC_MODE_TAILGATE (0x04)
+#define ADC_OP_SINGLE_REPEAT (0x10)
+#define ADC_OP_SCAN_REPEAT (0x20)
+#define ADC_MASK_MODE (0x0f)
+#define ADC_MASK_OP (0xf0)
/* Exported functions ------------------------------------------------------- */
void rt_hw_adc_init(void);