📄 config.h
字号:
//*****************************************************************************
//
// config.h - Configuration of the serial to Ethernet converter.
//
// Copyright (c) 2007 Luminary Micro, Inc. All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws. All rights are reserved. You may not combine
// this software with "viral" open-source software in order to form a larger
// program. Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 195 of the Serial to Ethernet Converter.
//
//*****************************************************************************
#ifndef __CONFIG_H__
#define __CONFIG_H__
//*****************************************************************************
//
// This define determines if a static IP address should be used. It should be
// commented out if USE_DHCP is defined.
//
//*****************************************************************************
#define USE_STATIC_IP
//*****************************************************************************
//
// The static IP address to assign to this device. This is only used if
// USE_STATIC_IP is defined.
//
//*****************************************************************************
#define STATIC_IPADDR0 169
#define STATIC_IPADDR1 254
#define STATIC_IPADDR2 19
#define STATIC_IPADDR3 70
//*****************************************************************************
//
// The netmask used with a static configuration. This is only used if
// USE_STATIC_IP is defined.
//
//*****************************************************************************
#define STATIC_NETMASK0 255
#define STATIC_NETMASK1 255
#define STATIC_NETMASK2 0
#define STATIC_NETMASK3 0
//*****************************************************************************
//
// The default gateway address used with a static configuration. This is only
// used if USE_STATIC_IP is defined.
//
//*****************************************************************************
#define STATIC_GWADDR0 0
#define STATIC_GWADDR1 0
#define STATIC_GWADDR2 0
#define STATIC_GWADDR3 0
//*****************************************************************************
//
// This define determines if DHCP should be used to configure the IP address.
// It should be commented out if USE_STATIC_IP is selected.
//
//*****************************************************************************
//#define USE_DHCP
//*****************************************************************************
//
// The TCP port that is used to communicate with the telnet server provided by
// the serial to Ethernet converter. The traditional telnet port is 23, though
// that port is not typically used for serial to Ethernet converters.
//
//*****************************************************************************
#define TELNET_PORT 23
//*****************************************************************************
//
// The number of seconds before an idle connection is aborted. If set to zero,
// the connection will never be aborted.
//
//*****************************************************************************
#define TELNET_TIMEOUT 0
//*****************************************************************************
//
// The baud rate at which the UART is operated.
//
//*****************************************************************************
#define UART_BAUDRATE 115200
//*****************************************************************************
//
// The number of data bits for each byte on the UART. This must be one of
// UART_CONFIG_WLEN_5, UART_CONFIG_WLEN_6, UART_CONFIG_WLEN_7, or
// UART_CONFIG_WLEN_8.
//
//*****************************************************************************
#define UART_DATABITS UART_CONFIG_WLEN_8
//*****************************************************************************
//
// The parity mode in which the UART is operated. This must be one of
// UART_CONFIG_PAR_NONE, UART_CONFIG_PAR_EVEN, or UART_CONFIG_PAR_ODD.
//
//*****************************************************************************
#define UART_PARITY UART_CONFIG_PAR_NONE
//*****************************************************************************
//
// The number of stop bits after each byte on the UART. This must be one of
// UART_CONFIG_STOP_ONE or UART_CONFIG_STOP_TWO.
//
//*****************************************************************************
#define UART_STOPBITS UART_CONFIG_STOP_ONE
#endif // __CONFIG_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -