Changes between Version 2 and Version 3 of mnc_driver


Ignore:
Timestamp:
Dec 3, 2016, 4:48:33 PM (8 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mnc_driver

    v2 v3  
    3737== Access Functions ==
    3838
    39  === 1) void '''_mnc_init'''( ) ===
     39 === 1) void  '''_mnc_init'''( ) ===
    4040This function allocates memory for the RX_CHBUF and TX_CHBUF implementing the RX and TX queues for all channels. It uses a round-robin policy, to distribute one CHBUF
    4141per cluster if the number of clusters is larger than 2 * NB_NIC_CHANNELS. It initialises both the CHBUF descriptors,
    4242and the hardware NIC registers.
    4343
    44  === 2) unsigned int '''_mnc_writable'''( unsigned int channel,  unsigned int length ) ===
     44 === 2) unsigned int  '''_mnc_writable'''( unsigned int channel,  unsigned int length ) ===
    4545This function returns a Boolean indicating if an Ethernet packet of a given length can be stored in the TX queue defined by the channel argument.
    4646The internal state of the queue (write pointer) can be modified if required.
     
    5959 * return a non-zero value if packet can be read / return zero if queue is empty.
    6060                         
    61  === 4) void '''_mnc_write'''( unsigned int channel ,  void * buffer , unsigned int length ) ===
     61 === 4) void  '''_mnc_write'''( unsigned int channel ,  void * buffer , unsigned int length ) ===
    6262This function writes an Ethernet packet in the TX queue defined by the channel argument. It should be called after the _mnc_writable() function.
    6363 * '''channel''' : channel index
     
    6565 * '''length''' : Ethernet packet length (bytes)
    6666
    67  === 5) int '''_mnc_read'''( unsigned int channel , void * buffer ) ===
     67 === 5) void '''_mnc_read'''( unsigned int channel , void * buffer ) ===
    6868This function read an Ethernet packet from the RX queue defined by the channel argument. It should be called after the _mnc_readable() function.
    6969 * '''channel''' : channel index
    7070 * '''buffer''' : pointer on buffer containing packet
    7171
    72  === 6) void '''_mnc_set_global_register( unsigned int index , unsigned int value ) ===
     72 === 6) void  '''_mnc_set_global_register( unsigned int index , unsigned int value ) ===
    7373This function set a given value in a given NIC global register.
    7474 * '''index''' : register index
    7575 * '''value''' : value to be written
    7676
    77  === 7) unsigned int '''_mnc_get_global_register( unsigned int index ) ===
     77 === 7) unsigned int  '''_mnc_get_global_register( unsigned int index ) ===
    7878This function returns the value contained in a given NIC global register.
    7979 * '''index''' : register index
     
    8282== __ Interrupt Service Routines__ ==
    8383
    84  === 8) void '''_nic_rx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
    85 This interrupt Service Routine  handles IRQs from a NIC_RX channel.
    86 WARNING : Not fully implemented yet : no IRQ acknowledge...
     84 === 8) void  '''_mnc_rx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
     85This Interrupt Service Routine  handles IRQs from a NIC_RX channel.
    8786
    88  === 9) void '''_nic_tx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
    89 This interrupt Service Routine  handles IRQs from a NIC_TX channel.
    90 WARNING : Not fully implemented yet : no IRQ acknowledge...
     87 === 9) void  '''_mnc_tx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
     88This Interrupt Service Routine  handles IRQs from a NIC_TX channel.