WPILibC++  2020.3.2
DutyCycleData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2019 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 "NotifyListener.h"
11 #include "hal/Types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 void HALSIM_ResetDutyCycleData(int32_t index);
18 int32_t HALSIM_GetDutyCycleDigitalChannel(int32_t index);
19 
20 int32_t HALSIM_RegisterDutyCycleInitializedCallback(int32_t index,
21  HAL_NotifyCallback callback,
22  void* param,
23  HAL_Bool initialNotify);
24 void HALSIM_CancelDutyCycleInitializedCallback(int32_t index, int32_t uid);
25 HAL_Bool HALSIM_GetDutyCycleInitialized(int32_t index);
26 void HALSIM_SetDutyCycleInitialized(int32_t index, HAL_Bool initialized);
27 
28 HAL_SimDeviceHandle HALSIM_GetDutyCycleSimDevice(int32_t index);
29 
30 int32_t HALSIM_RegisterDutyCycleOutputCallback(int32_t index,
31  HAL_NotifyCallback callback,
32  void* param,
33  HAL_Bool initialNotify);
34 void HALSIM_CancelDutyCycleOutputCallback(int32_t index, int32_t uid);
35 double HALSIM_GetDutyCycleOutput(int32_t index);
36 void HALSIM_SetDutyCycleOutput(int32_t index, double output);
37 
38 int32_t HALSIM_RegisterDutyCycleFrequencyCallback(int32_t index,
39  HAL_NotifyCallback callback,
40  void* param,
41  HAL_Bool initialNotify);
42 void HALSIM_CancelDutyCycleFrequencyCallback(int32_t index, int32_t uid);
43 int32_t HALSIM_GetDutyCycleFrequency(int32_t index);
44 void HALSIM_SetDutyCycleFrequency(int32_t index, int32_t frequency);
45 
46 void HALSIM_RegisterDutyCycleAllCallbacks(int32_t index,
47  HAL_NotifyCallback callback,
48  void* param, HAL_Bool initialNotify);
49 
50 #ifdef __cplusplus
51 } // extern "C"
52 #endif