⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scu.c

📁 xc164的双can的使用例程
💻 C
字号:
//****************************************************************************
// @Module        System Control Unit (SCU)
// @Filename      SCU.C
// @Project       TWINCAN.dav
//----------------------------------------------------------------------------
// @Controller    Infineon XC164CS-16F
//
// @Compiler      Keil
//
// @Codegenerator 2.7
//
// @Description   This file contains functions that use the SCU module.
//
//----------------------------------------------------------------------------
// @Date          12/17/2004 7:02:52 PM
//
//****************************************************************************

// USER CODE BEGIN (SCU_General,1)

// USER CODE END



//****************************************************************************
// @Project Includes
//****************************************************************************

#include "MAIN.H"

// USER CODE BEGIN (SCU_General,2)

// USER CODE END


//****************************************************************************
// @Macros
//****************************************************************************

// USER CODE BEGIN (SCU_General,3)

// USER CODE END


//****************************************************************************
// @Defines
//****************************************************************************


// USER CODE BEGIN (SCU_General,4)

// USER CODE END


//****************************************************************************
// @Typedefs
//****************************************************************************

// USER CODE BEGIN (SCU_General,5)

// USER CODE END


//****************************************************************************
// @Imported Global Variables
//****************************************************************************

// USER CODE BEGIN (SCU_General,6)

// USER CODE END


//****************************************************************************
// @Global Variables
//****************************************************************************

// USER CODE BEGIN (SCU_General,7)

// USER CODE END


//****************************************************************************
// @External Prototypes
//****************************************************************************

// USER CODE BEGIN (SCU_General,8)

// USER CODE END


//****************************************************************************
// @Prototypes Of Local Functions
//****************************************************************************


// USER CODE BEGIN (SCU_General,9)

// USER CODE END


//****************************************************************************
// @Function      void SCU_vInit(void) 
//
//----------------------------------------------------------------------------
// @Description   This is the initialization function of the SCU function 
//                library. It is assumed that the SFRs used by this library 
//                are in its reset state. 
//
//----------------------------------------------------------------------------
// @Returnvalue   None
//
//----------------------------------------------------------------------------
// @Parameters    None
//
//----------------------------------------------------------------------------
// @Date          12/17/2004
//
//****************************************************************************

// USER CODE BEGIN (Init,1)

// USER CODE END

void SCU_vInit(void)
{
  // USER CODE BEGIN (Init,2)

  // USER CODE END

  ///  -----------------------------------------------------------------------
  ///  System Control Register 1 (SYSCON1):
  ///  -----------------------------------------------------------------------
  ///  - port drivers are always on
  ///  - programm Flash is always on
  ///  - clock prescaler for system is fpll / 1

  //// this register must be set in the start-up file
  //// SYSCON1  =  0x0000

  ///  -----------------------------------------------------------------------
  ///  Configuration of Peripheral Management (SYSCON3):
  ///  -----------------------------------------------------------------------
  ///  - Analog/Digital converter (ADC) is enabled
  ///  - asynchronous serial channel (ASC0) is enabled
  ///  - synchronous serial channel 0 (SSC0) is enabled
  ///  - general purpose timer block (GPT1/2) is enabled
  ///  - on-chip programm flash memory is enabled
  ///  - CAPCOM unit 1 is disabled
  ///  - CAPCOM unit 2 is disabled
  ///  - CAPCOM unit 6 is disabled
  ///  - on-chip controller area network unit (CAN) is enabled
  ///  - synchronous serial channel 1 (SSC1) is disabled

  //// this register must be set in the start-up file
  //// SYSCON3  =  0x81C0


  // USER CODE BEGIN (Init,3)

  // USER CODE END

} //  End of function SCU_vInit




// USER CODE BEGIN (SCU_General,10)

// USER CODE END

⌨️ 快捷键说明

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