mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Squashed commit of the following:
commit a3ccfab0a42414aa169792356bfc47ee8d0d2d7b Author: Kevin O'Connor <koconnor@usfirst.org> Date: Tue Sep 23 13:56:59 2014 -0400 Implement zero latch (used to reduce brownout latency) in Java Change-Id: I3bf4ffbf20cf3d8a42da4fa1755b4306c49ede34 commit 0af37dfcc0d1172974519c44126973c302385d55 Author: Kevin O'Connor <koconnor@usfirst.org> Date: Tue Sep 23 13:03:07 2014 -0400 Implement zero latch (used to improve brownout latency) in C++ Change-Id: I62bedd1af65d367c32e2ab0b5a4fc679776eecb5 Change-Id: Ic27f37a9ab45aad82c1f7154d4edfbccfaa19229
This commit is contained in:
@@ -217,6 +217,12 @@ unsigned short getPWM(void* digital_port_pointer, int32_t *status) {
|
||||
}
|
||||
}
|
||||
|
||||
void latchPWMZero(void* digital_port_pointer, int32_t *status) {
|
||||
DigitalPort* port = (DigitalPort*) digital_port_pointer;
|
||||
pwmSystem->writeZeroLatch(1 << port->port.pin, true, status);
|
||||
pwmSystem->writeZeroLatch(1 << port->port.pin, false, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set how how often the PWM signal is squelched, thus scaling the period.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user