Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/port/niagara.c

    r9d58539 r336d2f52  
    6363#define POLL_INTERVAL  10000
    6464
     65/**
     66 * Virtual address mapped to the buffer shared with the kernel counterpart.
     67 */
     68static uintptr_t input_buffer_addr;
     69
    6570/*
    6671 * Kernel counterpart of the driver pushes characters (it has read) here.
     
    97102                return -1;
    98103       
    99         int rc = physmem_map((void *) paddr, 1,
    100             AS_AREA_READ | AS_AREA_WRITE, (void *) &input_buffer);
     104        input_buffer_addr = (uintptr_t) as_get_mappable_page(PAGE_SIZE);
     105        int rc = physmem_map((void *) paddr, (void *) input_buffer_addr,
     106            1, AS_AREA_READ | AS_AREA_WRITE);
     107       
    101108        if (rc != 0) {
    102109                printf("Niagara: uspace driver couldn't map physical memory: %d\n",
     
    104111                return rc;
    105112        }
     113       
     114        input_buffer = (input_buffer_t) input_buffer_addr;
    106115       
    107116        thread_id_t tid;
Note: See TracChangeset for help on using the changeset viewer.