入行新手,希望大家不吝赐教1
S12G128 16位 Code Warrior 5.2 代码如下:
编译报错 Error : C2450: Expected: ; = ,
希望各位大神给指点,谢谢!
.c文件:
sta
tic unsigned char bspInterruptNesting;
static tBspCanRxQCtrl canRxQCtrl[CAN_CHANNELS_MAX]; /**< CAN reception queue */
static tBspCanTxQCtrl canTxQCtrl[CAN_CHANNELS_MAX]; /**< CAN transmission queue */
static unsigned char canTxBusy[CAN_CHANNELS_MAX]; /**< transmit path semaphore */
byte check_TxQ_empty(void)
{
if(canTxQCtrl[0].entries ==0)return TRUE;
else return FALSE;
}
.h文件
typedef struct t_hw_can_msg
{
unsigned long id; /**< CAN message identifier */
unsigned char dlc; /**< CAN message data length */
unsigned char data[8]; /**< CAN message data */
} tBspCanMsg; /**< CAN message structure */
typedef struct t_hw_can_rx_q_entry
{
struct t_hw_can_rx_q_entry *prevPtr; /**< previous entry in the list */
tBspCanMsg msg; /**< CAN message structure */
struct t_hw_can_rx_q_entry *nextPtr; /**< next entry in the list */
} tBspCanRxQEntry; /**< CAN reception queue entry */
typedef struct t_hw_can_rx_q_ctrl
{
tBspCanRxQEntry *firstPtr; /**< first entry pointer */
tBspCanRxQEntry *freePtr; /**< next free entry pointer */
tBspCanRxQEntry data[BSP_CAN_RX_QUEUE_SIZE+1]; /**< actual queue data */
unsigned short entries; /**< number of full queue entries*/
} tBspCanRxQCtrl; /**< CAN reception queue control */
typedef struct t_hw_can_tx_q_entry
{
tBspCanMsg msg; /**< CAN message structure */
} tBspCanTxQEntry; /**< CAN transmit queue entry */
typedef struct t_hw_can_tx_q_ctrl
{
tBspCanTxQEntry data[BSP_CAN_TX_QUEUE_SIZE]; /**< actual queue data */
unsigned short readIdx; /**< FIFO read index */
unsigned short writeIdx; /**< FIFI write index */
unsigned short entries; /**< number of full queue entries*/
} tBspCanTxQCtrl; /**< CAN transmit queue control */
typedef struct t_hw_can_bus_timing
{
unsigned char tseg1; /**< CAN time segment 1 */
unsigned char tseg2; /**< CAN time segment 2 */
} tBspCanBusTiming; /**< bus timing structure type */
一周热门 更多>