#include "can-net.h"
#include <stdlib.h>
#include <string.h>
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, |
|
|
|
b |
|
) |
| (((a) < (b)) ? (a) : (b)) |
Variable Documentation