package gpiod
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A wrapper around the C libgpiod library for GPIO on recent (>4.8) Linux kernels
Install
dune-project
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 138open Ctypes module Stubs (F : Ctypes.FOREIGN) = struct open F type gpiod_chip let gpiod_chip : gpiod_chip structure typ = structure "gpiod_chip" type gpiod_chip_info let gpiod_chip_info : gpiod_chip_info structure typ = structure "gpiod_chip_info" type gpiod_line_info let gpiod_line_info : gpiod_line_info structure typ = structure "gpiod_line_info" type gpiod_line_settings let gpiod_line_settings : gpiod_line_settings structure typ = structure "gpiod_line_settings" type gpiod_line_config let gpiod_line_config : gpiod_line_config structure typ = structure "gpiod_line_config" type gpiod_request_config let gpiod_request_config : gpiod_request_config structure typ = structure "gpiod_request_config" type gpiod_line_request let gpiod_line_request : gpiod_line_request structure typ = structure "gpiod_line_request" type gpiod_info_event let gpiod_info_event : gpiod_info_event structure typ = structure "gpiod_info_event" type gpiod_edge_event let gpiod_edge_event : gpiod_edge_event structure typ = structure "gpiod_edge_event" type gpiod_edge_event_buffer let gpiod_edge_event_buffer : gpiod_edge_event_buffer structure typ = structure "gpiod_edge_event_buffer" let chip_open = foreign "gpiod_chip_open" (string_opt @-> (returning (ptr_opt gpiod_chip))) let chip_close = foreign "gpiod_chip_close" (ptr_opt gpiod_chip @-> (returning (void))) let chip_get_info = foreign "gpiod_chip_get_info" (ptr_opt gpiod_chip @-> (returning (ptr_opt gpiod_chip_info))) let chip_get_path = foreign "gpiod_chip_get_path" (ptr_opt gpiod_chip @-> (returning (string_opt))) let chip_get_line_info = foreign "gpiod_chip_get_line_info" (ptr_opt gpiod_chip @-> int @-> (returning (ptr_opt gpiod_line_info))) let chip_watch_line_info = foreign "gpiod_chip_watch_line_info" (ptr_opt gpiod_chip @-> int @-> (returning (ptr_opt gpiod_line_info))) let chip_unwatch_line_info = foreign "gpiod_chip_unwatch_line_info" (ptr_opt gpiod_chip @-> int @-> (returning (int))) let chip_get_fd = foreign "gpiod_chip_get_fd" (ptr_opt gpiod_chip @-> (returning (int))) let chip_read_info_event = foreign "gpiod_chip_read_info_event" (ptr_opt gpiod_chip @-> (returning (ptr_opt gpiod_info_event))) let chip_get_line_offset_from_name = foreign "gpiod_chip_get_line_offset_from_name" (ptr_opt gpiod_chip @-> string_opt @-> (returning (int))) let chip_request_lines = foreign "gpiod_chip_request_lines" (ptr_opt gpiod_chip @-> ptr_opt gpiod_request_config @-> ptr_opt gpiod_line_config @-> (returning (ptr_opt gpiod_line_request))) let chip_info_free = foreign "gpiod_chip_info_free" (ptr_opt gpiod_chip_info @-> (returning (void))) let chip_info_get_name = foreign "gpiod_chip_info_get_name" (ptr_opt gpiod_chip_info @-> (returning (string_opt))) let chip_info_get_label = foreign "gpiod_chip_info_get_label" (ptr_opt gpiod_chip_info @-> (returning (string_opt))) let chip_info_get_num_lines = foreign "gpiod_chip_info_get_num_lines" (ptr_opt gpiod_chip_info @-> (returning (nativeint))) let line_info_free = foreign "gpiod_line_info_free" (ptr_opt gpiod_line_info @-> (returning (void))) let line_info_copy = foreign "gpiod_line_info_copy" (ptr_opt gpiod_line_info @-> (returning (ptr_opt gpiod_line_info))) let line_info_get_offset = foreign "gpiod_line_info_get_offset" (ptr_opt gpiod_line_info @-> (returning (int))) let line_info_get_name = foreign "gpiod_line_info_get_name" (ptr_opt gpiod_line_info @-> (returning (string_opt))) let line_info_is_used = foreign "gpiod_line_info_is_used" (ptr_opt gpiod_line_info @-> (returning (bool))) let line_info_get_consumer = foreign "gpiod_line_info_get_consumer" (ptr_opt gpiod_line_info @-> (returning (string_opt))) let line_info_is_active_low = foreign "gpiod_line_info_is_active_low" (ptr_opt gpiod_line_info @-> (returning (bool))) let line_info_is_debounced = foreign "gpiod_line_info_is_debounced" (ptr_opt gpiod_line_info @-> (returning (bool))) let info_event_free = foreign "gpiod_info_event_free" (ptr_opt gpiod_info_event @-> (returning (void))) let info_event_get_line_info = foreign "gpiod_info_event_get_line_info" (ptr_opt gpiod_info_event @-> (returning (ptr_opt gpiod_line_info))) let line_settings_new = foreign "gpiod_line_settings_new" (void @-> (returning (ptr_opt gpiod_line_settings))) let line_settings_free = foreign "gpiod_line_settings_free" (ptr_opt gpiod_line_settings @-> (returning (void))) let line_settings_reset = foreign "gpiod_line_settings_reset" (ptr_opt gpiod_line_settings @-> (returning (void))) let line_settings_copy = foreign "gpiod_line_settings_copy" (ptr_opt gpiod_line_settings @-> (returning (ptr_opt gpiod_line_settings))) let line_settings_set_active_low = foreign "gpiod_line_settings_set_active_low" (ptr_opt gpiod_line_settings @-> bool @-> (returning (void))) let line_settings_get_active_low = foreign "gpiod_line_settings_get_active_low" (ptr_opt gpiod_line_settings @-> (returning (bool))) let line_config_new = foreign "gpiod_line_config_new" (void @-> (returning (ptr_opt gpiod_line_config))) let line_config_free = foreign "gpiod_line_config_free" (ptr_opt gpiod_line_config @-> (returning (void))) let line_config_reset = foreign "gpiod_line_config_reset" (ptr_opt gpiod_line_config @-> (returning (void))) let line_config_add_line_settings = foreign "gpiod_line_config_add_line_settings" (ptr_opt gpiod_line_config @-> ptr void @-> nativeint @-> ptr_opt gpiod_line_settings @-> (returning (int))) let line_config_get_line_settings = foreign "gpiod_line_config_get_line_settings" (ptr_opt gpiod_line_config @-> int @-> (returning (ptr_opt gpiod_line_settings))) let request_config_new = foreign "gpiod_request_config_new" (void @-> (returning (ptr_opt gpiod_request_config))) let request_config_free = foreign "gpiod_request_config_free" (ptr_opt gpiod_request_config @-> (returning (void))) let request_config_set_consumer = foreign "gpiod_request_config_set_consumer" (ptr_opt gpiod_request_config @-> string_opt @-> (returning (void))) let request_config_get_consumer = foreign "gpiod_request_config_get_consumer" (ptr_opt gpiod_request_config @-> (returning (string_opt))) let line_request_release = foreign "gpiod_line_request_release" (ptr_opt gpiod_line_request @-> (returning (void))) let line_request_get_chip_name = foreign "gpiod_line_request_get_chip_name" (ptr_opt gpiod_line_request @-> (returning (string_opt))) let line_request_reconfigure_lines = foreign "gpiod_line_request_reconfigure_lines" (ptr_opt gpiod_line_request @-> ptr_opt gpiod_line_config @-> (returning (int))) let line_request_get_fd = foreign "gpiod_line_request_get_fd" (ptr_opt gpiod_line_request @-> (returning (int))) let line_request_read_edge_events = foreign "gpiod_line_request_read_edge_events" (ptr_opt gpiod_line_request @-> ptr_opt gpiod_edge_event_buffer @-> nativeint @-> (returning (int))) let edge_event_free = foreign "gpiod_edge_event_free" (ptr_opt gpiod_edge_event @-> (returning (void))) let edge_event_copy = foreign "gpiod_edge_event_copy" (ptr_opt gpiod_edge_event @-> (returning (ptr_opt gpiod_edge_event))) let edge_event_get_line_offset = foreign "gpiod_edge_event_get_line_offset" (ptr_opt gpiod_edge_event @-> (returning (int))) let edge_event_buffer_new = foreign "gpiod_edge_event_buffer_new" (nativeint @-> (returning (ptr_opt gpiod_edge_event_buffer))) let edge_event_buffer_free = foreign "gpiod_edge_event_buffer_free" (ptr_opt gpiod_edge_event_buffer @-> (returning (void))) let is_gpiochip_device = foreign "gpiod_is_gpiochip_device" (string_opt @-> (returning (bool))) let api_version = foreign "gpiod_api_version" (void @-> (returning (string_opt))) end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>