亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hal_adc.h

?? 非常全的nrf2401設計資料
?? H
字號:
/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is property of Nordic Semiconductor ASA.
 * Terms and conditions of usage are described in detail in NORDIC
 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 
 *
 * Licensees are granted free, non-transferable use of the information. NO
 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
 * the file.
 *
 * $LastChangedRevision$
 */ 

/** @file
 * Interface for ADC HAL
 * @defgroup nordic_hal_adc Analog to Digital Converter (ADC)
 * @{
 * @ingroup nordic_hal
 *
 * @brief Interface functions for the analog-to-digital converter (ADC).
 *
 * This is a general-purpose ADC with up to 14 input channels. The ADC contains 
 * an internal 1.2V reference, but can also be used with external reference or 
 * full scale range equal to VDD. It can be operated in a single step mode with 
 * sampling under software control, or a continuous conversion mode with a programmable 
 * sampling rate.
 *
 * This module contains setup functions for configuring the ADC; operation functions 
 * for starting the ADC and reading a sampled value; and status functions for checking 
 *if the ADC is busy or ready, or has overflowed.
 *
 * @author Rune Brandsegg
 */

/**
 * The following example show a typical usage of the ADC:
 * @code
 * void main(void)
 * {
 *   uint16_t adc_out;
 *
 *   adc_init();                                         // Initialise ADC
 *
 *   while(true)                                         // Endless loop
 *   {
 *     hal_adc_start();                                  // Start ADconversion
 *                                                     
 *     while(hal_adc_busy());                            // Wait for data ready
 *        
 *     adc_out = hal_adc_read_LSB();                     // Read LSB of output
 *     adc_out += ((uint16_t)hal_adc_read_MSB()) << 8;   // Add MSB of output
 * 
 *     // Output from ADC is now stored in adc_out
 *
 *   }
 * }
 *
 * // Initialize ADC: Set input channel to AIN7 and VDD as reference. Use 
 * // single ended mode and single step conversion. Use 10 bits to represent
 * // the analog input signal, set the output data to be right justified 
 *
 * void adc_init(void)
 * {
 *   hal_adc_set_input_channel(HAL_ADC_INP_AIN7);                     
 *   hal_adc_set_reference(HAL_ADC_REF_VDD);                        
 *   hal_adc_set_input_mode(HAL_ADC_SINGLE);                             
 *   hal_adc_set_conversion_mode(HAL_ADC_SINGLE_STEP);               
 *   hal_adc_set_resolution(HAL_ADC_RES_10BIT);                          
 *   hal_adc_set_data_just(HAL_ADC_JUST_RIGHT);    
 * }
 * @endcode
 */

#ifndef HAL_ADC_H__
#define HAL_ADC_H__

#include <stdint.h>
#include <stdbool.h>

#define ADC_STARTUP_CNT 1;

#define HAL_INP_AIN0   0x00
#define HAL_INP_AIN1   0x01
#define HAL_INP_AIN2   0x02
#define HAL_INP_AIN3   0x03
#define HAL_INP_AIN4   0x04
#define HAL_INP_AIN5   0x05
#define HAL_INP_AIN6   0x06
#define HAL_INP_AIN7   0x07
#define HAL_INP_AIN8   0x08
#define HAL_INP_AIN9   0x09 
#define HAL_INP_AIN10  0x0A
#define HAL_INP_AIN11  0x0B
#define HAL_INP_AIN12  0x0C
#define HAL_INP_AIN13  0x0D
#define HAL_INP_VDD1_3 0x0E
#define HAL_INP_VDD2_3 0x0F

/** An enum describing the ADC's input channel.
 *
 */
typedef enum {
  HAL_ADC_INP_AIN0   = HAL_INP_AIN0,
  HAL_ADC_INP_AIN1   = HAL_INP_AIN1,
  HAL_ADC_INP_AIN2   = HAL_INP_AIN2,
  HAL_ADC_INP_AIN3   = HAL_INP_AIN3,
  HAL_ADC_INP_AIN4   = HAL_INP_AIN4,
  HAL_ADC_INP_AIN5   = HAL_INP_AIN5,
  HAL_ADC_INP_AIN6   = HAL_INP_AIN6,
  HAL_ADC_INP_AIN7   = HAL_INP_AIN7,
  HAL_ADC_INP_AIN8   = HAL_INP_AIN8,
  HAL_ADC_INP_AIN9   = HAL_INP_AIN9, 
  HAL_ADC_INP_AIN10  = HAL_INP_AIN10,
  HAL_ADC_INP_AIN11  = HAL_INP_AIN11,
  HAL_ADC_INP_AIN12  = HAL_INP_AIN12,
  HAL_ADC_INP_AIN13  = HAL_INP_AIN13,
  HAL_ADC_INP_VDD1_3 = HAL_INP_VDD1_3,
  HAL_ADC_INP_VDD2_3 = HAL_INP_VDD2_3
} hal_adc_input_channel_t;

