标题:
关于stm32F103和stm32F4的俄罗斯方块代码
[打印本页]
作者:
1421263166
时间:
2018-12-28 09:54
标题:
关于stm32F103和stm32F4的俄罗斯方块代码
用stm32F103和stm32F4写俄罗斯方块代码有何不同
单片机源程序如下:
#include "stm32f10x.h"
#include "stm32_eval.h"
#include "key.h"
#include "app.h"
#include "printf.h"
#include "adc.h"
#include "lcd.h"
//#include "bmp.c"
#include "backimg.c"
#include "RussiaGame.h"
#define GPIO_LED GPIOF
#define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOF
extern __IO uint16_t ADCConvertedValue;
extern __IO int sys_count;
//extern u8 Image_Table[];
/** @addtogroup STM32F10x_StdPeriph_Examples
* @{
*/
GPIO_InitTypeDef GPIO_InitStructure;
/** @addtogroup EXTI_Example
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief Main program.
* @param None
* @retval None
*/
extern u8 dis_tab_now[19][9];
int main(void)
{
//int x=0,y=0;
SystemInit();
InitUsart1();
STM3210E_LCD_Init();
KeyInit();
LedInit();
RussiaGameInit();
Printf("\r\nSysterm Init.");
while (1)
{
SecondHandle();
KeyHandle();
ChicRusiaStatus();
}
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
#endif
/**
* @}
*/
/**
* @}
*/
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
复制代码
所有资料51hei提供下载:
21.俄罗斯方块.rar
(530.01 KB, 下载次数: 46)
2018-12-28 09:52 上传
点击文件名下载附件
俄罗斯方块
下载积分: 黑币 -5
作者:
admin
时间:
2018-12-28 16:05
补全原理图或者详细说明一下电路连接即可获得100+黑币
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1