LCD_Init();
LCD_Clear(0, 0, 240, 320, BACKGROUND);
while (1)
{
if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9) == 0 )
{
LCD_DispStr(10, 90, (uint8_t *)"kid is crying", WHITE);
sim900a_sms((char *)num,"kid is crying ");
}
}
这是 B9口IO 电平为0 时候 就通过GSM发送短信在手机上 |