资源简介
IAR能编译通过运行的完整的STM32平台的GPS定位追踪器源码,原理图等。
代码片段和文件信息
#include “stm32f10x_lib.h“
#include “string.h“
#include “my32x.h“
#include “ini.h“
#include “myusart.h“
#include “mym10.h“
Gps_Info_TypeDef Gps_Info;
vu8 GPSmode_Worke_Flag = FALSE;
vu8 GSMmode_Worke_Flag = FALSE;
vu8 GPSmode_Sleep_Count = 0;
vu8 GSMmode_Sleep_Count = 0;
vu8 Timer_10ms_Count = 0;
vu8 Timer_1Sec_Flag = FALSE;
vu16 SysTick_Count = 0;
vu8 LED1_Flash_Flag = FALSE;
vu8 LED1_Flash_Count = 0;
void main(void)
{
#ifdef DEBUG
debug();
#endif
Init_Clock();
System_Init();
EXTI_Configuration();
NVIC_Configuration();
NVIC_RESETPRIMASK();//打开总中断
GPS_Pow_OFF;
LED1_ON;
LED2_OFF;
while(1)
{
//GPS
if(GPSmode_Worke_Flag)
{
GPS_Pow_ON;
myUsartGPS_GPIO_Cmd(ENABLE);
if(myUsartGPS.Event_Flag)
{
myUsartGPS.Event_Flag = FALSE;
myUsartGPS_Event();
}
}
else
{
GPS_Pow_OFF;
myUsartGPS_GPIO_Cmd(DISABLE);
GPSmode_Sleep_Count = 0;
}
//SMS
if(GSMmode_Worke_Flag)
{
if(Phone_Num_Flag && SMS_Buf_Flag)
{
Phone_Num_Flag = FALSE;
SMS_Buf_Flag = FALSE;
SMS_SendGSM();
}
Disposal_ReceiveGSM();
}
//1s Event
if(Timer_1Sec_Flag)
{
Timer_1Sec_Flag = FALSE;
M10_LOOP();
if(GPSmode_Worke_Flag)
{
if(GPSmode_Sleep_Count++ > 90)
{
GPSmode_Worke_Flag = FALSE;
memset((u8 *)Device_Info.SMS_Buf0128);
strncpy((char *)Device_Info.SMS_Buf(const char *)“No GPS Signal.\0“14);
SMS_Buf_Flag = TRUE;
}
}
if((GPSmode_Worke_Flag==FALSE) && GSMmode_Worke_Flag && (SendSMS_Flag==FALSE))
{
if(GSMmode_Sleep_Count++ > 90) // Mode Sleep
{
GSMmode_Sleep_Count = 0;
DTR_Hi;
Init_Gpio_Stop();
PWR_EnterSTOPMode(PWR_Regulator_LowPowerPWR_STOPEntry_WFI);
myUsartGSM_GPIO_Cmd(ENABLE);
Init_Gpio();
while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
DTR_Lo;
}
}
else
{
GSMmode_Sleep_Count = 0;
}
if(Read_ExtPow == Bit_SET) LED2_ON; else LED2_OFF;
}
}
}
#ifdef DEBUG
/*******************************************************************************
* Function Name : assert_failed
* Description : Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* Input : - file: pointer to the source file name
* - line: assert_param error line source number
* Output : None
* Return : None
*******************************************************************************/
void assert_failed(u8* file u32 line)
{
/* User can add his own implementation to report the file name and line number
ex: printf(“
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-04-02 23:57 Tracker_V2.03\
目录 0 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\
目录 0 2011-04-05 16:55 Tracker_V2.03\app程序V2.03\app\
文件 1851 2011-04-02 13:56 Tracker_V2.03\app程序V2.03\app\ini.h
文件 15409 2011-04-04 21:16 Tracker_V2.03\app程序V2.03\app\main.c
文件 3490 2011-04-01 22:07 Tracker_V2.03\app程序V2.03\app\my32x.c
文件 445 2011-04-02 22:48 Tracker_V2.03\app程序V2.03\app\my32x.h
文件 6162 2011-04-02 18:09 Tracker_V2.03\app程序V2.03\app\mym10.c
文件 1469 2011-04-02 16:07 Tracker_V2.03\app程序V2.03\app\mym10.h
文件 14623 2011-04-02 22:21 Tracker_V2.03\app程序V2.03\app\myusart.c
文件 3925 2011-04-02 22:47 Tracker_V2.03\app程序V2.03\app\myusart.h
目录 0 2011-04-04 21:18 Tracker_V2.03\app程序V2.03\Debug\
目录 0 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Exe\
文件 29187 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Exe\Gzq.hex
文件 182448 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Exe\Gzq.out
文件 10063 2011-04-05 16:32 Tracker_V2.03\app程序V2.03\Debug\Exe\Gzq.sim
文件 10063 2011-04-05 16:32 Tracker_V2.03\app程序V2.03\Debug\Exe\Gzq.sim._1
目录 0 2011-04-04 21:18 Tracker_V2.03\app程序V2.03\Debug\List\
目录 0 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Obj\
文件 2264 2011-04-05 16:55 Tracker_V2.03\app程序V2.03\Debug\Obj\cortexm3_macro.o
文件 23 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\Gzq.pbd
文件 23 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\Gzq.pbd.browse
文件 46738 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Obj\main.o
文件 38 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\main.pbi
文件 10448 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\main.pbi.cout
文件 19382 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Obj\my32x.o
文件 38 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\my32x.pbi
文件 10449 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\my32x.pbi.cout
文件 37036 2016-03-13 19:03 Tracker_V2.03\app程序V2.03\Debug\Obj\mym10.o
文件 38 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\mym10.pbi
文件 10449 2016-03-13 18:30 Tracker_V2.03\app程序V2.03\Debug\Obj\mym10.pbi.cout
............此处省略122个文件信息
相关资源
- 基于战舰V3的篮球计分器
- STM32F103mini-MLX90614工程文件
- 基于stm32的智能垃圾桶.zip
- STM32串口DMA方式接收不定长字符串.r
- SW-420常闭型震动传感器STM32源码
- HC-SR04超声波测距模块STM32源码
- 基于stm32的无线数据传输
- stm32 8266 局域网 控制灯的开关
- stm32f103x双串口间相互通讯基础版
- 利用地表观测的GPS/InSar形变资料反演
- zw_STM32F107参考手册中文版.zip
- STM32对接机智云
- 串口与蓝牙串口stm32f103C8T6通用系列
- 2016年电设省赛题目和资料.rar
- 电机驱动程序基于STM32F1
- 基于STM32F1循迹小车源码
- 基于STM32F1全向轮小车控制代码
- 基于STM32F4控制步进电机代码
- STM32 PMSM FOC SDK 4.3 Getting Started
- STM32电梯.7z
- 基于stm32f4zgt6超声波模块测距.rar
- 基于STM32F4、VGUS的电子称制作
- MLX90614(GY906)___STM32F407ZGT6
- 基于stm32f103的正弦波峰峰值.zip
- STM32F103OLED显示菜单实验
- 基于stm32单片机的水质监测
- ps2手柄控制智能车
- 基于STM32F103C8T6超声波测距源码及接线
- STM32F103+W5500做的web服务
- 蓝牙下位机stm32程序
评论
共有 条评论