Commit c76cda7c authored by Guilherme Sanches's avatar Guilherme Sanches

Merge commit 'f9267f34' of...

Merge commit 'f9267f34' of http://spass-git.gmv.es/spass_admin/esroscos_xky into xky4.8-dev-canbus-configure
parents c6d2b1b0 f9267f34

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# C compiled files
*.exe
*.o
*.map
*.num
*.o
*.ralf
*.txt
......@@ -15,13 +16,28 @@ Makefile.rej
# Install directory
xky/install
o-optimize-*/
b-*/
# 'configure' generated files
.config
xky/.air_config
# Examples generated files
xky/examples/**/*.a
xky/examples/**/*.ld
xky/examples/**/config
xky/examples/**/go.sh
xky/examples/**/init.c
xky/examples/**/init.template
xky/examples/**/linkcmds.inc
xky/examples/**/rtems_config.h
xky/examples/**/.config
# log/tags/tmp files
*.log
.*.swp
.*-swp
tags
# Eclipse
......
/**
* @file IOPethernet.h
*
* COPYRIGHT (c) 2011.
* GMV-SKYSOFT
*
* @author Cludio Silva
* @brief Access points to the greth driver
*
*
*/
#ifndef _IOPETHERNET_H_
#define _IOPETHERNET_H_
#include "iop.h"
/**
* \param [in] major : not used
* \param [in] minor : not used
* \param [in] arg : not used.
*
* \return Status of the operation
*
* returns RTEMS_INTERNAL_ERROR if no greth device was found.
*
* \brief Initializes the Greth Core
**/
rtems_device_driver greth_initialize(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg);
/**
* \param [in] major : not used
* \param [in] minor : not used
* \param [in] arg : not used.
*
* \return Status of the operation
* \return RTEMS_NOT_CONFIGURED if the device was not initialized
*
* \brief prepares the device for communication
**/
rtems_device_driver greth_open(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg);
/**
* \param [in] major : not used
* \param [in] minor : not used
* \param [in] arg : not used.
*
* \return Status of the operation \n
* \return RTEMS_NOT_CONFIGURED if the device was not initialized
*
* \brief stops the device
**/
rtems_device_driver greth_close(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg);
/**
* \param [in] major : not used
* \param [in] minor : not used
* \param [in] arg : struct greth_args with read buffer
*
* \return Status of the operation: \n
* RTEMS_NOT_CONFIGURED if the device was not initialized \n
* RTEMS_INVALID_NAME if the user argument (void *arg) is inconsistent \n
* RTEMS_RESOURCE_IN_USE there is no data to be read and we can't block \n
* RTEMS_SUCCESSFUL otherwise \n
*
* \brief stops the device
**/
rtems_device_driver greth_read(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg);
/**
* \param [in] major : not used
* \param [in] minor : not used
* \param [in] arg : struct greth_args containing the read buffer
*
* \return Status of the operation:\n
* RTEMS_NOT_CONFIGURED if the device was not initialized\n
* RTEMS_INVALID_NAME if the user argument (void *arg) is inconsistent\n
* RTEMS_SUCCESSFUL otherwise\n
*
* \brief stops the device
**/
rtems_device_driver greth_write(rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg);
#endif
This diff is collapsed.
/**
* @file IOPgreth.h
*
* COPYRIGHT (c) 2011.
* GMV-SKYSOFT
*
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* @ingroup Drivers
* @author Cludio Silva
* @brief GRETH ethernet driver macros and definitions
* @note adapted from Gaisler Research ethernet MAC driver
*
* Interrupts and dependency from the RTEMS BSD TCP/IP stack were removed.
* Access to the driver is now done through the usual RTEMS IO access points.
*/
#ifndef _GR_ETH_
#define _GR_ETH_
#include <stdint.h>
#include <rtems.h>
#define GRETH_TOTAL_BD 128 /**< Max number of decriptors*/
#define GRETH_MAXBUF_LEN 1520 /**< Ethernet max frame size*/
/**
* @name TX Descriptor
* @attention some of these are not from greth but from greth_gbit
*/
#define GRETH_TXD_ENABLE 0x0800 /**< Tx BD Enable */
#define GRETH_TXD_WRAP 0x1000 /**< Tx BD Wrap (last BD) */
#define GRETH_TXD_IRQ 0x2000 /**< Tx BD IRQ Enable */
#define GRETH_TXD_MORE 0x20000 /**< Tx BD More (more descs for packet) */
#define GRETH_TXD_IPCS 0x40000 /**< Tx BD insert ip chksum */
#define GRETH_TXD_TCPCS 0x80000 /**< Tx BD insert tcp chksum */
#define GRETH_TXD_UDPCS 0x100000 /**< Tx BD insert udp chksum */
#define GRETH_TXD_UNDERRUN 0x4000 /**< Tx BD Underrun Status */
#define GRETH_TXD_RETLIM 0x8000 /**< Tx BD Retransmission Limit Status */
#define GRETH_TXD_LATECOL 0x10000 /**< Tx BD Late Collision */
#define GRETH_TXD_STATS (GRETH_TXD_UNDERRUN | \
GRETH_TXD_RETLIM | \
GRETH_TXD_LATECOL)
#define GRETH_TXD_CS (GRETH_TXD_IPCS | \
GRETH_TXD_TCPCS | \
GRETH_TXD_UDPCS)
/**
* @name RX Descriptor
* @attention some of these are not from greth but from greth_gbit
*/
#define GRETH_RXD_ENABLE 0x0800 /**< Rx BD Enable */
#define GRETH_RXD_WRAP 0x1000 /**< Rx BD Wrap (last BD) */
#define GRETH_RXD_IRQ 0x2000 /**< Rx BD IRQ Enable */
#define GRETH_RXD_DRIBBLE 0x4000 /**< Rx BD Dribble Nibble Status */
#define GRETH_RXD_TOOLONG 0x8000 /**< Rx BD Too Long Status */
#define GRETH_RXD_CRCERR 0x10000 /**< Rx BD CRC Error Status */
#define GRETH_RXD_OVERRUN 0x20000 /**< Rx BD Overrun Status */
#define GRETH_RXD_LENERR 0x40000 /**< Rx BD Length Error */
#define GRETH_RXD_ID 0x40000 /**< Rx BD IP Detected */
#define GRETH_RXD_IR 0x40000 /**< Rx BD IP Chksum Error */
#define GRETH_RXD_UD 0x40000 /**< Rx BD UDP Detected*/
#define GRETH_RXD_UR 0x40000 /**< Rx BD UDP Chksum Error */
#define GRETH_RXD_TD 0x40000 /**< Rx BD TCP Detected */
#define GRETH_RXD_TR 0x40000 /**< Rx BD TCP Chksum Error */
#define GRETH_RXD_STATS (GRETH_RXD_OVERRUN | \
GRETH_RXD_DRIBBLE | \