资源简介
F1C100S keil裸机工程,可以使用keil直接编译,生成.bin文件之后,烧录到芯片,工程实现了常用的外设驱动。
代码片段和文件信息
/**************************************************************************//**
* @file 2d.c
* @version V1.00
* $Revision: 1 $
* $Date: 15/05/27 5:21p $
* @brief NUC970 GE2D driver source file
*
* @note
* Copyright (C) 2015 Nuvoton Technology Corp. All rights reserved.
*****************************************************************************/
#include
#include
#include
#include “nuc970.h“
#include “sys.h“
#include “2d.h“
/** @addtogroup NUC970_Device_Driver NUC970 Device Driver
@{
*/
/** @addtogroup NUC970_GE2D_Driver GE2D Driver
@{
*/
/** @addtogroup NUC970_GE2D_EXPORTED_CONSTANTS GE2D Exported Constants
@{
*/
/// @cond HIDDEN_SYMBOLS
static unsigned int GFX_BPP;
static unsigned int GFX_WIDTH;
static unsigned int GFX_HEIGHT;
static unsigned int GFX_PITCH;
static unsigned int GFX_SIZE;
static __align(32) void *GFX_START_ADDR;
static __align(32) void *MONO_SOURCE_ADDR;
static __align(32) void *COLOR_SOURCE_ADDR;
static __align(32) void *CMODEL_START_ADDR;
static __align(32) void *GFX_OFFSCREEN_ADDR;
static __align(32) void *GFX_PAT_ADDR;
static void *Orig_GFX_START_ADDR;
static void *Orig_MONO_SOURCE_ADDR;
static void *Orig_COLOR_SOURCE_ADDR;
static void *Orig_CMODEL_START_ADDR;
static void *Orig_GFX_OFFSCREEN_ADDR;
static void *Orig_GFX_PAT_ADDR;
#define PN 1 // Quadrant 1
#define NN 2 // Quadrant 2
#define NP 3 // Quadrant 3
#define PP 4 // Quadrant 4
#define ABS(x) (((x)>0)?(x):-(x))
#define MAX(ab) (((a)>(b))?(a):(b))
/* octant code of line drawing */
#define XpYpXl (0<<1) // XY octant position is 1~3 in Control register
#define XpYpYl (1<<1)
#define XpYmXl (2<<1)
#define XpYmYl (3<<1)
#define XmYpXl (4<<1)
#define XmYpYl (5<<1)
#define XmYmXl (6<<1)
#define XmYmYl (7<<1)
static MONOPATTERN MonoPatternData[6] = {
{0x00000000 0xff000000} // HS_HORIZONTAL
{0x08080808 0x08080808} // HS_VERTICAL
{0x80402010 0x08040201} // HS_FDIAGONAL
{0x01020408 0x10204080} // HS_BDIAGONAL
{0x08080808 0xff080808} // HS_CROSS
{0x81422418 0x18244281} // HS_DIAGCROSS
};
static char _DrawMode = MODE_OPAQUE;
static UINT32 _ColorKey;
static UINT32 _ColorKeyMask;
static BOOL _EnableAlpha = FALSE;
static int _AlphaKs _AlphaKd;
static BOOL _ClipEnable = FALSE;
static BOOL _OutsideClip = FALSE;
static UINT32 _ClipTL _ClipBR;
static int _PatternType;
/// @endcond /* HIDDEN_SYMBOLS */
/*@}*/ /* end of group NUC970_GE2D_EXPORTED_CONSTANTS */
/** @addtogroup NUC970_GE2D_EXPORTED_FUNCTIONS GE2D Exported Functions
@{
*/
/// @cond HIDDEN_SYMBOLS
/* For align 32 */
static unsigned int shift_pointer(int ptr int align)
{
unsigned int pos;
int remain;
pos = ptr;
if( (ptr%align)!=0) {
remain = ptr % align;
ptr = ptr + (align - remain);
return ptr;
} else
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-04 19:21 keil工程\
目录 0 2018-06-04 19:21 keil工程\Driver\
目录 0 2018-06-04 19:21 keil工程\Driver\Include\
文件 8820 2015-06-12 11:48 keil工程\Driver\Include\2d.h
文件 10551 2015-06-12 11:51 keil工程\Driver\Include\adc.h
文件 21680 2015-06-12 11:51 keil工程\Driver\Include\can.h
文件 15225 2015-06-12 11:51 keil工程\Driver\Include\cap.h
文件 51091 2015-06-12 11:51 keil工程\Driver\Include\crypto.h
文件 14540 2015-06-12 11:48 keil工程\Driver\Include\etimer.h
文件 19768 2015-06-12 11:48 keil工程\Driver\Include\fmi.h
文件 6284 2017-08-28 22:56 keil工程\Driver\Include\gpio.h
文件 4157 2015-06-12 11:51 keil工程\Driver\Include\i2c.h
文件 4979 2015-06-12 11:51 keil工程\Driver\Include\i2s.h
文件 22546 2015-06-12 11:51 keil工程\Driver\Include\jpeg.h
文件 11345 2015-06-12 11:51 keil工程\Driver\Include\jpegcodec.h
文件 16812 2015-06-12 11:51 keil工程\Driver\Include\kpi.h
文件 9908 2015-06-12 11:51 keil工程\Driver\Include\lcd.h
文件 5681 2015-06-12 11:51 keil工程\Driver\Include\mtp.h
文件 154257 2017-08-28 22:49 keil工程\Driver\Include\nuc970.h
文件 153761 2015-06-12 14:45 keil工程\Driver\Include\nuc970.h~RF62e5aaff.TMP
文件 154206 2017-08-28 22:46 keil工程\Driver\Include\nuc970.h~RF62e92418.TMP
文件 8223 2015-06-12 11:48 keil工程\Driver\Include\pwm.h
文件 33849 2015-06-12 11:51 keil工程\Driver\Include\rtc.h
文件 17482 2015-06-12 11:48 keil工程\Driver\Include\sc.h
文件 13687 2015-06-12 11:48 keil工程\Driver\Include\scuart.h
文件 25210 2015-06-12 11:48 keil工程\Driver\Include\sdh.h
文件 5394 2015-06-12 11:51 keil工程\Driver\Include\spi.h
文件 14271 2015-06-12 11:51 keil工程\Driver\Include\sys.h
文件 45829 2015-06-12 11:51 keil工程\Driver\Include\uart.h
文件 60378 2015-06-12 11:48 keil工程\Driver\Include\usbd.h
文件 4589 2015-06-12 11:48 keil工程\Driver\Include\wwdt.h
............此处省略125个文件信息
评论
共有 条评论