This file contains 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
cmake_minimum_required(VERSION 3.1) | |
include(CMakeParseArguments) | |
macro(open_eebus_project) | |
#message(DEBUG "---- processing open_eebus_project") | |
set(options DEBUG) | |
set(oneValueArgs |
This file contains 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
#include <iostream> | |
#include <string> | |
#include <array> | |
#include <functional> | |
using namespace std; | |
class NodeManager { | |
private: |
This file contains 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
#include <cstdint> | |
// normal device class e.g., i2c, spi | |
class Device { | |
public: | |
Device() {} | |
bool write8(uint8_t page, uint8_t addr, uint8_t v) | |
{ | |
return true; | |
} |
This file contains 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
1. digital last | |
1.1 switch-off/max-off/min-off | |
{signal: | |
[ | |
{name: 'Switch Off Req', wave: '010.....'}, | |
{name: 'ELA', wave: '01....0.'}, | |
{name: 'Active', wave: '1.0....1'}, | |
{name: 'Max Off Timer', wave: '0.1...0.'}, | |
{name: 'Min Off Timer', wave: '0.1.0...'}, | |
{name: 'Switch On Block', wave: '0.1.0...'}, |
This file contains 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
#include <iostream> | |
#include <memory> | |
#include <mutex> | |
#include <unordered_map> | |
using namespace std; | |
class Stock | |
{ | |
public: |
This file contains 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 | |
g++ -std=c++14 main.cpp publisher.cpp -o app -lavahi-core -lavahi-common -lavahi-client |
This file contains 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
#include <iostream> | |
#include <thread> | |
#include <mutex> | |
class Comm | |
{ | |
private: | |
Comm() {} |
This file contains 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/sh | |
qemu-system-arm \ | |
-M vexpress-a9 -smp 1 \ | |
-m 256 \ | |
-kernel output/images/zImage \ | |
-dtb output/images/vexpress-v2p-ca9.dtb \ | |
-drive file=output/images/rootfs.ext2,if=sd,format=raw \ | |
-append "console=ttyAMA0,115200 root=/dev/mmcblk0" \ | |
-net nic,model=lan9118 \ |
This file contains 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 | |
echo "21" > /sys/class/gpio/export | |
echo "out" > /sys/class/gpio/gpio21/direction | |
echo "1" > /sys/class/gpio/gpio21/value | |
sleep 5 | |
echo "0" > /sys/class/gpio/gpio21/value | |
sleep 1 | |
echo "0" > /sys/class/gpio/gpio21/value |
This file contains 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
Sat Jan 31 06:22:30 1970 kern.notice kernel: [ 0.000000] Linux version 4.4.14 (build@7e42c4b42298) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 v1.1.0) ) #3 SMP Tue Feb 14 20:33:07 UTC 2017 | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] SoC Type: IMG Pistachio SoC (B0) | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] bootconsole [early0] enabled | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] CPU0 revision is: 0001a120 (MIPS interAptiv (multi)) | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] FPU revision is: 0173a000 | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] MIPS: machine is IMG marduk - Creator Ci40 with ca8210 | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] Determined physical RAM map: | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] memory: 10000000 @ 00000000 (usable) | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] Initrd not found or empty - disabling initrd | |
Sat Jan 31 06:22:30 1970 kern.info kernel: [ 0.000000] Zone ran |