Changeset b7fd2a0 in mainline for uspace/lib/c/generic/device
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/lib/c/generic/device
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/device/clock_dev.c
r36f0738 rb7fd2a0 46 46 * @return EOK on success or an error code 47 47 */ 48 int48 errno_t 49 49 clock_dev_time_get(async_sess_t *sess, struct tm *t) 50 50 { 51 51 aid_t req; 52 int ret;52 errno_t ret; 53 53 54 54 async_exch_t *exch = async_exchange_begin(sess); … … 60 60 async_exchange_end(exch); 61 61 62 int rc;62 errno_t rc; 63 63 if (ret != EOK) { 64 64 async_forget(req); … … 67 67 68 68 async_wait_for(req, &rc); 69 return ( int)rc;69 return (errno_t)rc; 70 70 } 71 71 … … 77 77 * @return EOK on success or an error code 78 78 */ 79 int79 errno_t 80 80 clock_dev_time_set(async_sess_t *sess, struct tm *t) 81 81 { 82 82 aid_t req; 83 int ret;83 errno_t ret; 84 84 85 85 async_exch_t *exch = async_exchange_begin(sess); … … 91 91 async_exchange_end(exch); 92 92 93 int rc;93 errno_t rc; 94 94 if (ret != EOK) { 95 95 async_forget(req); … … 98 98 99 99 async_wait_for(req, &rc); 100 return ( int)rc;100 return (errno_t)rc; 101 101 } 102 102 -
uspace/lib/c/generic/device/hw_res.c
r36f0738 rb7fd2a0 38 38 #include <stdlib.h> 39 39 40 int hw_res_get_resource_list(async_sess_t *sess,40 errno_t hw_res_get_resource_list(async_sess_t *sess, 41 41 hw_resource_list_t *hw_resources) 42 42 { … … 45 45 async_exch_t *exch = async_exchange_begin(sess); 46 46 47 int rc = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),47 errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 48 48 HW_RES_GET_RESOURCE_LIST, &count); 49 49 … … 75 75 } 76 76 77 int hw_res_enable_interrupt(async_sess_t *sess, int irq)77 errno_t hw_res_enable_interrupt(async_sess_t *sess, int irq) 78 78 { 79 79 async_exch_t *exch = async_exchange_begin(sess); 80 80 81 int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),81 errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 82 82 HW_RES_ENABLE_INTERRUPT, irq); 83 83 async_exchange_end(exch); … … 86 86 } 87 87 88 int hw_res_disable_interrupt(async_sess_t *sess, int irq)88 errno_t hw_res_disable_interrupt(async_sess_t *sess, int irq) 89 89 { 90 90 async_exch_t *exch = async_exchange_begin(sess); 91 91 92 int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),92 errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 93 93 HW_RES_DISABLE_INTERRUPT, irq); 94 94 async_exchange_end(exch); … … 97 97 } 98 98 99 int hw_res_clear_interrupt(async_sess_t *sess, int irq)99 errno_t hw_res_clear_interrupt(async_sess_t *sess, int irq) 100 100 { 101 101 async_exch_t *exch = async_exchange_begin(sess); 102 102 103 int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),103 errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 104 104 HW_RES_CLEAR_INTERRUPT, irq); 105 105 async_exchange_end(exch); … … 122 122 * 123 123 */ 124 int hw_res_dma_channel_setup(async_sess_t *sess,124 errno_t hw_res_dma_channel_setup(async_sess_t *sess, 125 125 unsigned channel, uint32_t pa, uint32_t size, uint8_t mode) 126 126 { … … 128 128 129 129 const uint32_t packed = (channel & 0xffff) | (mode << 16); 130 const int ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),130 const errno_t ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 131 131 HW_RES_DMA_CHANNEL_SETUP, packed, pa, size); 132 132 … … 145 145 * 146 146 */ 147 int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel, size_t *rem)147 errno_t hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel, size_t *rem) 148 148 { 149 149 async_exch_t *exch = async_exchange_begin(sess); 150 150 151 151 sysarg_t remain; 152 const int ret = async_req_2_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),152 const errno_t ret = async_req_2_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 153 153 HW_RES_DMA_CHANNEL_REMAIN, channel, &remain); 154 154 -
uspace/lib/c/generic/device/hw_res_parsed.c
r36f0738 rb7fd2a0 194 194 * 195 195 */ 196 int hw_res_list_parse(const pio_window_t *win,196 errno_t hw_res_list_parse(const pio_window_t *win, 197 197 const hw_resource_list_t *res, hw_res_list_parsed_t *out, int flags) 198 198 { … … 253 253 * 254 254 */ 255 int hw_res_get_list_parsed(async_sess_t *sess,255 errno_t hw_res_get_list_parsed(async_sess_t *sess, 256 256 hw_res_list_parsed_t *hw_res_parsed, int flags) 257 257 { 258 258 pio_window_t pio_window; 259 int rc;259 errno_t rc; 260 260 261 261 if (!hw_res_parsed) -
uspace/lib/c/generic/device/led_dev.c
r36f0738 rb7fd2a0 39 39 #include <device/led_dev.h> 40 40 41 int led_dev_color_set(async_sess_t *sess, pixel_t pixel)41 errno_t led_dev_color_set(async_sess_t *sess, pixel_t pixel) 42 42 { 43 43 async_exch_t *exch = async_exchange_begin(sess); … … 48 48 async_exchange_end(exch); 49 49 50 int rc;50 errno_t rc; 51 51 async_wait_for(req, &rc); 52 52 53 return ( int) rc;53 return (errno_t) rc; 54 54 } 55 55 -
uspace/lib/c/generic/device/pio_window.c
r36f0738 rb7fd2a0 37 37 #include <async.h> 38 38 39 int pio_window_get(async_sess_t *sess, pio_window_t *pio_win)39 errno_t pio_window_get(async_sess_t *sess, pio_window_t *pio_win) 40 40 { 41 int rc;41 errno_t rc; 42 42 43 43 async_exch_t *exch = async_exchange_begin(sess);
Note:
See TracChangeset
for help on using the changeset viewer.