Merge branch 'master' of git@github.com:arduino/Arduino

This commit is contained in:
Tom Igoe 2011-02-24 09:31:13 -05:00
commit fa3728ea03
6 changed files with 24 additions and 9 deletions

View File

@ -1,17 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<project name="Arduino" default="build"> <project name="Arduino" default="build">
<!--echo message="os.name = ${os.name}" /-->
<!--echo message="os.arch = ${os.arch}" /-->
<!--echo message="os.version = ${os.version}" /-->
<!-- Sets properties for macosx/windows/linux depending on current system --> <!-- Sets properties for macosx/windows/linux depending on current system -->
<condition property="macosx"><os family="mac" /></condition> <condition property="macosx"><os family="mac" /></condition>
<condition property="windows"><os family="windows" /></condition> <condition property="windows"><os family="windows" /></condition>
<condition property="linux"><os family="unix" /></condition> <condition property="linux"><os family="unix" /></condition>
<condition property="linux64"><os family="unix" arch="amd64" /></condition>
<condition property="platform" <condition property="platform"
value="macosx"><os family="mac" /></condition> value="macosx"><os family="mac" /></condition>
<condition property="platform" <condition property="platform"
value="windows"><os family="windows" /></condition> value="windows"><os family="windows" /></condition>
<condition property="platform" <condition property="platform"
value="linux"><os family="unix" /></condition> value="linux"><os family="unix" arch="i386" /></condition>
<condition property="platform"
value="linux64"><os family="unix" arch="amd64" /></condition>
<!-- Libraries required for running arduino --> <!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars"> <fileset dir=".." id="runtime.jars">
@ -318,12 +324,22 @@
<chmod perm="755" file="linux/work/arduino" /> <chmod perm="755" file="linux/work/arduino" />
</target> </target>
<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
<copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" />
<copy tofile="linux/work/lib/librxtxSerial.so" file="linux/dist/lib/librxtxSerial64.so" overwrite="true" />
</target>
<target name="linux-run" depends="linux-build" <target name="linux-run" depends="linux-build"
description="Run Linux version"> description="Run Linux (32-bit) version">
<exec executable="./linux/work/arduino" spawn="false"/> <exec executable="./linux/work/arduino" spawn="false"/>
</target> </target>
<target name="linux-dist" depends="linux-build" <target name="linux64-run" depends="linux64-build"
description="Run Linux (64-bit) version">
<exec executable="./linux/work/arduino" spawn="false"/>
</target>
<target name="linux-dist" depends="build"
description="Build .tar.gz of linux version"> description="Build .tar.gz of linux version">
<!--get src="http://dev.processing.org/build/jre-tools-6u18-linux-i586.tgz" <!--get src="http://dev.processing.org/build/jre-tools-6u18-linux-i586.tgz"
@ -360,6 +376,9 @@
</target> </target>
<target name="linux64-dist" depends="linux-dist"
description="Build .tar.gz of linux version" />
<!-- - - - - - - - --> <!-- - - - - - - - -->
<!-- Windows --> <!-- Windows -->
<!-- - - - - - - - --> <!-- - - - - - - - -->

BIN
build/linux/dist/lib/librxtxSerial64.so vendored Executable file

Binary file not shown.

BIN
build/linux/dist/tools/avrdude64 vendored Executable file

Binary file not shown.

View File

@ -29,7 +29,7 @@ void setup() {
void loop() { void loop() {
// play notes from F#-0 (0x1E) to F#-5 (0x5A): // play notes from F#-0 (0x1E) to F#-5 (0x5A):
for (intnote = 0x1E; note < 0x5A; note ++) { for (int note = 0x1E; note < 0x5A; note ++) {
//Note on channel 1 (0x90), some note value (note), middle velocity (0x45): //Note on channel 1 (0x90), some note value (note), middle velocity (0x45):
noteOn(0x90, note, 0x45); noteOn(0x90, note, 0x45);
delay(100); delay(100);

View File

@ -79,7 +79,7 @@ void twi_init(void)
// initialize twi prescaler and bit rate // initialize twi prescaler and bit rate
cbi(TWSR, TWPS0); cbi(TWSR, TWPS0);
cbi(TWSR, TWPS1); cbi(TWSR, TWPS1);
TWBR = ((CPU_FREQ / TWI_FREQ) - 16) / 2; TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
/* twi bit rate formula from atmega128 manual pg 204 /* twi bit rate formula from atmega128 manual pg 204
SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR)) SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))

View File

@ -24,10 +24,6 @@
//#define ATMEGA8 //#define ATMEGA8
#ifndef CPU_FREQ
#define CPU_FREQ 16000000L
#endif
#ifndef TWI_FREQ #ifndef TWI_FREQ
#define TWI_FREQ 100000L #define TWI_FREQ 100000L
#endif #endif