This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Base class for MCP23008 and MCP23017 family of I2C i/o expanders | |
class MCP230xx { | |
BASE_ADDR = 0x20 | |
i2cPort = null | |
i2cAddr = null | |
regs = null | |
constructor(i2cPort, deviceAddr) { | |
this.i2cPort = i2cPort | |
this.i2cAddr = (BASE_ADDR + deviceAddr) << 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
function compressResource { | |
gzip --best --stdout "$1" >"$1.gz" | |
touch --no-create --reference="$1" "$1.gz" | |
echo "Compressed: $1 > $1.gz" | |
} | |
function main { |