stm32AT指令程序


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(“
<<<>>>
“);
    PUT(“init usart finished 
“);
    Init_TIM2();
    PUT(“timer2 init finished 
“);
    init_gprs_mode();
    PUT(“init gprs mode reg finished 
“);

    if(is_gprs_mode_status_ok())
    {
        PUT(“GSM

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        886  2012-05-18 17:56  STM32程序代码.gitCOMMIT_EDITMSG

     文件        157  2012-05-18 17:56  STM32程序代码.gitconfig

     文件         73  2012-05-18 17:56  STM32程序代码.gitdescription

     文件         23  2012-05-18 17:56  STM32程序代码.gitHEAD

     文件        452  2012-05-18 17:55  STM32程序代码.githooksapplypatch-msg.sample

     文件        896  2012-05-18 17:55  STM32程序代码.githookscommit-msg.sample

     文件        160  2012-05-18 17:55  STM32程序代码.githookspost-commit.sample

     文件        552  2012-05-18 17:55  STM32程序代码.githookspost-receive.sample

     文件        189  2012-05-18 17:55  STM32程序代码.githookspost-update.sample

     文件        398  2012-05-18 17:55  STM32程序代码.githookspre-applypatch.sample

     文件       1578  2012-05-18 17:55  STM32程序代码.githookspre-commit.sample

     文件       4951  2012-05-18 17:55  STM32程序代码.githookspre-rebase.sample

     文件       1239  2012-05-18 17:55  STM32程序代码.githooksprepare-commit-msg.sample

     文件       3611  2012-05-18 17:55  STM32程序代码.githooksupdate.sample

     文件        744  2012-05-18 17:56  STM32程序代码.gitindex

     文件        240  2012-05-18 17:55  STM32程序代码.gitinfoexclude

     文件        159  2012-05-18 17:55  STM32程序代码.gitlogsHEAD

     文件        159  2012-05-18 17:55  STM32程序代码.gitlogs
efsheadsmaster

     文件        272  2012-05-18 17:55  STM32程序代码.gitobjectsef843f11d1e9318291c3a3c15314f45b4ac512a

     文件       8534  2012-05-18 17:55  STM32程序代码.gitobjects3e2ed04b5d06d028d26ecace97f343a291d1b4b1

     文件        955  2012-05-18 17:55  STM32程序代码.gitobjects487549a09b3dd6240610a6b9a141959113dff5ec

     文件        125  2012-05-18 17:55  STM32程序代码.gitobjects667ec98ada90ca056f2ce0ae64069b65345b7fbb

     文件         76  2012-05-18 17:55  STM32程序代码.gitobjects8f645523cd3a6b426ef5bbf7396fe71848398202

     文件         80  2012-05-18 17:55  STM32程序代码.gitobjects9bcbddb306c3f2536221de288e02183653cee8ce

     文件         77  2012-05-18 17:55  STM32程序代码.gitobjects9d1c7b7f70e98b892efda965a56eed791de9702e

     文件        763  2012-05-18 17:55  STM32程序代码.gitobjects7fa6b51bf2c317c9eee25e2a34bb385609cbb9b

     文件        175  2012-05-18 17:55  STM32程序代码.gitobjectsc7403f951d57a0bac98c869592f82619d0c63e03

     文件       1641  2012-05-18 17:55  STM32程序代码.gitobjectsd2dc57f179b5d4af44178d5aeb58f95fb1c7b5b5

     文件       2610  2012-05-18 17:56  STM32程序代码.gitobjectsddea781052b531f1b5e3add300e3d925c54e79d7

     文件         78  2012-05-18 17:56  STM32程序代码.gitobjectse0600512acfd0ab90a86e59910170cda9aa721ec

............此处省略341个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)