matlab_23550/Inu/Src2/main/pwm_test_lines.c

37 lines
855 B
C
Raw Normal View History

#include <281xEvTimersInit.h>
#include <project_setup.h>
#include <PWMTMSHandle.h>
#include "DSP281x_Device.h"
#include "MemoryFunctions.h"
#include "Spartan2E_Adr.h"
#include "x_wdog.h"
#include <edrk_main.h>
unsigned int cmd_pwm_test_lines = 0xffff;
void pwm_test_lines_start(void)
{
cmd_pwm_test_lines = 0xffff;
// i_WriteMemory(ADR_TK_MASK_1, 0);
i_WriteMemory(ADR_PWM_DIRECT2,0xffff);
// i_WriteMemory(ADR_PWM_DRIVE_MODE, 3); // on direct tk lines
// i_WriteMemory(ADR_PWM_DIRECT2,0xffff);
i_WriteMemory(ADR_TK_MASK_1, 0x0); //Turn on additional 16 tk lines
}
void pwm_test_lines_stop(void)
{
cmd_pwm_test_lines = 0xffff;
i_WriteMemory(ADR_TK_MASK_1, 0xffff); //Turn off additional 16 tk lines
i_WriteMemory(ADR_PWM_DIRECT2,0xffff);
// i_WriteMemory(ADR_PWM_DRIVE_MODE, 0); // off direct tk lines
}