Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #300 #305

Merged
merged 2 commits into from Dec 29, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -6,4 +6,3 @@
*.out *.out
*.class *.class
*.svn *.svn
./build/upload.properties
Binary file removed build/antlibs/aws-ant-tasks-0.4-SNAPSHOT.jar
Binary file not shown.
Binary file removed build/antlibs/aws-java-sdk-1.3.8.jar
Binary file not shown.
Binary file removed build/antlibs/commons-codec-1.6.jar
Binary file not shown.
Binary file removed build/antlibs/commons-logging-1.1.1.jar
Binary file not shown.
Binary file removed build/antlibs/httpclient-4.1.1.jar
Binary file not shown.
Binary file removed build/antlibs/httpcore-4.1.jar
Binary file not shown.
Binary file removed build/antlibs/jackson-core-asl-1.9.11.jar
Binary file not shown.
Binary file removed build/antlibs/jackson-mapper-asl-1.9.11.jar
Binary file not shown.
41 changes: 2 additions & 39 deletions build/build.xml
Expand Up @@ -4,15 +4,13 @@
<!--echo message="os.arch = ${os.arch}" /--> <!--echo message="os.arch = ${os.arch}" /-->
<!--echo message="os.version = ${os.version}" /--> <!--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 -->
<property file="upload.properties"/>
<property name="aws.bucket" value="chipkit" />


<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="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>
Expand Down Expand Up @@ -321,11 +319,7 @@


macosx/mpide-${version}.dmg macosx/mpide-${version}.dmg
======================================================= =======================================================
</echo> </echo>
<propertyfile file="upload.properties">
<entry key="version" value="${version}"/>
</propertyfile>

</target> </target>




Expand Down Expand Up @@ -654,37 +648,6 @@
</copy> </copy>
</target> </target>
--> -->
<!-- Task for setting up the aws-ant-tasks -->
<target name="awstasks.setup">
<path id="tasks.path">
<fileset dir="antlibs" includes="*.jar"/>
</path>

<taskdef name="s3put" classpath="antlibs" classname="it.corley.ant.S3PutTask"
classpathref="tasks.path"/>
<typedef name="contenttype.mapping" classname="it.corley.ant.ContentTypeMapping" classpathref="tasks.path"/>
<typedef name="cachecontrol.mapping" classname="it.corley.ant.CacheControlMapping" classpathref="tasks.path"/>
<typedef name="contentencoding.mapping" classname="it.corley.ant.ContentEncodingMapping" classpathref="tasks.path"/>
</target>
<!-- Upload the current build -->
<target name="upload" description="Use the Task" depends="awstasks.setup">
<property file="test.properties"/>
<s3put key="${aws.access_key}" secret="${aws.secret_key}" bucket="${aws.bucket}"
dest="builds" publicread="true" cacheControl="3600" contentType="application/x-readme">
<fileset dir="macosx" includes="mpide-${version}.dmg"/>
<contenttypemapping extension="md" contenttype="text/plain"/>
<cachecontrolmapping extension="md" maxage="7200"/>
<contentencodingmapping extension="md" encoding="UTF-8" />
</s3put>

</target>
<!-- Debugging echo target for s3, other values could be added as needed. -->
<target name="echo">
<echo message="${aws.access_key}"/>
<echo message="${aws.secret_key}"/>
<echo message="${aws.bucket}"/>
<echo message="${version}"/>
</target>




</project> </project>
24 changes: 17 additions & 7 deletions hardware/pic32/cores/pic32/HardwareSerial.cpp
Expand Up @@ -59,6 +59,7 @@
//* Nov 12, 2012 <GeneApperson> Rewrite for board variant support //* Nov 12, 2012 <GeneApperson> Rewrite for board variant support
//* Sep 8, 2012 <BrianSchmalz> Fix dropping bytes on USB RX bug //* Sep 8, 2012 <BrianSchmalz> Fix dropping bytes on USB RX bug
//* Jul 26, 2012 <GeneApperson> Added PPS support for PIC32MX1xx/MX2xx devices //* Jul 26, 2012 <GeneApperson> Added PPS support for PIC32MX1xx/MX2xx devices
//* Nov 23, 2012 <BrianSchmalz> Auto-detect when to use BRGH = 1 (high baud rates)
//************************************************************************ //************************************************************************
#ifndef __LANGUAGE_C__ #ifndef __LANGUAGE_C__
#define __LANGUAGE_C__ #define __LANGUAGE_C__
Expand Down Expand Up @@ -87,7 +88,8 @@
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/* General Declarations */ /* General Declarations */
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */

// Baud rate above which we use high baud divisor (BRGH = 1)
#define LOW_HIGH_BAUD_SPLIT 200000


/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/* HardwareSerial Object Class Implementation */ /* HardwareSerial Object Class Implementation */
Expand Down Expand Up @@ -215,13 +217,21 @@ void HardwareSerial::begin(unsigned long baudRate)
iec->set = bit_rx; //enable rx interrupts iec->set = bit_rx; //enable rx interrupts


/* Initialize the UART itself. /* Initialize the UART itself.
*/ ** http://www.chipkit.org/forum/viewtopic.php?f=7&t=213&p=948#p948
// http://www.chipkit.org/forum/viewtopic.php?f=7&t=213&p=948#p948 ** Use high baud rate divisor for bauds over LOW_HIGH_BAUD_SPLIT
uart->uxBrg.reg = ((__PIC32_pbClk / 16 / baudRate) - 1); // calculate actual BAUD generate value. */
uart->uxSta.reg = 0; uart->uxSta.reg = 0;
uart->uxMode.reg = (1 << _UARTMODE_ON); //enable UART module if (baudRate < LOW_HIGH_BAUD_SPLIT)
uart->uxSta.reg = (1 << _UARTSTA_UTXEN) + (1 << _UARTSTA_URXEN); //enable transmitter and receiver {

uart->uxBrg.reg = ((__PIC32_pbClk / 16 / baudRate) - 1); // calculate actual BAUD generate value.
uart->uxMode.reg = (1 << _UARTMODE_ON); // enable UART module
}
else
{
uart->uxBrg.reg = ((__PIC32_pbClk / 4 / baudRate) - 1); // calculate actual BAUD generate value.
uart->uxMode.reg = (1 << _UARTMODE_ON) | (1 << _UARTMODE_BRGH); // enable UART module
}
uart->uxSta.reg = (1 << _UARTSTA_UTXEN) + (1 << _UARTSTA_URXEN); // enable transmitter and receiver
} }


/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
Expand Down
1 change: 1 addition & 0 deletions hardware/pic32/cores/pic32/p32_defs.h
Expand Up @@ -108,6 +108,7 @@ typedef struct {
/* UxMODE - Define bits in UART mode port /* UxMODE - Define bits in UART mode port
*/ */
#define _UARTMODE_ON 15 #define _UARTMODE_ON 15
#define _UARTMODE_BRGH 3


/* UxSTA - Define bits in UART status/control register /* UxSTA - Define bits in UART status/control register
*/ */
Expand Down