亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pointer.c

?? 最新的FreeRTOS源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
void POINTER_SetCurrentAreaStore( u8* ptr )
   {
   ptrAreaStore = ( ptr == 0 ) ? DefaultAreaStore : ptr;
   }

/*******************************************************************************
*
*                                POINTER_SetMode
*
*******************************************************************************/
/**
*
*  Change the current mode of the pointer management.
*
*  @note Must be called only ONCE!!
*
*  @param[in]  mode New pointer management mode.
*
**/
/******************************************************************************/
void POINTER_SetMode( enum POINTER_mode mode )
   {
   u16*  ptr;
   u16   i;
   u16   color;

   switch( mode )
      {
      case POINTER_APPLICATION:
         ptr   = (u16*)DefaultAreaStore;
         color = DRAW_GetBGndColor();

         for ( i = 0; i < (CurrentPointerWidth*CurrentPointerHeight) ; i++ )
            {
            *ptr++ = color;
            }

         POINTER_Draw( POINTER_Info.xPos, POINTER_Info.yPos, CurrentPointerWidth, CurrentPointerHeight, CurrentPointerBmp );
         break;

      case POINTER_RESTORE_LESS:
         POINTER_Draw( POINTER_Info.xPos, POINTER_Info.yPos, CurrentPointerWidth, CurrentPointerHeight, CurrentPointerBmp );
         break;

      case POINTER_ON:
         POINTER_SetCurrentAreaStore( 0 );
         POINTER_Save( POINTER_Info.xPos, POINTER_Info.yPos, POINTER_WIDTH, POINTER_WIDTH );
         POINTER_Draw( POINTER_Info.xPos, POINTER_Info.yPos, CurrentPointerWidth, CurrentPointerHeight,CurrentPointerBmp );
         break;

      case POINTER_OFF:
         POINTER_Info.xPos = ( SCREEN_WIDTH - POINTER_WIDTH ) / 2;
         POINTER_Info.yPos = ( SCREEN_WIDTH - POINTER_WIDTH ) / 2;

      case POINTER_MENU:
         if( Pointer_Mode == POINTER_ON )
            {
            POINTER_SetCurrentAreaStore( 0 );
            POINTER_Restore( POINTER_Info.xPos, POINTER_Info.yPos, POINTER_WIDTH, POINTER_WIDTH );
            }
         break;
      }

   Pointer_Mode = mode;
   }

/*******************************************************************************
*
*                                POINTER_GetMode
*
*******************************************************************************/
/**
*
*  Return the current mode of the pointer management
*
*  @return  Current pointer management mode.
*
**/
/******************************************************************************/
enum POINTER_mode POINTER_GetMode( void )
   {
   return Pointer_Mode;
   }

/*******************************************************************************
*
*                                POINTER_GetState
*
*******************************************************************************/
/**
*
*  Return current pointer state.
*
*  @return  Current pointer state.
*
**/
/******************************************************************************/
enum POINTER_state POINTER_GetState( void )
   {
   return Pointer_State;
   }

/*******************************************************************************
*
*                                POINTER_SetRect
*
*******************************************************************************/
/**
*
*  Set new limits for the move of the pointer
*
*  @param[in]  x        Horizontal coordinate of the bottom left corner of the new area.
*  @param[in]  y        Vertical coordinate of the bottom left corner of the new are.
*  @param[in]  width    New area width.
*  @param[in]  height   New area height.
*
*  @warning       The (0x0) point in on the low left corner.
*
**/
/******************************************************************************/
void POINTER_SetRect( s16 x, s16 y, s16 width, s16 height )
   {
   POINTER_Info.X_PosMin = x;

   if( POINTER_Info.xPos < POINTER_Info.X_PosMin )
      {
      POINTER_Info.xPos = POINTER_Info.X_PosMin;
      }

   POINTER_Info.X_PosMax = x + width - 1;

   if( POINTER_Info.xPos > POINTER_Info.X_PosMax )
      {
      POINTER_Info.xPos = POINTER_Info.X_PosMax;
      }

   POINTER_Info.Y_PosMin = y;

   if( POINTER_Info.yPos < POINTER_Info.Y_PosMin )
      {
      POINTER_Info.yPos = POINTER_Info.Y_PosMin;
      }

   POINTER_Info.Y_PosMax = y + height - 1;

   if( POINTER_Info.yPos > POINTER_Info.Y_PosMax )
      {
      POINTER_Info.yPos = POINTER_Info.Y_PosMax;
      }
   }

/*******************************************************************************
*
*                                POINTER_SetRectScreen
*
*******************************************************************************/
/**
*
*  Allow the pointer to move on the whole screen.
*
**/
/******************************************************************************/
void POINTER_SetRectScreen( void )
   {
   POINTER_SetRect( 0, 0, POS_MAX, POS_MAX );
   }

