mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Moved C++ comments from source files to headers (#1111)
Also sorted functions in C++ sources to match order in related headers.
This commit is contained in:
committed by
Peter Johnson
parent
d9971a705a
commit
8c680a26f8
@@ -83,9 +83,6 @@ HAL_PortHandle HAL_GetPort(int32_t channel) {
|
||||
return createPortHandle(channel, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Uses module numbers
|
||||
*/
|
||||
HAL_PortHandle HAL_GetPortWithModule(int32_t module, int32_t channel) {
|
||||
// Dont allow a number that wouldn't fit in a uint8_t
|
||||
if (channel < 0 || channel >= 255) return HAL_kInvalidHandle;
|
||||
@@ -204,44 +201,18 @@ const char* HAL_GetErrorMessage(int32_t code) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the runtime type of this HAL
|
||||
*/
|
||||
HAL_RuntimeType HAL_GetRuntimeType(void) { return HAL_Mock; }
|
||||
|
||||
/**
|
||||
* Return the FPGA Version number.
|
||||
* For now, expect this to be competition year.
|
||||
* @return FPGA Version number.
|
||||
*/
|
||||
int32_t HAL_GetFPGAVersion(int32_t* status) {
|
||||
return 2018; // Automatically script this at some point
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the FPGA Revision number.
|
||||
* The format of the revision is 3 numbers.
|
||||
* The 12 most significant bits are the Major Revision.
|
||||
* the next 8 bits are the Minor Revision.
|
||||
* The 12 least significant bits are the Build Number.
|
||||
* @return FPGA Revision number.
|
||||
*/
|
||||
int64_t HAL_GetFPGARevision(int32_t* status) {
|
||||
return 0; // TODO: Find a better number to return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the microsecond-resolution timer on the FPGA.
|
||||
*
|
||||
* @return The current time in microseconds according to the FPGA (since FPGA
|
||||
* reset).
|
||||
*/
|
||||
uint64_t HAL_GetFPGATime(int32_t* status) { return hal::GetFPGATime(); }
|
||||
|
||||
/**
|
||||
* Get the state of the "USER" button on the roboRIO
|
||||
* @return true if the button is currently pressed down
|
||||
*/
|
||||
HAL_Bool HAL_GetFPGAButton(int32_t* status) {
|
||||
return SimRoboRioData[0].GetFPGAButton();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user