/** An enum describing the ADC's reference.
 *
 */
typedef enum {
  HAL_ADC_REF_INT  = 0x00,    /**< Internal 1.22V reference */
  HAL_ADC_REF_VDD  = 0x01,    /**< VDD as reference */
  HAL_ADC_REF_AIN3 = 0x02,    /**< External reference on AIN3 */
  HAL_ADC_REF_AIN9 = 0x03     /**< External reference on AIN9 */
} hal_adc_reference_t;

/** An enum describing the ADC's single ended or differential mode.
 *
 */
typedef enum {
  HAL_ADC_SINGLE    = 0x00,   /**< Single ended mode */
  HAL_ADC_DIFF_AIN2 = 0x01,   /**< Differential with AIN2 as inv. input */
  HAL_ADC_DIFF_AIN6 = 0x02    /**< Differential with AIN6 as inv. input */
} hal_adc_input_mode_t;

/** An enum describing the ADC's conversion mode.
 *
 */
typedef enum {
  HAL_ADC_SINGLE_STEP = 0x00, /**< Single step conversion */
  HAL_ADC_CONTINOUS   = 0x01  /**< Cont. conversion, def. sampling rate */
} hal_adc_conversion_mode_t;

/** An enum describing the ADC's sampling rate (Continuous conversion).
 *
 */
typedef enum {
  HAL_ADC_2KSPS  = 0x00,      /**< ADC sampling rate = 2kbps */
  HAL_ADC_4KSPS  = 0x01,      /**< ADC sampling rate = 4kbps */
  HAL_ADC_8KSPS  = 0x02,      /**< ADC sampling rate = 8kbps */
  HAL_ADC_16KSPS = 0x03       /**< ADC sampling rate = 16kbps */
} hal_adc_sampling_rate_t;

/** An enum describing the ADC's power down delay (Single step conversion).
 *
 */
typedef enum {               
  HAL_ADC_PDD_0US  = 0x00,    /**< ADC power down delay = 0us */  
  HAL_ADC_PDD_6US  = 0x01,    /**< ADC power down delay = 6us */
  HAL_ADC_PDD_24US = 0x02,    /**< ADC power down delay = 24us */
  HAL_ADC_PDD_INF  = 0x03     /**< ADC power down delay = infinite */
} hal_adc_power_down_delay_t;

/** An enum describing the ADC's input acquisition window.
 *
 */
typedef enum {
  HAL_ADC_AQW_075US = 0x00,   /**< Input acquisition window = 0.75us */
  HAL_ADC_AQW_3US   = 0x01,   /**< Input acquisition window = 3us */
  HAL_ADC_AQW_12US  = 0x02,   /**< Input acquisition window = 12us */
  HAL_ADC_AQW_36US  = 0x03    /**< Input acquisition window = 36us */
} hal_adc_acq_window_t;

/** An enum describing the ADC's resolution.
 *
 */
typedef enum {
  HAL_ADC_RES_6BIT  = 0x00,   /**< ADC resolution set to 6 bit */
  HAL_ADC_RES_8BIT  = 0x01,   /**< ADC resolution set to 8 bit */
  HAL_ADC_RES_10BIT = 0x02,   /**< ADC resolution set to 10 bit */
  HAL_ADC_RES_12BIT = 0x03    /**< ADC resolution set to 12 bit */
} hal_adc_resolution_t;

/** An enum describing the position of output data.
 *
 */
typedef enum {
  HAL_ADC_JUST_LEFT  = 0x00,/**< Left justified data */
  HAL_ADC_JUST_RIGHT = 0x01/**< Right justified data */
} hal_adc_data_just_t;

/** An enum describing the ADC's resolution.
 *
 */
typedef enum {
  HAL_ADC_FLOW_NONE  = 0x00,   /**< No overflow or underflow */
  HAL_ADC_FLOW_OVER  = 0x01,   /**< Overflow */
  HAL_ADC_FLOW_UNDER = 0x02,   /**< Underflow */
  HAL_ADC_FLOW_BOTH  = 0x03    /**< Both overflow and underflow */
} hal_adc_overflow_t;

/** @name   SETUP FUNCTIONS  */
//@{
/* Setup function prototypes */

/** Function to set the input channel for the ADC.
 * This function sets the input channel for the ADC.
 * 
 * @param chsel Input channel
 */
void hal_adc_set_input_channel(hal_adc_input_channel_t chsel);

/** Function to set the reference for ADC
 * This function sets the reference for conversion.
 * 
 * @param refsel Reference
 */
