0e54fad2f089fdf66adddb9aa99cdbc518b554e7
[tpg/acess2.git] / UDI / drivers / net_ne2000 / ne2000_tx.c
1 /*
2  * UDI Ne2000 NIC Driver
3  * By John Hodge (thePowersGang)
4  *
5  * ne2000_tx.c
6  * - Transmit Code
7  */
8 #define UDI_VERSION     0x101
9 #define UDI_NIC_VERSION 0x101
10 #include <udi.h>
11 #include <udi_nic.h>
12 #include "ne2000_common.h"
13
14 // === PROTOTYPES ===
15 void ne2k_nd_tx_tx_req__trans_done(udi_cb_t *gcb, udi_buf_t *new_buf, udi_status_t status, udi_ubit16_t res);
16
17 // === CODE ===
18 void ne2k_nd_tx_channel_event_ind(udi_channel_event_cb_t *cb)
19 {
20 }
21
22 void ne2k_nd_tx_tx_req(udi_nic_tx_cb_t *cb)
23 {
24         ne2k_rdata_t    *rdata = UDI_GCB(cb)->context;
25         // TODO: TX request
26         udi_debug_printf("ne2k_nd_tx_tx_req: %p\n", cb);
27         udi_debug_printf("- pio_handles[%i] = %p\n", NE2K_PIO_TX, rdata->pio_handles[NE2K_PIO_TX]);
28         udi_debug_printf("- cb->tx_buf->buf_size = %x\n", cb->tx_buf->buf_size);
29         udi_pio_trans(ne2k_nd_tx_tx_req__trans_done, UDI_GCB(cb), rdata->pio_handles[NE2K_PIO_TX],
30                 0, cb->tx_buf, &cb->tx_buf->buf_size);
31 }
32 void ne2k_nd_tx_tx_req__trans_done(udi_cb_t *gcb, udi_buf_t *new_buf, udi_status_t status, udi_ubit16_t res)
33 {
34         udi_nsr_tx_rdy( UDI_MCB(gcb, udi_nic_tx_cb_t) );
35 }
36
37 void ne2k_nd_tx_exp_tx_req(udi_nic_tx_cb_t *cb)
38 {
39         // TODO: "expediant" TX reqest
40         ne2k_nd_tx_tx_req(cb);
41 }
42
43
44

UCC git Repository :: git.ucc.asn.au