WPILibC++  2019.1.1-beta-2-9-g70a66fc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
PWMData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-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 #ifndef __FRC_ROBORIO__
11 
12 #include "NotifyListener.h"
13 #include "hal/Types.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 void HALSIM_ResetPWMData(int32_t index);
20 int32_t HALSIM_RegisterPWMInitializedCallback(int32_t index,
21  HAL_NotifyCallback callback,
22  void* param,
23  HAL_Bool initialNotify);
24 void HALSIM_CancelPWMInitializedCallback(int32_t index, int32_t uid);
25 HAL_Bool HALSIM_GetPWMInitialized(int32_t index);
26 void HALSIM_SetPWMInitialized(int32_t index, HAL_Bool initialized);
27 
28 int32_t HALSIM_RegisterPWMRawValueCallback(int32_t index,
29  HAL_NotifyCallback callback,
30  void* param, HAL_Bool initialNotify);
31 void HALSIM_CancelPWMRawValueCallback(int32_t index, int32_t uid);
32 int32_t HALSIM_GetPWMRawValue(int32_t index);
33 void HALSIM_SetPWMRawValue(int32_t index, int32_t rawValue);
34 
35 int32_t HALSIM_RegisterPWMSpeedCallback(int32_t index,
36  HAL_NotifyCallback callback,
37  void* param, HAL_Bool initialNotify);
38 void HALSIM_CancelPWMSpeedCallback(int32_t index, int32_t uid);
39 double HALSIM_GetPWMSpeed(int32_t index);
40 void HALSIM_SetPWMSpeed(int32_t index, double speed);
41 
42 int32_t HALSIM_RegisterPWMPositionCallback(int32_t index,
43  HAL_NotifyCallback callback,
44  void* param, HAL_Bool initialNotify);
45 void HALSIM_CancelPWMPositionCallback(int32_t index, int32_t uid);
46 double HALSIM_GetPWMPosition(int32_t index);
47 void HALSIM_SetPWMPosition(int32_t index, double position);
48 
49 int32_t HALSIM_RegisterPWMPeriodScaleCallback(int32_t index,
50  HAL_NotifyCallback callback,
51  void* param,
52  HAL_Bool initialNotify);
53 void HALSIM_CancelPWMPeriodScaleCallback(int32_t index, int32_t uid);
54 int32_t HALSIM_GetPWMPeriodScale(int32_t index);
55 void HALSIM_SetPWMPeriodScale(int32_t index, int32_t periodScale);
56 
57 int32_t HALSIM_RegisterPWMZeroLatchCallback(int32_t index,
58  HAL_NotifyCallback callback,
59  void* param,
60  HAL_Bool initialNotify);
61 void HALSIM_CancelPWMZeroLatchCallback(int32_t index, int32_t uid);
62 HAL_Bool HALSIM_GetPWMZeroLatch(int32_t index);
63 void HALSIM_SetPWMZeroLatch(int32_t index, HAL_Bool zeroLatch);
64 
65 void HALSIM_RegisterPWMAllCallbacks(int32_t index, HAL_NotifyCallback callback,
66  void* param, HAL_Bool initialNotify);
67 
68 #ifdef __cplusplus
69 } // extern "C"
70 #endif
71 
72 #endif