blob: 465a63ba6403649a9aa5213d4a14e2f02ca94df6 [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001/**
2 * Compressor.h
3 * Methods for interacting with a compressor with the CAN PCM device
4 */
5
6#include <stdint.h>
7
8#ifndef __HAL_COMPRESSOR_H__
9#define __HAL_COMPRESSOR_H__
10
11extern "C" {
12 void *initializeCompressor(uint8_t module);
13 bool checkCompressorModule(uint8_t module);
14
15 bool getCompressor(void *pcm_pointer, int32_t *status);
16
17 void setClosedLoopControl(void *pcm_pointer, bool value, int32_t *status);
18 bool getClosedLoopControl(void *pcm_pointer, int32_t *status);
19
20 bool getPressureSwitch(void *pcm_pointer, int32_t *status);
21 float getCompressorCurrent(void *pcm_pointer, int32_t *status);
22
23 bool getCompressorCurrentTooHighFault(void *pcm_pointer, int32_t *status);
24 bool getCompressorCurrentTooHighStickyFault(void *pcm_pointer, int32_t *status);
25 bool getCompressorShortedStickyFault(void *pcm_pointer, int32_t *status);
26 bool getCompressorShortedFault(void *pcm_pointer, int32_t *status);
27 bool getCompressorNotConnectedStickyFault(void *pcm_pointer, int32_t *status);
28 bool getCompressorNotConnectedFault(void *pcm_pointer, int32_t *status);
29 void clearAllPCMStickyFaults(void *pcm_pointer, int32_t *status);
30}
31
32#endif
33