Brian Silverman | f7f267a | 2017-02-04 16:16:08 -0800 | [diff] [blame^] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) FIRST 2016-2017. All Rights Reserved. */ |
| 3 | /* Open Source Software - may be modified and shared by FRC teams. The code */ |
| 4 | /* must be accompanied by the FIRST BSD license file in the root directory of */ |
| 5 | /* the project. */ |
| 6 | /*----------------------------------------------------------------------------*/ |
| 7 | |
| 8 | #pragma once |
| 9 | |
| 10 | #include <stdint.h> |
| 11 | |
| 12 | #include "SerialPort.h" |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | void HAL_InitializeOSSerialPort(HAL_SerialPort port, int32_t* status); |
| 19 | void HAL_SetOSSerialBaudRate(HAL_SerialPort port, int32_t baud, |
| 20 | int32_t* status); |
| 21 | void HAL_SetOSSerialDataBits(HAL_SerialPort port, int32_t bits, |
| 22 | int32_t* status); |
| 23 | void HAL_SetOSSerialParity(HAL_SerialPort port, int32_t parity, |
| 24 | int32_t* status); |
| 25 | void HAL_SetOSSerialStopBits(HAL_SerialPort port, int32_t stopBits, |
| 26 | int32_t* status); |
| 27 | void HAL_SetOSSerialWriteMode(HAL_SerialPort port, int32_t mode, |
| 28 | int32_t* status); |
| 29 | void HAL_SetOSSerialFlowControl(HAL_SerialPort port, int32_t flow, |
| 30 | int32_t* status); |
| 31 | void HAL_SetOSSerialTimeout(HAL_SerialPort port, double timeout, |
| 32 | int32_t* status); |
| 33 | void HAL_EnableOSSerialTermination(HAL_SerialPort port, char terminator, |
| 34 | int32_t* status); |
| 35 | void HAL_DisableOSSerialTermination(HAL_SerialPort port, int32_t* status); |
| 36 | void HAL_SetOSSerialReadBufferSize(HAL_SerialPort port, int32_t size, |
| 37 | int32_t* status); |
| 38 | void HAL_SetOSSerialWriteBufferSize(HAL_SerialPort port, int32_t size, |
| 39 | int32_t* status); |
| 40 | int32_t HAL_GetOSSerialBytesReceived(HAL_SerialPort port, int32_t* status); |
| 41 | int32_t HAL_ReadOSSerial(HAL_SerialPort port, char* buffer, int32_t count, |
| 42 | int32_t* status); |
| 43 | int32_t HAL_WriteOSSerial(HAL_SerialPort port, const char* buffer, |
| 44 | int32_t count, int32_t* status); |
| 45 | void HAL_FlushOSSerial(HAL_SerialPort port, int32_t* status); |
| 46 | void HAL_ClearOSSerial(HAL_SerialPort port, int32_t* status); |
| 47 | void HAL_CloseOSSerial(HAL_SerialPort port, int32_t* status); |
| 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |