Nixie.c(8): error C267: 'SelectNixie': requires ANSI-style prototype

时间: 2024-05-12 08:20:18 浏览: 8
This error message suggests that there is a problem with the way the function "SelectNixie" is defined or declared. The compiler is expecting an ANSI-style prototype for the function. An ANSI-style prototype includes the return type of the function, the name of the function, and the type and name of each parameter, separated by commas and enclosed in parentheses. To fix this error, make sure that the function "SelectNixie" is declared with an ANSI-style prototype before it is used in the code. The prototype should include the return type of the function, the name of the function, and the type and name of each parameter. For example: ``` int SelectNixie(int nixieNum); ``` Make sure that the function definition matches the prototype and that it includes the return type, the function name, and the type and name of each parameter. By providing a correct ANSI-style prototype, the compiler will be able to correctly compile the code and resolve any issues related to the function "SelectNixie".

相关推荐

为什么以下代码中的定时器无法正常使用:/* Main.c file generated by New Project wizard * * Created: ?? 5? 16 2023 * Processor: AT89C52 * Compiler: Keil for 8051 */ #include <reg51.h> #include <stdio.h> #define FREQ 12000000UL // ¶¨ÒåʱÖÓƵÂÊΪ12MHz #define TIMER1_PRESCALER 12 // ¶¨Ê±Æ÷0Ô¤·ÖƵÆ÷Ϊ12 sbit out5v_1 = P3^7; sbit in5v_1 = P3^6; sbit button1 = P3^1; sbit button2 = P3^0; sbit button3 = P3^2; sbit num1 = P2^2; sbit num2 = P2^3; sbit num3 = P2^4; double f = 11.0592;//???? unsigned int time1 = 100; int n=1; unsigned int data1; //?????? unsigned char NixieTable[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}; void Delay(unsigned int xms) { unsigned char i, j; //???????,????????? while(xms--) { i = 2; j = 239; do { while (--j); } while (--i); } } //???????? void Nixie(unsigned char Location,Number) { switch(Location) //???? { case 1:num3=1;num2=1;num1=1;break; case 2:num3=1;num2=1;num1=0;break; case 3:num3=1;num2=0;num1=1;break; case 4:num3=1;num2=0;num1=0;break; case 5:num3=0;num2=1;num1=1;break; case 6:num3=0;num2=1;num1=0;break; case 7:num3=0;num2=0;num1=1;break; case 8:num3=0;num2=0;num1=0;break; } P0=NixieTable[Number]; //???? Delay(1); //?????? P0=0x00; //???0,?? } void Timer0_Start(int value){ TL0 = 0xFF; //ÉèÖö¨Ê±³õʼֵ TH0 = 0xFF; in5v_1 = 0; TR0 = 1; //¶¨Ê±Æ÷0¿ªÊ¼¼Æʱ } void Timer0_Isr(void) interrupt 1 { static unsigned int T0Count; TL0 = 0xFF; //ÉèÖö¨Ê±³õʼֵ TH0 = 0xFF; ++T0Count; if(T0Count >= time1){ T0Count = 0; in5v_1=1; TR0 = 1; //¶¨Ê±Æ÷0Í£Ö¹¼Æʱ } } void Timer0_Init(void) //1΢Ãë@10.973MHz { TMOD |= 0x01; //ÉèÖö¨Ê±Æ÷ģʽ TF0 = 0; //Çå³ýTF0±êÖ¾ ET0 = 1; //ʹÄܶ¨Ê±Æ÷0ÖÐ¶Ï EA = 1;//¿ªÆô×ÜÖÐ¶Ï } void main(){ out5v_1 = 1; in5v_1 = 1; button1 = 1; Timer0_Init(); isr_Init(); while(1){ n=8; data1 = time1; while(data1) { Nixie(n,data1%10); --n; data1 /= 10; } if(button1==0) //P3_2?K3??K3???? { Delay(20); //???? //Timer0_Start(time1); Timer0_Start(time1); while(button1==0); //???? Delay(20); //???? } if(button2==0) //P3_2?K3??K3???? { Delay(20); //???? ++time1; Delay(500); //???? } if(button3==0) //P3_2?K3??K3???? { Delay(20); //???? --time1; Delay(500); //???? } } }

请帮我为以下代码添加注释#include <REGX52.H> NixieTable[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7c,0x39,0x5e,0x79,0x71}; int MatrixKeyNum; void Delay(unsigned int xms) { unsigned char i, j; while(xms--) { i = 2; j = 239; do { while (--j); } while (--i); } } void Nixie(unsigned char Location,Number) { switch(Location) { case 1:P2_4=1;P2_3=1;P2_2=1;break; case 2:P2_4=1;P2_3=1;P2_2=0;break; case 3:P2_4=1;P2_3=0;P2_2=1;break; case 4:P2_4=1;P2_3=0;P2_2=0;break; case 5:P2_4=0;P2_3=1;P2_2=1;break; case 6:P2_4=0;P2_3=1;P2_2=0;break; case 7:P2_4=0;P2_3=0;P2_2=1;break; case 8:P2_4=0;P2_3=0;P2_2=0;break; } P0=NixieTable[Number]; } unsigned char MatrixKey() { unsigned char KeyNumber=0; P1=0xFF; P1_3=0; if(P1_7==0){Delay(20);while(P1_7==0);Delay(20);KeyNumber=1;} if(P1_6==0){Delay(20);while(P1_6==0);Delay(20);KeyNumber=5;} if(P1_5==0){Delay(20);while(P1_5==0);Delay(20);KeyNumber=9;} if(P1_4==0){Delay(20);while(P1_4==0);Delay(20);KeyNumber=13;} P1=0xFF; P1_2=0; if(P1_7==0){Delay(20);while(P1_7==0);Delay(20);KeyNumber=2;} if(P1_6==0){Delay(20);while(P1_6==0);Delay(20);KeyNumber=6;} if(P1_5==0){Delay(20);while(P1_5==0);Delay(20);KeyNumber=10;} if(P1_4==0){Delay(20);while(P1_4==0);Delay(20);KeyNumber=14;} P1=0xFF; P1_1=0; if(P1_7==0){Delay(20);while(P1_7==0);Delay(20);KeyNumber=3;} if(P1_6==0){Delay(20);while(P1_6==0);Delay(20);KeyNumber=7;} if(P1_5==0){Delay(20);while(P1_5==0);Delay(20);KeyNumber=11;} if(P1_4==0){Delay(20);while(P1_4==0);Delay(20);KeyNumber=15;} P1=0xFF; P1_0=0; if(P1_7==0){Delay(20);while(P1_7==0);Delay(20);KeyNumber=4;} if(P1_6==0){Delay(20);while(P1_6==0);Delay(20);KeyNumber=8;} if(P1_5==0){Delay(20);while(P1_5==0);Delay(20);KeyNumber=12;} if(P1_4==0){Delay(20);while(P1_4==0);Delay(20);KeyNumber=16;} return KeyNumber; } void main() { while(1) { MatrixKeyNum=MatrixKey(); if(MatrixKeyNum) Nixie(1,MatrixKeyNum); } }

最新推荐

recommend-type

####这是一篇对python的详细解析

python
recommend-type

菜日常菜日常菜日常菜日常

菜日常菜日常菜日常菜日常
recommend-type

VB学生档案管理系统设计(源代码+论文).rar

计算机专业毕业设计VB精品论文资源
recommend-type

电商到底怎么做?淘系电商三维经营心法(59节课)-课程网盘链接提取码下载 .txt

课程内容: 10-经营常见4大循环-被资本绑架思维.mp4 11-落地中的47个坑-产品坑.mp4 12-落地中的47个坑-一把手坑.mp4 13-落地中的47个坑-迷信坑.mp4 14-落地中的47个坑-缺乏坑.mp4 15-落地中的47个坑-团队坑.mp4 16-电商经营常见导致的10种挂法.mp4 18-淘系电商干法介绍.mp4 19-淘系电商的特点.mp4 20-淘系买家购物场景.mp4 21-淘系干法-标品.mp4 22-淘系电商干法-半标品.mp4 23-答疑.mp4 25-3类7种常见“干法”模型.mp4 26-6类产品日常运营报表.mp4 27-6类产品日常运营报表-高客单价店铺.mp4 28-6类产品运营报表-低客单价.mp4 29-6类产品运营报表-爆款数据模型季节性商品.mp4 2-前言.mp4 30-6类产品日常运营-标品.mp4 31-6类产品日常运营报表-非标品.mp4 32-6类产品日常运营报表-全店客服.mp4 33-执行就是一条:运营公式.mp4 35-搜索算法逻辑.mp4 36-2024年词层分层“激
recommend-type

grpcio-1.63.0-cp312-cp312-linux_armv7l.whl

Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

MATLAB柱状图在信号处理中的应用:可视化信号特征和频谱分析

![matlab画柱状图](https://img-blog.csdnimg.cn/3f32348f1c9c4481a6f5931993732f97.png) # 1. MATLAB柱状图概述** MATLAB柱状图是一种图形化工具,用于可视化数据中不同类别或组的分布情况。它通过绘制垂直条形来表示每个类别或组中的数据值。柱状图在信号处理中广泛用于可视化信号特征和进行频谱分析。 柱状图的优点在于其简单易懂,能够直观地展示数据分布。在信号处理中,柱状图可以帮助工程师识别信号中的模式、趋势和异常情况,从而为信号分析和处理提供有价值的见解。 # 2. 柱状图在信号处理中的应用 柱状图在信号处理
recommend-type

用Spring boot和vue写一个登录注册界面

好的,这是一个比较常见的技术问题,我可以为您提供一些参考资料和思路。首先,您可以使用Spring Boot作为后端框架来处理用户认证和注册的逻辑,比如使用Spring Security实现用户登录认证。同时,您还需要设计相应的数据模型和数据库表结构来存储用户信息。在前端方面,您可以使用Vue.js作为框架来构建登录注册页面,使用Axios来发起API请求并和后端进行交互。当然,在实现过程中,还需要考虑一些具体细节,比如数据校验、安全性和用户体验等方面。希望这些信息能够帮助到您。
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。