at91rm3400 ATMEL Corporation, at91rm3400 Datasheet - Page 63

no-image

at91rm3400

Manufacturer Part Number
at91rm3400
Description
Atmel Advanced At91 Arm Microcontroller
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at91rm3400-AU-002
Manufacturer:
Atmel
Quantity:
10 000
Xmodem Service
Presentation
Communication Pipe
Service
1790A–ATARM–11/03
The Xmodem service is an application of the communication pipe abstract layer. This layer is
media-independent (USART, USB, etc.) and gives entry points to carry out reads and writes
on an abstract media, the pipe.
The pipe communication structure is a virtual structure that contains all the functions required
to read and write a buffer, regardless of the communication media and the memory
management.
The pipe structure defines:
The following structure defines the pipe object:
The Xmodem protocol implementation demonstrates how to use the communication pipe.
a pointer to a communication service structure
a pointer to a buffer manager structure
pointers on read and write functions
pointers to callback functions associated to the read and write functions
typedef struct _AT91S_Pipe
{
} AT91S_Pipe, *AT91PS_Pipe;
// A pipe is linked with a peripheral and a buffer
AT91PS_SvcComm pSvcComm;
AT91PS_Buffer
// Callback functions with their arguments
void (*WriteCallback) (AT91S_PipeStatus, void *);
void (*ReadCallback)
void *pPrivateReadData;
void *pPrivateWriteData;
// Pipe methods
AT91S_PipeStatus (*Write) (
AT91S_PipeStatus (*Read) (
AT91S_PipeStatus (*AbortWrite) (struct _AT91S_Pipe
AT91S_PipeStatus (*AbortRead) (struct _AT91S_Pipe *pPipe);
AT91S_PipeStatus (*Reset) (struct _AT91S_Pipe *pPipe);
char (*IsWritten) (struct _AT91S_Pipe *pPipe,char const *pVoid);
char (*IsReceived) (struct _AT91S_Pipe *pPipe,char const *pVoid);
struct _AT91S_Pipe
char const *
unsigned int
void
void
struct _AT91S_Pipe
char
unsigned int
void
void
pBuffer;
*pPipe,
*pData,
size,
(*callback) (AT91S_PipeStatus, void *),
*privateData);
(AT91S_PipeStatus, void *);
*pPipe,
pData,
size,
(*callback) (AT91S_PipeStatus, void *),
*privateData);
AT91PS_Buffer
AT91PS_SvcComm
*pPipe);
AT91RM3400
63

Related parts for at91rm3400