Board logo

标题: 帮忙看程序 [打印本页]

作者: quray    时间: 2008-8-31 09:21     标题: 帮忙看程序

printf("Please enter your 9-digit serial number. This is printed on a \n");
printf("label under your Nios dev. board. The first 3 digits of the \n");
printf("label are ASJ and the serial number follows this.\n -->");

for(i=0; i<9; i++)
{
serial_number = getchar();
putchar(serial_number);

/* Handle backspaces. How civilized. */
if ((serial_number == 0x08) && (i >= 0))
{
i--;
}
}
printf("\n");

for(i=0; i<9; i++)
{
if (isdigit(serial_number))
{
ser_num *= 10;
ser_num += serial_number - '0';
}
else
{
ser_num = 0;
printf("Serial number only contains decimal digits and is non-zero\n");
break;
}
}

请问,这里应该输入什么样的数字啊?


作者: quray    时间: 2008-8-31 10:48

我这是调试rtl8019的时候遇到的问题,输入一串数字生成MAC,但是怎么输入好像都不对,有人知道怎么输入吗?
在7.2版本下面。
作者: caopengly    时间: 2008-9-4 12:45

Finding Your MAC Address
A computer's MAC address (Media Access Control - not to be confused with Macintosh) is a unique set of twelve letters and numbers that identifies your network card on the network. Computers with wireless capabilities will have two MAC addresses, one for the wired ethernet connection and one for the wireless connection. We need the wireless MAC address so that your computer can be recognized on WSU Vancouver's wireless network. If you give us the wrong one, you will not be able to get on the network until this is corrected.

Windows XP instructions
Click on the Start button
Click on Run. This will open a text box to type in commands.
Type in "cmd" (without the quote marks) and click the OK button. A command window will open. (In Windows Vista, type cmd into the search line)
At the command prompt type the following: ipconfig /all
Press the enter key. A list of information will show. Look for the MAC number as described above. Write it down.
At the command prompt type "exit" (without quotes) to close the window.
The picture below is an example of what you may see, depending on your operating system. You may also have a MAC number for "Bridge Ethernet" connection. If you do, then that is the MAC address you need to use in your registration form.

mac的值是设备的序列号,一般不用自己设,有些可以自己改,格式就如图了。


作者: quray    时间: 2008-9-4 16:06

谢谢版主了。






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0