WPILibC++  2018.4.1-20180825000225-1177-gc8482cd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
DigitalPWMData.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/HAL.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 void HALSIM_ResetDigitalPWMData(int32_t index);
20 int32_t HALSIM_RegisterDigitalPWMInitializedCallback(
21  int32_t index, HAL_NotifyCallback callback, void* param,
22  HAL_Bool initialNotify);
23 void HALSIM_CancelDigitalPWMInitializedCallback(int32_t index, int32_t uid);
24 HAL_Bool HALSIM_GetDigitalPWMInitialized(int32_t index);
25 void HALSIM_SetDigitalPWMInitialized(int32_t index, HAL_Bool initialized);
26 
27 int32_t HALSIM_RegisterDigitalPWMDutyCycleCallback(int32_t index,
28  HAL_NotifyCallback callback,
29  void* param,
30  HAL_Bool initialNotify);
31 void HALSIM_CancelDigitalPWMDutyCycleCallback(int32_t index, int32_t uid);
32 double HALSIM_GetDigitalPWMDutyCycle(int32_t index);
33 void HALSIM_SetDigitalPWMDutyCycle(int32_t index, double dutyCycle);
34 
35 int32_t HALSIM_RegisterDigitalPWMPinCallback(int32_t index,
36  HAL_NotifyCallback callback,
37  void* param,
38  HAL_Bool initialNotify);
39 void HALSIM_CancelDigitalPWMPinCallback(int32_t index, int32_t uid);
40 int32_t HALSIM_GetDigitalPWMPin(int32_t index);
41 void HALSIM_SetDigitalPWMPin(int32_t index, int32_t pin);
42 
43 void HALSIM_RegisterDigitalPWMAllCallbacks(int32_t index,
44  HAL_NotifyCallback callback,
45  void* param, HAL_Bool initialNotify);
46 
47 #ifdef __cplusplus
48 } // extern "C"
49 #endif
50 
51 #endif