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
| #include <hidef.h> /* common defines and macros */ | |
| #include "derivative.h" /* derivative-specific definitions */ | |
| #include <stdio.h> | |
| #include <termio.h> | |
| #include <stdlib.h> | |
| //float asciiToFloat(byte* line); | |
| #define FreqClockA 2000000 // Value on Reset (PWMPRCLK = 0x00) |
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
| #include <hidef.h> /* common defines and macros */ | |
| #include "derivative.h" /* derivative-specific definitions */ | |
| #include <math.h> | |
| int notes[16]= {60,62,64,65,67,69,71,0,72,74,76,77,79,81,83,84}; //key to note lookup table | |
| void initializePorts() |
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
| /* RealTime Clock. | |
| * Global variable msCount is incremented every millisecond by Timer | |
| * channel 5 Interrupt Service Routine. | |
| * Loop in main displays msCount<15:12> on the module LEDs | |
| * and msCount<11:4> project board LEDs. | |
| * Note that when a word is assigned to a byte variable, the low 8 bits | |
| * of the word are assigned to the byte. | |
| */ | |
| #include <hidef.h> /* common defines and macros */ |
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
| #** | |
| #* Subscribe | |
| #* | |
| #* This is BLOCKING. | |
| #* Listen for a message on a channel. | |
| #* | |
| #* @param array args with channel and message. | |
| #* @return false on fail, array on success. | |
| #* | |
| def subscribe(args) |
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
| cat network | |
| config 'interface' 'loopback' | |
| option 'ifname' 'lo' | |
| option 'proto' 'static' | |
| option 'ipaddr' '127.0.0.1' | |
| option 'netmask' '255.0.0.0' | |
| config 'interface' 'lan' | |
| option 'ifname' 'eth1' |
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
| br-lan Link encap:Ethernet HWaddr 00:03:7F:11:3F:33 | |
| inet addr:192.168.1.111 Bcast:192.168.1.255 Mask:255.255.255.0 | |
| UP BROADCAST MULTICAST MTU:1500 Metric:1 | |
| RX packets:0 errors:0 dropped:2 overruns:0 frame:0 | |
| TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 | |
| collisions:0 txqueuelen:0 | |
| RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) | |
| eth0 Link encap:Ethernet HWaddr 00:03:7F:11:3F:33 | |
| UP BROADCAST MULTICAST MTU:1500 Metric: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
| //Alex Egg Lab 12 | |
| #include <hidef.h> /* common defines and macros */ | |
| #include <MC9S12C128.h> /* derivative information */ | |
| #include <math.h> | |
| void initializePorts(void); | |
| byte PATTERNS[]= {0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F,0xFF,0x7F,0x1F,0x0F,0x07,0x03,0x01,0x00}; | |
| int notes[16]= {60,62,64,65,67,69,71,0,72,74,76,77,79,81,83,84}; //key to note lookup table |
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
| require 'eventmachine' | |
| module InsteonNetwork | |
| class Client | |
| attr_accessor :connection | |
| def connect | |
| @connection = EM.connect "192.168.1.102", 9761, Listener, self | |
| end | |
| def do_callback(data) |
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
| require 'eventmachine' | |
| class String | |
| #literal_hex_string | |
| def lhs | |
| self.unpack('C*').map {|e| "0x#{e.to_s(16)} "}.join | |
| end | |
| end | |
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
| threads = []; | |
| threads << Thread.new { funcA }; | |
| threads << Thread.new { funcB }; | |
| threads.each { |t| t.join(0.1) } while true |