Changeset 0adddea in mainline for uspace/lib/c/include/device/hw_res.h
- Timestamp:
- 2011-01-09T12:30:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b2263e6a
- Parents:
- 54de5ebd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/device/hw_res.h
r54de5ebd r0adddea 39 39 #include <bool.h> 40 40 41 // HW resource provider interface 42 41 /** HW resource provider interface */ 43 42 typedef enum { 44 43 GET_RESOURCE_LIST = 0, … … 46 45 } hw_res_funcs_t; 47 46 48 /** HW resource types .*/47 /** HW resource types */ 49 48 typedef enum { 50 49 INTERRUPT, … … 58 57 } endianness_t; 59 58 60 /** HW resource (e.g. interrupt, memory register, i/o register etc.) .*/61 typedef struct hw_resource{59 /** HW resource (e.g. interrupt, memory register, i/o register etc.) */ 60 typedef struct { 62 61 hw_res_type_t type; 63 62 union { … … 67 66 size_t size; 68 67 } mem_range; 68 69 69 struct { 70 70 uint64_t address; … … 72 72 size_t size; 73 73 } io_range; 74 74 75 struct { 75 76 int irq; … … 78 79 } hw_resource_t; 79 80 80 typedef struct hw_resource_list{81 typedef struct { 81 82 size_t count; 82 83 hw_resource_t *resources; … … 85 86 static inline void clean_hw_resource_list(hw_resource_list_t *hw_res) 86 87 { 87 if ( NULL != hw_res->resources) {88 if (hw_res->resources != NULL) { 88 89 free(hw_res->resources); 89 90
Note:
See TracChangeset
for help on using the changeset viewer.