[code=c]
#define TxBufferSize1 (countof(TxBuffer1) - 1)
#define RxBufferSize1 (countof(TxBuffer1) - 1)
#define countof(a) (sizeof(a) / sizeof(*(a)))
#define BufferSize (countof(Tx_Buffer)-1)[/code]
关于TxBufferSize1 为什么是TxBufferSize1元素个数减1?TxBuffer1包括了结束符?
|
|