crt.c

来自「ucos平台下的can网络源代码」· C语言 代码 · 共 46 行

C
46
字号
/*
 * COPYRIGHT (c) Notifier 1993-2004, All Rights Reserved
 *
 * Description:  Network Interface CAN Interface Configuration
 *
 * History:
 *
 * Version  Author     Date         Modification
 * 1.0      阙昊        2006-07-25  建立  
 * 1.1      阙昊        2006-09-01  启动发送时禁止中断,否则可能导致PrefetchAbort
 * 1.2      阙昊        2006-09-11  结构修改,将状态机独立到lib_sm4crtmsg中
 * 1.3      阙昊        2006-10-20  小修改
 *
 */
 
 //==============================================================================
// 包含的头文件
//==============================================================================

// 标准库文件
#include <assert.h>

// 系统头文件
#include "system\sys_types.h"
 
#include "driver\drv_chn_lpc2xxx_can.h"
#include "driver\drv_chn_lpc2xxx_uart0.h"

#include "library\lib_shell.h"
#include "library\lib_log.h"
#include "library\lib_sm4crtmsg.h"

#include "crt.h" 

INT8U PutMsg2Crt
    (INT8U *a_msg,
    INT8U a_len)
{
    INT8U cnt;
    
    for( cnt = 0; cnt < a_len; cnt ++ )
    {
        while( OK != UART0_PushMsg(&a_msg[cnt]));
    }   
    return 0;
}

⌨️ 快捷键说明

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