current position:Home>How does keil define variables?

How does keil define variables?

2022-06-24 09:58:15CSDN Q & A

The phenomenon and background of the problem
Operation results and error reporting contents
My solution ideas and tried methods
What I want to achieve

#include<reg51.h>
#include <intrins.h>
#include <stdio.h>
#define uint unsigned int
#define uchar unsigned char
char handle_1 ;
extern handle_1
uchar shi=12, fen=59, miao=0, green=0,beep=0 // The initial value of ten seconds
void main() // The main function

{

TMOD=0x11;
TH0=(65536- -50000)/256;
TL0=(65536-50000)%256;
EA=1;
ET0=1;
TR0=1;
char handle_1(shi);
handle_2(fen);
display_1();// Display the initial value of the clock
display_2();// Display the initial value of minutes
while(1)
{
scan_key(); // Call the key scan function
time_1(); // Call the clock function
handle_1(long shi); // Split hours
handle_2(long fen); // Split minutes
display_1();// Show hours
display_2();// Show minutes
}
// Function name : clock
// The functionality : Timer T0 Timed interrupt ,interrupt 1
// Formal parameters : nothing
// Return value : nothing
void clock() interrupt 1
{
EA=0;// Close the interrupt
if(msec1!=0x28)
msec1++; // To 10 Millisecond No , Less than msec1 Add 1
else
{
msec1=0;
if(msec2!= 100)msec2++; // To 1 Seconds no , Less than msec2 Add 1 .
else
{
if(rtimbit== 1 )count++;
msec2=0;
if(clockbuf[2]!=59)
clockbuf[2]++; // To 1 Whether or not , Less than clockbuf[2] Add 1
else
{ clockbuf[2]=0;
if(clockbuf[1]!=59)
clockbuf[1]++; // To 1 Hours no , Less than clockbuf[1] Add 1
else
{ clockbuf[1]=0;
if(clockbuf[0]!=23)
clockbuf[0]++; // To 24 When not , Less than clockbuf[0] Add 1
else clockbuf[0]=0; }
}
}
}
EA=1;// Open the interrupt
}
Compile output : error C192:missing ' ; ' before 'unsigned

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/175/202206171657172789.html

Random recommended