WPILibC++  2018.4.1-20180729040223-1137-g011f0ff
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Relay.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. 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 "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
28 HAL_RelayHandle HAL_InitializeRelayPort(HAL_PortHandle portHandle, HAL_Bool fwd,
29  int32_t* status);
30 
36 void HAL_FreeRelayPort(HAL_RelayHandle relayPortHandle);
37 
44 HAL_Bool HAL_CheckRelayChannel(int32_t channel);
45 
52 void HAL_SetRelay(HAL_RelayHandle relayPortHandle, HAL_Bool on,
53  int32_t* status);
54 
61 HAL_Bool HAL_GetRelay(HAL_RelayHandle relayPortHandle, int32_t* status);
62 #ifdef __cplusplus
63 } // extern "C"
64 #endif