This commit was generated by cvs2svn to compensate for changes in r10,
[reactos.git] / reactos / doc / api.txt
index 379023f..4dd8408 100644 (file)
-This file attempts to document the functions made publically available by\r
-the various subsystems.\r
-\r
-* Formatted I/O operations *\r
-\r
-NAME: int vsprintf(char *buf, const char *fmt, va_list args)\r
-NAME: int sprintf(char* buf, const char* fmt, ...)\r
-WHERE: internal/kernel.h\r
-FUNCTION: The same as the standard c library versions\r
-\r
-* PIO operations *\r
-\r
-NAME: in[b/w/l](port)\r
-WHERE: internal/io.h\r
-FUNCTION: Read an IO port of the specified size (byte/word or long)\r
-RETURNS: The value read\r
-\r
-NAME: out[b/w/l](port,val)\r
-WHERE: internal/io.h\r
-FUNCTION: Write an IO port of the specified size (byte/word or long)\r
-\r
-NAME: in_p[b/w/l](port)\r
-WHERE: internal/io.h\r
-FUNCTION: Read an IO port of the specified size (byte/word or long) with\r
-        a pause\r
-RETURNS: The value read\r
-\r
-NAME: out_p[b/w/l](port,val)\r
-WHERE: internal/io.h\r
-FUNCTION: Write an IO port of the specified size (byte/word or long) with\r
-        a pause\r
-\r
-* Bit operations *\r
-\r
-NAME: int set_bit(int nr, void* addr)\r
-NAME: int clear_bit(int nr, void* addr)\r
-NAME: int change_bit(int nr, void* addr)\r
-WHERE: internal/bitops.h>\r
-FUNCTION: Operate on a bit in the word pointed to by addr\r
-RETURN: 0 if the bit was cleared before the operations\r
-        non-zero otherwise\r
-\r
-* Debugging functions *\r
-\r
-NAME: DPRINT(fmt,....)\r
-WHERE: internal/debug.h\r
-FUNCTION: Outputs a string to the console if NDEBUG isn't defined before\r
-including internal/debug.h, a NOP otherwise\r
-ARGUMENTS: The same as printf\r
-\r
-NAME: printk\r
-WHERE: internal/kernel.h\r
-FUNCTION: Outputs a string to the console\r
-ARGUMENTS: The same as printf\r
-\r
-* Memory managment functions *\r
-\r
-NAME: unsigned int physical_to_linear(unsigned int paddr)\r
-WHERE: hal/page.h\r
-FUNCTION: Converts a physical address to a linear one\r
-RECEIVES:\r
-        paddr = the physical address to convert\r
-RETURNS: A virtual address where the memory at that physical address can be \r
-accessed\r
-\r
-NAME: void* ExAllocatePool(unsigned int size, unsigned int type = 0);\r
-WHERE: internal/pool.h\r
-FUNCTION: Allocates a block of memory\r
-RECEIVES:\r
-        size = the size of the block to allocate\r
-        type = will be whether to allocate pagable memory\r
-RETURNS: The address of the block\r
-NOTE: This isn't interrupt safe\r
-\r
-NAME: void ExFreePool(void* block)\r
-WHERE: internal/pool.h\r
-FUNCTION: Frees a block of memory\r
-\r
-NAME: void free_page(unsigned int physical_base, unsigned int nr = 1)\r
-WHERE: internal/mm.h\r
-FUNCTION: Adds a continuous range of physical memory to the free list\r
-\r
-NAME: unsigned int get_free_page(void)\r
-WHERE: internal/mm.h\r
-FUNCTION: Gets a free page\r
-RETURNS: Its physical address\r
-\r
-NAME: unsigned int get_page_physical_address(unsigned int vaddr)\r
-WHERE: internal/mm.h\r
-FUNCTION: Gets the physical address of a page\r
-\r
-NAME: void mark_page_not_writable(unsigned int vaddr)\r
-WHERE: internal/mm.h\r
-FUNCTION: Prevent writing the page\r
-\r
-* DMA functions *\r
-\r
-NAME: unsigned int get_dma_page(unsigned int max_address)\r
-WHERE: internal/mm.h\r
-FUNCTION: Gets a page with a restricted physical address i.e. suitable for\r
-          dma\r
-RETURNS: The physical address of the page\r
-\r
-NAME: void disable_dma(unsigned int dmanr)\r
-WHERE:    internal/dma.h\r
-FUNCTION: Disables the specified dma channel\r
-\r
-NAME: void enable_dma(unsigned int dmanr)\r
-WHERE:    internal/dma.h\r
-FUNCTION: Enables the specified dma channel\r
-\r
-NAME: void clear_dma_ff(unsigned int dmanr)\r
-WHERE: internal/dma.h\r
-FUNCTION: Clear the dma flip-flop\r
-\r
-NAME: void set_dma_mode(unsigned int dmanr, char mode)\r
-WHERE: internal/dma.h\r
-FUNCTION: Sets the type of dma transfer\r
-\r
-NAME: void set_dma_page(unsigned int dmanr, char pagenr)\r
-WHERE: internal/dma.h\r
-FUNCTION: Set only the page register bits of the transfer address\r
-\r
-NAME: void set_dma_addr(unsigned int dmanr, unsigned int a)\r
-WHERE: internal/dma.h\r
-FUNCTION: Set the transfer address for dma\r
-NOTE: Assumes flip-flop is clear\r
-\r
-NAME: void set_dma_count(unsigned int dmanr, unsigned int count)\r
-WHERE: internal/dma.h\r
-FUNCTION: Sets the size of the transfer\r
-ARGUMENTS:\r
-        count = the number of bytes to transfer\r
-NOTE: Count must be even for channels 5-7\r
-\r
-NAME: int get_dma_residue(unsigned int dmanr)\r
-WHERE: internal/dma.h\r
-FUNCTION: Gets the residue remaining after a dma transfer on the channel\r
-\r
-\r
+This file attempts to document the functions made publically available by
+the various subsystems.
+
+* Formatted I/O operations *
+
+NAME: int vsprintf(char *buf, const char *fmt, va_list args)
+NAME: int sprintf(char* buf, const char* fmt, ...)
+WHERE: internal/kernel.h
+FUNCTION: The same as the standard c library versions
+
+* PIO operations *
+
+NAME: in[b/w/l](port)
+WHERE: internal/io.h
+FUNCTION: Read an IO port of the specified size (byte/word or long)
+RETURNS: The value read
+
+NAME: out[b/w/l](port,val)
+WHERE: internal/io.h
+FUNCTION: Write an IO port of the specified size (byte/word or long)
+
+NAME: in_p[b/w/l](port)
+WHERE: internal/io.h
+FUNCTION: Read an IO port of the specified size (byte/word or long) with
+        a pause
+RETURNS: The value read
+
+NAME: out_p[b/w/l](port,val)
+WHERE: internal/io.h
+FUNCTION: Write an IO port of the specified size (byte/word or long) with
+        a pause
+
+* Bit operations *
+
+NAME: int set_bit(int nr, void* addr)
+NAME: int clear_bit(int nr, void* addr)
+NAME: int change_bit(int nr, void* addr)
+WHERE: internal/bitops.h>
+FUNCTION: Operate on a bit in the word pointed to by addr
+RETURN: 0 if the bit was cleared before the operations
+        non-zero otherwise
+
+* Debugging functions *
+
+NAME: DPRINT(fmt,....)
+WHERE: internal/debug.h
+FUNCTION: Outputs a string to the console if NDEBUG isn't defined before
+including internal/debug.h, a NOP otherwise
+ARGUMENTS: The same as printf
+
+NAME: printk
+WHERE: internal/kernel.h
+FUNCTION: Outputs a string to the console
+ARGUMENTS: The same as printf
+
+* Memory managment functions *
+
+NAME: unsigned int physical_to_linear(unsigned int paddr)
+WHERE: hal/page.h
+FUNCTION: Converts a physical address to a linear one
+RECEIVES:
+        paddr = the physical address to convert
+RETURNS: A virtual address where the memory at that physical address can be 
+accessed
+
+NAME: void* ExAllocatePool(unsigned int size, unsigned int type = 0);
+WHERE: internal/pool.h
+FUNCTION: Allocates a block of memory
+RECEIVES:
+        size = the size of the block to allocate
+        type = will be whether to allocate pagable memory
+RETURNS: The address of the block
+NOTE: This isn't interrupt safe
+
+NAME: void ExFreePool(void* block)
+WHERE: internal/pool.h
+FUNCTION: Frees a block of memory
+
+NAME: void free_page(unsigned int physical_base, unsigned int nr = 1)
+WHERE: internal/mm.h
+FUNCTION: Adds a continuous range of physical memory to the free list
+
+NAME: unsigned int get_free_page(void)
+WHERE: internal/mm.h
+FUNCTION: Gets a free page
+RETURNS: Its physical address
+
+NAME: unsigned int get_page_physical_address(unsigned int vaddr)
+WHERE: internal/mm.h
+FUNCTION: Gets the physical address of a page
+
+NAME: void mark_page_not_writable(unsigned int vaddr)
+WHERE: internal/mm.h
+FUNCTION: Prevent writing the page
+
+* DMA functions *
+
+NAME: unsigned int get_dma_page(unsigned int max_address)
+WHERE: internal/mm.h
+FUNCTION: Gets a page with a restricted physical address i.e. suitable for
+          dma
+RETURNS: The physical address of the page
+
+NAME: void disable_dma(unsigned int dmanr)
+WHERE:    internal/dma.h
+FUNCTION: Disables the specified dma channel
+
+NAME: void enable_dma(unsigned int dmanr)
+WHERE:    internal/dma.h
+FUNCTION: Enables the specified dma channel
+
+NAME: void clear_dma_ff(unsigned int dmanr)
+WHERE: internal/dma.h
+FUNCTION: Clear the dma flip-flop
+
+NAME: void set_dma_mode(unsigned int dmanr, char mode)
+WHERE: internal/dma.h
+FUNCTION: Sets the type of dma transfer
+
+NAME: void set_dma_page(unsigned int dmanr, char pagenr)
+WHERE: internal/dma.h
+FUNCTION: Set only the page register bits of the transfer address
+
+NAME: void set_dma_addr(unsigned int dmanr, unsigned int a)
+WHERE: internal/dma.h
+FUNCTION: Set the transfer address for dma
+NOTE: Assumes flip-flop is clear
+
+NAME: void set_dma_count(unsigned int dmanr, unsigned int count)
+WHERE: internal/dma.h
+FUNCTION: Sets the size of the transfer
+ARGUMENTS:
+        count = the number of bytes to transfer
+NOTE: Count must be even for channels 5-7
+
+NAME: int get_dma_residue(unsigned int dmanr)
+WHERE: internal/dma.h
+FUNCTION: Gets the residue remaining after a dma transfer on the channel
+
+