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

  • 大小: 9.78MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-17
  • 語言: 其他
  • 標(biāo)簽: STM32??BC28??NB_IOT??

資源簡(jiǎn)介

STM 32控制物聯(lián)網(wǎng)模塊BC28完成撥號(hào)上網(wǎng)等流程,實(shí)現(xiàn)與基站之間的信息交互,可初學(xué)者供參考設(shè)計(jì)。

資源截圖

代碼片段和文件信息

#include?“date_convert.h“
#include?
#include?“math.h“
#include?
#include?
/***************************************************************
*?函數(shù)名稱:?*StringToByte
*?說????明:字節(jié)轉(zhuǎn)字符
*?參????數(shù):?char?*pString,需要轉(zhuǎn)換的字符串
* unsigned?char?*pByte,轉(zhuǎn)換之后的字節(jié)串
*?返?回?值:?轉(zhuǎn)換之后的字節(jié)串
***************************************************************/
unsigned?char?*StringToByte(char?*pString?unsigned?char?*pByte)
{
unsigned?int?i?len?=?strlen(pString)?/?2;
char?Hex[3]?=?{?0?};

for?(i?=?0;?i? {
memcpy(Hex?pString?+?2?*?i?2);
pByte[i]?=?strtol(Hex?NULL?16);
}
return?pByte;
}

/***************************************************************
*?函數(shù)名稱:?*ByteToString
*?說????明:字節(jié)轉(zhuǎn)字符串
*?參????數(shù):?unsigned?char?*pByte,需要轉(zhuǎn)換的字節(jié)串
* char?*pString,轉(zhuǎn)換之后的字符串
* unsigned?int?len,len是轉(zhuǎn)換之前string的長(zhǎng)度
*?返?回?值:?轉(zhuǎn)換之后字符串
舉例:“12345”-->“31323333435“
***************************************************************/
char?*ByteToString(unsigned?char?*pByte?char?*pString?unsigned?int?len)
{
unsigned?int?i;
char?a?b;
for?(i?=?0;?i {
a?=?*(pByte?+?i)?/?16;
b?=?*(pByte?+?i)?%?16;
if?(a?<=?9?&&?b?<=?9)
{
*(pString?+?i?*?2)?=?a?+?‘0‘;
*(pString?+?i?*?2?+?1)?=?b?+?‘0‘;
}
else?if?(a?<=?9?&&?b>9)
{
*(pString?+?i?*?2)?=?a?+?‘0‘;
*(pString?+?i?*?2?+?1)?=?b?-?10?+?‘A‘;
}
else?if?(a>9?&&?b?<=?9)
{
*(pString?+?i?*?2)?=?a?-?10?+?‘A‘;
*(pString?+?i?*?2?+?1)?=?b?+?‘0‘;
}
else
{
*(pString?+?i?*?2)?=?a?-?10?+?‘A‘;
*(pString?+?i?*?2?+?1)?=?b?-?10?+?‘A‘;
}
}
*(pString?+?i?*?2)?=?‘\0‘;
return?pString;
}

/***************************************************************
*?函數(shù)名稱:?*DecToString
*?說????明:十進(jìn)制數(shù)轉(zhuǎn)字符串形式
*?參????數(shù):?unsigned?int?Dec,需要轉(zhuǎn)換的十進(jìn)制數(shù)據(jù)
* char?*pString,轉(zhuǎn)換之后的字符串
*?返?回?值:?轉(zhuǎn)換之后字符串
舉例:123-->“123“
***************************************************************/
char?*DecToString(unsigned?int?Dec?char?*pString)
{
unsigned?char?i?=?0?j?=?0;
unsigned?int?Num;
Num?=?Dec;
while?(Num?>=?10)
{
Num?/=?10;
i++;
}
i++;
while?(i)
{
*(pString?+?j)?=?Dec?/?pow(10?i?-?1)?+?‘0‘;
Dec?%=?(uint16_t)pow(10?i?-?1);
i--;
j++;
}
*(pString?+?j)?=?‘\0‘;
return?pString;
}

/***************************************************************
*?函數(shù)名稱:?str_to_hex
*?說????明:數(shù)字字符串轉(zhuǎn)換成對(duì)應(yīng)的hex值,并組成新的字符串
*?參????數(shù):?bufin:需要轉(zhuǎn)換的數(shù)字字符串
len:數(shù)字字符串長(zhǎng)度
* bufout:轉(zhuǎn)換之后的字符串
*?返?回?值:?0:成功??-1:失敗
舉例:“12345“?-->“3132333435“
***************************************************************/
int?Str_to_Hex(const?char?*bufin?int?len?char?*bufout)
{
????int?i?=?0;
????if?(NULL?==?bufin?||?len?<=?0?||?NULL?==?bufout)
????{
????????return?-1;
????}
????for(i?=?0;?i?????{
????????sprintf(bufout+i*2?“%02X“?bufin[i]);
????}
????return?0;
}

/***************************************************************
*?函數(shù)名稱:?HexStr_to_Str
*?說????明:hex字符串轉(zhuǎn)換成字符串
*?參????數(shù):?source:需要轉(zhuǎn)換的字符串
* dest:轉(zhuǎn)換之后的字符串

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????3972??2019-01-03?18:17??Hardware\date_convert.c

?????文件????????287??2018-12-20?20:32??Hardware\date_convert.h

?????文件????????610??2018-12-20?20:26??Hardware\delay.c

?????文件????????529??2018-12-21?08:33??Hardware\delay.h

?????文件??????50286??2019-01-15?14:42??Hardware\NB_BC28.c

?????文件???????3815??2019-01-15?14:42??Hardware\NB_BC28.h

?????文件???????3141??2018-12-20?17:07??Inc\adc.h

?????文件???????3137??2018-12-20?16:14??Inc\dma.h

?????文件???????3042??2018-12-20?16:14??Inc\gpio.h

?????文件???????4037??2018-12-20?20:23??Inc\main.h

?????文件??????15546??2018-12-20?16:14??Inc\stm32l4xx_hal_conf.h

?????文件???????3158??2018-12-20?16:14??Inc\stm32l4xx_it.h

?????文件???????4804??2018-12-25?20:05??Inc\usart.h

?????文件???????5226??2017-06-01?13:45??MDK-ARM\DebugConfig\NB_IoT_STM32L431RCTx.dbgconf

?????文件??????98380??2019-01-04?14:30??MDK-ARM\JlinkLog.txt

?????文件????????755??2019-01-04?14:30??MDK-ARM\JlinkSettings.ini

?????文件?????852872??2019-01-15?14:43??MDK-ARM\NB_IoT\adc.crf

?????文件???????2542??2019-01-15?14:43??MDK-ARM\NB_IoT\adc.d

?????文件?????954564??2019-01-15?14:43??MDK-ARM\NB_IoT\adc.o

?????文件?????870952??2019-01-15?14:43??MDK-ARM\NB_IoT\date_convert.crf

?????文件???????3133??2019-01-15?14:43??MDK-ARM\NB_IoT\date_convert.d

?????文件?????967128??2019-01-15?14:43??MDK-ARM\NB_IoT\date_convert.o

?????文件?????851139??2019-01-15?14:43??MDK-ARM\NB_IoT\delay.crf

?????文件???????2582??2019-01-15?14:43??MDK-ARM\NB_IoT\delay.d

?????文件?????950752??2019-01-15?14:43??MDK-ARM\NB_IoT\delay.o

?????文件?????851144??2019-01-15?14:43??MDK-ARM\NB_IoT\dma.crf

?????文件???????2485??2019-01-15?14:43??MDK-ARM\NB_IoT\dma.d

?????文件?????948424??2019-01-15?14:43??MDK-ARM\NB_IoT\dma.o

?????文件?????852710??2019-01-15?14:43??MDK-ARM\NB_IoT\gpio.crf

?????文件???????2526??2019-01-15?14:43??MDK-ARM\NB_IoT\gpio.d

............此處省略116個(gè)文件信息

評(píng)論

共有 條評(píng)論