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
//----------------------------------------------------------------------------- | |
// This file is for use in Embedded Control when using the SDCC compiler | |
// | |
// Directions: | |
// | |
// This file should be saved to the following directory on your laptop: | |
// C:\Program Files\SDCC\include\mcs51 | |
// Save as c8051_SDCC.h | |
// | |
// In your program, you need to include this header file as #include <c8051_SDCC.h> |
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
PROGRAM=hw1 | |
SOURCES=$(PROGRAM).c | |
# you should probably redefine this with an absolute path, if possible | |
INCLUDE=../headers | |
CC=sdcc | |
PORT="USB" | |
TARGET="SL51" | |
GDB=newcdb | |
all: $(PROGRAM).ihx flash run |
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
# Maintainer: Galen Schretlen <[email protected]> | |
pkgname=ec2drv-git | |
pkgdesc="ec2drv provides Linux support for the Silicon Laboritories EC2 serial debug adaptor." | |
_sourcename="ec2" | |
pkgrel=1 | |
pkgver=86ffac6 | |
arch=('i686' 'x86_64') | |
url="https://github.com/four0four/ec2" | |
license=('GPL') | |
depends=('python2' 'boost-libs' 'readline' 'libusb') |
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
/* | |
* mega324_UART.c | |
* | |
* Created: 12/28/2011 10:39:01 PM | |
* Author: Galen | |
*/ | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <avr/power.h> |
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
#!/usr/bin/python2 | |
import networkClasses | |
test = networkClasses.Subnet("192.168.0.1","255.255.0.0") | |
#test = networkClasses.Subnet("192.168.0.1/16") | |
print ".toIPaddress(): " + str(test.toIPaddress()) | |
print ".toBroadcast(): " + str(test.toBroadcast()) | |
print ".toNetmask(): " + str(test.toNetmask()) | |
print ".toSubnet(): " + str(test.toSubnet()) |
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
#http://wiki.python.org/moin/BitManipulation | |
def countBits(int_type): | |
count = 0 | |
while(int_type): | |
int_type &= int_type - 1 | |
count += 1 | |
return(count) | |
class Subnet: |
NewerOlder