MotorControlModuleSDFM_TMS3.../Projects/epwm_test/src/frmmstr_run.c

43 lines
1005 B
C

/*
* frmmstr_run.c
*
* Created on: 14 ñåíò. 2023 ã.
* Author: seklyuts
*/
#include "f28x_project.h"
#include "init_perif.h"
#include "frm_uart.h"
#include "gpio_init.h"
volatile uint16_t counter=0 ;
volatile uint16_t counter1=0 ;
volatile uint16_t counter2=0 ;
volatile uint16_t Rele=0;
void frmmstr_run(void)
{
static uint16_t diod = 0;
if(FMSTRIsEnable()) {
if(counter < 100) counter++;
else
{
counter = 0;
if(counter1 < 100) counter1++;
else
{
counter1=0;
counter2++;
diod++;
if(diod > 7) diod = 0;
Gpio_rainbow(diod);
//if(diod) {Gpio7out(0); diod = 0;}
//else {Gpio7out(1); diod = 1;}
}
}
FMSTR_Poll();
FMSTR_Recorder();
FMSTREnableClr();
Gpio95out(Rele);
}
}