vex_sdk/
generic_serial.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Smart Port Generic Serial Communication

#[cfg(any(target_env = "v5", target_env = "exp", doc))]
use crate::{map_jump_table, V5_DeviceT};

#[cfg(any(target_env = "v5", target_env = "exp", doc))]
map_jump_table! {
    0xa50 => pub fn vexDeviceGenericSerialEnable(device: V5_DeviceT, options: i32),
    0xa54 => pub fn vexDeviceGenericSerialBaudrate(device: V5_DeviceT, baudrate: i32),
    0xa58 => pub fn vexDeviceGenericSerialWriteChar(device: V5_DeviceT, c: u8) -> i32,
    0xa5c => pub fn vexDeviceGenericSerialWriteFree(device: V5_DeviceT) -> i32,
    0xa60 => pub fn vexDeviceGenericSerialTransmit(device: V5_DeviceT, buffer: *const u8, length: i32) -> i32,
    0xa64 => pub fn vexDeviceGenericSerialReadChar(device: V5_DeviceT) -> i32,
    0xa68 => pub fn vexDeviceGenericSerialPeekChar(device: V5_DeviceT) -> i32,
    0xa6c => pub fn vexDeviceGenericSerialReceiveAvail(device: V5_DeviceT) -> i32,
    0xa70 => pub fn vexDeviceGenericSerialReceive(device: V5_DeviceT, buffer: *mut u8, length: i32) -> i32,
    0xa74 => pub fn vexDeviceGenericSerialFlush(device: V5_DeviceT),
}