本帖最后由 ztb 于 2018-7-14 19:25 编辑
例如:
/******************************************************************************
The main C function. Program execution starts
here after stack initialization.
******************************************************************************/
void main (void)
{
P12_Quasi_Mode; //For GPIO1 output, Find in "Function_define.h" - "GPIO INIT"
InitialUART0_Timer1(115200);
Enable_ADC_BandGap; //Find in "Function_define.h" - "ADC INIT"
while(1)
{
clr_ADCF;
set_ADCS; // Each time ADC start trig signal
while(ADCF == 0);
printf ("\n Value = 0x%bx",ADCRH);
printf ("\n Value = 0x%bx",ADCRL);
clr_GPIO1;
// Timer0_Delay1ms(100);
set_GPIO1;
}
}
我在C51库中也找不类似的写法,一般都是写成:
ADCF = 0;
ADCS = 1;
请问 clr_xxx, 是在哪里定义的呢?还是C51默认的写法。如果是,类似的写法还有哪些呢?
|