Ignore:
Timestamp:
2017-10-02T20:13:41Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
943aaf1b
Parents:
300f4c4
Message:

Move CUDA hw-related definitions to a separate header file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r300f4c4 r6886705  
    5050#include <assert.h>
    5151#include "cuda_adb.h"
     52#include "cuda_hw.h"
    5253
    5354#define NAME  "cuda_adb"
     
    6869
    6970static void adb_packet_handle(uint8_t *data, size_t size, bool autopoll);
    70 
    71 
    72 /** B register fields */
    73 enum {
    74         TREQ    = 0x08,
    75         TACK    = 0x10,
    76         TIP     = 0x20
    77 };
    78 
    79 /** IER register fields */
    80 enum {
    81         IER_CLR = 0x00,
    82         IER_SET = 0x80,
    83 
    84         SR_INT  = 0x04,
    85         ALL_INT = 0x7f
    86 };
    87 
    88 /** ACR register fields */
    89 enum {
    90         SR_OUT  = 0x10
    91 };
    92 
    93 /** Packet types */
    94 enum {
    95         PT_ADB  = 0x00,
    96         PT_CUDA = 0x01
    97 };
    98 
    99 /** CUDA packet types */
    100 enum {
    101         CPT_AUTOPOLL    = 0x01
    102 };
    103 
    104 enum {
    105         ADB_MAX_ADDR    = 16
    106 };
    10771
    10872static irq_pio_range_t cuda_ranges[] = {
     
    172136        rc = loc_service_register("adb/kbd", &service_id);
    173137        if (rc != EOK) {
    174                 printf(NAME ": Unable to register service %s.\n", "adb/kdb");
     138                printf(NAME ": Unable to register service %s.\n", "adb/kbd");
    175139                return rc;
    176140        }
     
    181145        rc = loc_service_register("adb/mouse", &service_id);
    182146        if (rc != EOK) {
    183                 printf(NAME ": Unable to register servise %s.\n", "adb/mouse");
     147                printf(NAME ": Unable to register service %s.\n", "adb/mouse");
    184148                return rc;
    185149        }
Note: See TracChangeset for help on using the changeset viewer.