改了个名字,为什么总是fail了,没看出错误呀
if( Key_Scan(KEY2_GPIO_PORT,KEY2_GPIO_PIN) == KEY_ON )
{
get_tick_count(&count);
srand(count);
sprintf(spp_ca_name,"BT_HAHA%d\r\n",(uint8_t)rand());
sprintf(spp_ca_nameCMD,"ZLS_HAHA_%s\r\n",spp_ca_name);
if(SPP_CA_Send_CMD(spp_ca_nameCMD,1) == 0)
{
SPP_CA_INFO("xiegai%s",spp_ca_name);
sprintf(disp_buff,"Device name: %s",spp_ca_name);
LCD_SetColors(RED,BLACK);
ILI9341_Clear(0,60,240,20);
ILI9341_DispString_EN( 5, 60,disp_buff );
}
else
{
SPP_CA_ERROR("shibai");
LCD_SetColors(BLUE,BLACK);
ILI9341_Clear(0,60,240,20);
ILI9341_DispString_EN( 5, 60,"Rename fail!" );
}
} |