xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 5.74MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-23
  • 語言: 其他
  • 標(biāo)簽: STM8??003??模擬??串口??UART??

資源簡(jiǎn)介

在IAR環(huán)境中,用庫函數(shù)實(shí)現(xiàn)STM8S003單片機(jī)的模擬串口功能,用普通IO口作為串口,可以通過中斷方式接收數(shù)據(jù),也可以通過查詢方式接收數(shù)據(jù)。9600波特率測(cè)試。

資源截圖

代碼片段和文件信息

#include?“bsp.h“
#include?“stdio.h“

//#define????SIM_UART_WAIT??1?????????//?如果需要查詢方式接收?取消屏蔽

void?main(?void?)
{
????u8?i?=?0;
????//ASCII碼字符串??注意?“?要用轉(zhuǎn)義字符
????char?str_ASCII[100]?=?“?!\“#$%&‘()*+-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_‘a(chǎn)bcdefghijklmnopqrstuvwxyz{|}~“;
????disableInterrupts();
????BSP_Initializes();
????enableInterrupts();
????TIM4_Nms(?100?);
????WriteString(“simulate?URAT\r\n“);
????while(?1?)
????{

#if?defined(SIM_UART_WAIT)
???????//==============查詢方式接收數(shù)據(jù)========================//
????????GPIOB->CR2&=~(1<<4);????????????????//禁止PB4外部中斷
????????ReadString();???????????????????????//查詢方式接收
???????//======================================================//
#else
???????//-------------------中斷方式接收數(shù)據(jù)--------------------//
????????if(?recEnd?==?0x03?)??????????//判斷數(shù)據(jù)是否接收完成
????????{
????????????WriteString(?recBUFF?);
????????????recEnd?=?0x00;
????????????for(?i?=?0;?i?????????????{
????????????????recBUFF[i]?=?0;
????????????}
????????}
#endif

???????//------------------------------------------------------//
????????if(?1?==?time4_Flag?)
????????{
????????????//定時(shí)發(fā)送數(shù)據(jù)
????????????//WriteByte(?i?);
????????????//WriteString(?str_ASCII?);
????????????//WriteString(?“\r\n“?);
????????????time4_Flag?=?0;
????????????LED_REVERSE;
????????????TIM4_Nms(?100?);
????????}
????}
}


/*斷言函數(shù):它的作用是在編程的過程中為程序提供參數(shù)檢查*/
#ifdef?USE_FULL_ASSERT
void?assert_failed(?u8*?file?u32?line?)
{
????/*?User?can?add?his?own?implementation?to?report?the?file?name?and?line?number
????ex:?printf(“Wrong?parameters?value:?file?%s?on?line?%d\r\n“?file?line)?*/
????/*?Infinite?loop?*/
????while(?1?)
????{
????}
}
#endif

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

?????文件???????1837??2018-02-06?09:32??STM8S_IR_SimUart\App\main.c

?????文件???????1527??2018-02-05?15:54??STM8S_IR_SimUart\App\main.c.orig

?????文件???????4957??2018-01-20?15:33??STM8S_IR_SimUart\App\stm8s_conf.h

?????文件??????14704??2018-02-05?14:41??STM8S_IR_SimUart\App\stm8s_it.c

?????文件???????5951??2014-10-22?00:31??STM8S_IR_SimUart\App\stm8s_it.h

?????文件???????1294??2018-02-05?11:06??STM8S_IR_SimUart\Bsp\bsp.c

?????文件????????595??2018-02-05?11:06??STM8S_IR_SimUart\Bsp\bsp.h

?????文件???????2313??2018-01-20?17:13??STM8S_IR_SimUart\Bsp\delay.c

?????文件????????376??2018-01-20?17:16??STM8S_IR_SimUart\Bsp\delay.h

?????文件????????137??2018-01-22?14:02??STM8S_IR_SimUart\Bsp\led.c

?????文件????????523??2018-01-26?11:06??STM8S_IR_SimUart\Bsp\led.h

?????文件???????5139??2018-02-05?17:32??STM8S_IR_SimUart\Bsp\sim_uart.c

?????文件????????744??2018-02-05?14:40??STM8S_IR_SimUart\Bsp\sim_uart.h

?????文件????????847??2018-02-03?09:35??STM8S_IR_SimUart\Bsp\timer4_it.c

?????文件????????242??2018-02-03?09:33??STM8S_IR_SimUart\Bsp\timer4_it.h

?????文件??????????3??2018-01-20?16:29??STM8S_IR_SimUart\BuildLog.log

?????文件??????17975??2018-01-24?09:31??STM8S_IR_SimUart\Debug\Exe\ADC.hex

?????文件??????10131??2018-01-29?10:05??STM8S_IR_SimUart\Debug\Exe\eeprom.hex

?????文件???????8216??2018-01-30?09:12??STM8S_IR_SimUart\Debug\Exe\exti.hex

?????文件??????10131??2018-01-29?11:03??STM8S_IR_SimUart\Debug\Exe\flash.hex

?????文件??????20315??2018-02-03?08:55??STM8S_IR_SimUart\Debug\Exe\iic.hex

?????文件??????16727??2018-02-03?16:21??STM8S_IR_SimUart\Debug\Exe\ir_remote.hex

?????文件???????8719??2018-01-29?14:03??STM8S_IR_SimUart\Debug\Exe\iwdg.hex

?????文件???????3211??2018-01-22?14:37??STM8S_IR_SimUart\Debug\Exe\KEY.hex

?????文件??????89744??2018-02-06?15:47??STM8S_IR_SimUart\Debug\Exe\SimUart.out

?????文件???????4651??2018-02-06?15:47??STM8S_IR_SimUart\Debug\Exe\sim_uart.hex

?????文件???????2775??2018-01-23?11:50??STM8S_IR_SimUart\Debug\Exe\TIM.hex

?????文件??????19716??2018-01-26?14:21??STM8S_IR_SimUart\Debug\Exe\tim1_pwm.hex

?????文件???????6367??2018-01-23?15:04??STM8S_IR_SimUart\Debug\Exe\UART.hex

?????文件???????8705??2018-01-29?14:51??STM8S_IR_SimUart\Debug\Exe\wwdg.hex

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

評(píng)論

共有 條評(píng)論

相關(guān)資源