79 lines
1.4 KiB
C
79 lines
1.4 KiB
C
//###########################################################################
|
|
//
|
|
// FILE: epwm_test.c
|
|
//
|
|
|
|
//
|
|
//
|
|
//###########################################################################
|
|
//
|
|
|
|
//###########################################################################
|
|
|
|
//
|
|
// Included Files
|
|
//
|
|
#include "f28x_project.h"
|
|
#include "init_perif.h"
|
|
#include"frm_uart.h"
|
|
#include "spi_init.h"
|
|
#include "BL25CM1A.h"
|
|
#include "GD25Q16ETIGR.h"
|
|
//
|
|
// Main
|
|
//
|
|
volatile uint16_t test=0x1234;
|
|
volatile uint16_t test1=0x6789;
|
|
volatile uint16_t counter=0 ;
|
|
volatile uint16_t counter1=0 ;
|
|
volatile uint16_t counter2=0 ;
|
|
|
|
|
|
uint16_t sendNow = 0;
|
|
|
|
|
|
void main(void)
|
|
{
|
|
|
|
InitPerif();
|
|
FRMUartInit();
|
|
// GD25Q16ETIGR_en();
|
|
// Bl25cm1a_en();
|
|
//
|
|
// IDLE loop. Just sit and loop forever (optional):
|
|
//
|
|
for(;;)
|
|
{
|
|
asm (" NOP");
|
|
|
|
// if(sendNow)
|
|
// {
|
|
// Bl25cm1a_write();
|
|
// GD25Q16ETIGR_write();
|
|
// sendNow = 0;
|
|
// }
|
|
|
|
if(FMSTR_is_enable()) {
|
|
if(counter < 100) counter++;
|
|
else
|
|
{
|
|
counter = 0;
|
|
if(counter1 < 100) counter1++;
|
|
else
|
|
{
|
|
counter1=0;
|
|
counter2++;
|
|
}
|
|
}
|
|
FMSTR_Poll();
|
|
FMSTR_Recorder();
|
|
FMSTR_enable_clr();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// End of file
|
|
//
|