usbklsiend.c

来自「MPC5200 BSP 支持ATA,USB, I2C,扩展网口」· C语言 代码 · 共 1,799 行 · 第 1/5 页

C
1,799
字号
    0xc8, 0x07, 0x5a, 0x08, 0xc1, 0x07, 0x00, 0x80,    0x50, 0xaf, 0x97, 0xcf, 0x59, 0xaf, 0x97, 0xcf,    0x00, 0x60, 0x05, 0xc0, 0xe7, 0x07, 0x00, 0x00,    0x9a, 0x08, 0xa7, 0xcf, 0x58, 0x08, 0x9f, 0xaf,    0xe2, 0x0b, 0xe7, 0x07, 0x01, 0x00, 0x9a, 0x08,    0x49, 0xaf, 0xd7, 0x09, 0x00, 0xc0, 0x07, 0xaf,    0xe7, 0x05, 0x00, 0xc0, 0x4a, 0xaf, 0xa7, 0xcf,    0x58, 0x08, 0xc0, 0x07, 0x40, 0x00, 0x44, 0xaf,    0x27, 0x00, 0xa0, 0x08, 0x08, 0x00, 0xc0, 0x07,    0x20, 0x00, 0x20, 0x94, 0x00, 0xda, 0x7d, 0xc1,    0xc0, 0x07, 0xfe, 0x7f, 0x44, 0xaf, 0x40, 0x00,    0x41, 0x90, 0xc0, 0x37, 0x08, 0x00, 0xdf, 0xde,    0x50, 0x06, 0xc0, 0x57, 0x10, 0x00, 0x02, 0xc2,    0xc0, 0x07, 0x10, 0x00, 0x27, 0x00, 0x76, 0x08,    0x41, 0x90, 0x9f, 0xde, 0x40, 0x06, 0x44, 0xaf,    0x27, 0x00, 0x74, 0x08, 0xc0, 0x09, 0x76, 0x08,    0x41, 0x90, 0x00, 0xd2, 0x00, 0xd8, 0x9f, 0xde,    0x08, 0x00, 0x44, 0xaf, 0x27, 0x00, 0x9e, 0x08,    0x97, 0xcf, 0xe7, 0x87, 0x00, 0x84, 0x28, 0xc0,    0xe7, 0x67, 0xff, 0xf3, 0x24, 0xc0, 0x97, 0xcf,    0xe7, 0x87, 0x01, 0x00, 0xaa, 0x08, 0xe7, 0x57,    0x00, 0x00, 0x7a, 0x08, 0x97, 0xc1, 0x9f, 0xaf,    0xe2, 0x0b, 0xe7, 0x87, 0x00, 0x06, 0x22, 0xc0,    0xe7, 0x07, 0x00, 0x00, 0x90, 0xc0, 0xe7, 0x67,    0xfe, 0xff, 0x3e, 0xc0, 0xe7, 0x07, 0x2e, 0x00,    0x0a, 0xc0, 0xe7, 0x87, 0x01, 0x00, 0x3e, 0xc0,    0xe7, 0x07, 0xff, 0xff, 0x94, 0x08, 0x9f, 0xaf,    0xf0, 0x0c, 0x97, 0xcf, 0x17, 0x00, 0xa7, 0xaf,    0x54, 0x08, 0xc0, 0x05, 0x27, 0x00, 0x52, 0x08,    0xe7, 0x87, 0x01, 0x00, 0xaa, 0x08, 0x9f, 0xaf,    0xe2, 0x0b, 0xe7, 0x07, 0x0c, 0x00, 0x40, 0xc0,    0x9f, 0xaf, 0xf0, 0x0c, 0xe7, 0x07, 0x00, 0x00,    0x78, 0x08, 0x00, 0x90, 0xe7, 0x09, 0x88, 0x08,    0x8a, 0x08, 0x27, 0x00, 0x84, 0x08, 0x27, 0x00,    0x7c, 0x08, 0x9f, 0xaf, 0x8a, 0x0c, 0xe7, 0x07,    0x00, 0x00, 0xb2, 0x02, 0xe7, 0x07, 0x00, 0x00,    0xb4, 0x02, 0xc0, 0x07, 0x06, 0x00, 0xc8, 0x09,    0xde, 0x00, 0xc8, 0x17, 0x03, 0x00, 0xc9, 0x07,    0x7e, 0x08, 0x29, 0x0a, 0x00, 0xda, 0x7d, 0xc1,    0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf,    0x00, 0x90, 0x27, 0x00, 0x6a, 0x08, 0xe7, 0x07,    0x6a, 0x08, 0x6c, 0x08, 0x27, 0x00, 0x6e, 0x08,    0xe7, 0x07, 0x6e, 0x08, 0x70, 0x08, 0x27, 0x00,    0x78, 0x08, 0x27, 0x00, 0x62, 0x08, 0x27, 0x00,    0x64, 0x08, 0xc8, 0x09, 0x74, 0x08, 0xc1, 0x09,    0x76, 0x08, 0xc9, 0x07, 0x72, 0x08, 0x11, 0x02,    0x09, 0x02, 0xc8, 0x17, 0x40, 0x06, 0x01, 0xda,    0x7a, 0xc1, 0x51, 0x94, 0xc8, 0x09, 0x9e, 0x08,    0xc9, 0x07, 0x9c, 0x08, 0xc1, 0x09, 0x76, 0x08,    0x01, 0xd2, 0x01, 0xd8, 0x11, 0x02, 0x09, 0x02,    0xc8, 0x17, 0x08, 0x00, 0x01, 0xda, 0x7a, 0xc1,    0x51, 0x94, 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf,    0xe7, 0x57, 0x00, 0x00, 0x52, 0x08, 0x97, 0xc0,    0x9f, 0xaf, 0x04, 0x00, 0xe7, 0x09, 0x94, 0x08,    0x90, 0x08, 0xe7, 0x57, 0xff, 0xff, 0x90, 0x08,    0x04, 0xc1, 0xe7, 0x07, 0xf0, 0x0c, 0x8e, 0x08,    0x97, 0xcf, 0xe7, 0x17, 0x32, 0x00, 0x90, 0x08,    0xe7, 0x67, 0xff, 0x07, 0x90, 0x08, 0xe7, 0x07,    0x26, 0x0d, 0x8e, 0x08, 0x97, 0xcf, 0xd7, 0x09,    0x00, 0xc0, 0xc1, 0xdf, 0xe7, 0x57, 0x00, 0x00,    0x96, 0x08, 0x23, 0xc0, 0xe7, 0x07, 0x00, 0x80,    0x80, 0xc0, 0xe7, 0x07, 0x04, 0x00, 0x90, 0xc0,    0xe7, 0x07, 0x00, 0x00, 0x80, 0xc0, 0xe7, 0x07,    0x00, 0x80, 0x80, 0xc0, 0xc0, 0x07, 0x00, 0x00,    0xc0, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00,    0xe7, 0x07, 0x00, 0x00, 0x80, 0xc0, 0xe7, 0x07,    0x00, 0x80, 0x80, 0xc0, 0xe7, 0x07, 0x00, 0x80,    0x40, 0xc0, 0xc0, 0x07, 0x00, 0x00, 0xe7, 0x07,    0x00, 0x00, 0x40, 0xc0, 0xe7, 0x07, 0x00, 0x00,    0x80, 0xc0, 0xef, 0x57, 0x00, 0x00, 0xf1, 0x09,    0x9f, 0xa0, 0xc0, 0x0d, 0xe7, 0x07, 0x04, 0x00,    0x90, 0xc0, 0xe7, 0x07, 0x00, 0x02, 0x40, 0xc0,    0xe7, 0x07, 0x0c, 0x02, 0x40, 0xc0, 0xe7, 0x07,    0x00, 0x00, 0x96, 0x08, 0xe7, 0x07, 0x00, 0x00,    0x8e, 0x08, 0xe7, 0x07, 0x00, 0x00, 0xaa, 0x08,    0xd7, 0x09, 0x00, 0xc0, 0xc1, 0xdf, 0x9f, 0xaf,    0x9e, 0x03, 0xe7, 0x05, 0x00, 0xc0, 0x9f, 0xaf,    0xde, 0x01, 0xe7, 0x05, 0x00, 0xc0, 0x97, 0xcf,    0x9f, 0xaf, 0xde, 0x0d, 0xef, 0x77, 0x00, 0x00,    0xf1, 0x09, 0x97, 0xc1, 0x9f, 0xaf, 0xde, 0x0d,    0xef, 0x77, 0x00, 0x00, 0xf1, 0x09, 0x97, 0xc1,    0xef, 0x07, 0x01, 0x00, 0xf1, 0x09, 0xe7, 0x87,    0x00, 0x08, 0x1e, 0xc0, 0xe7, 0x87, 0x00, 0x08,    0x22, 0xc0, 0xe7, 0x67, 0xff, 0xf7, 0x22, 0xc0,    0xe7, 0x77, 0x00, 0x08, 0x20, 0xc0, 0x11, 0xc0,    0xe7, 0x67, 0xff, 0xf7, 0x1e, 0xc0, 0xe7, 0x87,    0x00, 0x08, 0x22, 0xc0, 0xe7, 0x67, 0xff, 0xf7,    0x22, 0xc0, 0xe7, 0x77, 0x00, 0x08, 0x20, 0xc0,    0x04, 0xc1, 0xe7, 0x87, 0x00, 0x08, 0x22, 0xc0,    0x97, 0xcf, 0xe7, 0x07, 0x01, 0x01, 0xf0, 0x09,    0xef, 0x57, 0x18, 0x00, 0xfe, 0xff, 0x97, 0xc2,    0xef, 0x07, 0x00, 0x00, 0xf0, 0x09, 0x97, 0xcf,    0xd7, 0x09, 0x00, 0xc0, 0x17, 0x00, 0x17, 0x02,    0x97, 0x02, 0xe7, 0x57, 0x00, 0x00, 0x7a, 0x08,    0x06, 0xc0, 0xc0, 0x09, 0x92, 0xc0, 0xc0, 0x77,    0x09, 0x02, 0x9f, 0xc1, 0xea, 0x06, 0x9f, 0xcf,    0x20, 0x08, 0xd7, 0x09, 0x0e, 0xc0, 0xe7, 0x07,    0x00, 0x00, 0x0e, 0xc0, 0x9f, 0xaf, 0x66, 0x0e,    0xe7, 0x05, 0x0e, 0xc0, 0x97, 0xcf, 0xd7, 0x09,    0x00, 0xc0, 0x17, 0x02, 0xc8, 0x09, 0xb0, 0xc0,    0xe7, 0x67, 0xfe, 0x7f, 0xb0, 0xc0, 0xc8, 0x77,    0x00, 0x20, 0x9f, 0xc1, 0x64, 0xeb, 0xe7, 0x57,    0x00, 0x00, 0xc8, 0x02, 0x9f, 0xc1, 0x80, 0xeb,    0xc8, 0x99, 0xca, 0x02, 0xc8, 0x67, 0x04, 0x00,    0x9f, 0xc1, 0x96, 0xeb, 0x9f, 0xcf, 0x4c, 0xeb,    0xe7, 0x07, 0x00, 0x00, 0xa6, 0xc0, 0xe7, 0x09,    0xb0, 0xc0, 0xc8, 0x02, 0xe7, 0x07, 0x03, 0x00,    0xb0, 0xc0, 0x97, 0xcf, 0xc0, 0x09, 0x86, 0x08,    0xc0, 0x37, 0x01, 0x00, 0x97, 0xc9, 0xc9, 0x09,    0x88, 0x08, 0x02, 0x00, 0x41, 0x90, 0x48, 0x02,    0xc9, 0x17, 0x06, 0x00, 0x9f, 0xaf, 0x64, 0x05,    0x9f, 0xa2, 0xd6, 0x0e, 0x02, 0xda, 0x77, 0xc1,    0x41, 0x60, 0x71, 0xc1, 0x97, 0xcf, 0x17, 0x02,    0x57, 0x02, 0x43, 0x04, 0x21, 0x04, 0xe0, 0x00,    0x43, 0x04, 0x21, 0x04, 0xe0, 0x00, 0x43, 0x04,    0x21, 0x04, 0xe0, 0x00, 0xc1, 0x07, 0x01, 0x00,    0xc9, 0x05, 0xc8, 0x05, 0x97, 0xcf,    0,    0};/* *     klsiNewCodeFix */static UINT8 klsiNewCodeFix[] = {    0xB6, 0xC3, 0xAA, 0xBB, 0xCC, 0xDD,    0x02, 0x00, 0x08, 0x00, 0x24, 0x00, 0x2e, 0x00,    0x2c, 0x00, 0x3e, 0x00, 0x44, 0x00, 0x48, 0x00,    0x50, 0x00, 0x5c, 0x00, 0x60, 0x00, 0x66, 0x00,    0x6c, 0x00, 0x70, 0x00, 0x76, 0x00, 0x74, 0x00,    0x7a, 0x00, 0x7e, 0x00, 0x84, 0x00, 0x8a, 0x00,    0x8e, 0x00, 0x92, 0x00, 0x98, 0x00, 0x9c, 0x00,    0xa0, 0x00, 0xa8, 0x00, 0xae, 0x00, 0xb4, 0x00,    0xb2, 0x00, 0xba, 0x00, 0xbe, 0x00, 0xc4, 0x00,    0xc8, 0x00, 0xce, 0x00, 0xd2, 0x00, 0xd6, 0x00,    0xda, 0x00, 0xe2, 0x00, 0xe0, 0x00, 0xea, 0x00,    0xf2, 0x00, 0xfe, 0x00, 0x06, 0x01, 0x0c, 0x01,    0x1a, 0x01, 0x24, 0x01, 0x22, 0x01, 0x2a, 0x01,    0x30, 0x01, 0x36, 0x01, 0x3c, 0x01, 0x4e, 0x01,    0x52, 0x01, 0x58, 0x01, 0x5c, 0x01, 0x9c, 0x01,    0xb6, 0x01, 0xba, 0x01, 0xc0, 0x01, 0xca, 0x01,    0xd0, 0x01, 0xda, 0x01, 0xe2, 0x01, 0xea, 0x01,    0xf0, 0x01, 0x0a, 0x02, 0x0e, 0x02, 0x14, 0x02,    0x26, 0x02, 0x6c, 0x02, 0x8e, 0x02, 0x98, 0x02,    0xa0, 0x02, 0xa6, 0x02, 0xba, 0x02, 0xc6, 0x02,    0xce, 0x02, 0xe8, 0x02, 0xee, 0x02, 0xf4, 0x02,    0xf8, 0x02, 0x0a, 0x03, 0x10, 0x03, 0x1a, 0x03,    0x1e, 0x03, 0x2a, 0x03, 0x2e, 0x03, 0x34, 0x03,    0x3a, 0x03, 0x44, 0x03, 0x4e, 0x03, 0x5a, 0x03,    0x5e, 0x03, 0x6a, 0x03, 0x72, 0x03, 0x80, 0x03,    0x84, 0x03, 0x8c, 0x03, 0x94, 0x03, 0x98, 0x03,    0xa8, 0x03, 0xae, 0x03, 0xb4, 0x03, 0xba, 0x03,    0xce, 0x03, 0xcc, 0x03, 0xd6, 0x03, 0xdc, 0x03,    0xec, 0x03, 0xf0, 0x03, 0xfe, 0x03, 0x1c, 0x04,    0x30, 0x04, 0x38, 0x04, 0x3c, 0x04, 0x40, 0x04,    0x48, 0x04, 0x46, 0x04, 0x54, 0x04, 0x5e, 0x04,    0x64, 0x04, 0x74, 0x04, 0x78, 0x04, 0x84, 0x04,    0xd8, 0x04, 0xec, 0x04, 0xf0, 0x04, 0xf8, 0x04,    0xfe, 0x04, 0x1c, 0x05, 0x2c, 0x05, 0x30, 0x05,    0x4a, 0x05, 0x56, 0x05, 0x5a, 0x05, 0x88, 0x05,    0x8c, 0x05, 0x96, 0x05, 0x9a, 0x05, 0xa8, 0x05,    0xcc, 0x05, 0xd2, 0x05, 0xda, 0x05, 0xe0, 0x05,    0xe4, 0x05, 0xfc, 0x05, 0x06, 0x06, 0x14, 0x06,    0x12, 0x06, 0x1a, 0x06, 0x20, 0x06, 0x26, 0x06,    0x2e, 0x06, 0x34, 0x06, 0x48, 0x06, 0x52, 0x06,    0x64, 0x06, 0x86, 0x06, 0x90, 0x06, 0x9a, 0x06,    0xa0, 0x06, 0xac, 0x06, 0xaa, 0x06, 0xb2, 0x06,    0xb8, 0x06, 0xdc, 0x06, 0xda, 0x06, 0xe2, 0x06,    0xe8, 0x06, 0xf2, 0x06, 0xf8, 0x06, 0xfc, 0x06,    0x0a, 0x07, 0x10, 0x07, 0x14, 0x07, 0x24, 0x07,    0x2a, 0x07, 0x32, 0x07, 0x38, 0x07, 0xb2, 0x07,    0xba, 0x07, 0xde, 0x07, 0xe4, 0x07, 0x10, 0x08,    0x14, 0x08, 0x1a, 0x08, 0x1e, 0x08, 0x30, 0x08,    0x38, 0x08, 0x3c, 0x08, 0x44, 0x08, 0x42, 0x08,    0x48, 0x08, 0xc6, 0x08, 0xcc, 0x08, 0xd2, 0x08,    0xfe, 0x08, 0x04, 0x09, 0x0a, 0x09, 0x0e, 0x09,    0x12, 0x09, 0x16, 0x09, 0x20, 0x09, 0x24, 0x09,    0x28, 0x09, 0x32, 0x09, 0x46, 0x09, 0x4a, 0x09,    0x50, 0x09, 0x54, 0x09, 0x5a, 0x09, 0x60, 0x09,    0x7c, 0x09, 0x80, 0x09, 0xb8, 0x09, 0xbc, 0x09,    0xc0, 0x09, 0xc4, 0x09, 0xc8, 0x09, 0xcc, 0x09,    0xd0, 0x09, 0xd4, 0x09, 0xec, 0x09, 0xf4, 0x09,    0xf6, 0x09, 0xf8, 0x09, 0xfa, 0x09, 0xfc, 0x09,    0xfe, 0x09, 0x00, 0x0a, 0x02, 0x0a, 0x04, 0x0a,    0x06, 0x0a, 0x08, 0x0a, 0x0a, 0x0a, 0x0c, 0x0a,    0x10, 0x0a, 0x18, 0x0a, 0x24, 0x0a, 0x2c, 0x0a,    0x32, 0x0a, 0x3c, 0x0a, 0x46, 0x0a, 0x4c, 0x0a,    0x50, 0x0a, 0x54, 0x0a, 0x5a, 0x0a, 0x5e, 0x0a,    0x66, 0x0a, 0x6c, 0x0a, 0x72, 0x0a, 0x78, 0x0a,    0x7e, 0x0a, 0x7c, 0x0a, 0x82, 0x0a, 0x8c, 0x0a,    0x92, 0x0a, 0x90, 0x0a, 0x98, 0x0a, 0x96, 0x0a,    0xa2, 0x0a, 0xb2, 0x0a, 0xb6, 0x0a, 0xc4, 0x0a,    0xe2, 0x0a, 0xe0, 0x0a, 0xe8, 0x0a, 0xee, 0x0a,    0xf4, 0x0a, 0xf2, 0x0a, 0xf8, 0x0a, 0x0c, 0x0b,    0x1a, 0x0b, 0x24, 0x0b, 0x40, 0x0b, 0x44, 0x0b,    0x48, 0x0b, 0x4e, 0x0b, 0x4c, 0x0b, 0x52, 0x0b,    0x68, 0x0b, 0x6c, 0x0b, 0x70, 0x0b, 0x76, 0x0b,    0x88, 0x0b, 0x92, 0x0b, 0xbe, 0x0b, 0xca, 0x0b,    0xce, 0x0b, 0xde, 0x0b, 0xf4, 0x0b, 0xfa, 0x0b,    0x00, 0x0c, 0x24, 0x0c, 0x28, 0x0c, 0x30, 0x0c,    0x36, 0x0c, 0x3c, 0x0c, 0x40, 0x0c, 0x4a, 0x0c,    0x50, 0x0c, 0x58, 0x0c, 0x56, 0x0c, 0x5c, 0x0c,    0x60, 0x0c, 0x64, 0x0c, 0x80, 0x0c, 0x94, 0x0c,    0x9a, 0x0c, 0x98, 0x0c, 0x9e, 0x0c, 0xa4, 0x0c,    0xa2, 0x0c, 0xa8, 0x0c, 0xac, 0x0c, 0xb0, 0x0c,    0xb4, 0x0c, 0xb8, 0x0c, 0xbc, 0x0c, 0xce, 0x0c,    0xd2, 0x0c, 0xd6, 0x0c, 0xf4, 0x0c, 0xfa, 0x0c,    0x00, 0x0d, 0xfe, 0x0c, 0x06, 0x0d, 0x0e, 0x0d,    0x0c, 0x0d, 0x16, 0x0d, 0x1c, 0x0d, 0x22, 0x0d,    0x20, 0x0d, 0x30, 0x0d, 0x7e, 0x0d, 0x82, 0x0d,    0x9a, 0x0d, 0xa0, 0x0d, 0xa6, 0x0d, 0xb0, 0x0d,    0xb8, 0x0d, 0xc2, 0x0d, 0xc8, 0x0d, 0xce, 0x0d,    0xd4, 0x0d, 0xdc, 0x0d, 0x1e, 0x0e, 0x2c, 0x0e,    0x3e, 0x0e, 0x4c, 0x0e, 0x50, 0x0e, 0x5e, 0x0e,    0xae, 0x0e, 0xb8, 0x0e, 0xc6, 0x0e, 0xca, 0x0e,    0,    0};const int 		lenKlsiNewCode = sizeof (klsiNewCode);const int 		lenKlsiNewCodeFix = sizeof (klsiNewCodeFix);LOCAL UINT16 		initCount = 0;	/* Count of init nesting */LOCAL MUTEX_HANDLE 	klsiMutex;	/* to protect internal structs */LOCAL LIST_HEAD		klsiDevList;	/* linked list of Device Structs */LOCAL LIST_HEAD    	reqList;        /* Attach callback request list */		LOCAL MUTEX_HANDLE 	klsiTxMutex;	/* to protect internal structs */LOCAL MUTEX_HANDLE 	klsiRxMutex;	/* to protect internal structs *//* forward declarartions *//* END Specific Externally imported interfaces. */IMPORT	int 	endMultiLstCnt 	(END_OBJ* pEnd);/* Externally visible interfaces. */END_OBJ * 	KlsiEndLoad 	(char * initString);STATUS 		usbKlsiEndInit 	(void);/*  LOCAL functions */LOCAL STATUS	klsiEndStart	(KLSI_DEVICE * pDrvCtrl);LOCAL STATUS	klsiEndStop	(KLSI_DEVICE * pDrvCtrl);LOCAL int	klsiEndIoctl   	(KLSI_DEVICE * pDrvCtrl, 				 int cmd, caddr_t data);LOCAL STATUS	klsiEndUnload	(KLSI_DEVICE * pDrvCtrl);LOCAL STATUS	klsiEndSend	(KLSI_DEVICE * pDrvCtrl, M_BLK_ID pBuf);			  LOCAL STATUS	klsiEndMCastAdd (KLSI_DEVICE * pDrvCtrl, char * pAddress);LOCAL STATUS	klsiEndMCastDel (KLSI_DEVICE * pDrvCtrl, char * pAddress);LOCAL STATUS	klsiEndMCastGet (KLSI_DEVICE * pDrvCtrl, 				 MULTI_TABLE * pTable);LOCAL STATUS	klsiEndPollSend	(KLSI_DEVICE * pDrvCtrl, M_BLK_ID pBuf);LOCAL STATUS	klsiEndPollRcv 	(KLSI_DEVICE * pDrvCtrl, M_BLK_ID pBuf);LOCAL STATUS	klsiEndParse	(KLSI_DEVICE * pDrvCtrl,	    				 char * initString,						UINT16 * pVendorId,    				UINT16 * pProductId				);LOCAL STATUS	klsiEndMemInit	(KLSI_DEVICE * pDrvCtrl);LOCAL STATUS	klsiEndConfig	(KLSI_DEVICE * pDrvCtrl);LOCAL STATUS 	klsiDevInit 	(KLSI_DEVICE* pDevCtrl, 			  	 UINT16 vendorId, 			  	 UINT16 productId				);LOCAL void 	klsiTxCallback	(pVOID p);LOCAL void 	klsiRxCallback	(pVOID p);LOCAL STATUS 	klsiShutdown 	(int errCode);LOCAL STATUS 	klsiReset 	(KLSI_DEVICE* pDevCtrl);LOCAL STATUS 	klsiInit	(KLSI_DEVICE * pDevCtrl);LOCAL STATUS 	klsiSend	(KLSI_DEVICE* pDevCtrl,UINT8* pBfr,					 UINT32 size);LOCAL STATUS 	klsiListenForInput   	(KLSI_DEVICE * pDevCtrl);LOCAL USB_KLSI_DEV * klsiFindDevice		(USBD_NODE_ID nodeId);LOCAL USB_KLSI_DEV * klsiEndFindDevice 	(UINT16 vendorId, UINT16 productId);LOCAL void 	klsiDestroyDevice 	(KLSI_DEVICE * pDevCtrl);LOCAL STATUS 	klsiMCastFilterSet 	(KLSI_DEVICE* pDevCtrl,   			                 UINT8* pAddress,					                 UINT32 noOfFilters);LOCAL STATUS 	klsiPacketFilterSet 	(KLSI_DEVICE* pDevCtrl,				         UINT8 bitmap);LOCAL STATUS 	klsiMacAddressSet	(KLSI_DEVICE* pDevCtrl,    			                 UINT8 * pAddress);LOCAL void 	klsiAttachCallback  	(USBD_NODE_ID nodeId,    				         UINT16 attachAction,     				         UINT16 configuration,    				         UINT16 interface,    				         UINT16 deviceClass,     				         UINT16 deviceSubClass,     				         UINT16 deviceProtocol);LOCAL STATUS 	klsiEndRecv (KLSI_DEVICE *pDrvCtrl, UINT8* pData, UINT32 len);LOCAL VOID 	notifyAttach 		(USBD_NODE_ID nodeId,    					 UINT16 attachCode);/* * Our driver function table.  This is static across all driver instances. */LOCAL NET_FUNCS klsiEndFuncTable =    {    (FUNCPTR) klsiEndStart,	/* Function to start the device. */    (FUNCPTR) klsiEndStop,	/* Function to stop the device. */    (FUNCPTR) klsiEndUnload,	/* Unloading function for the driver. */    (FUNCPTR) klsiEndIoctl,	/* Ioctl function for the driver. */    (FUNCPTR) klsiEndSend,	/* Send function for the driver. */    (FUNCPTR) klsiEndMCastAdd,	/* Multicast add function for the */				/* driver. */    (FUNCPTR) klsiEndMCastDel,	/* Multicast delete function for */				/* the driver. */    (FUNCPTR) klsiEndMCastGet,	/* Multicast retrieve function for */				/* the driver. */    (FUNCPTR) klsiEndPollSend,	/* Polling send function */    (FUNCPTR) klsiEndPollRcv,	/* Polling receive function */    endEtherAddressForm,	/* put address info into a NET_BUFFER */    endEtherPacketDataGet,	/* get pointer to data in NET_BUFFER */    endEtherPacketAddrGet  	/* Get packet addresses. */    };/***************************************************************************** klsiAttachCallback - Gets called for attachment/detachment of devices** The USBD will invoke this callback when a USB ethernet device is * attached to or removed from the system.  * <nodeId> is the USBD_NODE_ID of the node being attached or removed.	* <attachAction> is USBD_DYNA_ATTACH or USBD_DYNA_REMOVE.* Communication device functionality resides at the interface level, with* the exception of being the definition of the Communication device class* code.so <configuration> and <interface> will indicate the configuration* / interface that reports itself as a network device.* <deviceClass> and <deviceSubClass> will match the class/subclass for * which registration is done.  * <deviceProtocol> doesn't have any meaning for the ethernet devices.* This field is ignored.** NOTE: The USBD will invoke this function once for each configuration/* interface, which reports itself as a network device.* So, it is possible that a single device insertion/removal may trigger * multiple callbacks. All callbacks are ignored except the first  * for a given device.** RETURNS: N/A*/LOCAL void  klsiAttachCallback    (    USBD_NODE_ID nodeId,     UINT16 attachAction,     UINT16 configuration,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?