資源簡(jiǎn)介
GPRS通信模塊和STM32,使用串口相連實(shí)現(xiàn)遠(yuǎn)程通信。

代碼片段和文件信息
/**
??******************************************************************************
??*?@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;
/*-----------------------------------------------------------------------
創(chuàng)思通信?http://tpytongxin.taobao.com/
編寫日期??????????:2012-3-10
最后修改日期??????:2012-3-13
-----------------------------------------------------------------------*/
void?stm32_Init(void)
{
????RCC_Configuration();
????NVIC_Configuration();
????GPIO_Configuration();
????USART_Configuration();
}
/*-----------------------------------------------------------------------
創(chuàng)思通信?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
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????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個(gè)文件信息
評(píng)論
共有 條評(píng)論