Classes | Defines | Functions | Variables
can-net.c File Reference
#include "can-net.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for can-net.c:

Go to the source code of this file.

Classes

struct  AsebaCan

Defines

#define ASEBA_MIN(a, b)   (((a) < (b)) ? (a) : (b))
#define CANID_TO_ID(canid)   ((canid) & 0xff)
#define CANID_TO_TYPE(canid)   ((canid) >> 8)
#define MAX_DROPPING_SOURCE   20
#define TO_CANID(type, id)   (((type) << 8) | (id))
#define TYPE_PACKET_NORMAL   0x0
#define TYPE_PACKET_START   0x1
#define TYPE_PACKET_STOP   0x2
#define TYPE_SMALL_PACKET   0x3

Functions

void AsebaCanFlushQueue (void)
void AsebaCanFrameReceived (const CanFrame *frame)
void AsebaCanFrameSent ()
uint16 AsebaCanGetMinMultipleOfHeight (uint16 v)
void AsebaCanInit (uint16 id, AsebaCanSendFrameFP sendFrameFP, AsebaCanIntVoidFP isFrameRoomFP, AsebaCanVoidVoidFP receivedPacketDroppedFP, AsebaCanVoidVoidFP sentPacketDroppedFP, CanFrame *sendQueue, size_t sendQueueSize, CanFrame *recvQueue, size_t recvQueueSize)
uint16 AsebaCanRecv (uint8 *data, size_t size, uint16 *source)
uint16 AsebaCanRecvBufferEmpty (void)
void AsebaCanRecvFreeQueue (void)
static void AsebaCanRecvQueueFreeFrames (uint16 id)
static void AsebaCanRecvQueueGarbageCollect ()
static uint16 AsebaCanRecvQueueGetMaxUsedFrames ()
static uint16 AsebaCanRecvQueueGetMinFreeFrames ()
uint16 AsebaCanSend (const uint8 *data, size_t size)
static uint16 AsebaCanSendQueueGetFreeFrames ()
static uint16 AsebaCanSendQueueGetUsedFrames ()
static void AsebaCanSendQueueInsert (uint16 canid, const uint8 *data, size_t size)
static void AsebaCanSendQueueToPhysicalLayer ()
uint16 AsebaCanSendSpecificSource (const uint8 *data, size_t size, uint16 source)

Variables

static struct AsebaCan asebaCan
static uint16 dropping [MAX_DROPPING_SOURCE]

Define Documentation

#define ASEBA_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))

Definition at line 34 of file can-net.c.

#define CANID_TO_ID (   canid)    ((canid) & 0xff)

Definition at line 31 of file can-net.c.

#define CANID_TO_TYPE (   canid)    ((canid) >> 8)

Definition at line 30 of file can-net.c.

#define TO_CANID (   type,
  id 
)    (((type) << 8) | (id))

Definition at line 32 of file can-net.c.

#define TYPE_PACKET_NORMAL   0x0

Definition at line 26 of file can-net.c.

#define TYPE_PACKET_START   0x1

Definition at line 27 of file can-net.c.

#define TYPE_PACKET_STOP   0x2

Definition at line 28 of file can-net.c.

#define TYPE_SMALL_PACKET   0x3

Definition at line 25 of file can-net.c.


Variable Documentation

struct AsebaCan asebaCan [static]


aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17