CANopenLinux
CANopenNode on Linux devices
Loading...
Searching...
No Matches
CO_driver_target.h File Reference

Linux socketCAN specific definitions for CANopenNode. More...

#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <endian.h>
#include <pthread.h>
#include <linux/can.h>
#include <net/if.h>
#include <sys/epoll.h>
#include "CO_error.h"
+ Include dependency graph for CO_driver_target.h:

Go to the source code of this file.

Macros

#define CO_DRIVER_MULTI_INTERFACE   0
 Multi interface support.
 
#define CO_DRIVER_ERROR_REPORTING   1
 CAN bus error reporting.
 

Functions

CO_ReturnError_t CO_CANmodule_addInterface (CO_CANmodule_t *CANmodule, int can_ifindex)
 Add socketCAN interface to can driver.
 
bool_t CO_CANrxBuffer_getInterface (CO_CANmodule_t *CANmodule, uint16_t ident, const void **const CANptrRx, struct timespec *timestamp)
 Check on which interface the last message for one message buffer was received.
 
CO_ReturnError_t CO_CANtxBuffer_setInterface (CO_CANmodule_t *CANmodule, uint16_t ident, const void *CANptrTx)
 Set which interface should be used for message buffer transmission.
 
bool_t CO_CANrxFromEpoll (CO_CANmodule_t *CANmodule, struct epoll_event *ev, CO_CANrxMsg_t *buffer, int32_t *msgIndex)
 Receives CAN messages from matching epoll event.
 

Detailed Description

Linux socketCAN specific definitions for CANopenNode.

Author
Janez Paternoster
Martin Wagner

This file is part of https://github.com/CANopenNode/CANopenNode, a CANopen Stack.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.