adc.h

来自「Source code for driving RFM01 fm radio r」· C头文件 代码 · 共 52 行

H
52
字号
/** \file adc.h \brief Obs硊ga wbudowanego przetwornika analogowo/cyfrowego. */
/*
  Copyright (c) 2004 Robert Krysztof
  robert.krysztof@wp.pl
  http://www.avr-gcc.prv.pl
*/
//*****************************************************************************
//
// Title		: Analog-to-digital converter functions
// Author		: Pascal Stang - Copyright (C) 2002
//
// This code is distributed under the GNU Public License
//		which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************

/** \defgroup adc Przetwornik ADC
 
 Zawiera funkcje obs硊gi wbudowanego przetwornika analogowo/cyfrowego.
 \code
 #include "adc.h"
 \endcode 
*/

#include <avr/io.h>
#include <avr/signal.h>
#include <avr/interrupt.h>
#include "config.h"
#include "global.h"

#ifndef ADC_H
#define ADC_H

/*@{*/

// defines

// ADC_clock prescaler select
//		*selects how much the CPU clock frequency is divided
//		to create the ADC_ clock frequency
//		*lower division ratios make conversion go faster
//		*higher division ratios make conversions more accurate
#define ADC_PRESCALE_DIV2		0x00	///< 0x01,0x00 -> CPU clk/2
#define ADC_PRESCALE_DIV4		0x02	///< 0x02 -> CPU clk/4
#define ADC_PRESCALE_DIV8		0x03	///< 0x03 -> CPU clk/8
#define ADC_PRESCALE_DIV16		0x04	///< 0x04 -> CPU clk/16
#define ADC_PRESCALE_DIV32		0x05	///< 0x05 -> CPU clk/32
#define ADC_PRESCALE_DIV64		0x06	///< 0x06 -> CPU clk/64
#define ADC_PRESCALE_DIV128		0x07	///< 0x07 -> CPU clk/128
/// Warto滄 domy渓na
#define ADC_PRESCALE			ADC_PRESCALE_DIV64
/// Nie nale縴 zmienia

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?