You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.7 KiB

1 year ago
//////////////////////////////////////////////////////////////////////////
/// COPYRIGHT NOTICE
/// Copyright (c) 2023 CCSENS
/// All rights reserved.
///
/// @file main.c
/// @brief main app
///
///(本文件实现的功能的详述)
///
/// @version 1.1 CCsens technology
/// @author CC
/// @date 20150102
///
///
/// 修订说明:最初版本
/// Modified by:
/// Modified date:
/// Version:
/// Descriptions:
//////////////////////////////////////////////////////////////////////////
/*****************************************************************************
update by cc @201700110
.
clib/clib.c:
(线),
(lcd等固屏输出的)使
void Lc_print(void (*L0pf_send_uc)(char ww), char *dat,...)
-----------------------------------------------------------------------------------------
uartcom/Uprotocol2app
uart口来对应
typedef struct _ts_lcm_pro_; ? LCM的协议------------
L3_UARTcom0_exp_protocol
-----------------------------------------------------------------------------------------
uartcom/urec2protocol:
struct _s_uart_rec_ ()------struct _s_uart_rec_
void L1_uart_2buf(struct _s_uart_rec_ *p)
--------------------------------------------------------------------------------------------
msp/uartx.c cpu相关
L0_uart3_Init
uart3_IRQHandler
L0_Usend_uc------UserDef
-----------------------------------------------------------------------------------------
********************************************************************************/
#ifndef _uart3_H
#define _uart3_H
#include "bsp_config.h"
//#include "tpc_modbus.h"
#include "msp_uartN.h"
//#define S4SM0 BITN7
#define D_UART3_ES_INT(x) (x) ? (BITN_1(IE2,ES3)) : (BITN_0(IE2,ES3))
//#define D_uart3_ES_INT_CLOSE() BITN_0(IE2,ES3)
//#define D_uart3_ES_INT_OPEN() BITN_1(IE2,ES3)
#define L0_uart3_IntRI() (S3CON & S3RI)//BITN_G(SCON,U0RI)
#define L0_uart3_IntTI() (S3CON & S3TI)//BITN_G(SCON,U0TI)
#define L0_uart3_IntRIClear(); BITN_0(S3CON,S3RI)
#define L0_uart3_IntTIClear(); BITN_0(S3CON,S3TI)
#define L0_uart3_set(x) S3BUF = (x);
#define L0_uart3_get() (S3BUF)
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
void L0_uart3_buf_init(void);
void L0_uart3_sendArray(U8 * buf, U16 len);
#define L0_uart3_uc(X) L0_uartN_uc(D_UART3,X)
#define L0_uart3_us(X) L0_uartN_us(D_UART3,X)
#define L0_uart3_ul(X) L0_uartN_ul(D_UART3,X)
#define L0_uart3_0d0a() L0_uartN_0d0a(D_UART3)
#define L0_uart3_uchex(X) L0_uartN_uchex(D_UART3,X)
#define L0_uart3_ushex(X) L0_uartN_ushex(D_UART3,X)
#define L0_uart3_ulhex(X) L0_uartN_ulhex(D_UART3,X)
#define L0_uart3_sendstr(buf) L0_uartN_sendstr(D_UART3,buf)
#define L1_uart3_sendArray(buf,len) L0_uartN_sendArray(D_UART3,(buf),(len))
#define L1_uart3_sendArrayhex(buf,len) L0_uartN_uchexArray(D_UART3,(buf),(len))
extern void L2_uart3_overtime_callback(void);
#endif //#ifndef _uart3_H