Changes in uspace/lib/c/include/ddi.h [1433ecda:848e880f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ddi.h
r1433ecda r848e880f 40 40 #include <stdint.h> 41 41 #include <sys/time.h> 42 #include <byteorder.h> 42 43 #include <abi/ddi/irq.h> 43 44 #include <device/hw_res.h> … … 64 65 65 66 extern errno_t pio_enable_range(addr_range_t *, void **); 66 extern errno_t pio_enable_resource(pio_window_t *, hw_resource_t *, void **); 67 extern errno_t pio_enable_resource(pio_window_t *, hw_resource_t *, void **, 68 uintptr_t *, size_t *); 67 69 extern errno_t pio_enable(void *, size_t, void **); 68 70 extern errno_t pio_disable(void *, size_t); … … 85 87 extern uint64_t pio_read_64(const ioport64_t *); 86 88 89 static inline void pio_write_le16(ioport16_t *reg, uint16_t val) 90 { 91 pio_write_16(reg, host2uint16_t_le(val)); 92 } 93 static inline void pio_write_be16(ioport16_t *reg, uint16_t val) 94 { 95 pio_write_16(reg, host2uint16_t_be(val)); 96 } 97 static inline void pio_write_le32(ioport32_t *reg, uint32_t val) 98 { 99 pio_write_32(reg, host2uint32_t_le(val)); 100 } 101 static inline void pio_write_be32(ioport32_t *reg, uint32_t val) 102 { 103 pio_write_32(reg, host2uint32_t_be(val)); 104 } 105 static inline void pio_write_le64(ioport64_t *reg, uint64_t val) 106 { 107 pio_write_64(reg, host2uint64_t_le(val)); 108 } 109 static inline void pio_write_be64(ioport64_t *reg, uint64_t val) 110 { 111 pio_write_64(reg, host2uint64_t_be(val)); 112 } 113 114 static inline uint16_t pio_read_le16(const ioport16_t *reg) 115 { 116 return uint16_t_le2host(pio_read_16(reg)); 117 } 118 static inline uint16_t pio_read_be16(const ioport16_t *reg) 119 { 120 return uint16_t_be2host(pio_read_16(reg)); 121 } 122 static inline uint32_t pio_read_le32(const ioport32_t *reg) 123 { 124 return uint32_t_le2host(pio_read_32(reg)); 125 } 126 static inline uint32_t pio_read_be32(const ioport32_t *reg) 127 { 128 return uint32_t_be2host(pio_read_32(reg)); 129 } 130 static inline uint64_t pio_read_le64(const ioport64_t *reg) 131 { 132 return uint64_t_le2host(pio_read_64(reg)); 133 } 134 static inline uint64_t pio_read_be64(const ioport64_t *reg) 135 { 136 return uint64_t_be2host(pio_read_64(reg)); 137 } 138 87 139 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, 88 140 useconds_t delay)
Note:
See TracChangeset
for help on using the changeset viewer.