Changes between Version 1 and Version 2 of IoPorts


Ignore:
Timestamp:
04/07/07 20:12:12 (8 years ago)
Author:
ffjeld
Comment:

io-port is a function not a macro. Added a bit of info on the types.

Legend:

Unmodified
Added
Removed
Modified
  • IoPorts

    v1 v2  
    11When accessing the hardware directly, one of the most common operations is to read and write to hardware IO ports.
    22
    3 There is a macro located in losp/muerte/io-ports.lisp.  This macro establishes an easy to use method of using IO ports.
     3There is an accessor function (and compiler-macro) located in losp/muerte/io-ports.lisp.  This accessor establishes an easy to use method of using IO ports.
    44
    55Reading from an IO port is accomplished through the following function call:
     
    1111  * <address> is the io-port address.
    1212  * <data-type> is one of the following:
    13     * unsigned-byte8
    14     * unsigned-byte16
    15     * unsigned-byte32
    16     * character
    17     * location
     13    * :unsigned-byte8 - an 8-bit integer (using inb/outb).
     14    * :unsigned-byte16 - a 16-bit integer (inw/outw).
     15    * :unsigned-byte32 - a 32-bit integer (ind/outd).
     16    * :character - an 8-bit character (inb/outb).
     17    * :location - a fixnum, i.e. a lispval whose lower two bits are forced to zero (ind/outd).
    1818
    1919To write to an IO port you use the following construction