2023-09-14 14:39:29 +03:00
|
|
|
|
/*
|
|
|
|
|
|
* frmmstr_run.c
|
|
|
|
|
|
*
|
|
|
|
|
|
* Created on: 14 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2023 <EFBFBD>.
|
|
|
|
|
|
* Author: seklyuts
|
|
|
|
|
|
*/
|
|
|
|
|
|
#include "f28x_project.h"
|
|
|
|
|
|
#include "init_perif.h"
|
2023-09-20 17:43:56 +03:00
|
|
|
|
#include "frm_uart.h"
|
2023-10-12 08:47:43 +03:00
|
|
|
|
#include "gpio_init.h"
|
2023-09-14 14:39:29 +03:00
|
|
|
|
|
|
|
|
|
|
volatile uint16_t counter=0 ;
|
|
|
|
|
|
volatile uint16_t counter1=0 ;
|
|
|
|
|
|
volatile uint16_t counter2=0 ;
|
2023-12-26 13:28:58 +03:00
|
|
|
|
volatile uint16_t Rele=0;
|
2023-09-14 14:39:29 +03:00
|
|
|
|
|
|
|
|
|
|
void frmmstr_run(void)
|
|
|
|
|
|
{
|
2024-02-15 15:47:57 +03:00
|
|
|
|
static uint16_t diod = 0;
|
2024-03-11 09:45:50 +03:00
|
|
|
|
if(FMSTRIsEnable()) {
|
2023-09-14 14:39:29 +03:00
|
|
|
|
if(counter < 100) counter++;
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
counter = 0;
|
|
|
|
|
|
if(counter1 < 100) counter1++;
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
counter1=0;
|
|
|
|
|
|
counter2++;
|
2024-03-11 09:45:50 +03:00
|
|
|
|
diod++;
|
|
|
|
|
|
if(diod > 7) diod = 0;
|
|
|
|
|
|
Gpio_rainbow(diod);
|
|
|
|
|
|
//if(diod) {Gpio7out(0); diod = 0;}
|
|
|
|
|
|
//else {Gpio7out(1); diod = 1;}
|
2023-09-14 14:39:29 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
FMSTR_Poll();
|
|
|
|
|
|
FMSTR_Recorder();
|
2024-03-11 09:45:50 +03:00
|
|
|
|
FMSTREnableClr();
|
2023-12-26 13:28:58 +03:00
|
|
|
|
Gpio95out(Rele);
|
2023-09-14 14:39:29 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|