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

📄 make_usec_table.c

📁 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without ev
💻 C
字号:
/*----------------------------------------------------------------------------*\|                                                                              || Copyright (C) 2003,  James A. Cureington                                     ||                      tonycu * users_sourceforge_net                          ||                                                                              || 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 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., 675 Mass Ave, Cambridge, MA 02139, USA.                    ||                                                                              ||                                                                              || Tony Cureington                                                              || December 14, 2002                                                            ||                                                                              || This file is associated with the ezusb2131 Linux downloader project. The     || project can be found at http://ezusb2131.sourceforge.net.                    ||                                                                              ||                                                                              |\*----------------------------------------------------------------------------*//* * gcc make_usec_table.c -o make_usec_table *//******************************************************************************* * * $Id: make_usec_table.c,v 1.1 2003/02/21 06:50:35 tonycu Exp $ * ******************************************************************************/#include <stdio.h>/* the defines below were found by hand (trial and error)... you can * hack the usec table and put 4520 in location zero and see if it goes to  * 90 degrees, also put 760 in location one and see if it goes to -90 degrees. * this is how i did it since the values I found on the web did not work * correctly...  */#define NUM_STOPS		   270#define CENTER_USECS		2560#define MAX_USECS			4520#define MIN_USECS			760main(){	int i;	printf("{\n");	for (i=0; i<NUM_STOPS-1; i++)	{		printf("%5d, ", 				 (i+1)*((MAX_USECS-CENTER_USECS)/NUM_STOPS));		if ((i+1)%10==0) {			printf("\n");		}	}	printf("%5d ", MAX_USECS-CENTER_USECS);	printf("};\n");}

⌨️ 快捷键说明

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