This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
centipede_shield [2015/05/21 20:51] macegr |
centipede_shield [2015/11/12 12:16] (current) macegr [Code Example] |
||
---|---|---|---|
Line 67: | Line 67: | ||
.pinPullup([0...127], [LOW...HIGH]) - Sets pullup on input pin | .pinPullup([0...127], [LOW...HIGH]) - Sets pullup on input pin | ||
.portPullup([0...7], [0...65535]) - Sets pullups on one port (chip) | .portPullup([0...7], [0...65535]) - Sets pullups on one port (chip) | ||
+ | .portInterrupts([0...7],[0...65535],[0...65535],[0...65535]) - Configure interrupts | ||
+ | [device number],[use interrupt on pin],[default value],[interrupt when != default] | ||
+ | .portCaptureRead(0...7) - Reads 16-bit value registers as they were when interrupt occurred | ||
.init() - Sets all registers to initial values | .init() - Sets all registers to initial values | ||
Line 79: | Line 82: | ||
CS.pinPullup(1,HIGH); | CS.pinPullup(1,HIGH); | ||
CS.portPullup(0, 0b0111111001111110); // 0 = no pullup, 1 = pullup | CS.portPullup(0, 0b0111111001111110); // 0 = no pullup, 1 = pullup | ||
+ | CS.portInterrupts(0,0b0000000000000001,0b0000000000000000,0b0000000000000001); | ||
*/ | */ | ||