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

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

?? string.c

?? at91sam9263操作NAND FLASH代碼
?? C
字號:
/* ----------------------------------------------------------------------------
 *         ATMEL Microcontroller Software Support 
 * ----------------------------------------------------------------------------
 * Copyright (c) 2008, Atmel Corporation
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the disclaimer below.
 *
 * Atmel's name may not be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ----------------------------------------------------------------------------
 */

//------------------------------------------------------------------------------
//         Headers
//------------------------------------------------------------------------------

#include <string.h>

//------------------------------------------------------------------------------
//         Exported functions
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
/// Copies data from a source buffer into a destination buffer. The two buffers
/// must NOT overlap. Returns the destination buffer.
/// \param pDestination  Destination buffer.
/// \param pSource  Source buffer.
/// \param num  Number of bytes to copy.
//------------------------------------------------------------------------------
void * memcpy(void *pDestination, const void *pSource, size_t num)
{
    unsigned char *pByteDestination;
    unsigned char *pByteSource;
    unsigned int *pAlignedSource = (unsigned int *) pSource;
    unsigned int *pAlignedDestination = (unsigned int *) pDestination;

    // If num is more than 4 bytes, and both dest. and source are aligned,
    // then copy dwords
    if ((((unsigned int) pAlignedDestination & 0x3) == 0)
        && (((unsigned int) pAlignedSource & 0x3) == 0)
        && (num >= 4)) {

        while (num >= 4) {

            *pAlignedDestination++ = *pAlignedSource++;
            num -= 4;
        }
    }

    // Copy remaining bytes
    pByteDestination = (unsigned char *) pAlignedDestination;
    pByteSource = (unsigned char *) pAlignedSource;
    while (num--) {

        *pByteDestination++ = *pByteSource++;
    }

    return pDestination;
}

//------------------------------------------------------------------------------
/// Fills a memory region with the given value. Returns a pointer to the
/// memory region.
/// \param pBuffer  Pointer to the start of the memory region to fill
/// \param value    Value to fill the region with
/// \param num      Size to fill in bytes
//------------------------------------------------------------------------------
void * memset(void *pBuffer, int value, size_t num)
{
    unsigned char *pByteDestination;
    unsigned int  *pAlignedDestination = (unsigned int *) pBuffer;
    unsigned int  alignedValue = (value << 24) | (value << 16) | (value << 8) | value;

    // Set words if possible
    if ((((unsigned int) pAlignedDestination & 0x3) == 0) && (num >= 4)) {
        while (num >= 4) {
            *pAlignedDestination++ = alignedValue;
            num -= 4;
        }
    }
    // Set remaining bytes
    pByteDestination = (unsigned char *) pAlignedDestination;
    while (num--) {
        *pByteDestination++ = value;
    }
    return pBuffer;
}

//-----------------------------------------------------------------------------
/// Search a character in the given string.
/// Returns a pointer to the character location.
/// \param pString   Pointer to the start of the string to search.
/// \param character The character to find.
//-----------------------------------------------------------------------------
char * strchr(const char *pString, int character)
{
    char * p = (char *)pString;
    char   c = character & 0xFF;

    while(*p != c) {
        if (*p == 0) {
            return 0;
        }
        p++;
    }
    return p;
}

//-----------------------------------------------------------------------------
/// Return the length of a given string
/// \param pString Pointer to the start of the string.
//-----------------------------------------------------------------------------
size_t strlen(const char *pString)
{
    unsigned int length = 0;

    while(*pString++ != 0) {
        length++;
    }
    return length;
}


//-----------------------------------------------------------------------------
/// Search a character backword from the end of given string.
/// Returns a pointer to the character location.
/// \param pString   Pointer to the start of the string to search.
/// \param character The character to find.
//-----------------------------------------------------------------------------
char * strrchr(const char *pString, int character)
{
    char *p = 0;

    while(*pString != 0) {
        if (*pString++ == character) {
            p = (char*)pString;
        }
    }
    return p;
}

//-----------------------------------------------------------------------------
/// Copy from source string to destination string
/// Return a pointer to the destination string
/// \param pDestination Pointer to the destination string.
/// \param pSource      Pointer to the source string.
//-----------------------------------------------------------------------------
char * strcpy(char *pDestination, const char *pSource)
{
    char *pSaveDest = pDestination;

    for(; (*pDestination = *pSource) != 0; ++pSource, ++pDestination);
    return pSaveDest;
}

//-----------------------------------------------------------------------------
/// Compare the first specified bytes of 2 given strings
/// Return 0 if equals
/// Return >0 if 1st string > 2nd string
/// Return <0 if 1st string < 2nd string
/// \param pString1 Pointer to the start of the 1st string.
/// \param pString2 Pointer to the start of the 2nd string.
/// \param count    Number of bytes that should be compared.
//-----------------------------------------------------------------------------
int strncmp(const char *pString1, const char *pString2, size_t count)
{
    int r;

    while(count) {
        r = *pString1 - *pString2;
        if (r == 0) {
            if (*pString1 == 0) {
                break;
            }
            pString1++;
            pString2++;
            count--;
            continue;
        }
        return r;
    }
    return 0;
}

//-----------------------------------------------------------------------------
/// Copy the first number of bytes from source string to destination string
/// Return the pointer to the destination string.
/// \param pDestination Pointer to the start of destination string.
/// \param pSource      Pointer to the start of the source string.
/// \param count        Number of bytes that should be copied.
//-----------------------------------------------------------------------------
char * strncpy(char *pDestination, const char *pSource, size_t count)
{
    char *pSaveDest = pDestination;

    while (count) {
        *pDestination = *pSource;
        if (*pSource == 0) {
            break;
        }
        pDestination++;
        pSource++;
        count--;
    }
    return pSaveDest;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产原创一区二区三区| 欧美午夜一区二区| 在线免费视频一区二区| 欧美成人在线直播| 亚洲图片一区二区| 播五月开心婷婷综合| 91精品国产色综合久久不卡蜜臀| 国产精品日韩精品欧美在线| 日本视频一区二区三区| 日本久久电影网| 中文字幕在线观看不卡| 国产又粗又猛又爽又黄91精品| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 538prom精品视频线放| 日韩毛片在线免费观看| 懂色av一区二区在线播放| 欧美岛国在线观看| 丝瓜av网站精品一区二区| 91高清视频在线| 一区二区成人在线视频| 91亚洲精华国产精华精华液| 国产精品理论在线观看| 国产乱码精品一区二区三区忘忧草| 日韩一区二区视频| 免费成人在线网站| 日韩视频不卡中文| 青青草国产精品97视觉盛宴| 欧美伦理影视网| 亚洲不卡一区二区三区| 在线观看一区不卡| 亚洲一卡二卡三卡四卡| 色婷婷久久久久swag精品| 亚洲欧美激情一区二区| 日本乱码高清不卡字幕| 亚洲国产wwwccc36天堂| 欧美高清视频不卡网| 日韩黄色片在线观看| 4438x亚洲最大成人网| 久久精品免费看| 久久精品一区二区三区不卡牛牛| 国产综合久久久久久久久久久久| 久久久久久毛片| 不卡的av电影| 亚洲国产一区二区三区| 欧美精品电影在线播放| 另类综合日韩欧美亚洲| 国产午夜精品久久久久久免费视| 不卡高清视频专区| 亚洲综合色丁香婷婷六月图片| 欧美日韩成人激情| 日韩福利视频导航| 久久久久成人黄色影片| 91麻豆福利精品推荐| 亚洲va韩国va欧美va精品| 日韩精品资源二区在线| 成人永久aaa| 亚洲综合无码一区二区| 日韩三级在线观看| 成人avav影音| 日日夜夜精品免费视频| 国产欧美日韩精品一区| 欧美性猛交一区二区三区精品| 美女视频第一区二区三区免费观看网站| 久久老女人爱爱| 日本精品裸体写真集在线观看 | 日韩一级二级三级精品视频| 国产成人免费在线观看不卡| 亚洲天堂福利av| 日韩女优av电影| 91免费版在线| 激情五月婷婷综合| 亚洲精品国产a| 久久久www成人免费无遮挡大片| 99国产一区二区三精品乱码| 免费在线观看精品| 自拍偷自拍亚洲精品播放| 日韩欧美专区在线| 色一情一乱一乱一91av| 国内久久精品视频| 天天色 色综合| 最近中文字幕一区二区三区| 日韩欧美一级特黄在线播放| 91麻豆免费视频| 国产一区二区三区国产| 亚洲mv在线观看| 亚洲品质自拍视频网站| 欧美zozo另类异族| 91丨porny丨在线| 国产麻豆精品久久一二三| 五月婷婷综合在线| 亚洲欧美偷拍三级| 中文字幕不卡的av| 精品理论电影在线| 91精品国产91久久久久久一区二区 | 亚洲欧美日韩在线| 亚洲大型综合色站| 国产精品女同一区二区三区| 精品区一区二区| 精品欧美一区二区在线观看| 91精品国产综合久久久久久久| 欧洲另类一二三四区| 99久久综合色| 成人av先锋影音| 高清成人免费视频| 国产成人av电影在线观看| 精品一区二区三区免费| 美女国产一区二区| 激情综合五月天| 国产在线视视频有精品| 国产在线视频精品一区| 国产精品一二二区| 国产成人精品影视| 丁香婷婷综合网| 粉嫩久久99精品久久久久久夜| 国产精品77777| 成人18视频日本| eeuss鲁片一区二区三区在线看| 成人性生交大片免费看在线播放| 国产91在线观看| 成人丝袜视频网| 91丝袜国产在线播放| 欧美亚男人的天堂| 欧美片网站yy| 精品国产一区二区三区不卡| 久久久久成人黄色影片| 国产精品网友自拍| 一区二区理论电影在线观看| 亚洲va欧美va天堂v国产综合| 免费在线观看精品| 国产乱一区二区| 99精品久久只有精品| 欧美日韩一区二区三区视频| 日韩无一区二区| 中文字幕 久热精品 视频在线| 亚洲丝袜精品丝袜在线| 亚洲电影你懂得| 精品在线你懂的| av电影在线观看一区| 欧美色欧美亚洲另类二区| 91精品国产一区二区| 国产精品久久久久永久免费观看 | 欧美三级乱人伦电影| 91精品国产日韩91久久久久久| 精品国产伦一区二区三区免费| 国产精品污污网站在线观看 | 7878成人国产在线观看| 久久久噜噜噜久久中文字幕色伊伊| 亚洲丝袜美腿综合| 裸体在线国模精品偷拍| 91丝袜美腿高跟国产极品老师| 91精品国产品国语在线不卡| 国产欧美一区二区三区沐欲| 依依成人精品视频| 激情综合网av| 欧美在线观看一区二区| 精品电影一区二区三区| 亚洲尤物在线视频观看| 国产裸体歌舞团一区二区| 欧美唯美清纯偷拍| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲成a人片在线观看中文| 福利视频网站一区二区三区| 欧美一区二区在线不卡| 亚洲欧洲韩国日本视频| 黄色小说综合网站| 欧美性猛片xxxx免费看久爱| 国产精品美女久久福利网站| 美女性感视频久久| 欧美亚洲综合网| 亚洲欧美自拍偷拍| 久国产精品韩国三级视频| 欧美在线免费播放| 亚洲天堂中文字幕| 国产99精品国产| 久久亚洲影视婷婷| 日本不卡视频一二三区| 在线亚洲人成电影网站色www| 国产人成亚洲第一网站在线播放 | 久久久五月婷婷| 奇米四色…亚洲| 在线成人免费视频| 亚洲一区在线电影| 色先锋aa成人| 亚洲精品国产a久久久久久| 99久久精品99国产精品| 国产精品美女一区二区三区 | 国产一区二区三区在线观看免费| 欧美午夜精品久久久久久超碰| 国产精品久久久久久久浪潮网站 | 国产原创一区二区三区| 日韩一区二区免费在线观看| 亚洲国产一二三| 欧美日韩中文精品| 亚洲成av人综合在线观看| 欧美三级视频在线| 亚洲成人激情综合网| 欧美日韩国产乱码电影| 视频精品一区二区| 欧美精品乱码久久久久久按摩| 一区二区三区在线观看动漫|