📄 at91_uart_write.c
字号:
/* * can_write - can4linux CAN driver module * * * can4linux -- LINUX CAN device driver source * * Copyright (c) 2001 port GmbH Halle/Saale * (c) 2001 Heinz-J�rgen Oertel (oe@port.de) * Claus Schroeter (clausi@chemie.fu-berlin.de) * derived from the the LDDK can4linux version * (c) 1996,1997 Claus Schroeter (clausi@chemie.fu-berlin.de) *------------------------------------------------------------------ * $Header: /z2/cvsroot/products/0530/software/can4linux/src/can_write.c,v 1.12 2005/07/22 12:01:47 oe Exp $ * *-------------------------------------------------------------------------- * * * modification history * -------------------- * $Log: can_write.c,v $ * Revision 1.12 2005/07/22 12:01:47 oe * applied patch by Steven Scholz * - new ioctl( , CONF_LISTEN_ONLY_MODE, ) * - replaced verify_area() by !access_ok() * * Revision 1.11 2005/04/01 16:07:21 oe * - replacesd cli() ... stuff * * Revision 1.10 2005/02/07 11:18:15 oe * - deleted old #if 0 stuff * * Revision 1.9 2004/12/14 09:35:45 oe * - bug fix by Henrik Maier * * Revision 1.8 2004/05/14 10:02:54 oe * - started supporting CPC-Card * - version number in can4linux.h available * - only one structure type for Config_par_t Command_par_t * - new ioctl command CMD_CLEARBUFFERS * * Revision 1.7 2003/07/05 14:28:55 oe * - all changes for the new 3.0: try to eliminate hw depedencies at run-time. * configure for HW at compile time * * Revision 1.6 2002/08/20 05:57:22 oe * - new write() handling, now not ovrwriting buffer content if buffer fill * - ioctl() get status returns buffer information * * Revision 1.5 2002/08/08 18:05:57 oe * *** empty log message *** * * Revision 1.4 2001/09/14 14:58:09 oe * first free release * * Revision 1.3 2001/09/04 15:51:44 oe * changed struct file_operations can_fops * * Revision 1.2 2001/06/15 15:32:49 oe * - added PCI support EMS CPC-PCI * * Revision 1.1.1.1 2001/06/11 18:30:54 oe * minimal version can4linux embedded, compile time Konfigurierbar * * * * *-------------------------------------------------------------------------- *//*** \file can_write.c* \author Heinz-J�rgen Oertel, port GmbH* $Revision: 1.12 $* $Date: 2005/07/22 12:01:47 $**/#include "at91_uart_defs.h"/* \fn size_t can_write( __LDDK_WRITE_PARAM) *//***************************************************************************//**\brief size_t write(int fd, const char *buf, size_t count);write CAN messages to the network\param fd The descriptor to write to.\param buf The data buffer to write (array of CAN canmsg_t).\param count The number of bytes to write.write writes up to \a count CAN messages to the CAN controllerreferenced by the file descriptor fd from the bufferstarting at buf.\par Errorsthe following errors can occur\li \c EBADF fd is not a valid file descriptor or is not open for writing.\li \c EINVAL fd is attached to an object which is unsuitable for writing.\li \c EFAULT buf is outside your accessible address space.\li \c EINTR The call was interrupted by a signal before any data was written.\returnsOn success, the number of CAN messages written are returned(zero indicates nothing was written).On error, -1 is returned, and errno is set appropriately.\internal*/__LDDK_WRITE_TYPE at91_uart_write( __LDDK_WRITE_PARAM ){ return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -