?? constants.h
字號:
/* ***********************************************************************
**
** Copyright (C) 2002 Romuald Bialy (MIS) <romek_b@o2.pl>,
** Jesper Hansen <jesperh@telia.com>.
**
**
** Yampp-3/USB Test - Constants and options definition file
**
** File Constants.h
**
*************************************************************************
**
** This file is part of the yampp system.
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software Foundation,
** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
*************************************************************************
**
** Revision History
**
** when what who why
**
** 2002-09-25 1.0 jesper initial version
**
*********************************************************************** */
// Overall current firmware version is 1.00
#ifndef __CONST_H__
#define __CONST_H__
// Here is some constants are defined.
//============================================================================
// VS1001
//============================================================================
//
// Define F_VS1001 constant according to your VS1001 clock divided by 2000.
// Add 0x8000 if you use clock doubler.
#define F_VS1001 (6144 + 0x8000) /* 12,288MHz x2 */
//#define F_VS1001 (12288 + 0x0000) /* 24.576Mhz */
//============================================================================
// DEFINITION OF LCD ORGANIZATION
//============================================================================
//
//#define LCD_TYPE 1 // 2x16 LCD
//#define LCD_TYPE 2 // 2x20 LCD
//#define LCD_TYPE 3 // 2x24 LCD
//#define LCD_TYPE 4 // 2x40 LCD
//#define LCD_TYPE 5 // 4x16 LCD
#define LCD_TYPE 6 // 4x20 LCD
#define UART_BAUD_RATE 115200 // baud rate
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//
// Some checks and calculations - DON'T change it !
//
#if F_VS1001 < 10000 || F_VS1001 > 65536
#error Invalid F_VS1001 !
#endif
#if (LCD_TYPE == 1)
#define LCD_LINES 2
#define LCD_LINE_LENGTH 16
#endif
#if (LCD_TYPE == 2)
#define LCD_LINES 2
#define LCD_LINE_LENGTH 20
#endif
#if (LCD_TYPE == 3)
#define LCD_LINES 2
#define LCD_LINE_LENGTH 24
#endif
#if (LCD_TYPE == 4)
#define LCD_LINES 2
#define LCD_LINE_LENGTH 40
#endif
#if (LCD_TYPE == 5)
#define LCD_LINES 4
#define LCD_LINE_LENGTH 16
#endif
#if (LCD_TYPE == 6)
#define LCD_LINES 4
#define LCD_LINE_LENGTH 20
#endif
#ifdef UART_BAUD_SELECT
#undef UART_BAUD_SELECT
#define UART_BAUD_SELECT ((u32)((u32)UART_CPU/(UART_BAUD_RATE*16L)-1))
#endif
#endif // __CONST_H__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -