91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

在正點原子開發板的基礎上移植的二維碼例子程序,在使用的時候注意棧的大小,希望對你有幫助。

資源截圖

代碼片段和文件信息

/*
?*?qrencode?-?QR?Code?encoder
?*
?*?Binary?sequence?class.
?*?Copyright?(C)?2006-2011?Kentaro?Fukuchi?
?*
?*?This?library?is?free?software;?you?can?redistribute?it?and/or
?*?modify?it?under?the?terms?of?the?GNU?Lesser?General?Public
?*?License?as?published?by?the?Free?Software?Foundation;?either
?*?version?2.1?of?the?License?or?any?later?version.
?*
?*?This?library?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.?See?the?GNU
?*?Lesser?General?Public?License?for?more?details.
?*
?*?You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public
?*?License?along?with?this?library;?if?not?write?to?the?Free?Software
?*?Foundation?Inc.?51?Franklin?St?Fifth?Floor?Boston?MA?02110-1301?USA
?*/

#if?HAVE_CONFIG_H
#?include?“config.h“
#endif
#include?
#include?
#include?

#include?“bitstream.h“?

BitStream?*BitStream_new(void)
{
BitStream?*bstream;

bstream?=?(BitStream?*)malloc(sizeof(BitStream));
if(bstream?==?NULL)?return?NULL;

bstream->length?=?0;
bstream->data?=?NULL;

return?bstream;
}

static?int?BitStream_allocate(BitStream?*bstream?int?length)
{
unsigned?char?*data;

if(bstream?==?NULL)?{
return?-1;
}

data?=?(unsigned?char?*)malloc(length);
if(data?==?NULL)?{
return?-1;
}

if(bstream->data)?{
free(bstream->data);
}
bstream->length?=?length;
bstream->data?=?data;

return?0;
}

static?BitStream?*BitStream_newFromNum(int?bits?unsigned?int?num)
{
unsigned?int?mask;
int?i;
unsigned?char?*p;
BitStream?*bstream;

bstream?=?BitStream_new();
if(bstream?==?NULL)?return?NULL;

if(BitStream_allocate(bstream?bits))?{
BitStream_free(bstream);
return?NULL;
}

p?=?bstream->data;
mask?=?1?< for(i=0;?i if(num?&?mask)?{
*p?=?1;
}?else?{
*p?=?0;
}
p++;
mask?=?mask?>>?1;
}

return?bstream;
}

static?BitStream?*BitStream_newFromBytes(int?size?unsigned?char?*data)
{
unsigned?char?mask;
int?i?j;
unsigned?char?*p;
BitStream?*bstream;

bstream?=?BitStream_new();
if(bstream?==?NULL)?return?NULL;

if(BitStream_allocate(bstream?size?*?8))?{
BitStream_free(bstream);
return?NULL;
}

p?=?bstream->data;
for(i=0;?i mask?=?0x80;
for(j=0;?j<8;?j++)?{
if(data[i]?&?mask)?{
*p?=?1;
}?else?{
*p?=?0;
}
p++;
mask?=?mask?>>?1;
}
}

return?bstream;
}

int?BitStream_append(BitStream?*bstream?BitStream?*arg)
{
unsigned?char?*data;

if(arg?==?NULL)?{
return?-1;
}
if(arg->length?==?0)?{
return?0;
}
if(bstream->length?==?0)?{
if(BitStream_allocate(bstream?arg->length))?{
return?-1;
}
memcpy(bstream->data?arg->data?arg->length);
return?0;
}

data?=?(unsigned?char?*)malloc(bstream->length?+?arg->length);
if(data?==?NULL)?{
return?-1;
}
memcpy(data?bstream->data?bstream->length);
memcpy(data?+?bstream->length?arg->data?arg->length);


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????4311??2018-06-19?19:43??二維碼實驗\ASP\qrcode\bitstream.c

?????文件???????1432??2014-07-24?12:17??二維碼實驗\ASP\qrcode\bitstream.h

?????文件???????2513??2016-11-18?01:23??二維碼實驗\ASP\qrcode\config.h

?????文件???????6980??2016-11-18?00:58??二維碼實驗\ASP\qrcode\mask.c

?????文件???????1560??2014-07-04?00:43??二維碼實驗\ASP\qrcode\mask.h

?????文件???????4106??2018-06-16?18:47??二維碼實驗\ASP\qrcode\mmask.c

?????文件???????1404??2014-07-04?00:43??二維碼實驗\ASP\qrcode\mmask.h

?????文件???????7089??2014-07-04?00:43??二維碼實驗\ASP\qrcode\mqrspec.c

?????文件???????4774??2014-07-04?00:43??二維碼實驗\ASP\qrcode\mqrspec.h

?????文件??????20124??2018-06-16?18:47??二維碼實驗\ASP\qrcode\qrencode.c

?????文件??????20916??2014-07-24?12:17??二維碼實驗\ASP\qrcode\qrencode.h

?????文件???????2778??2014-07-04?00:43??二維碼實驗\ASP\qrcode\qrencode_inner.h

?????文件??????38918??2018-06-14?18:05??二維碼實驗\ASP\qrcode\qrinput.c

?????文件???????3651??2014-07-24?12:17??二維碼實驗\ASP\qrcode\qrinput.h

?????文件??????15715??2014-07-24?12:17??二維碼實驗\ASP\qrcode\qrspec.c

?????文件???????5832??2014-07-24?12:17??二維碼實驗\ASP\qrcode\qrspec.h

?????文件???????9176??2018-06-16?18:46??二維碼實驗\ASP\qrcode\rscode.c

?????文件???????1468??2014-07-24?12:17??二維碼實驗\ASP\qrcode\rscode.h

?????文件???????7709??2014-07-24?12:17??二維碼實驗\ASP\qrcode\split.c

?????文件???????1913??2014-07-24?12:17??二維碼實驗\ASP\qrcode\split.h

?????文件?????109142??2014-07-17?21:52??二維碼實驗\CORE\core_cm4.h

?????文件??????22735??2014-07-17?21:52??二維碼實驗\CORE\core_cm4_simd.h

?????文件??????17146??2014-07-17?21:52??二維碼實驗\CORE\core_cmFunc.h

?????文件??????20513??2014-07-17?21:52??二維碼實驗\CORE\core_cmInstr.h

?????文件??????29605??2018-06-16?19:35??二維碼實驗\CORE\startup_stm32f40_41xxx.s

?????文件???????6924??2014-08-01?23:18??二維碼實驗\FWLIB\inc\misc.h

?????文件??????32880??2014-08-01?23:18??二維碼實驗\FWLIB\inc\stm32f4xx_adc.h

?????文件??????27318??2014-08-01?23:18??二維碼實驗\FWLIB\inc\stm32f4xx_can.h

?????文件???????2416??2014-08-01?23:18??二維碼實驗\FWLIB\inc\stm32f4xx_crc.h

?????文件??????14481??2014-08-01?23:18??二維碼實驗\FWLIB\inc\stm32f4xx_cryp.h

............此處省略189個文件信息

評論

共有 條評論