1、【修改】porttimer.c文件中部分函数内容,解决Keil编译出错的问题

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink 2013-10-04 22:48:57 +08:00
parent 5de9d82e09
commit 1fdba29ff1
1 changed files with 6 additions and 3 deletions

View File

@ -73,10 +73,11 @@ BOOL xMBMasterPortTimersInit(USHORT usTimeOut50us)
void vMBMasterPortTimersT35Enable()
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
/* Set current timer mode,don't change it.*/
vMBMasterSetCurTimerMode(MB_TMODE_T35);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Prescaler = usPrescalerValue;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
@ -91,10 +92,11 @@ void vMBMasterPortTimersT35Enable()
void vMBMasterPortTimersConvertDelayEnable()
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
/* Set current timer mode,don't change it.*/
vMBMasterSetCurTimerMode(MB_TMODE_CONVERT_DELAY);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Prescaler = usPrescalerValue;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
@ -109,10 +111,11 @@ void vMBMasterPortTimersConvertDelayEnable()
void vMBMasterPortTimersRespondTimeoutEnable()
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
/* Set current timer mode,don't change it.*/
vMBMasterSetCurTimerMode(MB_TMODE_RESPOND_TIMEOUT);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Prescaler = usPrescalerValue;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;