Lines Matching refs:buffer

85 	CO_CANrx_t *buffer;  in canopen_rx_callback()  local
92 buffer = &CANmodule->rx_array[i]; in canopen_rx_callback()
94 if (buffer->filter_id == -ENOSPC || buffer->pFunct == NULL) { in canopen_rx_callback()
98 if (((frame->id ^ buffer->ident) & buffer->mask) == 0U) { in canopen_rx_callback()
102 buffer->pFunct(buffer->object, &rxMsg); in canopen_rx_callback()
132 CO_CANtx_t *buffer; in canopen_tx_retry() local
141 buffer = &CANmodule->tx_array[i]; in canopen_tx_retry()
142 if (buffer->bufferFull) { in canopen_tx_retry()
143 frame.id = buffer->ident; in canopen_tx_retry()
144 frame.dlc = buffer->DLC; in canopen_tx_retry()
145 frame.flags |= (buffer->rtr ? CAN_FRAME_RTR : 0); in canopen_tx_retry()
146 memcpy(frame.data, buffer->data, buffer->DLC); in canopen_tx_retry()
161 buffer->bufferFull = false; in canopen_tx_retry()
294 CO_CANrx_t *buffer; in CO_CANrxBufferInit() local
307 buffer = &CANmodule->rx_array[index]; in CO_CANrxBufferInit()
308 buffer->object = object; in CO_CANrxBufferInit()
309 buffer->pFunct = pFunct; in CO_CANrxBufferInit()
310 buffer->ident = ident; in CO_CANrxBufferInit()
311 buffer->mask = mask; in CO_CANrxBufferInit()
317 if (buffer->filter_id != -ENOSPC) { in CO_CANrxBufferInit()
318 can_remove_rx_filter(CANmodule->dev, buffer->filter_id); in CO_CANrxBufferInit()
321 buffer->filter_id = can_add_rx_filter(CANmodule->dev, in CO_CANrxBufferInit()
324 if (buffer->filter_id == -ENOSPC) { in CO_CANrxBufferInit()
338 CO_CANtx_t *buffer; in CO_CANtxBufferInit() local
351 buffer = &CANmodule->tx_array[index]; in CO_CANtxBufferInit()
352 buffer->ident = ident; in CO_CANtxBufferInit()
353 buffer->rtr = rtr; in CO_CANtxBufferInit()
354 buffer->DLC = noOfBytes; in CO_CANtxBufferInit()
355 buffer->bufferFull = false; in CO_CANtxBufferInit()
356 buffer->syncFlag = syncFlag; in CO_CANtxBufferInit()
358 return buffer; in CO_CANtxBufferInit()
361 CO_ReturnError_t CO_CANsend(CO_CANmodule_t *CANmodule, CO_CANtx_t *buffer) in CO_CANsend() argument
367 if (!CANmodule || !CANmodule->dev || !buffer) { in CO_CANsend()
375 if (buffer->bufferFull) { in CO_CANsend()
378 CO_EMC_CAN_OVERRUN, buffer->ident); in CO_CANsend()
380 buffer->bufferFull = false; in CO_CANsend()
384 frame.id = buffer->ident; in CO_CANsend()
385 frame.dlc = buffer->DLC; in CO_CANsend()
386 frame.flags = (buffer->rtr ? CAN_FRAME_RTR : 0); in CO_CANsend()
387 memcpy(frame.data, buffer->data, buffer->DLC); in CO_CANsend()
392 buffer->bufferFull = true; in CO_CANsend()
408 CO_CANtx_t *buffer; in CO_CANclearPendingSyncPDOs() local
418 buffer = &CANmodule->tx_array[i]; in CO_CANclearPendingSyncPDOs()
419 if (buffer->bufferFull && buffer->syncFlag) { in CO_CANclearPendingSyncPDOs()
420 buffer->bufferFull = false; in CO_CANclearPendingSyncPDOs()