void hal_adc_set_reference(hal_adc_reference_t refsel);

/** Function to set the ADC single ended or differential mode.
 * This function sets the single ended or differential mode of the ADC.
 * 
 * @param input_mode Single ended or differential mode
 */
void hal_adc_set_input_mode(hal_adc_input_mode_t input_mode);

/** Function to set the ADC conversion mode.
 * This function sets the conversion mode of the ADC conversion.
 * 
 * @param conv_mode The conversion mode
 */
void hal_adc_set_conversion_mode(hal_adc_conversion_mode_t conv_mode);

/** Function to set the ADC sampling rate.
 * This function sets the sampling rate for the ADC.
 * 
 * @param rate The sampling rate
 */
void hal_adc_set_sampling_rate(hal_adc_sampling_rate_t rate);

/** Function to set the ADC power down delay.
 * This function sets the power down delay of the ADC.
 * 
 * @param pdd The power down delay
 */
void hal_adc_set_power_down_delay(hal_adc_power_down_delay_t pdd);

/** Function to set the duration of the acquisition window for the ADC.
 * This function sets the duration of the acquisition window.
 * 
 * @param tacq Duration of the acquisition window
 */
void hal_adc_set_acq_window(hal_adc_acq_window_t tacq);

/** Function to set the ADC resolution.
 * This function sets the resolution of the ADC conversion.
 * 
 * @param res The resolution of the ADC
 */
void hal_adc_set_resolution(hal_adc_resolution_t res);

/** Function to set the ADC data output justification.
 * This function sets the ADC output to be left or right justified.
 * 
 * @param just The resolution of the ADC
 */
void hal_adc_set_data_just(hal_adc_data_just_t just);
//@}


/** @name   OPERATION FUNCTIONS  */
//@{
/* Operation function prototypes */

/** Function to start the ADC conversion.
 * This function starts the conversion.
 */
void hal_adc_start(void);

/** Function that returns the LSB of the data from the ADC.
 * This function returns the LSB of the current data stored in the ADC.
 *
 * @return LSB of data from the ADC
 */
uint8_t hal_adc_read_LSB(void);

/** Function that returns the MSB of the data from the ADC.
 * This function returns the MSB of the current data stored in the ADC.
 *
 * @return MSB of data from the ADC
 */
uint8_t hal_adc_read_MSB(void);
//@}

/** @name   STATUS FUNCTIONS  */
//@{
/* Status functions prototypes */

/** Function that returns the status of the ADC.
 * This function returns true if the ADC is busy.
 *
 * @return ADC busy bit
 * @retval FALSE no conversion in progress
 * @retval TRUE conversion in progress
 */
bool hal_adc_busy(void);

/** Function that returns the flow status of the ADC.
 * Use this function to check for overflow and/or underflow.
 *
 * @return Overflow status
 */
hal_adc_overflow_t hal_adc_get_overflow_status(void);
//@}

