mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
HAL Port is using a special handle, where the module and pin are bit shifted straight into the handle. This is one of the few special cases we have, but for the way port is used it is much cleaner and uses much less memory. Plus it is generic and not specific to one type.
29 lines
1.3 KiB
C
29 lines
1.3 KiB
C
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) FIRST 2016. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "Handles.h"
|
|
|
|
extern "C" {
|
|
void* initializeSolenoidPort(HalPortHandle port_handle, int32_t* status);
|
|
void freeSolenoidPort(void* solenoid_port_pointer);
|
|
bool checkSolenoidModule(uint8_t module);
|
|
|
|
bool getSolenoid(void* solenoid_port_pointer, int32_t* status);
|
|
uint8_t getAllSolenoids(void* solenoid_port_pointer, int32_t* status);
|
|
void setSolenoid(void* solenoid_port_pointer, bool value, int32_t* status);
|
|
|
|
int getPCMSolenoidBlackList(void* solenoid_port_pointer, int32_t* status);
|
|
bool getPCMSolenoidVoltageStickyFault(void* solenoid_port_pointer,
|
|
int32_t* status);
|
|
bool getPCMSolenoidVoltageFault(void* solenoid_port_pointer, int32_t* status);
|
|
void clearAllPCMStickyFaults_sol(void* solenoid_port_pointer, int32_t* status);
|
|
}
|