Browse Source

修改9600

dev
mr.zhangsan 1 year ago
parent
commit
b23718dca3
  1. 54
      keilp/stcTTSS2_W5.uvprojx
  2. 57
      source/msp/uart/msp_uart1.c

54
keilp/stcTTSS2_W5.uvprojx

@ -10,7 +10,6 @@
<TargetName>STC8H3K64S2</TargetName> <TargetName>STC8H3K64S2</TargetName>
<ToolsetNumber>0x0</ToolsetNumber> <ToolsetNumber>0x0</ToolsetNumber>
<ToolsetName>MCS-51</ToolsetName> <ToolsetName>MCS-51</ToolsetName>
<uAC6>0</uAC6>
<TargetOption> <TargetOption>
<TargetCommonOption> <TargetCommonOption>
<Device>STC8H3K64S4 Series</Device> <Device>STC8H3K64S4 Series</Device>
@ -124,6 +123,47 @@
<HexOffset>0</HexOffset> <HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen> <Oh166RecLen>16</Oh166RecLen>
</OPTHX> </OPTHX>
<Simulator>
<UseSimulator>1</UseSimulator>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>1</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
<RestoreSysVw>1</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>0</UseTarget>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>0</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>0</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<RestoreTracepoints>1</RestoreTracepoints>
<RestoreSysVw>1</RestoreSysVw>
</Target>
<RunDebugAfterBuild>0</RunDebugAfterBuild>
<TargetSelection>-1</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
</SimDlls>
<TargetDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
<Driver></Driver>
</TargetDlls>
</DebugOption> </DebugOption>
<Utilities> <Utilities>
<Flash1> <Flash1>
@ -177,14 +217,12 @@
<Mx51P>0</Mx51P> <Mx51P>0</Mx51P>
<hadXRAM2>0</hadXRAM2> <hadXRAM2>0</hadXRAM2>
<uocXram2>0</uocXram2> <uocXram2>0</uocXram2>
<hadXRAM3>0</hadXRAM3>
<ModC2>0</ModC2> <ModC2>0</ModC2>
<ModH2>0</ModH2> <ModH2>0</ModH2>
<Mdu_R515>0</Mdu_R515> <Mdu_R515>0</Mdu_R515>
<Mdu_F120>0</Mdu_F120> <Mdu_F120>0</Mdu_F120>
<Psoc>0</Psoc> <Psoc>0</Psoc>
<hadIROM2>0</hadIROM2> <hadIROM2>0</hadIROM2>
<hadIROM3>0</hadIROM3>
<ModSmx2>0</ModSmx2> <ModSmx2>0</ModSmx2>
<cBanks>0</cBanks> <cBanks>0</cBanks>
<xBanks>0</xBanks> <xBanks>0</xBanks>
@ -254,16 +292,6 @@
<StartAddress>0x0</StartAddress> <StartAddress>0x0</StartAddress>
<Size>0x0</Size> <Size>0x0</Size>
</IROM512> </IROM512>
<XRA513>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRA513>
<IROM513>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</IROM513>
</OnChipMemories> </OnChipMemories>
</Target51Misc> </Target51Misc>
<C51> <C51>

57
source/msp/uart/msp_uart1.c

@ -1,60 +1,3 @@
//////////////////////////////////////////////////////////////////////////
/// 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:
// 20160413 CC-ACC-VH02
// 连接至 J22 RXD0 TXD0
//P5_DIR &= ~BITN1; //p5.1输出TXD
//P5_DIR |= BITN0; //p5.0输入RXD
//P5_SEL0 &= ~(BITN0 +BITN1); //设置P5.0 P5.1为uart1 RXD TXD
//P5_SEL1 |= BITN0 +BITN1;
/*****************************************************************************
update by cc @201700110
.
c_lib/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
-----------------------------------------------------------------------------------------
********************************************************************************/
#include "msp_uart1.h" #include "msp_uart1.h"
///#include "msp_time2.h" ///#include "msp_time2.h"
#include "c_crc.h" #include "c_crc.h"

Loading…
Cancel
Save