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.

101 lines
4.0 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/c_lib.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_uart1_Init
uart1_IRQHandler
L0_Usend_uc------UserDef
-----------------------------------------------------------------------------------------
********************************************************************************/
#ifndef _uart1_H
#define _uart1_H
#include "bsp_config.h"
//#include "tpc_modbus.h"
#include "msp_uartN.h"
//#include "msp_time2.h"
//#include "../tpc/tpc_x.h"
#define D_UART1_RS_EN(x) REN = (x)
#define D_uart1_ES_INT(x) ES = (x)
#define L0_uart1_IntRI() (RI)//BITN_G(SCON,U0RI)
#define L0_uart1_IntTI() (TI)//BITN_G(SCON,U0TI)
#define L0_uart1_IntRIClear(); RI = 0;//BITN_0(SCON,U0RI)
#define L0_uart1_IntTIClear(); TI = 0;//BITN_0(SCON,U0TI)
#define L0_uart1_set(x) (SBUF = (x))
#define L0_uart1_get() (SBUF)
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
extern void L1_uart1_open(void);
extern void L0_uart1_buf_init(void);
extern void L0_uart1_Array(U8 * buf, U16 len);
#define L1_uart1_uc(X) L0_uartN_uc(D_UART1,X)
#define L0_uart1_us(X) L0_uartN_us(D_UART1,X)
#define L0_uart1_ul(X) L0_uartN_ul(D_UART1,X)
#define L0_uart1_0d0a() L0_uartN_0d0a(0)
#define L0_uart1_uchex(X) L0_uartN_uchex(D_UART1,X)
#define L0_uart1_ushex(X) L0_uartN_ushex(D_UART1,X)
#define L0_uart1_ulhex(X) L0_uartN_ulhex(D_UART1,X)
#define L0_uart1_str(buf) L0_uartN_str(D_UART1,buf)
#define L1_uart1_Array(buf,len) L0_uartN_Array(D_UART1,(buf),(len))
#define L1_uart1_Arrayhex(buf,len) L0_uartN_uchexArray(D_UART1,(buf),(len))
///void L2_callback_uart1_free(void);
///void L2_callback_uart1_free(Ts_uart_rev_ *p);
#define L1_uart1_isFree(); /////L0_timer2_start();
#define L1_uart1_isFree_over(); /////L0_timer2_stop();
#define L1_uart1_timer_isFree_init(); /////L0_timer2_init();L0_timer2_stop();\
/////L0_timer2_int_on();\
/////ts_timer2.callback = L2_callback_uart1_free;ts_timer2.p = &s_uart1_rec;
extern void L2_uart1_overtime_callback(void);
#endif //#ifndef _uart1_H