⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uart_pc.c

📁 ARM_thumb 在embest 下的源码.可直接运行于embest 环境.
💻 C
字号:


/*
***********************************************************************

       Embest Info&Tech Co., Ltd.  All rights reserved.
                     www.embedinfo.com

***********************************************************************

---------------- file information -------------------------------------

file name: uart_pc.c
version  : v0
author   : peter pan / panqan@hotmail.com
                       panqian@embedinfo.com
begin    : 2006-02-10
finish   : 2006-02-10
define   : uart to pc test

notes    :

---------------- modify information -----------------------------------
version  :
modify   :
begin    :
finish   :
define   :
-----------------------------------------------------------------------
*/


// (--------------------- compiler condition --------------------------

/*
#ifdef  xxx
        #define  xxx
#endif
*/

// --------------------- compiler condition --------------------------)



/*-------------------------------------------------------------------*/
/*                       include files                               */
/*---------------------------------------------------------------- --*/

#include "..\..\..\com\lib_lpc\lib_lpc_uart\lib_lpc_uart.h"
#include "..\..\..\com\lib_22eb06\module_control\lib_22eb06_mc.h"

/*-------------------------------------------------------------------*/
/*                       local function declare                      */
/*-------------------------------------------------------------------*/

/*
void    xxx(xxx xxx, xxx xxx);
*/


/*-------------------------------------------------------------------*/
/*                       variable define                             */
/*-------------------------------------------------------------------*/

/*
INT32U      XXXXXX;
*/


     INT32U      g_spi_extend_data=module_c_all_module_off;



/*-------------------------------------------------------------------*/
/*                       extern function declare                     */
/*-------------------------------------------------------------------*/

/*--- define in XXX.c ---
extern  void    XXX();
*/


/*-------------------------------------------------------------------*/
/*                       extern variable declare                     */
/*-------------------------------------------------------------------*/

/*--- USED in XXX() ---
XXX SSS; // used inXXX()
*/



/*-------------------------------------------------------------------*/
/*                       function code                               */
/*-------------------------------------------------------------------*/


/**********************************************************************
* name  :    xxxxx
* func  :    xxxxx
* para  :    xxxx
* ret   :    xxxx

* glob  :    xxxx
* inc   :

* author:
* date  :

* modify:
* comment:
**********************************************************************/
/*void  xxx(xxx xxx)
      {
      }
*/



/**********************************************************************
* name  :    Main
* func  :    main fun
* para  :    none
* ret   :    none

* glob  :    xxxx
* inc   :

* author:
* date  :

* modify:
* comment:
**********************************************************************/
void Main(void)

     {
      INT32U i;
      INT8U char_lpc22eb06_in[128] = "LPC22EB06 INPUT: \n";
      INT8U char_lpc22eb06_out[128] = "LPC22EB06 OUTPUT: \n";
      INT8U char_temp_space[256];

      lpc_init_pll_manual();

      spi_extend_alloff();
      
      
      uart_init(uart_c0, 57600, wdl_8, spb_1, parity_g_dis,
                parity_s_00oddp, break_tr_dis, fifo_dis,
                uart0_int_data_dis_all);

      for(;;)
         {
          uart_send_char(uart_c0,'\n\n');
          uart_send_string(uart_c0, char_lpc22eb06_in);
          uart_get_string(uart_c0, char_temp_space);
          uart_send_string(uart_c0, char_lpc22eb06_out);
          uart_send_string(uart_c0, char_temp_space);
          uart_send_char(uart_c0,'\n');
         }
     }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -