资源简介
GPRS通信模块和STM32,使用串口相连实现远程通信。

代码片段和文件信息
/**
******************************************************************************
* @file USART/Printf/main.c
* @author MCD Application Team
* @version V3.3.0
* @date 04/16/2010
* @brief Main program body
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* © C6OPYRIGHT 2010 STMicroelectronics
*/
/* Includes ------------------------------------------------------------------*/
#include “stm32f10x.h“
#include “stm32_eval.h“
#include
#include
#include “USART/usart.h“
#include “CHIPSET/chipset.h“
#include “TIMERS/times.h“
#include “USART/usart.h“
#include “GPRS/gprs.h“
#ifdef __GNUC__
/* With GCC/RAISONANCE small printf (option LD linker->Libraries->Small printf
set to ‘Yes‘) calls __io_putchar() */
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch FILE *f)
#endif /* __GNUC__ */
/**
* @brief Retargets the C library printf function to the USART.
* @param None
* @retval None
*/
PUTCHAR_PROTOTYPE
{
/* Place your implementation of fputc here */
/* e.g. write a character to the USART */
USART_SendData(USART1 (uint8_t) ch);
/* Loop until the end of transmission */
while (USART_GetFlagStatus(USART1 USART_FLAG_TC) == RESET)
{
}
return ch;
}
int err = 0;
unsigned char is_gps_fix_position = 0;
char *p = NULL;
/*-----------------------------------------------------------------------
创思通信 http://tpytongxin.taobao.com/
编写日期 :2012-3-10
最后修改日期 :2012-3-13
-----------------------------------------------------------------------*/
void stm32_Init(void)
{
RCC_Configuration();
NVIC_Configuration();
GPIO_Configuration();
USART_Configuration();
}
/*-----------------------------------------------------------------------
创思通信 http://tpytongxin.taobao.com/
编写日期 :2012-3-10
最后修改日期 :2012-3-13
-----------------------------------------------------------------------*/
int main(void)
{
clean_gps_flag();
clear_buf_uart3();
clean_time2_flags();
clean_tp_flag();
stm32_Init();
printf(“\r\n<<<>>>\r\n“);
PUT(“init usart finished \r\n“);
Init_TIM2();
PUT(“timer2 init finished \r\n“);
init_gprs_mode();
PUT(“init gprs mode reg finished \r\n“);
if(is_gprs_mode_status_ok())
{
PUT(“GSM
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 886 2012-05-18 17:56 STM32程序代码\.git\COMMIT_EDITMSG
文件 157 2012-05-18 17:56 STM32程序代码\.git\config
文件 73 2012-05-18 17:56 STM32程序代码\.git\desc
文件 23 2012-05-18 17:56 STM32程序代码\.git\HEAD
文件 452 2012-05-18 17:55 STM32程序代码\.git\hooks\applypatch-msg.sample
文件 896 2012-05-18 17:55 STM32程序代码\.git\hooks\commit-msg.sample
文件 160 2012-05-18 17:55 STM32程序代码\.git\hooks\post-commit.sample
文件 552 2012-05-18 17:55 STM32程序代码\.git\hooks\post-receive.sample
文件 189 2012-05-18 17:55 STM32程序代码\.git\hooks\post-update.sample
文件 398 2012-05-18 17:55 STM32程序代码\.git\hooks\pre-applypatch.sample
文件 1578 2012-05-18 17:55 STM32程序代码\.git\hooks\pre-commit.sample
文件 4951 2012-05-18 17:55 STM32程序代码\.git\hooks\pre-reba
文件 1239 2012-05-18 17:55 STM32程序代码\.git\hooks\prepare-commit-msg.sample
文件 3611 2012-05-18 17:55 STM32程序代码\.git\hooks\update.sample
文件 744 2012-05-18 17:56 STM32程序代码\.git\index
文件 240 2012-05-18 17:55 STM32程序代码\.git\info\exclude
文件 159 2012-05-18 17:55 STM32程序代码\.git\logs\HEAD
文件 159 2012-05-18 17:55 STM32程序代码\.git\logs\refs\heads\master
文件 272 2012-05-18 17:55 STM32程序代码\.git\ob
文件 8534 2012-05-18 17:55 STM32程序代码\.git\ob
文件 955 2012-05-18 17:55 STM32程序代码\.git\ob
文件 125 2012-05-18 17:55 STM32程序代码\.git\ob
文件 76 2012-05-18 17:55 STM32程序代码\.git\ob
文件 80 2012-05-18 17:55 STM32程序代码\.git\ob
文件 77 2012-05-18 17:55 STM32程序代码\.git\ob
文件 763 2012-05-18 17:55 STM32程序代码\.git\ob
文件 175 2012-05-18 17:55 STM32程序代码\.git\ob
文件 1641 2012-05-18 17:55 STM32程序代码\.git\ob
文件 2610 2012-05-18 17:56 STM32程序代码\.git\ob
文件 78 2012-05-18 17:56 STM32程序代码\.git\ob
............此处省略341个文件信息
- 上一篇:月光宝盒Z6便携无损播放器固件
- 下一篇:基于组态王设计自动洗车系统
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- stm32f030 IAP Demo(原创)
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- SIM908 SDIO FSMC STM32 FIFO
- STM32F103 CC2500完整驱动(模拟SPI)
- AD7606采集程序
- stm32 用SPI 方式读写 SDHC
- stm32通过DMA方式采集ADC数据
- 意法半导体STM全系列微控制器STM32ST
- 基于STM32芯片的SX1278 驱动 LORA.rar
评论
共有 条评论