#11452: 求解問題(error: expected expression before '<' token )


alex014238 (unknown)

學校 : 不指定學校
編號 : 61202
來源 : [203.163.194.26]
最後登入時間 :
2016-10-19 22:08:48
a006. 一元二次方程式 | From: [203.163.194.23] | 發表日期 : 2016-10-19 00:11

#include "HT66FU50.h"

#define LED_PORT _pa
#define LED_PORTC _pac

void init(void)
{
_tmpc0 = 0; <span style="white-space:pre"> </span>
_tmpc1 = 0;
_acerl = 0; <span style="white-space:pre"> </span>
_cp0c = 0; <span style="white-space:pre"> </span>
_cp1c = 0;
LED_PORT = 0xff; //0b11111111; 
LED_PORTC = 0x00; //0b00000000;
}


void delaynms(unsigned int t)
{
while (t > 0) {
_delay(1000); //1ms
t--;
}
}

int main()
{
unsigned char i;
unsigned int j;

init();

while(1) {

for (i=0; i<8; i++) {
LED_PORT = 0x01<<i;
delaynms(1000);
}


for (i=0; i<8; i++) {
LED_PORT = 0x80>>i;
delaynms(1000);
}
}

return 0;
}

 
ZeroJudge Forum