WPILibC++  2020.3.2
DigitalPWMData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-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_ResetDigitalPWMData(int32_t index);
18 int32_t HALSIM_RegisterDigitalPWMInitializedCallback(
19  int32_t index, HAL_NotifyCallback callback, void* param,
20  HAL_Bool initialNotify);
21 void HALSIM_CancelDigitalPWMInitializedCallback(int32_t index, int32_t uid);
22 HAL_Bool HALSIM_GetDigitalPWMInitialized(int32_t index);
23 void HALSIM_SetDigitalPWMInitialized(int32_t index, HAL_Bool initialized);
24 
25 int32_t HALSIM_RegisterDigitalPWMDutyCycleCallback(int32_t index,
26  HAL_NotifyCallback callback,
27  void* param,
28  HAL_Bool initialNotify);
29 void HALSIM_CancelDigitalPWMDutyCycleCallback(int32_t index, int32_t uid);
30 double HALSIM_GetDigitalPWMDutyCycle(int32_t index);
31 void HALSIM_SetDigitalPWMDutyCycle(int32_t index, double dutyCycle);
32 
33 int32_t HALSIM_RegisterDigitalPWMPinCallback(int32_t index,
34  HAL_NotifyCallback callback,
35  void* param,
36  HAL_Bool initialNotify);
37 void HALSIM_CancelDigitalPWMPinCallback(int32_t index, int32_t uid);
38 int32_t HALSIM_GetDigitalPWMPin(int32_t index);
39 void HALSIM_SetDigitalPWMPin(int32_t index, int32_t pin);
40 
41 void HALSIM_RegisterDigitalPWMAllCallbacks(int32_t index,
42  HAL_NotifyCallback callback,
43  void* param, HAL_Bool initialNotify);
44 
45 #ifdef __cplusplus
46 } // extern "C"
47 #endif