вот так вот сделал
#include ‹90s2313.h›
#include ‹delay.h›
// Standard Input/Output functions
#include ‹stdio.h›
#define SIZERX 32
char arRx[SIZERX];
unsigned char posRx = 0;
interrupt [UART_RXC] void uart_rx_isr(void)
{
char data;
data=UDR;
arRx[posRx] = data;
posRx++; // +1 следующий регистр
if(posRx ›= SIZERX) // если posRx больше или равно SIZERX
posRx--;
}
// Declare your global variables here
char* UART_Recv(char* pnRecv)
{
*pnRecv = posRx;
return arRx;
}
char szSMSRecipientNumber[15] = "+78121234567"; // в полном формате
void main(void)
{
// Declare your local variables here
PORTB=0xFF;
DDRB=0xFF;
PORTD=0x00;
DDRD=0x00;
TCCR0=0x00;
TCNT0=0x00;
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
OCR1H=0x00;
OCR1L=0x00;
GIMSK=0x00;
MCUCR=0x00;
TIMSK=0x00;
UCR=0x18;
UBRR=0x17;
ACSR=0x80;
//================================================== =================
{
unsigned char cp = 0;
char nRecv = 0;
char* pBuf = UART_Recv(&nRecv);
if(nRecv ‹ 12)
{
//DiagOut(4); // нет номера
//continue;
}
// else DiagOut(nRecv+0x80);
//unsigned char cp = 0;
while(pBuf[cp])
{
if(pBuf[cp]=='O')
{
//DiagOut(4);
cp = 240; // признак ошибки
break;
}
if(pBuf[cp]=='B') // +CPBR
{
//DiagOut(0x81);
break;
}
cp++;
}
if(cp › 12

//continue; // ошибка
while(pBuf[cp])
{
if(pBuf[cp]=='\"' && pBuf[cp+1]=='+'/* && pBuf[cp+13]=='\"'*/)
{
// нашли "+
szSMSRecipientNumber[0] = pBuf[cp+1+2]; // 8
szSMSRecipientNumber[1] = pBuf[cp+1+1]; // 7
szSMSRecipientNumber[2] = pBuf[cp+1+4]; // 2
szSMSRecipientNumber[3] = pBuf[cp+1+3]; // 1
szSMSRecipientNumber[4] = pBuf[cp+1+6]; // 0
szSMSRecipientNumber[5] = pBuf[cp+1+5]; // 9
szSMSRecipientNumber[6] = pBuf[cp+1+8]; // 4
szSMSRecipientNumber[7] = pBuf[cp+1+7]; // 3
szSMSRecipientNumber[8] = pBuf[cp+1+10]; // 6
szSMSRecipientNumber[9] = pBuf[cp+1+9]; // 5
szSMSRecipientNumber[10] = 0x46; // F
szSMSRecipientNumber[11] = pBuf[cp+1+11]; // 7
szSMSRecipientNumber[12] = 0; // EOS
//DiagOut(0x82);
cp = 241;
break;
}
cp++;
}
}
//================================================== =====================
while (1)
{
// Place your code here
};
}
ошибка вылетает вот здесь char* pBuf = UART_Recv(&nRecv);
non-address/-constant initializer
что ему надо ?