WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
DIO.h
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 "HAL/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 HAL_DigitalHandle HAL_InitializeDIOPort(HAL_PortHandle portHandle,
19  HAL_Bool input, int32_t* status);
20 HAL_Bool HAL_CheckDIOChannel(int32_t channel);
21 void HAL_FreeDIOPort(HAL_DigitalHandle dioPortHandle);
22 HAL_DigitalPWMHandle HAL_AllocateDigitalPWM(int32_t* status);
23 void HAL_FreeDigitalPWM(HAL_DigitalPWMHandle pwmGenerator, int32_t* status);
24 void HAL_SetDigitalPWMRate(double rate, int32_t* status);
25 void HAL_SetDigitalPWMDutyCycle(HAL_DigitalPWMHandle pwmGenerator,
26  double dutyCycle, int32_t* status);
27 void HAL_SetDigitalPWMOutputChannel(HAL_DigitalPWMHandle pwmGenerator,
28  int32_t channel, int32_t* status);
29 void HAL_SetDIO(HAL_DigitalHandle dioPortHandle, HAL_Bool value,
30  int32_t* status);
31 HAL_Bool HAL_GetDIO(HAL_DigitalHandle dioPortHandle, int32_t* status);
32 HAL_Bool HAL_GetDIODirection(HAL_DigitalHandle dioPortHandle, int32_t* status);
33 void HAL_Pulse(HAL_DigitalHandle dioPortHandle, double pulseLength,
34  int32_t* status);
35 HAL_Bool HAL_IsPulsing(HAL_DigitalHandle dioPortHandle, int32_t* status);
36 HAL_Bool HAL_IsAnyPulsing(int32_t* status);
37 
38 void HAL_SetFilterSelect(HAL_DigitalHandle dioPortHandle, int32_t filterIndex,
39  int32_t* status);
40 int32_t HAL_GetFilterSelect(HAL_DigitalHandle dioPortHandle, int32_t* status);
41 void HAL_SetFilterPeriod(int32_t filterIndex, int64_t value, int32_t* status);
42 int64_t HAL_GetFilterPeriod(int32_t filterIndex, int32_t* status);
43 #ifdef __cplusplus
44 }
45 #endif