Changeset 6886705 in mainline
- Timestamp:
- 2017-10-02T20:13:41Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 943aaf1b
- Parents:
- 300f4c4
- Location:
- uspace/srv/hw/bus/cuda_adb
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r300f4c4 r6886705 50 50 #include <assert.h> 51 51 #include "cuda_adb.h" 52 #include "cuda_hw.h" 52 53 53 54 #define NAME "cuda_adb" … … 68 69 69 70 static 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 = 0x2077 };78 79 /** IER register fields */80 enum {81 IER_CLR = 0x00,82 IER_SET = 0x80,83 84 SR_INT = 0x04,85 ALL_INT = 0x7f86 };87 88 /** ACR register fields */89 enum {90 SR_OUT = 0x1091 };92 93 /** Packet types */94 enum {95 PT_ADB = 0x00,96 PT_CUDA = 0x0197 };98 99 /** CUDA packet types */100 enum {101 CPT_AUTOPOLL = 0x01102 };103 104 enum {105 ADB_MAX_ADDR = 16106 };107 71 108 72 static irq_pio_range_t cuda_ranges[] = { … … 172 136 rc = loc_service_register("adb/kbd", &service_id); 173 137 if (rc != EOK) { 174 printf(NAME ": Unable to register service %s.\n", "adb/k db");138 printf(NAME ": Unable to register service %s.\n", "adb/kbd"); 175 139 return rc; 176 140 } … … 181 145 rc = loc_service_register("adb/mouse", &service_id); 182 146 if (rc != EOK) { 183 printf(NAME ": Unable to register servi se %s.\n", "adb/mouse");147 printf(NAME ": Unable to register service %s.\n", "adb/mouse"); 184 148 return rc; 185 149 } -
uspace/srv/hw/bus/cuda_adb/cuda_adb.h
r300f4c4 r6886705 37 37 #define CUDA_ADB_H_ 38 38 39 #include <async.h> 40 #include <fibril_synch.h> 39 41 #include <stddef.h> 40 42 #include <stdint.h> 41 #include <async.h>42 #include <fibril_synch.h>43 44 typedef struct {45 uint8_t b;46 uint8_t pad0[0x1ff];47 48 uint8_t a;49 uint8_t pad1[0x1ff];50 51 uint8_t dirb;52 uint8_t pad2[0x1ff];53 54 uint8_t dira;55 uint8_t pad3[0x1ff];56 57 uint8_t t1cl;58 uint8_t pad4[0x1ff];59 60 uint8_t t1ch;61 uint8_t pad5[0x1ff];62 63 uint8_t t1ll;64 uint8_t pad6[0x1ff];65 66 uint8_t t1lh;67 uint8_t pad7[0x1ff];68 69 uint8_t t2cl;70 uint8_t pad8[0x1ff];71 72 uint8_t t2ch;73 uint8_t pad9[0x1ff];74 75 uint8_t sr;76 uint8_t pad10[0x1ff];77 78 uint8_t acr;79 uint8_t pad11[0x1ff];80 81 uint8_t pcr;82 uint8_t pad12[0x1ff];83 84 uint8_t ifr;85 uint8_t pad13[0x1ff];86 87 uint8_t ier;88 uint8_t pad14[0x1ff];89 90 uint8_t anh;91 uint8_t pad15[0x1ff];92 } cuda_t;93 43 94 44 enum { … … 110 60 111 61 typedef struct { 112 cuda_t*cuda;62 struct cuda *cuda; 113 63 uintptr_t cuda_physical; 114 64
Note:
See TracChangeset
for help on using the changeset viewer.