adcinit.c

来自「此资料是关于51单片机与射频芯片CC1100和2500的联合开发示例程序。」· C语言 代码 · 共 43 行

C
43
字号
/*******************************************************************************************************
 *                                                                                                     *
 *        **********                                                                                   *
 *       ************                                                                                  *
 *      ***        ***                                                                                 *
 *      ***   +++   ***                                                                                *
 *      ***   + +   ***     This file implements functionality for reading the potmeter                *
 *      ***   +                                                                                        *
 *      ***   + +   ***                                                                                *
 *      ***   +++   ***     AdcInit.c                                                                  *
 *      ***        ***                                                                                 *
 *       ************                                                                                  *
 *        **********                                                                                   *
 *                                                                                                     *
 *******************************************************************************************************
 * Compiler:                Keil C51 V7.50                                                             *
 * Target platform:         Chipcon CCxxx0 (Silabs F320)                                               *
 * Author:                  SNA                                                                        *
 *******************************************************************************************************
 * Revision history:        See end of file                                                            *
 ******************************************************************************************************/
#include <Chipcon\srf04\halsrf04.h>
#include <Chipcon\srf04\ebsrf04.h>




//-------------------------------------------------------------------------------------------------------
//  void ebAdcInit(UINT8 adcInput)
//
//  DESCRIPTION:
//      Function used to initialize ADC before using the ebGetJoystickPosition or ebReadPotentiometer
//      functions.
//
//  ARGUMENTS:
//      UINT8 adcInput
//          ADC_JOY
//          ADC_POT
//          ADC_AUDIO
//-------------------------------------------------------------------------------------------------------
void ebAdcInit(UINT8 adcInput) {
   
    // Setup the ADC: Low-power Track Mode (ADC0 conversion initiated on every write of 

⌨️ 快捷键说明

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