2016-05-25 20:23:37 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
/* Copyright (c) FIRST 2016. All Rights Reserved. */
|
|
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
2014-10-29 13:44:20 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2016-05-20 17:30:37 -07:00
|
|
|
extern "C" {
|
2016-07-09 00:24:26 -07:00
|
|
|
void HAL_SerialInitializePort(uint8_t port, int32_t* status);
|
|
|
|
|
void HAL_SerialSetBaudRate(uint8_t port, uint32_t baud, int32_t* status);
|
|
|
|
|
void HAL_SerialSetDataBits(uint8_t port, uint8_t bits, int32_t* status);
|
|
|
|
|
void HAL_SerialSetParity(uint8_t port, uint8_t parity, int32_t* status);
|
|
|
|
|
void HAL_SerialSetStopBits(uint8_t port, uint8_t stopBits, int32_t* status);
|
|
|
|
|
void HAL_SerialSetWriteMode(uint8_t port, uint8_t mode, int32_t* status);
|
|
|
|
|
void HAL_SerialSetFlowControl(uint8_t port, uint8_t flow, int32_t* status);
|
|
|
|
|
void HAL_SerialSetTimeout(uint8_t port, float timeout, int32_t* status);
|
|
|
|
|
void HAL_SerialEnableTermination(uint8_t port, char terminator,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
void HAL_SerialDisableTermination(uint8_t port, int32_t* status);
|
|
|
|
|
void HAL_SerialSetReadBufferSize(uint8_t port, uint32_t size, int32_t* status);
|
|
|
|
|
void HAL_SerialSetWriteBufferSize(uint8_t port, uint32_t size, int32_t* status);
|
|
|
|
|
int32_t HAL_SerialGetBytesReceived(uint8_t port, int32_t* status);
|
|
|
|
|
uint32_t HAL_SerialRead(uint8_t port, char* buffer, int32_t count,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
uint32_t HAL_SerialWrite(uint8_t port, const char* buffer, int32_t count,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
void HAL_SerialFlush(uint8_t port, int32_t* status);
|
|
|
|
|
void HAL_SerialClear(uint8_t port, int32_t* status);
|
|
|
|
|
void HAL_SerialClose(uint8_t port, int32_t* status);
|
2014-08-14 00:07:02 -07:00
|
|
|
}
|