/*******************************************************************************
*
*                                POINTER_GetPos
*
*******************************************************************************/
/**
*
*  Return the current position of the pointer (on the screen).
*
*  @return  The current pointer screen position with X in the LSB and Y in the MSB.
*
*  @warning       The (0x0) point in on the low left corner.
**/
/******************************************************************************/
u16 POINTER_GetPos( void )
   {
   return ( POINTER_Info.xPos | ( POINTER_Info.yPos << 8 ) );
   }

/*******************************************************************************
*
*                                POINTER_SetPos
*
*******************************************************************************/
/**
*
*  Force the screen position of the pointer.
*
*  @param[in]  x  New horizontal coordinate.
*  @param[in]  y  New vertical coordinate.
*
*  @warning       The (0x0) point in on the low left corner.
*
**/
/******************************************************************************/
void POINTER_SetPos( u16 x, u16 y )
   {
   POINTER_Info.xPos = x;
   POINTER_Info.yPos = y;
   }

/*******************************************************************************
*
*                                POINTER_Draw
*
*******************************************************************************/
/**
*
*  Draw pointer.
*
*  @param[in]  x        Horizontal coordinate of the bottom left corner of the pointer.
*  @param[in]  y        Vertical coordinate of the bottom left corner of the pointer.
*  @param[in]  width    Pointer bitmap width.
*  @param[in]  height   Pointer bitmap height.
*  @param[in]  bmp      Pointer to width * height bit array. If null used default
*                       pointer bitmap.
*
*  @note          The provided bitmap is a monochrome one.
*  @warning       The (0x0) point in on the low left corner.
*
**/
/******************************************************************************/
void POINTER_Draw( u8 x, u8 y, u8 width, u8 height, u8* bmp )
   {
   int   i     = 0;
   int   l     = 0;
   int   n     = 0;
   char* ptr   = ptrAreaStore;
   char  c;
   u16   val;

   // No bitmap provided, use the default one!
   if( bmp == 0 )
      {
      bmp = BallPointerBmp;
      }

   // Select the screen area were going to take care about!
   LCD_SetRect_For_Cmd( x, y, width, height );

   // Let draw to the LCD screen.
   LCD_SendLCDCmd( ST7637_RAMWR );

   while( n < ( width * height ) )
      {
      if( Pointer_Mode != POINTER_RESTORE_LESS )
         {
         // Draw pixel using current storage area data for background pixels.
         c = *ptr++;
         LCD_SendLCDData( ( bmp[ l + ( i / 8 ) ] & ( 1 << ( 7 - ( i % 8 ) ) ) ) ? ( POINTER_GetColor() & 255 ) : c );

         c = *ptr++;
         LCD_SendLCDData( ( bmp[ l + ( i / 8 ) ] & ( 1 << ( 7 - ( i % 8 ) ) ) ) ? ( POINTER_GetColor() >> 8 )  : c );
         }
      else
         {
         // POINTER_RESTORE_LESS: use current background color for background color.
         c = DRAW_GetBGndColor();
         val = ( bmp[ l + ( i / 8 ) ] & ( 1 << ( 7 - ( i % 8 ) ) ) ) ? POINTER_GetColor() : c;

         LCD_SendLCDData( val & 255 );
         LCD_SendLCDData( val >> 8 );
         }

      n++;

      i++;

      // End of line ?
      if( i == width )
         {
         // Next line!
         l++;
         i=0;
         }
      }
   }

/*******************************************************************************
*
*                                POINTER_Save
*
*******************************************************************************/
/**
*
*  Save the background of the pointer.
*
*  @param[in]  x        Horizontal coordinate of the bottom left corner of the area to save.
*  @param[in]  y        Vertical coordinate of the bottom left corner of the area to save.
*  @param[in]  width    Width of the area to save.
*  @param[in]  height   Height of the area to save.
*
*  @note          The store area must be large enough to store all the pixels (16 bits).
*  @warning       The (0x0) point in on the low left corner.
*  @see  POINTER_Restore
*  @see  POINTER_SetCurrentAreaStore
*
**/
/******************************************************************************/
void POINTER_Save( u8 x, u8 y, u8 width, u8 height )
   {
   int   i;
   char* ptr      = ptrAreaStore;
   int   bytesize = ( width * height ) * 2;                // 2 bytes per pixel.

   // Is this pointer management mode, don't save pointer background!
   if( Pointer_Mode == POINTER_RESTORE_LESS )
      {
      return;
      }

   // Select the LCD screen area to read.
   LCD_SetRect_For_Cmd ( x, y, width, height );

   // Send the memory read command to the LCD controller.
   LCD_SendLCDCmd( ST7637_RAMRD );

   // First returned byte is a dummy!
   LCD_ReadLCDData();

   for( i = 0; i < bytesize; i++ )
      {
      *ptr++ = LCD_ReadLCDData();
      }
   }

