WPILibC++
2019.1.1-beta-1-1-g0a2ab4f
|
WPILib Hardware Abstraction Layer (HAL) namespace. More...
Classes | |
class | DigitalHandleResource |
The DigitalHandleResource class is a way to track handles. More... | |
struct | DIOSetProxy |
Proxy class for directly manipulating the DIO pins. More... | |
class | fpga_clock |
A std::chrono compatible wrapper around the FPGA Timer. More... | |
struct | HalCallbackListener |
class | HandleBase |
Base for all HAL Handles. More... | |
class | IndexedClassedHandleResource |
The IndexedClassedHandleResource class is a way to track handles. More... | |
class | IndexedHandleResource |
The IndexedHandleResource class is a way to track handles. More... | |
class | LimitedClassedHandleResource |
The LimitedClassedHandleResource class is a way to track handles. More... | |
class | LimitedHandleResource |
The LimitedHandleResource class is a way to track handles. More... | |
class | SerialHelper |
A class for deterministically getting information about Serial Ports. More... | |
class | SimCallbackRegistry |
Simulation callback registry. More... | |
class | SimDataValue |
Simulation data value wrapper. More... | |
class | UnlimitedHandleResource |
The UnlimitedHandleResource class is a way to track handles. More... | |
Enumerations | |
enum | HAL_HandleEnum { Undefined = 0, DIO = 1, Port = 2, Notifier = 3, Interrupt = 4, AnalogOutput = 5, AnalogInput = 6, AnalogTrigger = 7, Relay = 8, PWM = 9, DigitalPWM = 10, Counter = 11, FPGAEncoder = 12, Encoder = 13, Compressor = 14, Solenoid = 15, AnalogGyro = 16, Vendor = 17, SimulationJni = 18, CAN = 19 } |
Enum of HAL handle types. More... | |
Functions | |
HAL_PortHandle | createPortHandle (uint8_t channel, uint8_t module) |
Create a port handle. More... | |
HAL_PortHandle | createPortHandleForSPI (uint8_t channel) |
Create a port handle for SPI. More... | |
HAL_Handle | createHandle (int16_t index, HAL_HandleEnum handleType, int16_t version) |
Create a handle for a specific index, type and version. More... | |
template<typename Functor > | |
void | UnsafeManipulateDIO (HAL_DigitalHandle handle, int32_t *status, Functor func) |
Unsafe digital output set function This function can be used to perform fast and determinstically set digital outputs. More... | |
Variables | |
constexpr int16_t | InvalidHandleIndex = -1 |
WPILib Hardware Abstraction Layer (HAL) namespace.
|
strong |
Enum of HAL handle types.
Vendors/Teams should use Vendor (17).
HAL_Handle hal::createHandle | ( | int16_t | index, |
HAL_HandleEnum | handleType, | ||
int16_t | version | ||
) |
Create a handle for a specific index, type and version.
Note the version is not checked on the roboRIO.
index | the index |
handleType | the handle type |
version | the handle version |
HAL_PortHandle hal::createPortHandle | ( | uint8_t | channel, |
uint8_t | module | ||
) |
Create a port handle.
channel | the channel |
module | the module |
HAL_PortHandle hal::createPortHandleForSPI | ( | uint8_t | channel | ) |
Create a port handle for SPI.
channel | the SPI channel |
void hal::UnsafeManipulateDIO | ( | HAL_DigitalHandle | handle, |
int32_t * | status, | ||
Functor | func | ||
) |
Unsafe digital output set function This function can be used to perform fast and determinstically set digital outputs.
This function holds the DIO lock, so calling anyting other then functions on the Proxy object passed as a parameter can deadlock your program.
handle | the HAL digital handle of the pin to toggle. |
status | status check |
func | A functor taking a ref to a DIOSetProxy object. |