[hal] Expose power rail disable and cpu temp functionality (#5477)

This commit is contained in:
Ryan Blue
2023-08-04 02:48:29 -04:00
committed by GitHub
parent 3ad5d2e42d
commit e2d17a24a6
12 changed files with 255 additions and 9 deletions

View File

@@ -32,6 +32,7 @@ HAL_Bool HAL_GetUserActive6V(int32_t* status) {
int32_t HAL_GetUserCurrentFaults6V(int32_t* status) {
return SimRoboRioData->userFaults6V;
}
void HAL_SetUserRailEnabled6V(HAL_Bool enabled, int32_t* status) {}
double HAL_GetUserVoltage5V(int32_t* status) {
return SimRoboRioData->userVoltage5V;
}
@@ -44,6 +45,7 @@ HAL_Bool HAL_GetUserActive5V(int32_t* status) {
int32_t HAL_GetUserCurrentFaults5V(int32_t* status) {
return SimRoboRioData->userFaults5V;
}
void HAL_SetUserRailEnabled5V(HAL_Bool enabled, int32_t* status) {}
double HAL_GetUserVoltage3V3(int32_t* status) {
return SimRoboRioData->userVoltage3V3;
}
@@ -56,10 +58,14 @@ HAL_Bool HAL_GetUserActive3V3(int32_t* status) {
int32_t HAL_GetUserCurrentFaults3V3(int32_t* status) {
return SimRoboRioData->userFaults3V3;
}
void HAL_SetUserRailEnabled3V3(HAL_Bool enabled, int32_t* status) {}
void HAL_SetBrownoutVoltage(double voltage, int32_t* status) {
SimRoboRioData->brownoutVoltage = voltage;
}
double HAL_GetBrownoutVoltage(int32_t* status) {
return SimRoboRioData->brownoutVoltage;
}
double HAL_GetCPUTemp(int32_t* status) {
return SimRoboRioData->cpuTemp;
}
} // extern "C"