MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                  ddidevicezero(9F)



NAME
     ddidevicezero - zero fill the device

SYNOPSIS
     #include 
     #include 



     int ddidevicezero(ddiacchandlet handle, caddrt devaddr,
          sizet bytecount, ssizet devadvcnt, uintt devdatasz);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     handle         The data access handle  returned  from  setup
                    calls, such as ddiregsmapsetup(9F).


     devaddr       Beginning of the device address.


     bytecount      Number of bytes to zero.


     devadvcnt     Number of  devdatasz  units  to  advance  on
                    every access.


     devdatasz     The size of each data word.  Possible  values
                    are defined as:

                    DIDATASZ01AC     1 byte data size


                    DIDATASZ02AC     2 bytes data size


                    DIDATASZ04AC     4 bytes data size


                    DIDATASZ08AC     8 bytes data size



DESCRIPTION
     ddidevicezero()  function  fills  the  given,   bytecount,
     number of byte of zeroes to the device register or memory.





SunOS 5.11          Last change: 25 Sep 1996                    1






Kernel Functions for Drivers                  ddidevicezero(9F)



     The  devadvcnt argument determines the value of the  device
     address,   devaddr, on each access.  A value of  0 will use
     the same device address,   devaddr,  on  every   access.  A
     positive  value  increments  the  device address in the next
     access while a negative value decrements  the  address.  The
     device address is incremented and decremented in  devdatasz
     units.


     The devdatasz argument determines the size of data word  on
     each access.

RETURN VALUES
     ddidevicezero() returns:

     DISUCES     Successfully zeroed the data.


     DIFAILURE     The  byte  count  is  not  a   multiple   of
                     devdatasz.


CONTEXT
     ddidevicezero() can be called from user, kernel, or inter-
     rupt context.

SEE ALSO
     ddiregsmapfree(9F), ddiregsmapsetup(9F)


     Writing Device Drivers
























SunOS 5.11          Last change: 25 Sep 1996                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™