/*******************************************************************************
*
*                                POINTER_Restore
*
*******************************************************************************/
/**
*
*  Restore the background of the pointer with data saved in the current store area.
*
*  @param[in]  x        Horizontal coordinate of the bottom left corner of the area to restore.
*  @param[in]  y        Vertical coordinate of the bottom left corner of the area to restore.
*  @param[in]  width    Width of the area to restore.
*  @param[in]  height   Height of the area to restore.
*
*  @warning       The (0x0) point in on the low left corner.
*  @see  POINTER_Save
*  @see  POINTER_SetCurrentAreaStore
*
**/
/******************************************************************************/
void POINTER_Restore( u8 x, u8 y, u8 width, u8 height )
   {
   int   i;
   char* ptr      = ptrAreaStore;
   int   bytesize = ( width * height ) * 2;                // 2 bytes per pixel.

   // Select the screen area to write.
   LCD_SetRect_For_Cmd( x, y, width, height );

   // Send the memory write command to the LCD controller.
   LCD_SendLCDCmd( ST7637_RAMWR );

   for( i = 0; i < bytesize; i++ )
      {
      // In this mode, use background color (no data was previously saved).
      if ( Pointer_Mode == POINTER_RESTORE_LESS )
         {
         LCD_SendLCDData( DRAW_GetBGndColor() );
         }
      else
         {
         LCD_SendLCDData( *ptr++ );
         }
      }
   }

/*******************************************************************************
*
*                                POINTER_SetApplication_Pointer_Mgr
*
*******************************************************************************/
/**
*
*  Provides an user defined pointer manager.
*
*  @param[in]  mgr Pointer to the user defined pointer manager.
*
**/
/******************************************************************************/
void POINTER_SetApplication_Pointer_Mgr( tAppPtrMgr mgr )
   {
   Application_Pointer_Mgr = mgr;
   }

/*******************************************************************************
*
*                                POINTER_SetColor
*
*******************************************************************************/
/**
*
*  Set the pointer color.
*
*  @param[in]  color The new pointer color.
*
**/
/******************************************************************************/
void POINTER_SetColor( u16 color )
   {
   CurrentPointerColor = color;
   }

/*******************************************************************************
*
*                                POINTER_GetColor
*
*******************************************************************************/
/**
*
*  Return the current pointer color.
*
*  @return  Current pointer color.
*
**/
/******************************************************************************/
u16 POINTER_GetColor( void )
   {
   return CurrentPointerColor;
   }

