package gpiod
A wrapper around the C libgpiod library for GPIO on recent (>4.8) Linux kernels
Install
Dune Dependency
Authors
Maintainers
Sources
v0.7.tar.gz
md5=5c7cc97227025d483b181a22dc22481f
sha512=4a12ef0e1b53adcf5e61495df1b27e0800da035eb21716b757199a852d94502de1d31cb401e4bb39662b7ac33cea7e88971bcfc86d8620d44c03e6593d13d168
doc/src/gpiod.bindings/gpiod_bindings.ml.html
Source file gpiod_bindings.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
open Ctypes module Stubs (F : Ctypes.FOREIGN) = struct open F type gpiod_chip let gpiod_chip : gpiod_chip structure typ = structure "gpiod_chip" type gpiod_line let gpiod_line : gpiod_line structure typ = structure "gpiod_line" type gpiod_chip_iter let gpiod_chip_iter : gpiod_chip_iter structure typ = structure "gpiod_chip_iter" type gpiod_line_iter let gpiod_line_iter : gpiod_line_iter structure typ = structure "gpiod_line_iter" type gpiod_line_bulk let gpiod_line_bulk : gpiod_line_bulk structure typ = structure "gpiod_line_bulk" let ctxless_get_value = foreign "gpiod_ctxless_get_value" (string_opt @-> int @-> bool @-> string_opt @-> (returning (int))) let ctxless_get_value_ext = foreign "gpiod_ctxless_get_value_ext" (string_opt @-> int @-> bool @-> string_opt @-> int @-> (returning (int))) let ctxless_get_value_multiple = foreign "gpiod_ctxless_get_value_multiple" (string_opt @-> ptr void @-> ptr void @-> int @-> bool @-> string_opt @-> (returning (int))) let ctxless_get_value_multiple_ext = foreign "gpiod_ctxless_get_value_multiple_ext" (string_opt @-> ptr void @-> ptr void @-> int @-> bool @-> string_opt @-> int @-> (returning (int))) type gpiod_ctxless_event_poll_fd let gpiod_ctxless_event_poll_fd : gpiod_ctxless_event_poll_fd structure typ = structure "gpiod_ctxless_event_poll_fd" let ctxless_find_line = foreign "gpiod_ctxless_find_line" (string_opt @-> string_opt @-> nativeint @-> ptr void @-> (returning (int))) let chip_open = foreign "gpiod_chip_open" (string_opt @-> (returning (ptr_opt gpiod_chip))) let chip_open_by_name = foreign "gpiod_chip_open_by_name" (string_opt @-> (returning (ptr_opt gpiod_chip))) let chip_open_by_number = foreign "gpiod_chip_open_by_number" (int @-> (returning (ptr_opt gpiod_chip))) let chip_open_by_label = foreign "gpiod_chip_open_by_label" (string_opt @-> (returning (ptr_opt gpiod_chip))) let chip_open_lookup = foreign "gpiod_chip_open_lookup" (string_opt @-> (returning (ptr_opt gpiod_chip))) let chip_close = foreign "gpiod_chip_close" (ptr_opt gpiod_chip @-> (returning (void))) let chip_name = foreign "gpiod_chip_name" (ptr_opt gpiod_chip @-> (returning (string_opt))) let chip_label = foreign "gpiod_chip_label" (ptr_opt gpiod_chip @-> (returning (string_opt))) let chip_num_lines = foreign "gpiod_chip_num_lines" (ptr_opt gpiod_chip @-> (returning (int))) let chip_get_line = foreign "gpiod_chip_get_line" (ptr_opt gpiod_chip @-> int @-> (returning (ptr_opt gpiod_line))) let chip_get_lines = foreign "gpiod_chip_get_lines" (ptr_opt gpiod_chip @-> ptr void @-> int @-> ptr_opt gpiod_line_bulk @-> (returning (int))) let chip_get_all_lines = foreign "gpiod_chip_get_all_lines" (ptr_opt gpiod_chip @-> ptr_opt gpiod_line_bulk @-> (returning (int))) let chip_find_line = foreign "gpiod_chip_find_line" (ptr_opt gpiod_chip @-> string_opt @-> (returning (ptr_opt gpiod_line))) let chip_find_lines = foreign "gpiod_chip_find_lines" (ptr_opt gpiod_chip @-> ptr void @-> ptr_opt gpiod_line_bulk @-> (returning (int))) let line_offset = foreign "gpiod_line_offset" (ptr_opt gpiod_line @-> (returning (int))) let line_name = foreign "gpiod_line_name" (ptr_opt gpiod_line @-> (returning (string_opt))) let line_consumer = foreign "gpiod_line_consumer" (ptr_opt gpiod_line @-> (returning (string_opt))) let line_direction = foreign "gpiod_line_direction" (ptr_opt gpiod_line @-> (returning (int))) let line_active_state = foreign "gpiod_line_active_state" (ptr_opt gpiod_line @-> (returning (int))) let line_bias = foreign "gpiod_line_bias" (ptr_opt gpiod_line @-> (returning (int))) let line_is_used = foreign "gpiod_line_is_used" (ptr_opt gpiod_line @-> (returning (bool))) let line_is_open_drain = foreign "gpiod_line_is_open_drain" (ptr_opt gpiod_line @-> (returning (bool))) let line_is_open_source = foreign "gpiod_line_is_open_source" (ptr_opt gpiod_line @-> (returning (bool))) let line_update = foreign "gpiod_line_update" (ptr_opt gpiod_line @-> (returning (int))) type gpiod_line_request_config let gpiod_line_request_config : gpiod_line_request_config structure typ = structure "gpiod_line_request_config" let line_request_input = foreign "gpiod_line_request_input" (ptr_opt gpiod_line @-> string_opt @-> (returning (int))) let line_request_output = foreign "gpiod_line_request_output" (ptr_opt gpiod_line @-> string_opt @-> int @-> (returning (int))) let line_request_rising_edge_events = foreign "gpiod_line_request_rising_edge_events" (ptr_opt gpiod_line @-> string_opt @-> (returning (int))) let line_request_falling_edge_events = foreign "gpiod_line_request_falling_edge_events" (ptr_opt gpiod_line @-> string_opt @-> (returning (int))) let line_request_both_edges_events = foreign "gpiod_line_request_both_edges_events" (ptr_opt gpiod_line @-> string_opt @-> (returning (int))) let line_request_input_flags = foreign "gpiod_line_request_input_flags" (ptr_opt gpiod_line @-> string_opt @-> int @-> (returning (int))) let line_request_output_flags = foreign "gpiod_line_request_output_flags" (ptr_opt gpiod_line @-> string_opt @-> int @-> int @-> (returning (int))) let line_request_rising_edge_events_flags = foreign "gpiod_line_request_rising_edge_events_flags" (ptr_opt gpiod_line @-> string_opt @-> int @-> (returning (int))) let line_request_falling_edge_events_flags = foreign "gpiod_line_request_falling_edge_events_flags" (ptr_opt gpiod_line @-> string_opt @-> int @-> (returning (int))) let line_request_both_edges_events_flags = foreign "gpiod_line_request_both_edges_events_flags" (ptr_opt gpiod_line @-> string_opt @-> int @-> (returning (int))) let line_request_bulk_input = foreign "gpiod_line_request_bulk_input" (ptr_opt gpiod_line_bulk @-> string_opt @-> (returning (int))) let line_request_bulk_output = foreign "gpiod_line_request_bulk_output" (ptr_opt gpiod_line_bulk @-> string_opt @-> ptr void @-> (returning (int))) let line_request_bulk_rising_edge_events = foreign "gpiod_line_request_bulk_rising_edge_events" (ptr_opt gpiod_line_bulk @-> string_opt @-> (returning (int))) let line_request_bulk_falling_edge_events = foreign "gpiod_line_request_bulk_falling_edge_events" (ptr_opt gpiod_line_bulk @-> string_opt @-> (returning (int))) let line_request_bulk_both_edges_events = foreign "gpiod_line_request_bulk_both_edges_events" (ptr_opt gpiod_line_bulk @-> string_opt @-> (returning (int))) let line_request_bulk_input_flags = foreign "gpiod_line_request_bulk_input_flags" (ptr_opt gpiod_line_bulk @-> string_opt @-> int @-> (returning (int))) let line_request_bulk_output_flags = foreign "gpiod_line_request_bulk_output_flags" (ptr_opt gpiod_line_bulk @-> string_opt @-> int @-> ptr void @-> (returning (int))) let line_request_bulk_rising_edge_events_flags = foreign "gpiod_line_request_bulk_rising_edge_events_flags" (ptr_opt gpiod_line_bulk @-> string_opt @-> int @-> (returning (int))) let line_request_bulk_falling_edge_events_flags = foreign "gpiod_line_request_bulk_falling_edge_events_flags" (ptr_opt gpiod_line_bulk @-> string_opt @-> int @-> (returning (int))) let line_request_bulk_both_edges_events_flags = foreign "gpiod_line_request_bulk_both_edges_events_flags" (ptr_opt gpiod_line_bulk @-> string_opt @-> int @-> (returning (int))) let line_release = foreign "gpiod_line_release" (ptr_opt gpiod_line @-> (returning (void))) let line_release_bulk = foreign "gpiod_line_release_bulk" (ptr_opt gpiod_line_bulk @-> (returning (void))) let line_is_requested = foreign "gpiod_line_is_requested" (ptr_opt gpiod_line @-> (returning (bool))) let line_is_free = foreign "gpiod_line_is_free" (ptr_opt gpiod_line @-> (returning (bool))) let line_get_value = foreign "gpiod_line_get_value" (ptr_opt gpiod_line @-> (returning (int))) let line_get_value_bulk = foreign "gpiod_line_get_value_bulk" (ptr_opt gpiod_line_bulk @-> ptr void @-> (returning (int))) let line_set_value = foreign "gpiod_line_set_value" (ptr_opt gpiod_line @-> int @-> (returning (int))) let line_set_value_bulk = foreign "gpiod_line_set_value_bulk" (ptr_opt gpiod_line_bulk @-> ptr void @-> (returning (int))) let line_set_config = foreign "gpiod_line_set_config" (ptr_opt gpiod_line @-> int @-> int @-> int @-> (returning (int))) let line_set_config_bulk = foreign "gpiod_line_set_config_bulk" (ptr_opt gpiod_line_bulk @-> int @-> int @-> ptr void @-> (returning (int))) let line_set_flags = foreign "gpiod_line_set_flags" (ptr_opt gpiod_line @-> int @-> (returning (int))) let line_set_flags_bulk = foreign "gpiod_line_set_flags_bulk" (ptr_opt gpiod_line_bulk @-> int @-> (returning (int))) let line_set_direction_input = foreign "gpiod_line_set_direction_input" (ptr_opt gpiod_line @-> (returning (int))) let line_set_direction_output = foreign "gpiod_line_set_direction_output" (ptr_opt gpiod_line @-> int @-> (returning (int))) let line_set_direction_output_bulk = foreign "gpiod_line_set_direction_output_bulk" (ptr_opt gpiod_line_bulk @-> ptr void @-> (returning (int))) type gpiod_line_event let gpiod_line_event : gpiod_line_event structure typ = structure "gpiod_line_event" let line_event_read = foreign "gpiod_line_event_read" (ptr_opt gpiod_line @-> ptr_opt gpiod_line_event @-> (returning (int))) let line_event_read_multiple = foreign "gpiod_line_event_read_multiple" (ptr_opt gpiod_line @-> ptr_opt gpiod_line_event @-> int @-> (returning (int))) let line_event_get_fd = foreign "gpiod_line_event_get_fd" (ptr_opt gpiod_line @-> (returning (int))) let line_event_read_fd = foreign "gpiod_line_event_read_fd" (int @-> ptr_opt gpiod_line_event @-> (returning (int))) let line_event_read_fd_multiple = foreign "gpiod_line_event_read_fd_multiple" (int @-> ptr_opt gpiod_line_event @-> int @-> (returning (int))) let line_get = foreign "gpiod_line_get" (string_opt @-> int @-> (returning (ptr_opt gpiod_line))) let line_find = foreign "gpiod_line_find" (string_opt @-> (returning (ptr_opt gpiod_line))) let line_close_chip = foreign "gpiod_line_close_chip" (ptr_opt gpiod_line @-> (returning (void))) let line_get_chip = foreign "gpiod_line_get_chip" (ptr_opt gpiod_line @-> (returning (ptr_opt gpiod_chip))) let chip_iter_new = foreign "gpiod_chip_iter_new" (void @-> (returning (ptr_opt gpiod_chip_iter))) let chip_iter_free = foreign "gpiod_chip_iter_free" (ptr_opt gpiod_chip_iter @-> (returning (void))) let chip_iter_free_noclose = foreign "gpiod_chip_iter_free_noclose" (ptr_opt gpiod_chip_iter @-> (returning (void))) let chip_iter_next = foreign "gpiod_chip_iter_next" (ptr_opt gpiod_chip_iter @-> (returning (ptr_opt gpiod_chip))) let chip_iter_next_noclose = foreign "gpiod_chip_iter_next_noclose" (ptr_opt gpiod_chip_iter @-> (returning (ptr_opt gpiod_chip))) let line_iter_new = foreign "gpiod_line_iter_new" (ptr_opt gpiod_chip @-> (returning (ptr_opt gpiod_line_iter))) let line_iter_free = foreign "gpiod_line_iter_free" (ptr_opt gpiod_line_iter @-> (returning (void))) let line_iter_next = foreign "gpiod_line_iter_next" (ptr_opt gpiod_line_iter @-> (returning (ptr_opt gpiod_line))) let version_string = foreign "gpiod_version_string" (void @-> (returning (string_opt))) end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>