WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
AnalogTrigger.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 enum HAL_AnalogTriggerType : int32_t {
15  HAL_Trigger_kInWindow = 0,
16  HAL_Trigger_kState = 1,
17  HAL_Trigger_kRisingPulse = 2,
18  HAL_Trigger_kFallingPulse = 3
19 };
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 HAL_AnalogTriggerHandle HAL_InitializeAnalogTrigger(
25  HAL_AnalogInputHandle portHandle, int32_t* index, int32_t* status);
26 void HAL_CleanAnalogTrigger(HAL_AnalogTriggerHandle analogTriggerHandle,
27  int32_t* status);
28 void HAL_SetAnalogTriggerLimitsRaw(HAL_AnalogTriggerHandle analogTriggerHandle,
29  int32_t lower, int32_t upper,
30  int32_t* status);
31 void HAL_SetAnalogTriggerLimitsVoltage(
32  HAL_AnalogTriggerHandle analogTriggerHandle, double lower, double upper,
33  int32_t* status);
34 void HAL_SetAnalogTriggerAveraged(HAL_AnalogTriggerHandle analogTriggerHandle,
35  HAL_Bool useAveragedValue, int32_t* status);
36 void HAL_SetAnalogTriggerFiltered(HAL_AnalogTriggerHandle analogTriggerHandle,
37  HAL_Bool useFilteredValue, int32_t* status);
38 HAL_Bool HAL_GetAnalogTriggerInWindow(
39  HAL_AnalogTriggerHandle analogTriggerHandle, int32_t* status);
40 HAL_Bool HAL_GetAnalogTriggerTriggerState(
41  HAL_AnalogTriggerHandle analogTriggerHandle, int32_t* status);
42 HAL_Bool HAL_GetAnalogTriggerOutput(HAL_AnalogTriggerHandle analogTriggerHandle,
43  HAL_AnalogTriggerType type,
44  int32_t* status);
45 #ifdef __cplusplus
46 }
47 #endif