VxWorks BSP学习笔记(基于SBC8349E)
1. 串口驱动
1.1 串行驱动程序的重要结构
以下结构指出了驱动程序函数的入口点 ../target/h/sioLib.h
Typedef struct sio_drv_funcs /* driver functions */
{
int (*ioctl)
(
SIO_CHAN * pSioChan,
int cmd,
void * arg
);
int (*txStartup)
(
SIO_CHAN * pSioChan
);
int (*callbackInstall)
(
SIO_CHAN * pSioChan,
int callbackType,
STATUS (*callback)(void *, ...),
void * callbackArg
);
int (*pollInput)
(
SIO_CHAN * pSioChan,
char * inChar
);
int (*pollOutput)
(
SIO_CHAN * pSioChan,
char outChar
);
}SIO_DRV_FUNCS;
typedef struct sio_chan /* a serial channel */
{
<