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

📄 board.h

📁 atmel c5122 USB C51程序
💻 H
字号:
/*H**************************************************************************
* NAME:         board.h         
*----------------------------------------------------------------------------
* Copyright (c) 2003 Atmel.
*----------------------------------------------------------------------------
* RELEASE:      c5122-scib-usb-hid-2_4_0      
* REVISION:     1.4.6.4     
*----------------------------------------------------------------------------
* PURPOSE: 
* Configuration file. Selection of the device.
* Abstraction layer of C51 Demonstration Board
*****************************************************************************/
#ifndef _BOARD_H_
#define _BOARD_H_

/*_____ D E F I N I T I O N S ______________________________________________*/

#if CPUB_VERSION <0x0120
//---------------------
// CPU DEMOBOARD V1.0.3
//---------------------
  #define NOT_CONNECTED_CPU_PIN   P1_6  

  #define GENEB_BUZZER            P4_4 // CPU I/O Port connected to GENEB Buzzer Pin or mute
  #define GENEB_BP1               P3_2 // CPU I/O Port connected to GENEB BP1

  //#define GENEB_TWI_IT          // Port I/O IT pin of CPU connected to GENEB TWI_IT Pin
  #define GENEB_SDA               P4_3
  #define GENEB_SCL               P4_2

  #define GENEB_A16               NOT_CONNECTED_CPU_PIN // CPU I/O Port connected to GENEB A16
  #define GENEB_CS_RAM            P4_5
  //#define GENEB_CS_FLASH          P1_3
  //#define GENEB_ISP_FLASH         P1_4
  
  #define CPUb_enable_all_leds()  (AUXR&=~1,P3_0=0,P3_1=0,PMOD0&=0x3F,LEDCON0=0xFF,P3_2=0,P3_4=0,PMOD1&=0xFC,LEDCON1=0xFF,P4_3=0,P4_5=0)
  #define CPUb_enable_spe_leds()  (P3_6=0,P3_7=0,P4_4=0)
  #define Geneb_enable_isp()      
  #define Geneb_disable_isp()

#else
//---------------------
// CPU DEMOBOARD V1.2.0
//---------------------
  #define NOT_CONNECTED_CPU_PIN   B  

  #define GENEB_BUZZER            P1_6 // CPU I/O Port connected to GENEB Buzzer Pin or mute
  #define GENEB_BP1               P3_2 // CPU I/O Port connected to GENEB BP1

  //#define GENEB_TWI_IT          P3_3 // Port I/O IT pin of CPU connected to GENEB TWI_IT Pin
  #define GENEB_SDA               P4_3
  #define GENEB_SCL               P4_2

  #define GENEB_A16               NOT_CONNECTED_CPU_PIN // CPU I/O Port connected to GENEB A16
  #define GENEB_CS_RAM            NOT_CONNECTED_CPU_PIN // CPU I/O Port connected to GENEB CE2_RAM
  //#define GENEB_CS_FLASH          NOT_CONNECTED_CPU_PIN
  #define GENEB_ISP_FLASH         P3_5

  #define CPUb_enable_all_leds()  (AUXR&=~1,P3_0=0,P3_1=0,PMOD0&=0x3F,LEDCON0=0xFF,P3_2=0,P3_4=0,PMOD1&=0xFC,LEDCON1=0xFF,P4_3=0,P4_4=0,P4_5=0)
  #define CPUb_enable_spe_leds()  (P3_6=0,P3_7=0)
  #define Geneb_enable_isp()      (GENEB_ISP_FLASH=0)
  #define Geneb_disable_isp()     (GENEB_ISP_FLASH=1)
#endif


#define CPUb_disable_all_leds() (AUXR|=1,P3_0=1,P3_1=1,P3_2=1,P3_4=1,P3_6=1,P3_7=1,P4_3=1,P4_4=1,P4_5=1,LEDCON0=0,LEDCON1=0)
#define Geneb_enable_ram()      (GENEB_CS_RAM=1)
#define Geneb_disable_ram()     (GENEB_CS_RAM=0)

/*_____ I N C L U D E S ____________________________________________________*/

#ifdef GENEB_VERSION
#include "lib_board/geneb.h"
#endif


/*_____ M A C R O S ________________________________________________________*/

/*_____ D E C L A R A T I O N S ____________________________________________*/

#endif  /* _BOARD_H */



⌨️ 快捷键说明

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