/*******************************************************************************
*
*                                POINTER_GetInfo
*
*******************************************************************************/
/**
*
*  Get pointer informations.
*
*  @return  A pointer to a pointer information structure.
*
**/
/******************************************************************************/
tPointer_Info* POINTER_GetInfo( void )
   {
   return &POINTER_Info;
   }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产美女娇喘av呻吟久久| 国产成人免费视频精品含羞草妖精| 91在线高清观看| 激情文学综合网| 久久精品99国产精品日本| 免费观看在线综合色| 青草av.久久免费一区| 麻豆精品精品国产自在97香蕉 | 日韩午夜中文字幕| 欧美综合久久久| 欧美天堂亚洲电影院在线播放| 一本大道久久精品懂色aⅴ| 91麻豆精品一区二区三区| 91九色最新地址| 欧美一区二区视频免费观看| 欧美一级欧美三级在线观看| 久久综合色之久久综合| 欧美国产成人精品| 亚洲欧美日韩久久精品| 亚洲第一主播视频| 美女视频第一区二区三区免费观看网站| 日本伊人精品一区二区三区观看方式| 欧美中文字幕亚洲一区二区va在线 | 中文成人av在线| 国产精品毛片久久久久久| 亚洲天堂免费看| 日本va欧美va瓶| 国产aⅴ综合色| 欧美私人免费视频| 欧美精品一区二区三区蜜桃视频| 国产精品美女久久久久久久| 亚洲第一电影网| 国产在线视视频有精品| 91视频91自| 精品欧美一区二区三区精品久久| 国产精品电影一区二区三区| 日韩一区精品字幕| av激情综合网| 欧美三级电影一区| 免费观看一级欧美片| 国产电影精品久久禁18| 国产精品免费久久| 国产日产欧美一区二区视频| 一区二区在线观看av| 久久99久久久欧美国产| 色综合久久中文字幕| 精品国产乱码久久久久久久久| 国产精品电影院| 精品午夜一区二区三区在线观看 | 欧美一区二区黄| 综合久久久久综合| 韩国女主播一区| 欧美伦理电影网| 亚洲精品一卡二卡| 成人美女在线视频| 久久嫩草精品久久久精品一| 热久久久久久久| 粉嫩欧美一区二区三区高清影视 | 51精品久久久久久久蜜臀| 久久久久久毛片| 丝瓜av网站精品一区二区| 成人免费观看视频| 久久久久久久综合色一本| 蜜桃视频在线观看一区| 欧美日韩免费不卡视频一区二区三区| 国产欧美日韩不卡免费| 裸体一区二区三区| 欧美一区二区免费| 日韩精品一二三四| 欧美精品vⅰdeose4hd| 亚洲国产日韩a在线播放性色| 91论坛在线播放| 亚洲乱码国产乱码精品精的特点 | 欧美日韩国产中文| 亚洲午夜久久久| 久久se精品一区二区| 亚洲国产精品一区二区尤物区| 国产成人精品免费视频网站| 99久久亚洲一区二区三区青草 | 日韩一区欧美二区| 5858s免费视频成人| 午夜视频久久久久久| 欧美丰满少妇xxxxx高潮对白| 亚洲一区二区影院| 制服丝袜国产精品| 久久精工是国产品牌吗| 久久影院视频免费| 成人午夜免费电影| 成人免费视频在线观看| 欧美日韩一区中文字幕| 男人的j进女人的j一区| 久久只精品国产| www.亚洲精品| 亚洲国产精品精华液网站| 欧美精品乱人伦久久久久久| 日韩和的一区二区| 欧美综合一区二区三区| 91久久一区二区| 欧美日韩国产综合视频在线观看| 亚洲成av人片在线| 精品少妇一区二区三区免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品人妖ts系列视频| 91丨porny丨蝌蚪视频| 视频一区二区不卡| 欧美国产精品久久| 精品视频免费看| 激情综合亚洲精品| 亚洲女与黑人做爰| 日韩欧美二区三区| 色综合久久天天| 美国三级日本三级久久99| 国产精品色噜噜| 欧美精品一二三区| 成人一级片在线观看| 天天亚洲美女在线视频| 国产女人18水真多18精品一级做 | 欧美一级黄色录像| 亚洲精品一卡二卡| 国产午夜精品久久久久久久 | 国产亚洲成av人在线观看导航| www.欧美日韩国产在线| 人禽交欧美网站| 色综合视频在线观看| 中文字幕制服丝袜成人av| 色综合久久久久综合体桃花网| 久久99久久99| 午夜在线电影亚洲一区| 国产肉丝袜一区二区| 日韩欧美你懂的| 欧美中文字幕亚洲一区二区va在线| 国产91精品欧美| 久久aⅴ国产欧美74aaa| 亚洲一区二区综合| 国产精品伦理在线| 久久人人97超碰com| 精品美女一区二区| 国产精品久久久久久久岛一牛影视| 国产91富婆露脸刺激对白| 午夜激情久久久| 亚洲一二三区在线观看| 亚洲蜜桃精久久久久久久| 国产精品视频线看| 久久久精品影视| 精品奇米国产一区二区三区| 日韩片之四级片| 欧美日韩国产一级| 欧美老年两性高潮| 欧美一区在线视频| 91精品欧美综合在线观看最新| 欧美视频日韩视频| 欧美色图天堂网| 欧美三级电影一区| 欧美精品一卡二卡| 日韩午夜电影av| 精品国产乱码久久久久久牛牛| 欧美xxxx老人做受| 日韩精品专区在线| 日韩网站在线看片你懂的| 欧美一区二区久久久| 精品卡一卡二卡三卡四在线| 欧美sm极限捆绑bd| 久久久久99精品国产片| 国产日韩成人精品| 亚洲精品国产精品乱码不99| 一区二区三区中文字幕| 午夜欧美一区二区三区在线播放| 亚洲福利视频一区二区| 美女视频黄a大片欧美| 国产精品1024久久| 91蜜桃免费观看视频| 成人动漫一区二区在线| 91一区二区三区在线观看| 色久综合一二码| 日韩小视频在线观看专区| 久久久蜜桃精品| 亚洲视频精选在线| 丝袜a∨在线一区二区三区不卡| 美女mm1313爽爽久久久蜜臀| 丁香啪啪综合成人亚洲小说| 91国偷自产一区二区三区观看 | 成人一区在线观看| 97久久精品人人做人人爽50路| 色婷婷一区二区三区四区| 欧美一区二区三区免费观看视频 | 91黄色免费看| 久久久五月婷婷| 亚洲一区二区三区免费视频| 精品一区二区在线播放| 不卡的看片网站| 91精品综合久久久久久| 国产精品久久久久9999吃药| 亚洲欧美日韩国产手机在线 | 国产高清视频一区| 欧美色视频一区| 五月天视频一区| 欧美日韩精品一区二区三区蜜桃 | 欧美美女视频在线观看| 国产日韩欧美激情| 天天av天天翘天天综合网色鬼国产|