b943ae8827d111f7e6e526cc64c9952aaf3ac752
[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 #include <udi.h>
9 #include <udi_nic.h>
10 #include "ne2000_common.h"
11
12 // === PROTOTYPES ===
13 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);
14
15 // === CODE ===
16 void ne2k_nd_tx_channel_event_ind(udi_channel_event_cb_t *cb)
17 {
18 }
19
20 void ne2k_nd_tx_tx_req(udi_nic_tx_cb_t *cb)
21 {
22         ne2k_rdata_t    *rdata = UDI_GCB(cb)->context;
23         // TODO: TX request
24         udi_debug_printf("ne2k_nd_tx_tx_req: %p\n", cb);
25         udi_debug_printf("- pio_handles[%i] = %p\n", NE2K_PIO_TX, rdata->pio_handles[NE2K_PIO_TX]);
26         udi_debug_printf("- cb->tx_buf->buf_size = %x\n", cb->tx_buf->buf_size);
27         udi_pio_trans(ne2k_nd_tx_tx_req__trans_done, UDI_GCB(cb), rdata->pio_handles[NE2K_PIO_TX],
28                 0, cb->tx_buf, &cb->tx_buf->buf_size);
29 }
30 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)
31 {
32         udi_nsr_tx_rdy( UDI_MCB(gcb, udi_nic_tx_cb_t) );
33 }
34
35 void ne2k_nd_tx_exp_tx_req(udi_nic_tx_cb_t *cb)
36 {
37         // TODO: "expediant" TX reqest
38         ne2k_nd_tx_tx_req(cb);
39 }
40
41
42

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