mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-07 20:34:00 +02:00
& not &&
This commit is contained in:
parent
cb8ea5c0e5
commit
8ea47f27fc
2 changed files with 14 additions and 14 deletions
|
@ -101,18 +101,18 @@ void SetOutReport (uint8_t dst[], uint32_t length)
|
|||
}
|
||||
|
||||
void SwitchesSetup(uint8_t states) {
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<8] |= ((( states && 0x01) >> 0)<<8);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<8] &= ((((states && 0x01) >> 0)<<8) | ~(1<<8));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<9] |= ((( states && 0x02) >> 1)<<9);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<9] &= ((((states && 0x02) >> 1)<<9) | ~(1<<9));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<10] |= ((( states && 0x04) >> 2)<<10);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<10] &= ((((states && 0x04) >> 2)<<10) | ~(1<<10));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<11] |= ((( states && 0x08) >> 3)<<11);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<11] &= ((((states && 0x08) >> 3)<<11) | ~(1<<11));
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<0] |= ((( states && 0x10) >> 4)<<0);
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<0] &= ((((states && 0x10) >> 4)<<0) | ~(1<<0));
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<1] |= ((( states && 0x20) >> 5)<<1);
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<1] &= ((((states && 0x20) >> 5)<<1) | ~(1<<1));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<8] |= ((( states & 0x01) >> 0)<<8);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<8] &= ((((states & 0x01) >> 0)<<8) | ~(1<<8));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<9] |= ((( states & 0x02) >> 1)<<9);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<9] &= ((((states & 0x02) >> 1)<<9) | ~(1<<9));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<10] |= ((( states & 0x04) >> 2)<<10);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<10] &= ((((states & 0x04) >> 2)<<10) | ~(1<<10));
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<11] |= ((( states & 0x08) >> 3)<<11);
|
||||
LPC_GPIO2->MASKED_ACCESS[1<<11] &= ((((states & 0x08) >> 3)<<11) | ~(1<<11));
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<0] |= ((( states & 0x10) >> 4)<<0);
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<0] &= ((((states & 0x10) >> 4)<<0) | ~(1<<0));
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<1] |= ((( states & 0x20) >> 5)<<1);
|
||||
LPC_GPIO3->MASKED_ACCESS[1<<1] &= ((((states & 0x20) >> 5)<<1) | ~(1<<1));
|
||||
}
|
||||
|
||||
void PinInit() {
|
||||
|
|
|
@ -27,9 +27,9 @@ class ModuleDebugWidget(QWidget):
|
|||
QObject.connect(self.ui.pushPin3, SIGNAL("clicked(bool)"), self.on_pins_changed)
|
||||
|
||||
# real device:
|
||||
self.dev = Device()
|
||||
# self.dev = Device()
|
||||
# fake device:
|
||||
# self.dev = Device(True)
|
||||
self.dev = Device(True)
|
||||
|
||||
self.timer = QTimer()
|
||||
QObject.connect(self.timer, SIGNAL("timeout()"), self.read_inputs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue