if_robo.h
资源名称:bcm4702.rar [点击查看]
上传用户:yuanda199
上传日期:2022-06-26
资源大小:412k
文件大小:1k
源码类别:
VxWorks
开发平台:
C/C++
- /*
- * BCM53xx RoboSwitch utility functions
- *
- * Copyright (C) 2002 Broadcom Corporation
- *
- * $Id: if_robo.h,v 1.1 Broadcom SDK $
- */
- #ifndef _robo_h_
- #define _robo_h_
- /* Private state per RoboSwitch */
- typedef struct {
- void *sbh; /* SiliconBackplane handle */
- uint coreidx; /* Current core index */
- uint32 reset, ssl, clk, mosi, miso; /* GPIO mapping */
- int cid, page; /* Current chip ID and page */
- #ifdef _KERNEL_
- spinlock_t lock; /* per-device perimeter lock */
- #endif
- } robo_info_t;
- typedef void (*ROBO_READ)(robo_info_t *robo, uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- typedef void (*ROBO_WRITE)(robo_info_t *robo, uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- robo_info_t *robosw_attach(void *sbh, uint32 reset, uint32 ssl, uint32 clk, uint32 mosi, uint32 miso);
- void robosw_detach(robo_info_t *robo);
- void robosw_rreg(robo_info_t *robo, uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- void robosw_wreg(robo_info_t *robo, uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- void robo_mdio_rreg( uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- void robo_mdio_wreg( uint8 cid, uint8 page, uint8 addr, uint8 *buf, uint len);
- typedef struct robo_driver_s {
- char *drv_name;
- ROBO_READ robo_read;
- ROBO_WRITE robo_write;
- } robo_driver_t;
- #endif /* _robo_h_ */