#endif // HAL_ADC_H__
/** 
@} 
@} */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人教育av在线| 麻豆91在线播放| 国产性天天综合网| 337p日本欧洲亚洲大胆精品| 日韩一区二区视频| 精品久久久久久最新网址| 日韩欧美你懂的| 日韩美女在线视频| 久久夜色精品国产欧美乱极品| 欧美大胆人体bbbb| 精品卡一卡二卡三卡四在线| 日韩免费成人网| 国产欧美一区二区精品性色超碰| 精品1区2区在线观看| 国产人妖乱国产精品人妖| 中文字幕不卡一区| 亚洲九九爱视频| 天天综合色天天综合色h| 蜜臀99久久精品久久久久久软件| 久久精品免费看| 成人网男人的天堂| 日本精品一区二区三区高清 | 欧美日韩电影一区| 在线播放中文一区| 久久久久久久综合狠狠综合| 国产欧美一区二区精品性| 亚洲欧美色一区| 青青草国产成人99久久| 国产精品中文字幕欧美| 欧美色图天堂网| 精品国产乱码久久久久久图片 | 2020国产精品自拍| 国产精品另类一区| 天堂蜜桃91精品| 国产精品77777| 欧美挠脚心视频网站| 精品国产人成亚洲区| 亚洲免费观看高清| 国产尤物一区二区在线| 在线区一区二视频| 久久色.com| 五月天激情综合网| 不卡在线观看av| 欧美一区二区三区视频免费| 国产精品久久久久一区| 另类小说一区二区三区| 91伊人久久大香线蕉| 欧美mv日韩mv国产网站| 一区二区免费视频| 国产a久久麻豆| 日韩一二三四区| 亚洲综合在线第一页| 国产成人亚洲精品狼色在线| 91精品国产综合久久精品图片| 国产精品乱人伦一区二区| 久久国产精品99精品国产| 欧美日韩国产一区二区三区地区| 国产精品日韩精品欧美在线| 蜜臀精品久久久久久蜜臀| 在线日韩一区二区| 亚洲精品写真福利| 成人午夜私人影院| 国产午夜精品久久久久久免费视| 免费在线看一区| 色婷婷一区二区| 1024精品合集| 成人avav影音| 国产欧美精品一区| 国产在线播放一区二区三区| 日韩一本二本av| 日本中文字幕一区| 欧美日韩成人高清| 亚洲一卡二卡三卡四卡无卡久久| 91在线免费视频观看| 国产精品美女久久久久aⅴ| 国产一区二区三区免费观看| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 欧美精品九九99久久| 亚洲黄色免费电影| 色综合久久中文字幕| 亚洲免费视频成人| 91久久免费观看| 亚洲一区精品在线| 欧美午夜精品电影| 免费日本视频一区| 日韩欧美中文字幕制服| 国产在线不卡视频| 国产精品亲子乱子伦xxxx裸| 成人国产精品免费网站| 亚洲欧美精品午睡沙发| 欧美性受xxxx黑人xyx| 日精品一区二区| 日韩亚洲欧美成人一区| 激情图片小说一区| 国产精品久久久久久久久动漫 | 国产激情视频一区二区三区欧美 | 久久99蜜桃精品| 久久久久九九视频| av在线播放不卡| 亚洲成人激情自拍| 精品国产伦理网| 色天天综合色天天久久| 日韩成人精品在线| 中文字幕av一区二区三区| 91国模大尺度私拍在线视频| 日本女优在线视频一区二区| 国产网站一区二区三区| 一本到三区不卡视频| 美女爽到高潮91| 1000精品久久久久久久久| 欧美日韩国产在线观看| 福利一区福利二区| 亚洲国产一区视频| 国产日产欧美一区二区视频| 欧美体内she精视频| 国产成人自拍网| 日本中文字幕一区二区视频 | 国产精品婷婷午夜在线观看| 欧美久久婷婷综合色| 成人高清伦理免费影院在线观看| 亚洲高清免费观看| 国产精品久久久久影院亚瑟| 欧美一级黄色片| 欧美在线视频全部完| 国产成人在线影院| 日本美女一区二区三区视频| 亚洲日本韩国一区| 国产日韩欧美精品在线| 欧美精品vⅰdeose4hd| 成人丝袜高跟foot| 国产一区二区女| 午夜电影网一区| 亚洲三级电影网站| 国产亚洲精品7777| 精品国产乱子伦一区| 欧美日韩一区不卡| 欧美综合在线视频| 91蜜桃视频在线| av电影在线观看不卡| 国产成人av一区二区三区在线观看| 蜜臀av一区二区| 日韩电影免费一区| 亚洲成年人影院| 亚洲二区视频在线| 亚洲国产综合视频在线观看| 国产精品国产a级| 亚洲国产精品高清| 国产精品青草久久| **欧美大码日韩| 国产精品麻豆欧美日韩ww| 中文av一区二区| 国产精品美女视频| 国产精品午夜久久| 国产精品久久久久影院| 国产精品三级在线观看| 国产精品美女久久久久aⅴ国产馆| 国产欧美视频一区二区三区| 久久久777精品电影网影网| 精品福利一区二区三区 | 91在线视频免费观看| 99久久国产免费看| 91黄视频在线观看| 欧美亚洲一区二区在线观看| 欧美精品 日韩| 日韩免费一区二区| 久久综合国产精品| 国产精品美女一区二区| 亚洲一区在线电影| 人人狠狠综合久久亚洲| 国产在线精品一区二区| 国产91精品欧美| 色婷婷久久99综合精品jk白丝| 欧美视频一区二区三区四区| 欧美一级理论性理论a| 欧美一区二区视频在线观看| 欧美成人三级在线| 亚洲国产成人午夜在线一区| 一区二区在线观看视频在线观看| 亚洲成人免费电影| 国产自产视频一区二区三区| 成人激情av网| 欧美日韩激情一区二区三区| 精品久久99ma| 亚洲免费在线观看| 美女视频网站黄色亚洲| 欧洲国内综合视频| 欧美成人国产一区二区| 国产精品无码永久免费888| 亚洲一区二区四区蜜桃| 激情国产一区二区 | 欧美成人女星排行榜| 国产精品美女久久久久av爽李琼| 亚洲高清在线精品| 激情五月婷婷综合网| 在线中文字幕不卡| 久久精品人人做人人爽97| 同产精品九九九| 成人av影视在线观看| 日韩欧美一级在线播放| 一区二区三区**美女毛片|