Skip to main content

libicsneoc2_sys/
bindings.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3pub const ICSNEOC2_OPEN_OPTIONS_NONE: u32 = 0;
4pub const ICSNEOC2_OPEN_OPTIONS_GO_ONLINE: u32 = 1;
5pub const ICSNEOC2_OPEN_OPTIONS_SYNC_RTC: u32 = 2;
6pub const ICSNEOC2_OPEN_OPTIONS_ENABLE_AUTO_UPDATE: u32 = 4;
7pub const ICSNEOC2_OPEN_OPTIONS_FORCE_UPDATE: u32 = 8;
8pub const ICSNEOC2_DISK_FORMAT_FLAGS_PRESENT: u32 = 1;
9pub const ICSNEOC2_DISK_FORMAT_FLAGS_INITIALIZED: u32 = 2;
10pub const ICSNEOC2_DISK_FORMAT_FLAGS_FORMATTED: u32 = 4;
11pub const ICSNEOC2_MESSAGE_CAN_FLAGS_RTR: u32 = 1;
12pub const ICSNEOC2_MESSAGE_CAN_FLAGS_IDE: u32 = 2;
13pub const ICSNEOC2_MESSAGE_CAN_FLAGS_FDF: u32 = 4;
14pub const ICSNEOC2_MESSAGE_CAN_FLAGS_BRS: u32 = 8;
15pub const ICSNEOC2_MESSAGE_CAN_FLAGS_ESI: u32 = 16;
16pub type icsneoc2_open_options_t = u32;
17#[repr(u32)]
18#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
19pub enum Devicetype {
20    Unknown = 0,
21    Blue = 1,
22    EcuAvb = 2,
23    RadSupermoon = 3,
24    DwVcan = 4,
25    RadMoon2 = 5,
26    RadMars = 6,
27    Vcan41 = 7,
28    Fire = 8,
29    RadPluto = 9,
30    Vcan42El = 10,
31    RadioCanhub = 11,
32    NeoEcu12 = 12,
33    Obd2LcBadge = 13,
34    RadMoonDuo = 14,
35    Fire3 = 15,
36    Vcan3 = 16,
37    RadJupiter = 17,
38    Vcan4Industrial = 18,
39    RadGigastar = 19,
40    Red2 = 20,
41    Etherbadge = 22,
42    RadA2b = 23,
43    RadEpsilon = 24,
44    RadEpsilonXl = 30,
45    RadGalaxy2 = 33,
46    RadMoon3 = 35,
47    RadComet = 36,
48    Fire3Flexray = 37,
49    Connect = 38,
50    RadComet3 = 39,
51    RadMoonT1s = 40,
52    RadGigastar2 = 41,
53    Fire3T1sLin = 42,
54    Fire3T1sSent = 43,
55    RadGemini = 44,
56    Red = 64,
57    Ecu = 128,
58    Ievb = 256,
59    Pendant = 512,
60    Obd2Pro = 1024,
61    EcuchipUart = 2048,
62    Plasma = 4096,
63    NeoAnalog = 16384,
64    CtObd = 32768,
65    Ion = 262144,
66    RadStar = 524288,
67    Vcan44 = 2097152,
68    Vcan42 = 4194304,
69    CmProbe = 8388608,
70    Eevb = 16777216,
71    VcanRf = 33554432,
72    Fire2 = 67108864,
73    Flex = 134217728,
74    RadGalaxy = 268435456,
75    RadStar2 = 536870912,
76    Vividcan = 1073741824,
77    Obd2Sim = 2147483648,
78    Maxsize = 2147483649,
79}
80pub type icsneoc2_devicetype_t = u32;
81#[repr(u32)]
82#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
83pub enum NetworkType {
84    Invalid = 0,
85    Internal = 1,
86    Can = 2,
87    Lin = 3,
88    Flexray = 4,
89    Most = 5,
90    Ethernet = 6,
91    Lsftcan = 7,
92    Swcan = 8,
93    Iso9141 = 9,
94    I2c = 10,
95    A2b = 11,
96    Spi = 12,
97    Mdio = 13,
98    AutomotiveEthernet = 14,
99    Maxsize = 15,
100    Any = 254,
101    Other = 255,
102}
103pub type icsneoc2_network_type_t = u8;
104#[repr(u32)]
105#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
106pub enum Netid {
107    Device = 0,
108    Dwcan01 = 1,
109    Dwcan08 = 2,
110    Swcan01 = 3,
111    Lsftcan01 = 4,
112    Fordscp = 5,
113    J1708 = 6,
114    Aux = 7,
115    J1850vpw = 8,
116    Iso9141 = 9,
117    DiskData = 10,
118    Main51 = 11,
119    Red = 12,
120    Sci = 13,
121    Iso914102 = 14,
122    Iso14230 = 15,
123    Lin01 = 16,
124    Ae01 = 17,
125    Ae02 = 18,
126    Ae03 = 19,
127    RedExtMemoryread = 20,
128    RedIntMemoryread = 21,
129    RedDflashRead = 22,
130    NeoMemorySdread = 23,
131    CanErrbits = 24,
132    NeoMemoryWriteDone = 25,
133    RedWaveCan1Logical = 26,
134    RedWaveCan2Logical = 27,
135    RedWaveLin1Logical = 28,
136    RedWaveLin2Logical = 29,
137    RedWaveLin1Analog = 30,
138    RedWaveLin2Analog = 31,
139    RedWaveMiscAnalog = 32,
140    RedWaveMiscdio2Logical = 33,
141    RedNetworkComEnableEx = 34,
142    RedNeoviNetwork = 35,
143    RedReadBaudSettings = 36,
144    RedOldformat = 37,
145    RedScopeCapture = 38,
146    RedHardwareExcep = 39,
147    RedGetRtc = 40,
148    Iso914103 = 41,
149    Dwcan02 = 42,
150    Dwcan03 = 44,
151    Ae04 = 45,
152    Ae05 = 46,
153    Iso914104 = 47,
154    Lin02 = 48,
155    Lin03 = 49,
156    Lin04 = 50,
157    MostUnused = 51,
158    RedAppError = 52,
159    Cgi = 53,
160    ResetStatus = 54,
161    FbStatus = 55,
162    AppSignalStatus = 56,
163    ReadDatalinkCmTxMsg = 57,
164    ReadDatalinkCmRxMsg = 58,
165    LoggingOverflow = 59,
166    ReadSettings = 60,
167    Dwcan04 = 61,
168    Dwcan05 = 62,
169    Rs232 = 63,
170    Uart01 = 64,
171    Uart02 = 65,
172    Uart03 = 66,
173    Uart04 = 67,
174    Swcan02 = 68,
175    EthernetDaq = 69,
176    DataToHost = 70,
177    TextapiToHost = 71,
178    Spi01 = 72,
179    Ae06 = 73,
180    RedVbat = 74,
181    Ae07 = 75,
182    Ae08 = 76,
183    Ae09 = 77,
184    Ae10 = 78,
185    Ae11 = 79,
186    Flexray01a = 80,
187    Flexray01b = 81,
188    Flexray02a = 82,
189    Flexray02b = 83,
190    Lin05 = 84,
191    Flexray01 = 85,
192    Flexray02 = 86,
193    Ae12 = 87,
194    I2c01 = 88,
195    Most25 = 90,
196    Most50 = 91,
197    Most150 = 92,
198    Ethernet01 = 93,
199    Gmfsa = 94,
200    Tcp = 95,
201    Dwcan06 = 96,
202    Dwcan07 = 97,
203    Lin06 = 98,
204    Lsftcan02 = 99,
205    LogicalDiskInfo = 187,
206    WiviCommand = 221,
207    ScriptStatus = 224,
208    EthPhyControl = 239,
209    ExtendedCommand = 240,
210    ExtendedData = 242,
211    FlexrayControl = 243,
212    CoreminiPreload = 244,
213    HwComLatencyTest = 512,
214    DeviceStatus = 513,
215    Udp = 514,
216    ForwardedMessage = 516,
217    I2c02 = 517,
218    I2c03 = 518,
219    I2c04 = 519,
220    Ethernet02 = 520,
221    EthernetTxWrap = 521,
222    A2b01 = 522,
223    A2b02 = 523,
224    Ethernet03 = 524,
225    Wbms01 = 532,
226    Dwcan09 = 534,
227    Dwcan10 = 535,
228    Dwcan11 = 536,
229    Dwcan12 = 537,
230    Dwcan13 = 538,
231    Dwcan14 = 539,
232    Dwcan15 = 540,
233    Dwcan16 = 541,
234    Lin07 = 542,
235    Lin08 = 543,
236    Spi02 = 544,
237    Mdio01 = 545,
238    Mdio02 = 546,
239    Mdio03 = 547,
240    Mdio04 = 548,
241    Mdio05 = 549,
242    Mdio06 = 550,
243    Mdio07 = 551,
244    Mdio08 = 552,
245    Ae13 = 553,
246    Ae14 = 554,
247    Ae15 = 555,
248    Ae16 = 556,
249    Spi03 = 557,
250    Spi04 = 558,
251    Spi05 = 559,
252    Spi06 = 560,
253    Spi07 = 561,
254    Spi08 = 562,
255    Lin09 = 563,
256    Lin10 = 564,
257    Lin11 = 565,
258    Lin12 = 566,
259    Lin13 = 567,
260    Lin14 = 568,
261    Lin15 = 569,
262    Lin16 = 570,
263    Maxsize = 571,
264    Any = 65534,
265    Invalid = 65535,
266}
267pub type icsneoc2_netid_t = u16;
268#[repr(u32)]
269#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
270pub enum IoType {
271    EthActivation = 0,
272    UsbHostPower = 1,
273    BackupPowerEn = 2,
274    BackupPowerGood = 3,
275    Misc = 4,
276    Emisc = 5,
277    Maxsize = 6,
278}
279pub type icsneoc2_io_type_t = u32;
280#[repr(u32)]
281#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
282pub enum LinMode {
283    Sleep = 0,
284    Slow = 1,
285    Normal = 2,
286    Fast = 3,
287    Maxsize = 4,
288}
289pub type icsneoc2_lin_mode_t = u32;
290#[repr(i32)]
291#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
292pub enum AeLinkMode {
293    Invalid = -1,
294    Auto = 0,
295    Master = 1,
296    Slave = 2,
297    Maxsize = 3,
298}
299pub type icsneoc2_ae_link_mode_t = u32;
300#[repr(u32)]
301#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
302pub enum EthPhyLinkMode {
303    AutoNegotiation = 1,
304    EthPhyLinkMode10mbpsHalfduplex = 2,
305    EthPhyLinkMode10mbpsFullDuplex = 3,
306    EthPhyLinkMode100mbpsHalfDuplex = 4,
307    EthPhyLinkMode100mbpsFullDuplex = 5,
308    EthPhyLinkMode1gbpsHalfDuplex = 6,
309    EthPhyLinkMode1gbpsFullDuplex = 7,
310    EthPhyLinkMode25gbpsFullDuplex = 8,
311    EthPhyLinkMode5gbpsFullDuplex = 9,
312    EthPhyLinkMode10gbpsFullDuplex = 10,
313    Maxsize = 11,
314}
315pub type icsneoc2_eth_phy_link_mode_t = u32;
316#[repr(u32)]
317#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
318pub enum MiscIoAnalogVoltage {
319    V0 = 0,
320    V1 = 1,
321    V2 = 2,
322    V3 = 3,
323    V4 = 4,
324    V5 = 5,
325    Maxsize = 6,
326}
327pub type icsneoc2_misc_io_analog_voltage_t = u8;
328#[repr(C)]
329#[derive(Debug, Copy, Clone)]
330pub struct icsneoc2_disk_details_t {
331    _unused: [u8; 0],
332}
333#[repr(u32)]
334#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
335pub enum DiskLayout {
336    Spanned = 0,
337    Raid0 = 1,
338    Maxsize = 2,
339}
340pub type icsneoc2_disk_layout_t = u8;
341pub type icsneoc2_disk_format_flags_t = u32;
342#[repr(u32)]
343#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
344pub enum DiskFormatDirective {
345    Continue = 0,
346    Stop = 1,
347    Maxsize = 2,
348}
349pub type icsneoc2_disk_format_directive_t = u8;
350pub type icsneoc2_disk_format_progress_fn = ::std::option::Option<
351    unsafe extern "C" fn(
352        sectors_formatted: u64,
353        total_sectors: u64,
354        user_data: *mut ::std::os::raw::c_void,
355    ) -> icsneoc2_disk_format_directive_t,
356>;
357#[repr(C)]
358#[derive(Debug, Copy, Clone)]
359pub struct icsneoc2_script_status_t {
360    _unused: [u8; 0],
361}
362#[repr(u32)]
363#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
364pub enum MemoryType {
365    Flash = 0,
366    Sd = 1,
367    Maxsize = 2,
368}
369pub type icsneoc2_memory_type_t = u8;
370#[repr(C)]
371#[derive(Debug, Copy, Clone)]
372pub struct icsneoc2_device_info_t {
373    _unused: [u8; 0],
374}
375#[repr(C)]
376#[derive(Debug, Copy, Clone)]
377pub struct icsneoc2_device_t {
378    _unused: [u8; 0],
379}
380#[repr(C)]
381#[derive(Debug, Copy, Clone)]
382pub struct icsneoc2_message_t {
383    _unused: [u8; 0],
384}
385#[repr(C)]
386#[derive(Debug, Copy, Clone)]
387pub struct icsneoc2_event_t {
388    _unused: [u8; 0],
389}
390#[repr(u32)]
391#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
392pub enum Error {
393    Success = 0,
394    InvalidParameters = 1,
395    OpenFailed = 2,
396    GoOnlineFailed = 3,
397    EnableMessagePollingFailed = 4,
398    SyncRtcFailed = 5,
399    GetMessagesFailed = 6,
400    InvalidType = 7,
401    RtcFailure = 8,
402    GetSettingsFailure = 9,
403    SetSettingsFailure = 10,
404    TransmitMessageFailed = 11,
405    StringCopyFailed = 12,
406    InvalidDevice = 13,
407    InvalidMessage = 14,
408    OutOfMemory = 15,
409    FormatDiskFailed = 16,
410    ScriptStartFailed = 17,
411    ScriptStopFailed = 18,
412    ScriptClearFailed = 19,
413    ScriptUploadFailed = 20,
414    ScriptLoadPrepareFailed = 21,
415    CloseFailed = 22,
416    ReconnectFailed = 23,
417    Maxsize = 24,
418}
419pub type icsneoc2_error_t = u32;
420pub const icsneoc2_open_options_default: icsneoc2_open_options_t = 7;
421unsafe extern "C" {
422    #[doc = " Get the error string for an error code.\n\n @param[in] error_code The error code to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
423    pub fn icsneoc2_error_code_get(
424        error_code: icsneoc2_error_t,
425        value: *mut ::std::os::raw::c_char,
426        value_length: *mut usize,
427    ) -> icsneoc2_error_t;
428}
429unsafe extern "C" {
430    #[doc = " Get the device type string for a icsneoc2_devicetype_t.\n\n @param[in] device_type The device type to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
431    pub fn icsneoc2_device_type_name_get(
432        device_type: icsneoc2_devicetype_t,
433        value: *mut ::std::os::raw::c_char,
434        value_length: *mut usize,
435    ) -> icsneoc2_error_t;
436}
437unsafe extern "C" {
438    #[doc = " Enumerate connected devices. Returns head of an opaque linked list.\n Pass 0 for device_type to enumerate all devices, or a specific type to filter.\n\n @param[in] device_type The device type to filter by, or 0 for all devices.\n @param[out] devices Pointer to receive the head of the device info linked list.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful.\n\n @see icsneoc2_enumeration_free"]
439    pub fn icsneoc2_device_enumerate(
440        device_type: icsneoc2_devicetype_t,
441        devices: *mut *mut icsneoc2_device_info_t,
442    ) -> icsneoc2_error_t;
443}
444unsafe extern "C" {
445    #[doc = " Free an enumeration list returned by icsneoc2_device_enumerate().\n Safe to call after opening devices from the list.\n\n @param[in] devices The head of the device info linked list to free."]
446    pub fn icsneoc2_enumeration_free(devices: *mut icsneoc2_device_info_t);
447}
448unsafe extern "C" {
449    #[doc = " Advance to the next device in an enumeration list.\n\n @param[in] device_info The current device info node.\n\n @return The next device info node, or NULL at the end of the list."]
450    pub fn icsneoc2_device_info_next(
451        device_info: *const icsneoc2_device_info_t,
452    ) -> *mut icsneoc2_device_info_t;
453}
454unsafe extern "C" {
455    #[doc = " Get the serial number of an enumerated device.\n\n @param[in] device_info The device info node.\n @param[out] serial Buffer to copy the serial string into. Null terminated.\n @param[in,out] serial_length Size of the serial buffer. Modified with the length of the serial.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful."]
456    pub fn icsneoc2_device_info_serial_get(
457        device_info: *const icsneoc2_device_info_t,
458        serial: *mut ::std::os::raw::c_char,
459        serial_length: *mut usize,
460    ) -> icsneoc2_error_t;
461}
462unsafe extern "C" {
463    #[doc = " Get the device type of an enumerated device.\n\n @param[in] device_info The device info node.\n @param[out] type Pointer to receive the device type.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful."]
464    pub fn icsneoc2_device_info_type_get(
465        device_info: *const icsneoc2_device_info_t,
466        type_: *mut icsneoc2_devicetype_t,
467    ) -> icsneoc2_error_t;
468}
469unsafe extern "C" {
470    #[doc = " Get the human-readable type name of an enumerated device.\n\n @param[in] device_info The device info node.\n @param[out] type_name Buffer to copy the type name into. Null terminated.\n @param[in,out] type_name_length Size of the buffer. Modified with the length of the name.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful."]
471    pub fn icsneoc2_device_info_type_name_get(
472        device_info: *const icsneoc2_device_info_t,
473        type_name: *mut ::std::os::raw::c_char,
474        type_name_length: *mut usize,
475    ) -> icsneoc2_error_t;
476}
477unsafe extern "C" {
478    #[doc = " Get the full description of an enumerated device (e.g. \"neoVI FIRE 3 RS2043\").\n\n @param[in] device_info The device info node.\n @param[out] description Buffer to copy the description into. Null terminated.\n @param[in,out] description_length Size of the buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful."]
479    pub fn icsneoc2_device_info_description_get(
480        device_info: *const icsneoc2_device_info_t,
481        description: *mut ::std::os::raw::c_char,
482        description_length: *mut usize,
483    ) -> icsneoc2_error_t;
484}
485unsafe extern "C" {
486    #[doc = " Check to make sure a device is valid.\n\n @param[in] device The device to check.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
487    pub fn icsneoc2_device_is_valid(device: *const icsneoc2_device_t) -> icsneoc2_error_t;
488}
489unsafe extern "C" {
490    #[doc = " Check to make sure a device is open.\n\n @param[in] device The device to check.\n @param[out] is_open true if the device is open, false otherwise\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
491    pub fn icsneoc2_device_is_open(
492        device: *const icsneoc2_device_t,
493        is_open: *mut bool,
494    ) -> icsneoc2_error_t;
495}
496unsafe extern "C" {
497    #[doc = " Create a device handle from an enumeration node without opening it. Need to call icsneoc2_device_free() to free the handle when finished.\n The device can then be opened with icsneoc2_device_open().\n\n @param[in] device_info The device info node to create from.\n @param[out] device Pointer to receive the created device handle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_invalid_device otherwise.\n\n @see icsneoc2_device_open icsneoc2_device_free"]
498    pub fn icsneoc2_device_create(
499        device_info: *const icsneoc2_device_info_t,
500        device: *mut *mut icsneoc2_device_t,
501    ) -> icsneoc2_error_t;
502}
503unsafe extern "C" {
504    #[doc = " Open a device from an enumeration node.\n\n After a successful call, icsneoc2_device_close() must be called to close the device.\n\n @param[in] device Pointer to the device to open.\n @param[in] options Open options (e.g. icsneoc2_open_options_default).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_open_failed otherwise.\n\n @see icsneoc2_device_close icsneoc2_device_free"]
505    pub fn icsneoc2_device_open(
506        device: *const icsneoc2_device_t,
507        options: icsneoc2_open_options_t,
508    ) -> icsneoc2_error_t;
509}
510unsafe extern "C" {
511    #[doc = " Convenience: enumerate, find by serial, open, and free enumeration.\n\n @param[in] serial Serial number string to match (e.g. \"RS2043\").\n @param[in] options Open options (e.g. icsneoc2_open_options_default).\n @param[out] device Pointer to receive the opened device handle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful.\n\n @see icsneoc2_device_close icsneoc2_device_free"]
512    pub fn icsneoc2_device_open_serial(
513        serial: *const ::std::os::raw::c_char,
514        options: icsneoc2_open_options_t,
515        device: *mut *mut icsneoc2_device_t,
516    ) -> icsneoc2_error_t;
517}
518unsafe extern "C" {
519    #[doc = " Convenience: enumerate, find first available device (optionally filtered by type), open, and free enumeration.\n Pass 0 for device_type to match any device.\n\n\n @param[in] device_type The device type to match, or 0 for any.\n @param[in] options Open options (e.g. icsneoc2_open_options_default).\n @param[out] device Pointer to receive the opened device handle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful.\n\n @see icsneoc2_device_close icsneoc2_device_free"]
520    pub fn icsneoc2_device_open_first(
521        device_type: icsneoc2_devicetype_t,
522        options: icsneoc2_open_options_t,
523        device: *mut *mut icsneoc2_device_t,
524    ) -> icsneoc2_error_t;
525}
526unsafe extern "C" {
527    #[doc = " Reconnect to a device. This is useful if the device was disconnected and reconnected, or if the connection was lost for some reason.\n\n @param[in] device The device to reconnect.\n @param[in] options Open options (e.g. icsneoc2_open_options_default).\n @param[in] timeout_ms The timeout in milliseconds to keep trying to reconnect before giving up.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_reconnect_failed if the timeout was reached without reconnecting, or icsneoc2_device_is_valid() errors otherwise."]
528    pub fn icsneoc2_device_reconnect(
529        device: *mut icsneoc2_device_t,
530        options: icsneoc2_open_options_t,
531        timeout_ms: u32,
532    ) -> icsneoc2_error_t;
533}
534unsafe extern "C" {
535    #[doc = " Close a connection to a previously opened device.\n\n After a successful call to icsneoc2_device_open(), this function must be called to close the device.\n An already closed device will still succeed. The device handle must be freed with icsneoc2_device_free() when finished.\n\n @param[in,out] device Pointer to the device to close.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_device_is_valid() errors otherwise.\n\n @see icsneoc2_device_open icsneoc2_device_is_valid icsneoc2_device_free"]
536    pub fn icsneoc2_device_close(device: *mut icsneoc2_device_t) -> icsneoc2_error_t;
537}
538unsafe extern "C" {
539    #[doc = " Free a device handle created by icsneoc2_device_create(). Device should be closed before freeing.\n\n @param[in] device The device handle to free.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_device_is_valid() errors otherwise.\n\n @see icsneoc2_device_create icsneoc2_device_close"]
540    pub fn icsneoc2_device_free(device: *mut icsneoc2_device_t) -> icsneoc2_error_t;
541}
542unsafe extern "C" {
543    #[doc = " Get the description of a device\n\n @param[in] device The device to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
544    pub fn icsneoc2_device_description_get(
545        device: *const icsneoc2_device_t,
546        value: *mut ::std::os::raw::c_char,
547        value_length: *mut usize,
548    ) -> icsneoc2_error_t;
549}
550unsafe extern "C" {
551    #[doc = " Get the type of a device\n\n @param[in] device The device to get the type of.\n @param[out] value Pointer to an icsneoc2_devicetype_t to copy the type into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
552    pub fn icsneoc2_device_type_get(
553        device: *const icsneoc2_device_t,
554        value: *mut icsneoc2_devicetype_t,
555    ) -> icsneoc2_error_t;
556}
557unsafe extern "C" {
558    #[doc = " Get the serial of a device\n\n @param[in] device The device to get the serial of.\n @param[out] value Pointer to a buffer to copy the serial into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the serial.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
559    pub fn icsneoc2_device_serial_get(
560        device: *const icsneoc2_device_t,
561        value: *mut ::std::os::raw::c_char,
562        value_length: *mut usize,
563    ) -> icsneoc2_error_t;
564}
565unsafe extern "C" {
566    #[doc = " Set the online state of a device.\n\n @param[in] device The device to set the online state of.\n @param[in] go_online true to go online, false to go offline.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_go_online_failed otherwise."]
567    pub fn icsneoc2_device_go_online(
568        device: *const icsneoc2_device_t,
569        go_online: bool,
570    ) -> icsneoc2_error_t;
571}
572unsafe extern "C" {
573    #[doc = " Get the online state of a device.\n\n @param[in] device The device to get the online state of.\n @param[out] is_online true if online, false if offline.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
574    pub fn icsneoc2_device_is_online(
575        device: *const icsneoc2_device_t,
576        is_online: *mut bool,
577    ) -> icsneoc2_error_t;
578}
579unsafe extern "C" {
580    #[doc = " Get the online supported state of a device.\n\n @param[in] device The device to get the online supported state of.\n @param[out] is_online_supported true if online supported, false if not.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
581    pub fn icsneoc2_device_is_online_supported(
582        device: *const icsneoc2_device_t,
583        is_online_supported: *mut bool,
584    ) -> icsneoc2_error_t;
585}
586unsafe extern "C" {
587    #[doc = " Set the message polling limit of a device.\n\n This will truncate the message queue to the specified limit.\n\n @param[in] device The device to enforce the message polling limit.\n @param[in] limit The limit to enforce.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
588    pub fn icsneoc2_device_message_polling_limit_set(
589        device: *const icsneoc2_device_t,
590        limit: u32,
591    ) -> icsneoc2_error_t;
592}
593unsafe extern "C" {
594    #[doc = " Get the message polling limit of a device.\n\n @see icsneoc2_device_message_polling_limit_set\n\n @param[in] device The device to get the message polling limit from.\n @param[out] limit The limit to get.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
595    pub fn icsneoc2_device_message_polling_limit_get(
596        device: *const icsneoc2_device_t,
597        limit: *mut u32,
598    ) -> icsneoc2_error_t;
599}
600unsafe extern "C" {
601    #[doc = " Get the timestamp resolution (nanoseconds) of a device\n\n @param[in] device The device to get the timestamp resolution of.\n @param[out] resolution Pointer to a uint32_t to copy the timestamp resolution in nanoseconds into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
602    pub fn icsneoc2_device_timestamp_resolution_get(
603        device: *mut icsneoc2_device_t,
604        resolution: *mut u32,
605    ) -> icsneoc2_error_t;
606}
607unsafe extern "C" {
608    #[doc = " Get a message from a device\n\n @param[in] device The device to get the message from.\n @param[out] message Pointer to a icsneoc2_message_t to copy the message into.\n @param[in] timeout_ms The timeout in milliseconds to wait for a message. A value of 0 indicates a non-blocking call.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise.\n\n @see icsneoc2_message_free"]
609    pub fn icsneoc2_device_message_get(
610        device: *const icsneoc2_device_t,
611        message: *mut *mut icsneoc2_message_t,
612        timeout_ms: u32,
613    ) -> icsneoc2_error_t;
614}
615unsafe extern "C" {
616    #[doc = " Transmit messages from a device\n\n @param[in] device The device to transmit the message from.\n @param[in] messages Pointer to an icsneoc2_message_t to transmit.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_transmit_message_failed otherwise."]
617    pub fn icsneoc2_device_message_transmit(
618        device: *const icsneoc2_device_t,
619        messages: *const icsneoc2_message_t,
620    ) -> icsneoc2_error_t;
621}
622unsafe extern "C" {
623    #[doc = " Get the network type string for a icsneoc2_network_type_t.\n\n @param[in] network_type The network type to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
624    pub fn icsneoc2_network_type_name_get(
625        network_type: icsneoc2_network_type_t,
626        value: *mut ::std::os::raw::c_char,
627        value_length: *mut usize,
628    ) -> icsneoc2_error_t;
629}
630unsafe extern "C" {
631    #[doc = " Get the last event to occur, with an optional device filter.\n\n @param[out] event Pointer to an icsneoc2_event_t to copy the event into.\n @param[in] device Optional device filter to get event for.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise.\n\n @see icsneoc2_event_free"]
632    pub fn icsneoc2_event_get(
633        event: *mut *mut icsneoc2_event_t,
634        device: *const icsneoc2_device_t,
635    ) -> icsneoc2_error_t;
636}
637unsafe extern "C" {
638    #[doc = " Pop the last event not related to a specific device.\n\n @param[out] event Pointer to an icsneoc2_event_t to copy the event into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
639    pub fn icsneoc2_event_free(event: *mut icsneoc2_event_t) -> icsneoc2_error_t;
640}
641unsafe extern "C" {
642    #[doc = " Get the description of an event.\n\n @param[in] event The event to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
643    pub fn icsneoc2_event_description_get(
644        event: *const icsneoc2_event_t,
645        value: *mut ::std::os::raw::c_char,
646        value_length: *mut usize,
647    ) -> icsneoc2_error_t;
648}
649unsafe extern "C" {
650    #[doc = " Get the RTC (Real time clock) of a device.\n\n @param[in] device The device to get the RTC of.\n @param[out] unix_epoch Pointer to an int64_t to copy the RTC into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
651    pub fn icsneoc2_device_rtc_get(
652        device: *const icsneoc2_device_t,
653        unix_epoch: *mut i64,
654    ) -> icsneoc2_error_t;
655}
656unsafe extern "C" {
657    #[doc = " Set the RTC (Real time clock) of a device.\n\n @param[in] device The device to set the RTC of.\n @param[in] unix_epoch int64_t to set the RTC to.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
658    pub fn icsneoc2_device_rtc_set(
659        device: *const icsneoc2_device_t,
660        unix_epoch: i64,
661    ) -> icsneoc2_error_t;
662}
663unsafe extern "C" {
664    #[doc = " Check if the device supports TC10.\n\n @param[in] device The device to check against.\n @param[out] supported Pointer to a bool to copy the value into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
665    pub fn icsneoc2_device_supports_tc10(
666        device: *const icsneoc2_device_t,
667        supported: *mut bool,
668    ) -> icsneoc2_error_t;
669}
670unsafe extern "C" {
671    #[doc = " Get the current state of a digital I/O pin.\n\n @param[in] device The device to query.\n @param[in] type The I/O pin type.\n @param[in] number The pin number (for misc/emisc types).\n @param[out] value Pointer to store the current pin state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
672    pub fn icsneoc2_device_digital_io_get(
673        device: *const icsneoc2_device_t,
674        type_: icsneoc2_io_type_t,
675        number: u32,
676        value: *mut bool,
677    ) -> icsneoc2_error_t;
678}
679unsafe extern "C" {
680    #[doc = " Set the state of a digital I/O pin.\n\n @param[in] device The device to configure.\n @param[in] type The I/O pin type.\n @param[in] number The pin number (for misc/emisc types).\n @param[in] value The desired pin state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
681    pub fn icsneoc2_device_digital_io_set(
682        device: *const icsneoc2_device_t,
683        type_: icsneoc2_io_type_t,
684        number: u32,
685        value: bool,
686    ) -> icsneoc2_error_t;
687}
688unsafe extern "C" {
689    #[doc = " Get the version of the icsneoc2 API.\n\n @param[out] value Pointer to a buffer to copy the version string into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the version string.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
690    pub fn icsneoc2_version_get(
691        value: *mut ::std::os::raw::c_char,
692        value_length: *mut usize,
693    ) -> icsneoc2_error_t;
694}
695unsafe extern "C" {
696    #[doc = " Convert a device serial number to a string.\n\n @param[in] num The serial number to convert.\n @param[out] str Pointer to a buffer to copy the serial string into. Null terminated.\n @param[in,out] str_length Size of the str buffer. Modified with the length of the serial string.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_string_copy_failed otherwise."]
697    pub fn icsneoc2_serial_num_to_string(
698        num: u32,
699        str_: *mut ::std::os::raw::c_char,
700        str_length: *mut usize,
701    ) -> icsneoc2_error_t;
702}
703unsafe extern "C" {
704    #[doc = " Convert a device serial string to a number.\n\n @param[in] str The serial string to convert (e.g., \"GS1128\").\n @param[in] str_length The length of the serial string. This should match strlen(str).\n @param[out] num Pointer to store the converted serial number.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
705    pub fn icsneoc2_serial_string_to_num(
706        str_: *mut ::std::os::raw::c_char,
707        str_length: usize,
708        num: *mut u32,
709    ) -> icsneoc2_error_t;
710}
711unsafe extern "C" {
712    #[doc = " Get the number of disk slots on a device.\n\n @param[in] device The device to query.\n @param[out] count Pointer to receive the number of disk slots.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
713    pub fn icsneoc2_device_disk_count_get(
714        device: *const icsneoc2_device_t,
715        count: *mut usize,
716    ) -> icsneoc2_error_t;
717}
718unsafe extern "C" {
719    #[doc = " Check if a device supports disk formatting.\n\n @param[in] device The device to query.\n @param[out] supported Pointer to receive true if the device supports disk formatting, false otherwise.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
720    pub fn icsneoc2_device_supports_disk_formatting(
721        device: *const icsneoc2_device_t,
722        supported: *mut bool,
723    ) -> icsneoc2_error_t;
724}
725unsafe extern "C" {
726    #[doc = " Query the current disk details from a device.\n\n On success, the caller owns the returned icsneoc2_disk_details_t and must free it\n with icsneoc2_disk_details_free() when done.\n\n @param[in] device The device to query.\n @param[out] disk_details Pointer to receive the allocated disk details handle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful.\n\n @see icsneoc2_disk_details_free"]
727    pub fn icsneoc2_device_disk_details_get(
728        device: *const icsneoc2_device_t,
729        disk_details: *mut *mut icsneoc2_disk_details_t,
730    ) -> icsneoc2_error_t;
731}
732unsafe extern "C" {
733    #[doc = " Free a disk details handle returned by icsneoc2_device_disk_details_get().\n\n @param[in] disk_details The disk details handle to free. May be NULL."]
734    pub fn icsneoc2_disk_details_free(disk_details: *mut icsneoc2_disk_details_t);
735}
736unsafe extern "C" {
737    #[doc = " Get the number of disks described in a disk details handle.\n\n @param[in] disk_details The disk details handle.\n @param[out] count Pointer to receive the disk count.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
738    pub fn icsneoc2_disk_details_count_get(
739        disk_details: *const icsneoc2_disk_details_t,
740        count: *mut usize,
741    ) -> icsneoc2_error_t;
742}
743unsafe extern "C" {
744    #[doc = " Get the layout of the disks (e.g. spanned or RAID0).\n\n @param[in] disk_details The disk details handle.\n @param[out] layout Pointer to receive the layout.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
745    pub fn icsneoc2_disk_details_layout_get(
746        disk_details: *const icsneoc2_disk_details_t,
747        layout: *mut icsneoc2_disk_layout_t,
748    ) -> icsneoc2_error_t;
749}
750unsafe extern "C" {
751    #[doc = " Set the layout of the disks (e.g. spanned or RAID0).\n\n @param[in] disk_details The disk details handle.\n @param[in] layout The layout to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
752    pub fn icsneoc2_disk_details_layout_set(
753        disk_details: *const icsneoc2_disk_details_t,
754        layout: icsneoc2_disk_layout_t,
755    ) -> icsneoc2_error_t;
756}
757unsafe extern "C" {
758    #[doc = " Get the status flags for a specific disk by index.\n\n Flags are a bitmask of icsneoc2_disk_format_flag_present, icsneoc2_disk_format_flag_initialized,\n and icsneoc2_disk_format_flag_formatted.\n\n @param[in] disk_details The disk details handle.\n @param[in] index Zero-based disk index.\n @param[out] flags Pointer to receive the flags bitmask.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters if out of range."]
759    pub fn icsneoc2_disk_details_flags_get(
760        disk_details: *const icsneoc2_disk_details_t,
761        index: usize,
762        flags: *mut icsneoc2_disk_format_flags_t,
763    ) -> icsneoc2_error_t;
764}
765unsafe extern "C" {
766    #[doc = " Set the status flags for a specific disk by index.\n\n Flags are a bitmask of icsneoc2_disk_format_flag_present, icsneoc2_disk_format_flag_initialized,\n and icsneoc2_disk_format_flag_formatted.\n\n @param[in] disk_details The disk details handle.\n @param[in] index Zero-based disk index.\n @param[in] flags Flags bitmask to apply.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters if out of range."]
767    pub fn icsneoc2_disk_details_flags_set(
768        disk_details: *const icsneoc2_disk_details_t,
769        index: usize,
770        flags: icsneoc2_disk_format_flags_t,
771    ) -> icsneoc2_error_t;
772}
773unsafe extern "C" {
774    #[doc = " Get the size of a specific disk by index.\n\n @param[in] disk_details The disk details handle.\n @param[in] index Zero-based disk index.\n @param[out] sectors Pointer to receive the number of sectors.\n @param[out] bytes_per_sector Pointer to receive the number of bytes per sector.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters if out of range."]
775    pub fn icsneoc2_disk_details_size_get(
776        disk_details: *const icsneoc2_disk_details_t,
777        index: usize,
778        sectors: *mut u64,
779        bytes_per_sector: *mut u64,
780    ) -> icsneoc2_error_t;
781}
782unsafe extern "C" {
783    #[doc = " Get whether a full format is configured.\n\n @param[in] disk_details The disk details handle.\n @param[out] full_format Pointer to receive true for full format, false for quick format.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
784    pub fn icsneoc2_disk_details_full_format_get(
785        disk_details: *const icsneoc2_disk_details_t,
786        full_format: *mut bool,
787    ) -> icsneoc2_error_t;
788}
789unsafe extern "C" {
790    #[doc = " Set whether to perform a full format.\n\n @param[in] disk_details The disk details handle.\n @param[in] full_format true for a full (slow) format, false for a quick format.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
791    pub fn icsneoc2_disk_details_full_format_set(
792        disk_details: *const icsneoc2_disk_details_t,
793        full_format: bool,
794    ) -> icsneoc2_error_t;
795}
796unsafe extern "C" {
797    #[doc = " Format the disk(s) on a device.\n\n This is a blocking call that runs until formatting completes or the progress callback\n returns icsneoc2_disk_format_directive_stop.\n\n @param[in] device The device whose disks should be formatted.\n @param[in] disk_details A disk details handle describing the format configuration.\n            Use icsneoc2_device_disk_details_get() to obtain a handle, then modify flags\n            (set icsneoc2_disk_format_flag_formatted on disks you want to format).\n @param[in] progress_callback Optional callback invoked periodically with progress.\n            Return icsneoc2_disk_format_directive_continue to keep going, or\n            icsneoc2_disk_format_directive_stop to cancel. May be NULL.\n @param[in] user_data Opaque pointer passed through to the progress callback.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_format_disk_failed otherwise."]
798    pub fn icsneoc2_device_format_disk(
799        device: *const icsneoc2_device_t,
800        disk_details: *mut icsneoc2_disk_details_t,
801        progress_callback: icsneoc2_disk_format_progress_fn,
802        user_data: *mut ::std::os::raw::c_void,
803    ) -> icsneoc2_error_t;
804}
805unsafe extern "C" {
806    #[doc = " Get the list of networks this device supports for receiving.\n\n If networks is NULL, only the count is written. Otherwise, up to *count network IDs\n are copied into the caller-provided buffer and *count is set to the number written.\n\n @param[in] device The device to query.\n @param[out] networks Caller-allocated array to receive network IDs, or NULL to query count only.\n @param[in,out] count On input, the maximum number of entries the buffer can hold.\n                      On output, the number of entries written (or total available if networks is NULL).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
807    pub fn icsneoc2_device_supported_rx_networks_get(
808        device: *const icsneoc2_device_t,
809        networks: *mut icsneoc2_netid_t,
810        count: *mut usize,
811    ) -> icsneoc2_error_t;
812}
813unsafe extern "C" {
814    #[doc = " Get the list of networks this device supports for transmitting.\n\n If networks is NULL, only the count is written. Otherwise, up to *count network IDs\n are copied into the caller-provided buffer and *count is set to the number written.\n\n @param[in] device The device to query.\n @param[out] networks Caller-allocated array to receive network IDs, or NULL to query count only.\n @param[in,out] count On input, the maximum number of entries the buffer can hold.\n                      On output, the number of entries written (or total available if networks is NULL).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
815    pub fn icsneoc2_device_supported_tx_networks_get(
816        device: *const icsneoc2_device_t,
817        networks: *mut icsneoc2_netid_t,
818        count: *mut usize,
819    ) -> icsneoc2_error_t;
820}
821unsafe extern "C" {
822    #[doc = " Check whether this device supports CoreMini scripts.\n\n @param[in] device The device to query.\n @param[out] supported Set to true if the device supports CoreMini scripts, false otherwise.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
823    pub fn icsneoc2_device_supports_coremini_script(
824        device: *const icsneoc2_device_t,
825        supported: *mut bool,
826    ) -> icsneoc2_error_t;
827}
828unsafe extern "C" {
829    #[doc = " Start a CoreMini script on the device.\n\n @param[in] device The device to start the script on.\n @param[in] memory_type The memory location of the script (flash or SD).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_start_failed otherwise."]
830    pub fn icsneoc2_device_script_start(
831        device: *const icsneoc2_device_t,
832        memory_type: icsneoc2_memory_type_t,
833    ) -> icsneoc2_error_t;
834}
835unsafe extern "C" {
836    #[doc = " Stop a running CoreMini script on the device.\n\n @param[in] device The device to stop the script on.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_stop_failed otherwise."]
837    pub fn icsneoc2_device_script_stop(device: *const icsneoc2_device_t) -> icsneoc2_error_t;
838}
839unsafe extern "C" {
840    #[doc = " Clear a CoreMini script from the device.\n\n @param[in] device The device to clear the script from.\n @param[in] memory_type The memory location to clear the script from (flash or SD).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_clear_failed otherwise."]
841    pub fn icsneoc2_device_script_clear(
842        device: *const icsneoc2_device_t,
843        memory_type: icsneoc2_memory_type_t,
844    ) -> icsneoc2_error_t;
845}
846unsafe extern "C" {
847    #[doc = " Prepare the device for a script load operation.\n\n @param[in] device The device to prepare.\n @param[out] status Receives the prepare status code from the device.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_load_prepare_failed otherwise."]
848    pub fn icsneoc2_device_script_prepare_load(
849        device: *const icsneoc2_device_t,
850        status: *mut i8,
851    ) -> icsneoc2_error_t;
852}
853unsafe extern "C" {
854    #[doc = " Upload a CoreMini script to the device from a file path.\n\n @param[in] device The device to upload to.\n @param[in] path Null-terminated file path to the CoreMini binary.\n @param[in] memory_type The memory location to upload to (flash or SD).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_upload_failed otherwise."]
855    pub fn icsneoc2_device_coremini_upload_file(
856        device: *const icsneoc2_device_t,
857        path: *const ::std::os::raw::c_char,
858        memory_type: icsneoc2_memory_type_t,
859    ) -> icsneoc2_error_t;
860}
861unsafe extern "C" {
862    #[doc = " Upload a CoreMini script to the device from a memory buffer.\n\n @param[in] device The device to upload to.\n @param[in] data Pointer to the CoreMini binary data.\n @param[in] length Length of the data in bytes.\n @param[in] memory_type The memory location to upload to (flash or SD).\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_script_upload_failed otherwise."]
863    pub fn icsneoc2_device_coremini_upload(
864        device: *const icsneoc2_device_t,
865        data: *const u8,
866        length: usize,
867        memory_type: icsneoc2_memory_type_t,
868    ) -> icsneoc2_error_t;
869}
870unsafe extern "C" {
871    #[doc = " Get the current script status from the device.\n\n Returns an opaque handle that must be freed with icsneoc2_script_status_free() when done.\n\n @param[in] device The device to query.\n @param[out] script_status Receives a newly allocated script status handle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful.\n @see icsneoc2_script_status_free"]
872    pub fn icsneoc2_device_script_status_get(
873        device: *const icsneoc2_device_t,
874        script_status: *mut *mut icsneoc2_script_status_t,
875    ) -> icsneoc2_error_t;
876}
877unsafe extern "C" {
878    #[doc = " Free a script status handle returned by icsneoc2_device_script_status_get().\n\n @param[in] script_status The handle to free. May be NULL."]
879    pub fn icsneoc2_script_status_free(script_status: *mut icsneoc2_script_status_t);
880}
881unsafe extern "C" {
882    #[doc = " Get whether the CoreMini script is currently running.\n\n @param[in] script_status The script status handle.\n @param[out] value Set to true if a script is running, false otherwise.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
883    pub fn icsneoc2_script_status_is_coremini_running(
884        script_status: *const icsneoc2_script_status_t,
885        value: *mut bool,
886    ) -> icsneoc2_error_t;
887}
888unsafe extern "C" {
889    #[doc = " Get whether the script is encrypted.\n\n @param[in] script_status The script status handle.\n @param[out] value Set to true if the script is encrypted, false otherwise.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
890    pub fn icsneoc2_script_status_is_encrypted(
891        script_status: *const icsneoc2_script_status_t,
892        value: *mut bool,
893    ) -> icsneoc2_error_t;
894}
895unsafe extern "C" {
896    #[doc = " Get the number of sector overflows.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the sector overflow count.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
897    pub fn icsneoc2_script_status_sector_overflows_get(
898        script_status: *const icsneoc2_script_status_t,
899        value: *mut u32,
900    ) -> icsneoc2_error_t;
901}
902unsafe extern "C" {
903    #[doc = " Get the number of remaining sector buffers.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the remaining sector buffer count.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
904    pub fn icsneoc2_script_status_remaining_sector_buffers_get(
905        script_status: *const icsneoc2_script_status_t,
906        value: *mut u32,
907    ) -> icsneoc2_error_t;
908}
909unsafe extern "C" {
910    #[doc = " Get the last sector written.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the last sector value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
911    pub fn icsneoc2_script_status_last_sector_get(
912        script_status: *const icsneoc2_script_status_t,
913        value: *mut u32,
914    ) -> icsneoc2_error_t;
915}
916unsafe extern "C" {
917    #[doc = " Get the read binary size.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the read binary size in bytes.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
918    pub fn icsneoc2_script_status_read_bin_size_get(
919        script_status: *const icsneoc2_script_status_t,
920        value: *mut u32,
921    ) -> icsneoc2_error_t;
922}
923unsafe extern "C" {
924    #[doc = " Get the minimum sector.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the minimum sector value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
925    pub fn icsneoc2_script_status_min_sector_get(
926        script_status: *const icsneoc2_script_status_t,
927        value: *mut u32,
928    ) -> icsneoc2_error_t;
929}
930unsafe extern "C" {
931    #[doc = " Get the maximum sector.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the maximum sector value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
932    pub fn icsneoc2_script_status_max_sector_get(
933        script_status: *const icsneoc2_script_status_t,
934        value: *mut u32,
935    ) -> icsneoc2_error_t;
936}
937unsafe extern "C" {
938    #[doc = " Get the current sector.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the current sector value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
939    pub fn icsneoc2_script_status_current_sector_get(
940        script_status: *const icsneoc2_script_status_t,
941        value: *mut u32,
942    ) -> icsneoc2_error_t;
943}
944unsafe extern "C" {
945    #[doc = " Get the CoreMini creation timestamp.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the creation timestamp as a Unix epoch value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
946    pub fn icsneoc2_script_status_coremini_create_time_get(
947        script_status: *const icsneoc2_script_status_t,
948        value: *mut u64,
949    ) -> icsneoc2_error_t;
950}
951unsafe extern "C" {
952    #[doc = " Get the file checksum.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the file checksum.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
953    pub fn icsneoc2_script_status_file_checksum_get(
954        script_status: *const icsneoc2_script_status_t,
955        value: *mut u16,
956    ) -> icsneoc2_error_t;
957}
958unsafe extern "C" {
959    #[doc = " Get the CoreMini version.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the CoreMini version.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
960    pub fn icsneoc2_script_status_coremini_version_get(
961        script_status: *const icsneoc2_script_status_t,
962        value: *mut u16,
963    ) -> icsneoc2_error_t;
964}
965unsafe extern "C" {
966    #[doc = " Get the CoreMini header size.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the CoreMini header size in bytes.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
967    pub fn icsneoc2_script_status_coremini_header_size_get(
968        script_status: *const icsneoc2_script_status_t,
969        value: *mut u16,
970    ) -> icsneoc2_error_t;
971}
972unsafe extern "C" {
973    #[doc = " Get the diagnostic error code.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the diagnostic error code.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
974    pub fn icsneoc2_script_status_diagnostic_error_code_get(
975        script_status: *const icsneoc2_script_status_t,
976        value: *mut u8,
977    ) -> icsneoc2_error_t;
978}
979unsafe extern "C" {
980    #[doc = " Get the diagnostic error code count.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the diagnostic error code count.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
981    pub fn icsneoc2_script_status_diagnostic_error_code_count_get(
982        script_status: *const icsneoc2_script_status_t,
983        value: *mut u8,
984    ) -> icsneoc2_error_t;
985}
986unsafe extern "C" {
987    #[doc = " Get the maximum CoreMini size in kilobytes.\n\n @param[in] script_status The script status handle.\n @param[out] value Receives the maximum CoreMini size in KB.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
988    pub fn icsneoc2_script_status_max_coremini_size_kb_get(
989        script_status: *const icsneoc2_script_status_t,
990        value: *mut u16,
991    ) -> icsneoc2_error_t;
992}
993unsafe extern "C" {
994    #[doc = " Create CAN message\n\n @param[out] message Pointer to icsneoc2_message_t to copy the message into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
995    pub fn icsneoc2_message_can_create(message: *mut *mut icsneoc2_message_t) -> icsneoc2_error_t;
996}
997unsafe extern "C" {
998    #[doc = " Free message\n\n @param[in] message The message to free.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise.\n\n @see icsneoc2_message_can_create icsneoc2_device_message_get"]
999    pub fn icsneoc2_message_free(message: *mut icsneoc2_message_t) -> icsneoc2_error_t;
1000}
1001unsafe extern "C" {
1002    #[doc = " Get the transmission status of a message.\n\n When a message is transmitted from the device, it will be returned in the receive buffer.\n @see icsneoc2_device_messages_transmit\n\n @param[in] message The message to check.\n @param[out] value Pointer to a bool to copy the transmission status into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1003    pub fn icsneoc2_message_is_transmit(
1004        message: *mut icsneoc2_message_t,
1005        value: *mut bool,
1006    ) -> icsneoc2_error_t;
1007}
1008unsafe extern "C" {
1009    #[doc = " Get the Network ID (netid) of a bus message\n\n @param[in] message The message to check.\n @param[out] netid Pointer to a icsneoc2_netid_t to copy the netid into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_invalid_type otherwise.\n\n @see icsneoc2_netid_t, icsneoc2_netid_name_get"]
1010    pub fn icsneoc2_message_netid_get(
1011        message: *mut icsneoc2_message_t,
1012        netid: *mut icsneoc2_netid_t,
1013    ) -> icsneoc2_error_t;
1014}
1015unsafe extern "C" {
1016    #[doc = " Get the netid string for a icsneoc2_netid_t.\n\n @param[in] netid The network id to get the description of.\n @param[out] value Pointer to a buffer to copy the description into. Null terminated.\n @param[in,out] value_length Size of the value buffer. Modified with the length of the description.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1017    pub fn icsneoc2_netid_name_get(
1018        netid: icsneoc2_netid_t,
1019        value: *mut ::std::os::raw::c_char,
1020        value_length: *mut usize,
1021    ) -> icsneoc2_error_t;
1022}
1023unsafe extern "C" {
1024    #[doc = " Set the Network ID (netid) of a bus message\n\n @param[in] device The device to check against.\n @param[in] message The message to modify.\n @param[in] netid The netid to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1025    pub fn icsneoc2_message_netid_set(
1026        message: *mut icsneoc2_message_t,
1027        netid: icsneoc2_netid_t,
1028    ) -> icsneoc2_error_t;
1029}
1030unsafe extern "C" {
1031    #[doc = " Set the data bytes of a message\n\n @param[in] message The message to copy the data into.\n @param[in] data Pointer to a uint8_t array to copy from.\n @param[in] data_length length of the data.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1032    pub fn icsneoc2_message_data_set(
1033        message: *mut icsneoc2_message_t,
1034        data: *mut u8,
1035        data_length: usize,
1036    ) -> icsneoc2_error_t;
1037}
1038unsafe extern "C" {
1039    #[doc = " Get the data bytes of a message\n\n @param[in] message The message to check.\n @param[out] data Pointer to a uint8_t to copy the data bytes into.\n @param[in,out] data_length Pointer to a size_t to copy the length of the data into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1040    pub fn icsneoc2_message_data_get(
1041        message: *mut icsneoc2_message_t,
1042        data: *mut u8,
1043        data_length: *mut usize,
1044    ) -> icsneoc2_error_t;
1045}
1046pub type icsneoc2_message_can_flags_t = u64;
1047unsafe extern "C" {
1048    #[doc = " Set the CAN specific properties of a message\n\n @param[in] message The message to modify.\n @param[in] arb_id Pointer to a uint64_t containing the arbitration ID to set. If NULL, it's ignored.\n @param[in] flags Pointer to a icsneoc2_message_can_flags_t containing the flags to set. If NULL, it's ignored. See icsneoc2_message_can_flags_t for details.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_invalid_type otherwise."]
1049    pub fn icsneoc2_message_can_props_set(
1050        message: *mut icsneoc2_message_t,
1051        arb_id: *const u64,
1052        flags: *const icsneoc2_message_can_flags_t,
1053    ) -> icsneoc2_error_t;
1054}
1055unsafe extern "C" {
1056    #[doc = " Get the CAN specific properties of a message\n\n @param[in] message The message to check.\n @param[out] arb_id Pointer to a uint64_t to copy the arbitration ID into. If NULL, it's ignored.\n @param[out] flags Pointer to a series of flags. If NULL, it's ignored. See icsneoc2_message_can_flags_t for details.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_invalid_type otherwise."]
1057    pub fn icsneoc2_message_can_props_get(
1058        message: *mut icsneoc2_message_t,
1059        arb_id: *mut u64,
1060        flags: *mut icsneoc2_message_can_flags_t,
1061    ) -> icsneoc2_error_t;
1062}
1063unsafe extern "C" {
1064    #[doc = " Check if a message is valid\n\n @param[in] device The device to check against.\n @param[in] message The message to check.\n @param[out] is_valid Pointer to a bool to copy the validity of the message into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1065    pub fn icsneoc2_message_is_valid(
1066        message: *mut icsneoc2_message_t,
1067        is_valid: *mut bool,
1068    ) -> icsneoc2_error_t;
1069}
1070unsafe extern "C" {
1071    #[doc = " Check if a message is a raw message (message with data)\n\n @param[in] device The device to check against.\n @param[in] message The message to check.\n @param[out] is_raw Pointer to a bool to copy the raw status of the message into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1072    pub fn icsneoc2_message_is_raw(
1073        message: *mut icsneoc2_message_t,
1074        is_raw: *mut bool,
1075    ) -> icsneoc2_error_t;
1076}
1077unsafe extern "C" {
1078    #[doc = " Check if a message is a frame message (message with data)\n\n @param[in] device The device to check against.\n @param[in] message The message to check.\n @param[out] is_frame Pointer to a bool to copy the frame status of the message into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1079    pub fn icsneoc2_message_is_frame(
1080        message: *mut icsneoc2_message_t,
1081        is_frame: *mut bool,
1082    ) -> icsneoc2_error_t;
1083}
1084unsafe extern "C" {
1085    #[doc = " Check if a message is a CAN message\n\n @param[in] device The device to check against.\n @param[in] message The message to check.\n @param[out] is_can Pointer to a bool to copy the CAN status of the message into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1086    pub fn icsneoc2_message_is_can(
1087        message: *mut icsneoc2_message_t,
1088        is_can: *mut bool,
1089    ) -> icsneoc2_error_t;
1090}
1091unsafe extern "C" {
1092    #[doc = " Get the network type of a message\n\n @param[in] message The message to check.\n @param[out] network_type Pointer to a icsneoc2_network_type_t to copy the network type into.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_invalid_type otherwise.\n\n @see icsneoc2_network_type_t, icsneoc2_network_type_name_get"]
1093    pub fn icsneoc2_message_network_type_get(
1094        message: *mut icsneoc2_message_t,
1095        network_type: *mut icsneoc2_network_type_t,
1096    ) -> icsneoc2_error_t;
1097}
1098unsafe extern "C" {
1099    #[doc = " Apply the default settings for a device\n\n @param[in] device The device to apply the settings for.\n @param[in] save True to make the settings permanent, false will be reverted on power cycle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
1100    pub fn icsneoc2_settings_apply_defaults(
1101        device: *mut icsneoc2_device_t,
1102        save: bool,
1103    ) -> icsneoc2_error_t;
1104}
1105unsafe extern "C" {
1106    #[doc = " Apply the current settings for a device.\n\n This makes all settings persistent across power cycles.\n\n @param[in] device The device to apply the settings for.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
1107    pub fn icsneoc2_settings_apply(device: *mut icsneoc2_device_t) -> icsneoc2_error_t;
1108}
1109unsafe extern "C" {
1110    #[doc = " Refresh the settings for a device. This reads the current settings from the device,\n overwriting any unsaved local changes.\n\n @param[in] device The device to refresh the settings for.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_get_settings_failure otherwise."]
1111    pub fn icsneoc2_settings_refresh(device: *mut icsneoc2_device_t) -> icsneoc2_error_t;
1112}
1113unsafe extern "C" {
1114    #[doc = " Get the baudrate for a network\n\n @note @see icsneoc2_settings_canfd_baudrate_get for CANFD.\n\n @param[in] device The device to get the baudrate value.\n @param[in] netid The network to get the baudrate value.\n @param[out] baudrate Pointer to store the baudrate value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1115    pub fn icsneoc2_settings_baudrate_get(
1116        device: *mut icsneoc2_device_t,
1117        netid: icsneoc2_netid_t,
1118        baudrate: *mut i64,
1119    ) -> icsneoc2_error_t;
1120}
1121unsafe extern "C" {
1122    #[doc = " Set the baudrate for a network\n\n @note @see icsneoc2_settings_canfd_baudrate_set for CANFD.\n\n @param[in] device The device to set the baudrate for.\n @param[in] netid The network to set the baudrate for.\n @param[in] baudrate The baudrate to set the network to.\n @param[in] save True to make the settings permanent, false will be reverted on power cycle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1123    pub fn icsneoc2_settings_baudrate_set(
1124        device: *mut icsneoc2_device_t,
1125        netid: icsneoc2_netid_t,
1126        baudrate: i64,
1127    ) -> icsneoc2_error_t;
1128}
1129unsafe extern "C" {
1130    #[doc = " Get the baudrate for a CAN FD network\n\n @param[in] device The device to get the baudrate value.\n @param[in] netid The network to get the baudrate value.\n @param[out] baudrate Pointer to store the baudrate value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1131    pub fn icsneoc2_settings_canfd_baudrate_get(
1132        device: *mut icsneoc2_device_t,
1133        netid: icsneoc2_netid_t,
1134        baudrate: *mut i64,
1135    ) -> icsneoc2_error_t;
1136}
1137unsafe extern "C" {
1138    #[doc = " Set the baudrate for a CANFD network\n\n @param[in] device The device to set the baudrate for.\n @param[in] netid The network to set the baudrate for.\n @param[in] baudrate The baudrate to set the network to.\n @param[in] save True to make the settings permanent, false will be reverted on power cycle.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1139    pub fn icsneoc2_settings_canfd_baudrate_set(
1140        device: *mut icsneoc2_device_t,
1141        netid: icsneoc2_netid_t,
1142        baudrate: i64,
1143    ) -> icsneoc2_error_t;
1144}
1145unsafe extern "C" {
1146    #[doc = " Check if termination is supported for a network.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check termination support for.\n @param[out] supported Pointer to store whether termination is supported.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1147    pub fn icsneoc2_settings_termination_is_supported(
1148        device: *mut icsneoc2_device_t,
1149        netid: icsneoc2_netid_t,
1150        supported: *mut bool,
1151    ) -> icsneoc2_error_t;
1152}
1153unsafe extern "C" {
1154    #[doc = " Check if termination can be enabled for a network.\n\n Termination may be supported but not currently able to be enabled (e.g., due to hardware constraints).\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] can_enable Pointer to store whether termination can be enabled.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1155    pub fn icsneoc2_settings_termination_can_enable(
1156        device: *mut icsneoc2_device_t,
1157        netid: icsneoc2_netid_t,
1158        can_enable: *mut bool,
1159    ) -> icsneoc2_error_t;
1160}
1161unsafe extern "C" {
1162    #[doc = " Check if termination is currently enabled for a network.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] enabled Pointer to store whether termination is currently enabled.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1163    pub fn icsneoc2_settings_termination_is_enabled(
1164        device: *mut icsneoc2_device_t,
1165        netid: icsneoc2_netid_t,
1166        enabled: *mut bool,
1167    ) -> icsneoc2_error_t;
1168}
1169unsafe extern "C" {
1170    #[doc = " Enable or disable termination for a network.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure termination for.\n @param[in] enable True to enable termination, false to disable.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
1171    pub fn icsneoc2_settings_termination_set(
1172        device: *mut icsneoc2_device_t,
1173        netid: icsneoc2_netid_t,
1174        enable: bool,
1175    ) -> icsneoc2_error_t;
1176}
1177unsafe extern "C" {
1178    #[doc = " Check if the commander resistor is currently enabled for a network.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] enabled Pointer to store whether the commander resistor is currently enabled.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1179    pub fn icsneoc2_settings_commander_resistor_enabled(
1180        device: *mut icsneoc2_device_t,
1181        netid: icsneoc2_netid_t,
1182        enabled: *mut bool,
1183    ) -> icsneoc2_error_t;
1184}
1185unsafe extern "C" {
1186    #[doc = " Enable or disable the commander resistor for a network.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure the commander resistor for.\n @param[in] enable True to enable the commander resistor, false to disable.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
1187    pub fn icsneoc2_settings_commander_resistor_set(
1188        device: *mut icsneoc2_device_t,
1189        netid: icsneoc2_netid_t,
1190        enable: bool,
1191    ) -> icsneoc2_error_t;
1192}
1193unsafe extern "C" {
1194    #[doc = " Get the LIN mode for a given network in the currently active device settings.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the LIN mode.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1195    pub fn icsneoc2_settings_lin_mode_get(
1196        device: *mut icsneoc2_device_t,
1197        netid: icsneoc2_netid_t,
1198        value: *mut icsneoc2_lin_mode_t,
1199    ) -> icsneoc2_error_t;
1200}
1201unsafe extern "C" {
1202    #[doc = " Set the LIN mode for a given network in the currently active device settings.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The LIN mode to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1203    pub fn icsneoc2_settings_lin_mode_set(
1204        device: *mut icsneoc2_device_t,
1205        netid: icsneoc2_netid_t,
1206        value: icsneoc2_lin_mode_t,
1207    ) -> icsneoc2_error_t;
1208}
1209unsafe extern "C" {
1210    #[doc = " Get number of bit delays between commander ID and first responder byte for\n a given network in the currently active device settings.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the number of bit delays.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1211    pub fn icsneoc2_settings_lin_commander_response_time_get(
1212        device: *mut icsneoc2_device_t,
1213        netid: icsneoc2_netid_t,
1214        value: *mut u8,
1215    ) -> icsneoc2_error_t;
1216}
1217unsafe extern "C" {
1218    #[doc = " Set number of bit delays between commander ID and first responder byte for\n a given network in the currently active device settings.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The number of bit delays to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1219    pub fn icsneoc2_settings_lin_commander_response_time_set(
1220        device: *mut icsneoc2_device_t,
1221        netid: icsneoc2_netid_t,
1222        value: u8,
1223    ) -> icsneoc2_error_t;
1224}
1225unsafe extern "C" {
1226    #[doc = " Get PHY enable state for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_enable_for_get() instead.\n\n @param[in] device The device to check.\n @param[in] index The port index to check.\n @param[out] value Pointer to store the PHY enable state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1227    pub fn icsneoc2_settings_phy_enable_get(
1228        device: *mut icsneoc2_device_t,
1229        index: u8,
1230        value: *mut bool,
1231    ) -> icsneoc2_error_t;
1232}
1233unsafe extern "C" {
1234    #[doc = " Enable/disable PHY for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_enable_for_set() instead.\n\n @param[in] device The device to configure.\n @param[in] index The port index to configure.\n @param[in] value bool to set the PHY enable state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1235    pub fn icsneoc2_settings_phy_enable_set(
1236        device: *mut icsneoc2_device_t,
1237        index: u8,
1238        value: bool,
1239    ) -> icsneoc2_error_t;
1240}
1241unsafe extern "C" {
1242    #[doc = " Get PHY role (Master/Slave/Auto) for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_role_for_get() instead.\n\n @param[in] device The device to check.\n @param[in] index The port index to check.\n @param[out] value Pointer to store the link mode state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1243    pub fn icsneoc2_settings_phy_mode_get(
1244        device: *mut icsneoc2_device_t,
1245        index: u8,
1246        value: *mut icsneoc2_ae_link_mode_t,
1247    ) -> icsneoc2_error_t;
1248}
1249unsafe extern "C" {
1250    #[doc = " Set PHY role (Master/Slave/Auto) for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_role_for_set() instead.\n\n @param[in] device The device to configure.\n @param[in] index The port index to configure.\n @param[in] value The link mode state to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1251    pub fn icsneoc2_settings_phy_mode_set(
1252        device: *mut icsneoc2_device_t,
1253        index: u8,
1254        value: icsneoc2_ae_link_mode_t,
1255    ) -> icsneoc2_error_t;
1256}
1257unsafe extern "C" {
1258    #[doc = " Get PHY link mode (speed and duplex) for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_link_mode_for_get() instead.\n\n @param[in] device The device to check.\n @param[in] index The port index to check.\n @param[out] value Pointer to store the link mode state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1259    pub fn icsneoc2_settings_phy_speed_get(
1260        device: *mut icsneoc2_device_t,
1261        index: u8,
1262        value: *mut icsneoc2_eth_phy_link_mode_t,
1263    ) -> icsneoc2_error_t;
1264}
1265unsafe extern "C" {
1266    #[doc = " Set PHY link mode (speed and duplex) for switch devices (Epsilon/XL, Jupiter, etc) using port index.\n For all other devices, use icsneoc2_settings_phy_link_mode_for_set() instead.\n\n @param[in] device The device to configure.\n @param[in] index The port index to configure.\n @param[in] value The link mode state to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1267    pub fn icsneoc2_settings_phy_speed_set(
1268        device: *mut icsneoc2_device_t,
1269        index: u8,
1270        value: icsneoc2_eth_phy_link_mode_t,
1271    ) -> icsneoc2_error_t;
1272}
1273unsafe extern "C" {
1274    #[doc = " Get PHY role (Master/Slave/Auto) for network-based devices.\n For switch devices, use icsneoc2_settings_phy_mode_get() with port index instead.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the PHY role state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1275    pub fn icsneoc2_settings_phy_role_for_get(
1276        device: *mut icsneoc2_device_t,
1277        netid: icsneoc2_netid_t,
1278        value: *mut icsneoc2_ae_link_mode_t,
1279    ) -> icsneoc2_error_t;
1280}
1281unsafe extern "C" {
1282    #[doc = " Set PHY role (Master/Slave/Auto) for network-based devices.\n For switch devices, use icsneoc2_settings_phy_mode_set() with port index instead.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The PHY role state to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1283    pub fn icsneoc2_settings_phy_role_for_set(
1284        device: *mut icsneoc2_device_t,
1285        netid: icsneoc2_netid_t,
1286        value: icsneoc2_ae_link_mode_t,
1287    ) -> icsneoc2_error_t;
1288}
1289unsafe extern "C" {
1290    #[doc = " Get PHY link mode (speed and duplex) for network-based devices.\n For switch devices, use icsneoc2_settings_phy_speed_get() with port index instead.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the PHY link mode state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1291    pub fn icsneoc2_settings_phy_link_mode_for_get(
1292        device: *mut icsneoc2_device_t,
1293        netid: icsneoc2_netid_t,
1294        value: *mut icsneoc2_eth_phy_link_mode_t,
1295    ) -> icsneoc2_error_t;
1296}
1297unsafe extern "C" {
1298    #[doc = " Set PHY link mode (speed and duplex) for network-based devices.\n For switch devices, use icsneoc2_settings_phy_speed_set() with port index instead.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The PHY link mode to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters or icsneoc2_error_set_settings_failure otherwise."]
1299    pub fn icsneoc2_settings_phy_link_mode_for_set(
1300        device: *mut icsneoc2_device_t,
1301        netid: icsneoc2_netid_t,
1302        value: icsneoc2_eth_phy_link_mode_t,
1303    ) -> icsneoc2_error_t;
1304}
1305unsafe extern "C" {
1306    #[doc = " Get PHY enable state for network-based devices.\n For switch devices, use icsneoc2_settings_phy_enable_get() with port index instead.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the PHY enable state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1307    pub fn icsneoc2_settings_phy_enable_for_get(
1308        device: *mut icsneoc2_device_t,
1309        netid: icsneoc2_netid_t,
1310        value: *mut bool,
1311    ) -> icsneoc2_error_t;
1312}
1313unsafe extern "C" {
1314    #[doc = " Enable/disable PHY for network-based devices.\n For switch devices, use icsneoc2_settings_phy_enable_set() with port index instead.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The PHY enable state to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1315    pub fn icsneoc2_settings_phy_enable_for_set(
1316        device: *mut icsneoc2_device_t,
1317        netid: icsneoc2_netid_t,
1318        value: bool,
1319    ) -> icsneoc2_error_t;
1320}
1321unsafe extern "C" {
1322    #[doc = " Get supported PHY link modes (combined speed+duplex) for a network.\n Each mode represents a valid hardware configuration.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] link_modes Pointer to store the supported PHY link modes. Should be at least the size of icsneoc2_eth_phy_link_mode_maxsize.\n @param[in,out] link_modes_count Pointer to the size of link_modes array. Updated with the number of link modes written to the array.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1323    pub fn icsneoc2_settings_supported_phy_link_modes_for(
1324        device: *mut icsneoc2_device_t,
1325        netid: icsneoc2_netid_t,
1326        link_modes: *mut *mut icsneoc2_eth_phy_link_mode_t,
1327        link_modes_count: *mut usize,
1328    ) -> icsneoc2_error_t;
1329}
1330unsafe extern "C" {
1331    #[doc = " Check if PLCA is enabled for a network that supports 10BASE-T1S.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the PLCA enable state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1332    pub fn icsneoc2_settings_t1s_is_plca_enabled_for(
1333        device: *mut icsneoc2_device_t,
1334        netid: icsneoc2_netid_t,
1335        value: *mut bool,
1336    ) -> icsneoc2_error_t;
1337}
1338unsafe extern "C" {
1339    #[doc = " Set PLCA enabled for a network that supports 10BASE-T1S.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The PLCA enable state to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1340    pub fn icsneoc2_settings_t1s_plca_enabled_for_set(
1341        device: *mut icsneoc2_device_t,
1342        netid: icsneoc2_netid_t,
1343        value: bool,
1344    ) -> icsneoc2_error_t;
1345}
1346unsafe extern "C" {
1347    #[doc = " Get the local ID for a network that supports 10BASE-T1S.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the local ID.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1348    pub fn icsneoc2_settings_t1s_local_id_get(
1349        device: *mut icsneoc2_device_t,
1350        netid: icsneoc2_netid_t,
1351        value: *mut u8,
1352    ) -> icsneoc2_error_t;
1353}
1354unsafe extern "C" {
1355    #[doc = " Set the local ID for a network that supports 10BASE-T1S.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The local ID to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1356    pub fn icsneoc2_settings_t1s_local_id_set(
1357        device: *mut icsneoc2_device_t,
1358        netid: icsneoc2_netid_t,
1359        value: u8,
1360    ) -> icsneoc2_error_t;
1361}
1362unsafe extern "C" {
1363    #[doc = " Get the maximum number of nodes for a network that supports 10BASE-T1S.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the maximum number of nodes.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1364    pub fn icsneoc2_settings_t1s_max_nodes_get(
1365        device: *mut icsneoc2_device_t,
1366        netid: icsneoc2_netid_t,
1367        value: *mut u8,
1368    ) -> icsneoc2_error_t;
1369}
1370unsafe extern "C" {
1371    #[doc = " Set the maximum number of nodes for a network that supports 10BASE-T1S.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The maximum number of nodes to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1372    pub fn icsneoc2_settings_t1s_max_nodes_set(
1373        device: *mut icsneoc2_device_t,
1374        netid: icsneoc2_netid_t,
1375        value: u8,
1376    ) -> icsneoc2_error_t;
1377}
1378unsafe extern "C" {
1379    #[doc = " Get the OOP Timer for a network that supports 10BASE-T1S.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the OOP Timer value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1380    pub fn icsneoc2_settings_t1s_tx_opp_timer_get(
1381        device: *mut icsneoc2_device_t,
1382        netid: icsneoc2_netid_t,
1383        value: *mut u8,
1384    ) -> icsneoc2_error_t;
1385}
1386unsafe extern "C" {
1387    #[doc = " Set the OOP Timer for a network that supports 10BASE-T1S.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The OOP Timer value to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1388    pub fn icsneoc2_settings_t1s_tx_opp_timer_set(
1389        device: *mut icsneoc2_device_t,
1390        netid: icsneoc2_netid_t,
1391        value: u8,
1392    ) -> icsneoc2_error_t;
1393}
1394unsafe extern "C" {
1395    #[doc = " Get the Max burst timer for a network that supports 10BASE-T1S.\n\n @param[in] device The device to check.\n @param[in] netid The network ID to check.\n @param[out] value Pointer to store the Max burst timer value.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1396    pub fn icsneoc2_settings_t1s_max_burst_timer_for_get(
1397        device: *mut icsneoc2_device_t,
1398        netid: icsneoc2_netid_t,
1399        value: *mut u8,
1400    ) -> icsneoc2_error_t;
1401}
1402unsafe extern "C" {
1403    #[doc = " Set the Max burst timer for a network that supports 10BASE-T1S.\n\n @param[in] device The device to configure.\n @param[in] netid The network ID to configure.\n @param[in] value The Max burst timer value to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1404    pub fn icsneoc2_settings_t1s_max_burst_timer_for_set(
1405        device: *mut icsneoc2_device_t,
1406        netid: icsneoc2_netid_t,
1407        value: u8,
1408    ) -> icsneoc2_error_t;
1409}
1410unsafe extern "C" {
1411    #[doc = " Set the analog output enabled.\n\n @param[in] device The device to configure.\n @param[in] pin The analog output pin to configure.\n @param[in] value The analog output value to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1412    pub fn icsneoc2_settings_misc_io_analog_output_enabled_set(
1413        device: *mut icsneoc2_device_t,
1414        pin: u8,
1415        value: u8,
1416    ) -> icsneoc2_error_t;
1417}
1418unsafe extern "C" {
1419    #[doc = " Set the analog output voltage for a misc IO pin.\n\n @param[in] device The device to configure.\n @param[in] pin The analog output pin to configure.\n @param[in] value The analog output voltage to set.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1420    pub fn icsneoc2_settings_misc_io_analog_output_set(
1421        device: *mut icsneoc2_device_t,
1422        pin: u8,
1423        value: icsneoc2_misc_io_analog_voltage_t,
1424    ) -> icsneoc2_error_t;
1425}
1426unsafe extern "C" {
1427    #[doc = " Check if settings are disabled.\n\n @param[in] device The device to check.\n @param[out] value Pointer to store the disabled state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1428    pub fn icsneoc2_settings_disabled_get(
1429        device: *mut icsneoc2_device_t,
1430        value: *mut bool,
1431    ) -> icsneoc2_error_t;
1432}
1433unsafe extern "C" {
1434    #[doc = " Check if settings are read-only.\n\n @param[in] device The device to check.\n @param[out] value Pointer to store the read-only state.\n\n @return icsneoc2_error_t icsneoc2_error_success if successful, icsneoc2_error_invalid_parameters otherwise."]
1435    pub fn icsneoc2_settings_readonly_get(
1436        device: *mut icsneoc2_device_t,
1437        value: *mut bool,
1438    ) -> icsneoc2_error_t;
1439}