Download Precise/RTCS™ User's Guide
Transcript
Data Types
8.3.1
_iopcb_handle, _iopcb_table
_iopcb_handle
A variable of _iopcb_handle structure is an input parameter to PPP_initialize().
typedef struct _iopcb_table {
uint_32 (_CODE_PTR_ OPEN)
uint_32
PCB_PTR
(_CODE_PTR_
(_CODE_PTR_
void
(_CODE_PTR_
uint_32
(_CODE_PTR_
} _PTR_
(struct _iopcb_table _PTR_,
void (_CODE_PTR_)(pointer),
void (_CODE_PTR_)(pointer),
pointer);
CLOSE) (struct _iopcb_table _PTR_);
READ) (struct _iopcb_table _PTR_,
uint_32);
WRITE) (struct _iopcb_table _PTR_,
PCB_PTR,
uint_32);
IOCTL) (struct _iopcb_table _PTR_,
uint_32,
pointer);
_iopcb_handle;
OPEN
Called by PPP Driver to open a link.
• First parameter — pointer to an I/O handle.
• Second parameter — pointer to a function that PPP Driver uses to put the link down.
• Third parameter — pointer to a function that PPP Driver uses to put the link up.
• Fourth parameter — the parameter for the up and down functions.
Returns a status code.
CLOSE
Called by PPP Driver to close a link and free memory.
• Parameter — pointer to an I/O handle.
Returns a status code.
READ
Called by PPP Driver to receive data.
• First parameter — pointer to an I/O handle.
• Second parameter — flags (ignored; must be zero).
Returns a pointer to a PCB.
WRITE
Called by PPP Driver to send data.
• First parameter — pointer to an I/O handle.
• Second parameter — pointer to a PCB to send.
Freescale MQX™ RTCS™ User’s Guide, Rev. 10
Freescale Semiconductor
331