基于事件驅動的串口通訊控件
消息幀數據格式:
1 0 A B X X
其中 10 為消息標識,
AB表示文本長度,L=A*100+B
XX為配位字符,任意
控制幀數據格式
0 1 A B M N
其中 01為控制標識,
AB為請求標識
MN為附加標識
11表示請求對方接收文件,M表示描述字串中文件名子串的長度
N表示描述字串中文件大小子串的長度
10通知對方放棄傳輸
00通知文件傳輸完畢
01請求對方發送數據, MN為10請求發送下一個
MN為00請求重發
數據幀數據格式
0 0 A B M N
其中 00 為數據標識,
AB表示數據長度,L=A*100+B
MN為校驗,M*100+N=A+B
This a simple bootloader for AT91SAM7{S,X}{64,128,256} processors. It
permits you to download new code to the device over USB. This bootrom is
installed at address 0x00000000 in the ARM, which means that it is the
first piece of code to execute after reset. At startup, it waits for
a few seconds to see if the downloader is trying to connect. If not,
then the bootloader gives up control and jumps to your program. If the
downloader is trying to connect, then the bootloader receives the new
program over USB and writes it into flash.
% A 2D homogeneous convection-diffusion case (u=exp(-ex*deta*x-ex*deta*y) with a square with
% all Dirichlet boundary, note that reaction coefficient is not zero
% by indirect BKM
A 2D homogeneous Helmholtz case (u=sin(x)cos(y) with a square) with
% two Dirichlet edges (x=1,y=1) and two Neumann edges (x=0,y=0)
% by indirect symmetric BKM