#include "common.h"
#include "systick.h"
#include "bme.h"
#include "gpio.h"
#include "sysinit.h"
#include "start.h"
/***********************************************
#define LD0_Off GPIOB_OutPut1(7)
#define LD0_On GPIOB_OutPut0(7) //PE7
#define LD1_Off GPIOB_OutPut1(25)
#define LD1_On GPIOB_OutPut0(25) //PH1
#define LD2_Off GPIOB_OutPut1(26)
#define LD2_On GPIOB_OutPut0(26) //PH2
***************************************************/
#define LD0_Off PE_OutPut1(7)
#define LD0_On PE_OutPut0(7)
#define LD1_Off PH_OutPut1(1)
#define LD1_On PH_OutPut0(1)
#define LD2_Off PH_OutPut1(2)
#define LD2_On PH_OutPut0(2)
int main (void);
int main (void)
{
sysinit();
BME_BIT_SET(&GPIOB->PDDR,7); //set PE7 output
BME_BIT_SET(&GPIOB->PDDR,25); //set PH1 output
BME_BIT_SET(&GPIOB->PDDR,26); //set PH2 output
while(1)
{
delay_ms(1000);
LD0_Off;
delay_ms(1000);
LD1_Off;
delay_ms(1000);
LD2_Off;
delay_ms(1000);
LD2_On;
delay_ms(1000);
LD1_On;
delay_ms(1000);
LD0_On;
delay_ms(1000);
LD0_Off;
LD1_Off;
LD2_Off;
delay_ms(1000);
LD0_On;
LD1_On;
LD2_On;
}
}
/********************************************************************/
|