WPILibC++  2019.1.1-beta-2-41-gd65547e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
SPIAccelerometerData.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_ResetSPIAccelerometerData(int32_t index);
20 int32_t HALSIM_RegisterSPIAccelerometerActiveCallback(
21  int32_t index, HAL_NotifyCallback callback, void* param,
22  HAL_Bool initialNotify);
23 void HALSIM_CancelSPIAccelerometerActiveCallback(int32_t index, int32_t uid);
24 HAL_Bool HALSIM_GetSPIAccelerometerActive(int32_t index);
25 void HALSIM_SetSPIAccelerometerActive(int32_t index, HAL_Bool active);
26 
27 int32_t HALSIM_RegisterSPIAccelerometerRangeCallback(
28  int32_t index, HAL_NotifyCallback callback, void* param,
29  HAL_Bool initialNotify);
30 void HALSIM_CancelSPIAccelerometerRangeCallback(int32_t index, int32_t uid);
31 int32_t HALSIM_GetSPIAccelerometerRange(int32_t index);
32 void HALSIM_SetSPIAccelerometerRange(int32_t index, int32_t range);
33 
34 int32_t HALSIM_RegisterSPIAccelerometerXCallback(int32_t index,
35  HAL_NotifyCallback callback,
36  void* param,
37  HAL_Bool initialNotify);
38 void HALSIM_CancelSPIAccelerometerXCallback(int32_t index, int32_t uid);
39 double HALSIM_GetSPIAccelerometerX(int32_t index);
40 void HALSIM_SetSPIAccelerometerX(int32_t index, double x);
41 
42 int32_t HALSIM_RegisterSPIAccelerometerYCallback(int32_t index,
43  HAL_NotifyCallback callback,
44  void* param,
45  HAL_Bool initialNotify);
46 void HALSIM_CancelSPIAccelerometerYCallback(int32_t index, int32_t uid);
47 double HALSIM_GetSPIAccelerometerY(int32_t index);
48 void HALSIM_SetSPIAccelerometerY(int32_t index, double y);
49 
50 int32_t HALSIM_RegisterSPIAccelerometerZCallback(int32_t index,
51  HAL_NotifyCallback callback,
52  void* param,
53  HAL_Bool initialNotify);
54 void HALSIM_CancelSPIAccelerometerZCallback(int32_t index, int32_t uid);
55 double HALSIM_GetSPIAccelerometerZ(int32_t index);
56 void HALSIM_SetSPIAccelerometerZ(int32_t index, double z);
57 
58 void HALSIM_RegisterSPIAccelerometerAllCallbcaks(int32_t index,
59  HAL_NotifyCallback callback,
60  void* param,
61  HAL_Bool initialNotify);
62 
63 #ifdef __cplusplus
64 } // extern "C"
65 #endif
66 
67 #endif