Hi,
smsSend=adl_smsSend(smsSu,phonenumber,CmdCreate ,ADL_SMS_MODE_TEXT);
for this code i got error messsage of:
"passing arg 3 of ‘adl_smsSend’ makes pointer from integer without a cast [Conflicting names][applic.c] "
.
What does this error mean?
this is our original code
ascii phonenumber[20]="+6594868899";
ascii SmsTel[20]="+6581507582";
ascii SmsTimeorLength[20]="1000";
ascii SmsText[20]="hi";
ascii smsSu,CmdSu,CmdCreate;
ascii u;
u32 smsSend;
s16 smsUn,CmdUn;
bool SMS_TELE_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
return TRUE;
}
void SMS_TELE_ctrl_Handler ( u8 Event, u16 Nb )
{
switch ( Event )
{
case ADL_SMS_EVENT_SENDING_OK :
TRACE (( 1, "Report OK" ));
break;
case ADL_SMS_EVENT_SENDING_ERROR :
TRACE (( 1, "Report sending error %d", Nb ));
adl_atSendResponse ( ADL_AT_UNS, "\r\nFailed...\r\n" );
if ( Nb == 512 )
{
TRACE (( 1, "Retry later..." ));
}
break;
}
}
ascii ADC_Response_Handler (adl_atResponse_t *paras)
{
//CmdCreate=adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ),(adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);
return TRUE;
}
void tele_tmrRetryHandler ( u8 ID )
{
CmdCreate=adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ) , (adl_atRspHandler_t)ADC_Response_Handler, "+ADC:", NULL);
smsSu=adl_smsSubscribe( SMS_TELE_Handler, SMS_TELE_ctrl_Handler, ADL_SMS_MODE_TEXT );
smsSend=adl_smsSend(smsSu,phonenumber,CmdCreate ,ADL_SMS_MODE_TEXT);
smsUn=adl_smsUnsubscribe(smsSu);
TRACE ((1, " Send Command: %d ", CmdCreate));
TRACE ((1, " Send SMS: %d ", smsSu));
TRACE ((1, " Send SMS: %d ", smsSend));
TRACE ((1, " Send SMS: %d ", smsUn));
}
void adl_main ( adl_InitType_e InitType )
{
adl_tmrSubscribe ( FALSE, 200, ADL_TMR_TYPE_100MS, tele_tmrRetryHandler );
}
best regards ,
Thia