• 大小: 3.63MB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2025-02-17
  • 语言: 其他
  • 标签: 跑马灯  

资源简介

基于stm32f103ve的程序——跑马灯实验,可以直接运行的好程序

代码片段和文件信息

/*----------------------------------------------------------------------------
 * Name:    GLCD.c
 * Purpose: MCBSTM32C low level Graphic LCD (320x240 pixels) functions
 * Version: V1.00
 * Note(s):
 *----------------------------------------------------------------------------
 * This file is part of the uVision/ARM development tools.
 * This software may only be used under the terms of a valid current
 * end user licence from KEIL for a compatible version of KEIL software
 * development tools. Nothing else gives you the right to use this software.
 *
 * This software is supplied “AS IS“ without warranties of any kind.
 *
 * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.
 *----------------------------------------------------------------------------
 * History:
 *          V1.00 Initial Version
 *----------------------------------------------------------------------------*/

#pragma diag_suppress=550

#include “stm32f10x.h“
#include “GLCD.h“
#include “font.h“

/* SPI_SR - bit definitions. */
#define RXNE    0x01
#define TXE     0x02
#define BSY     0x80


/*********************** Hardware specific configuration **********************/

/*------------------------- Speed dependant settings -------------------------*/

/* If processor works on high frequency delay has to be increased it can be 
   increased by factor 2^N by this constant                                   */
#define DELAY_2N    18

/*---------------------- Graphic LCD size definitions ------------------------*/

#define WIDTH       320                 /* Screen Width (in pixels)           */
#define HEIGHT      240                 /* Screen Hight (in pixels)           */
#define BPP         16                  /* Bits per pixel                     */
#define BYPP        ((BPP+7)/8)         /* Bytes per pixel                    */

/*--------------- Graphic LCD interface hardware definitions -----------------*/

#define SPI_START   (0x70)              /* Start byte for SPI transfer        */
#define SPI_RD      (0x01)              /* WR bit 1 within start              */
#define SPI_WR      (0x00)              /* WR bit 0 within start              */
#define SPI_DATA    (0x02)              /* RS bit 1 within start byte         */
#define SPI_INDEX   (0x00)              /* RS bit 0 within start byte         */
 
/*---------------------------- Global variables ------------------------------*/

/******************************************************************************/
static volatile unsigned short TextColor = Black BackColor = White;


/************************ Local auxiliary functions ***************************/

/*******************************************************************************
* Delay in while loop cycles                                                   *
*   Parameter:    cnt:    number of while cycles to delay                      *
*   Return:                                     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        152  2009-10-20 11:15  【02】 跑马灯实验(GPIO)\GPIO.plg

    .......     76873  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\GPIO.uvopt

     文件      16853  2010-11-29 15:24  【02】 跑马灯实验(GPIO)\GPIO.uvproj

     文件      20224  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\GPIO_GPIO.dep

    .......     76881  2010-12-03 10:09  【02】 跑马灯实验(GPIO)\GPIO_uvopt.bak

     文件      71340  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Lis\GPIO.map

     文件      59547  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Lis\startup_stm32f10x_hd.lst

     文件       3543  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\core_cm3.crf

     文件        101  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\core_cm3.d

     文件      10352  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\core_cm3.o

     文件     316346  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\glcd.crf

     文件       1821  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\glcd.d

     文件     357328  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\glcd.o

     文件     291076  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.axf

     文件      24650  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.hex

     文件      64967  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.htm

     文件        478  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.lnp

     文件        682  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.plg

     文件        479  2010-10-25 12:02  【02】 跑马灯实验(GPIO)\Obj\GPIO.sct

     文件       1635  2010-12-04 10:33  【02】 跑马灯实验(GPIO)\Obj\GPIO.tra

     文件     313668  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\main.crf

     文件       1822  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\main.d

     文件     340480  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\main.o

     文件     311330  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\misc.crf

     文件       1844  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\misc.d

     文件     337400  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\misc.o

     文件         88  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\startup_stm32f10x_hd.d

     文件       6932  2010-12-04 10:32  【02】 跑马灯实验(GPIO)\Obj\startup_stm32f10x_hd.o

     文件     318493  2010-11-29 11:45  【02】 跑马灯实验(GPIO)\Obj\stm32f10x_adc.crf

     文件       2114  2010-11-29 11:45  【02】 跑马灯实验(GPIO)\Obj\stm32f10x_adc.d

............此处省略162个文件信息

评论

共有 条评论