mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[hal, wpilib] PWM Rewrite (#7845)
The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
This commit is contained in:
@@ -9,15 +9,16 @@
|
||||
extern "C" {
|
||||
void HALSIM_ResetPWMData(int32_t index) {}
|
||||
|
||||
HAL_SimDeviceHandle HALSIM_GetPWMSimDevice(int32_t index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define DEFINE_CAPI(TYPE, CAPINAME, RETURN) \
|
||||
HAL_SIMDATAVALUE_STUB_CAPI(TYPE, HALSIM, PWM##CAPINAME, RETURN)
|
||||
|
||||
DEFINE_CAPI(HAL_Bool, Initialized, false)
|
||||
DEFINE_CAPI(int32_t, PulseMicrosecond, 0)
|
||||
DEFINE_CAPI(double, Speed, 0)
|
||||
DEFINE_CAPI(double, Position, 0)
|
||||
DEFINE_CAPI(int32_t, PeriodScale, 0)
|
||||
DEFINE_CAPI(HAL_Bool, ZeroLatch, false)
|
||||
DEFINE_CAPI(int32_t, OutputPeriod, 0)
|
||||
|
||||
void HALSIM_RegisterPWMAllCallbacks(int32_t index, HAL_NotifyCallback callback,
|
||||
void* param, HAL_Bool initialNotify) {}
|
||||
|
||||
Reference in New Issue
Block a user