?????????????
???????????? ???????[ 2010/12/27 10:38:45 ] ????????
???????????
??????????????????谓????????????谢?????????????????????????????????????????????????????????????????????????????????写????芯???????????????????????????
1 ??????璞�??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
2 ?卸???????????????????????????卸?????????貌????????????????????位?????????????????????????????????卸????????????????
3 ?????眉??????????????????????貌????????????屑浜�??????????????????????????????????????????????杌�??些?屑??????????????
4??????????????????????????????????????????????????????????????????????????
5 ??t???????????????PC-Lint??????绶�?????????PC-Lint??????????????????????????????????????位?????????????????????绶�????????????????????小????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
void test_ xxx_driver (void) // ????xxx????????
{
typedef struct _TEST_CASE // ????????????
{
UINT8* pBuf; //??写?????????
int len; //??写???????
STATUS result; // ????????OK??ERROR
} TESTCASE;
#define TEST_NUM 4 // ??????????
UINT8* rBuf;
TESTCASE testCase[TEST_NUM]={
{0??DATA_MAX_LEN+1??ERROR}?? // DATA_MAX_LEN??????写?????
{"a"??1??OK}??
{"12"??2??OK}??
{0??DATA_MAX_LEN??OK}
};
for (int i=0;i< TEST_NUM;i++)
{
if(write(testCase[i].pBuf??testCase[i].len) != testCase[i].result) // 写????
LOG ("test write failed!");
if(read(rBuf??testCase[i].len) != testCase[i].result) // ??????
LOG ("test read failed! ");
if(bcmp(testCase[i].pBuf??rBuf??testCase[i].len) != 0) // ????写????
LOG ("compare data failed! ");
}
}
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11