blob: 21696cc3b418c3950c711b1e21dbe3af6c60f410 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
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
15extern "C" {
16#endif
17
18void HAL_InitializeOSSerialPort(HAL_SerialPort port, int32_t* status);
19void HAL_SetOSSerialBaudRate(HAL_SerialPort port, int32_t baud,
20 int32_t* status);
21void HAL_SetOSSerialDataBits(HAL_SerialPort port, int32_t bits,
22 int32_t* status);
23void HAL_SetOSSerialParity(HAL_SerialPort port, int32_t parity,
24 int32_t* status);
25void HAL_SetOSSerialStopBits(HAL_SerialPort port, int32_t stopBits,
26 int32_t* status);
27void HAL_SetOSSerialWriteMode(HAL_SerialPort port, int32_t mode,
28 int32_t* status);
29void HAL_SetOSSerialFlowControl(HAL_SerialPort port, int32_t flow,
30 int32_t* status);
31void HAL_SetOSSerialTimeout(HAL_SerialPort port, double timeout,
32 int32_t* status);
33void HAL_EnableOSSerialTermination(HAL_SerialPort port, char terminator,
34 int32_t* status);
35void HAL_DisableOSSerialTermination(HAL_SerialPort port, int32_t* status);
36void HAL_SetOSSerialReadBufferSize(HAL_SerialPort port, int32_t size,
37 int32_t* status);
38void HAL_SetOSSerialWriteBufferSize(HAL_SerialPort port, int32_t size,
39 int32_t* status);
40int32_t HAL_GetOSSerialBytesReceived(HAL_SerialPort port, int32_t* status);
41int32_t HAL_ReadOSSerial(HAL_SerialPort port, char* buffer, int32_t count,
42 int32_t* status);
43int32_t HAL_WriteOSSerial(HAL_SerialPort port, const char* buffer,
44 int32_t count, int32_t* status);
45void HAL_FlushOSSerial(HAL_SerialPort port, int32_t* status);
46void HAL_ClearOSSerial(HAL_SerialPort port, int32_t* status);
47void HAL_CloseOSSerial(HAL_SerialPort port, int32_t* status);
48#ifdef __cplusplus
49}
50#endif