Ignore:
Timestamp:
Sep 14, 2010, 10:07:59 AM (15 years ago)
Author:
root
Message:

latest NCQ changes from Christian

Location:
trunk/src/os2ahci
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/libc.c

    r12 r13  
    2727                                       * for printing custom messages via
    2828                                       * DevHelp_Save_Message() */
    29 
    30 #define COM_BASE              0x03f8  /* base address of COM port (COM1) */
    3129
    3230/* heap management constants */
     
    5452
    5553/* ------------------------ global/static variables ------------------------ */
     54
     55/* debug COM port base address */
     56u16 com_base = 0x03f8;
    5657
    5758static char  hex_digits[] = "0123456789abcdef";
     
    99100
    100101  for (i = 0; com1_init_sequence[i].reg != -1; i++) {
    101     u16 port = COM_BASE + com1_init_sequence[i].reg;
     102    u16 port = com_base + com1_init_sequence[i].reg;
    102103    u8  data = com1_init_sequence[i].data;
    103104    _asm {
     
    248249     * The C equivalent would look like this:
    249250     *
    250      *   while (!(inp(COM_BASE + 5) & 0x20));
    251      *   outp(COM_BASE, *s);
     251     *   while (!(inp(com_base + 5) & 0x20));
     252     *   outp(com_base, *s);
    252253     */
    253254
    254255    _asm {
    255256      /* wait until COM transmitter is idle */
    256       mov  dx, COM_BASE + 5;
     257      mov  dx, com_base;
     258      add  dx, 5;
    257259    transmitter_not_idle:
    258260      in   al, dx;
     
    261263
    262264      /* output character to be sent */
    263       mov  dx, COM_BASE;
     265      mov  dx, com_base;
    264266      mov  bx, s;
    265267      mov  al, [bx];
     
    655657int disable(void)
    656658{
    657   int rc = 0;
     659  int rc;
    658660
    659661  _asm {
Note: See TracChangeset for help on using the changeset viewer.