tinyos8051wg-commit Mailing List for tinyos8051wg
Status: Alpha
Brought to you by:
mleopold
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(23) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(20) |
Oct
(4) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <al...@us...> - 2010-02-22 11:55:35
|
Revision: 1108 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1108&view=rev Author: alfvii Date: 2010-02-22 11:54:51 +0000 (Mon, 22 Feb 2010) Log Message: ----------- Email and Copyright modified Modified Paths: -------------- trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/Haladuc841SimplePWMP.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMC.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMControl.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/pwm.h trunk/diku/mcs51/tos/chips/aduc841/spi/Haladuc841SimpleSPIP.nc trunk/diku/mcs51/tos/chips/aduc841/spi/SpiByte.nc trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841Counter.nc trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841TimerP.nc trunk/diku/mcs51/tos/chips/aduc841/timer/aduc841-timer.h trunk/diku/mcs51/tos/chips/aduc841/uart/Haladuc841SimpleUart0P.nc trunk/diku/mcs51/tos/chips/aduc841/uart/serial.h trunk/diku/mcs51/tos/platforms/cookie841/ActiveMessageC.nc trunk/diku/mcs51/tos/platforms/cookie841/DS18S20C.nc trunk/diku/mcs51/tos/platforms/cookie841/HalTelegesisRadioP.nc trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841DS18S20P.nc trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841OneWireP.nc trunk/diku/mcs51/tos/platforms/cookie841/OneWireC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformADCC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformDACC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformDS18S20C.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformI2CC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformLedsC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformOneWireC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformPWMC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformRadioC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformTimerC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformUARTC.nc trunk/diku/mcs51/tos/platforms/cookie841/RadioC.nc trunk/diku/mcs51/tos/platforms/cookie841/RadioControl.nc trunk/diku/mcs51/tos/platforms/cookie841/onewire.h trunk/diku/mcs51/tos/platforms/cookie841/radio.h Modified: trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <adc.h> interface ADCC { Modified: trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <adc.h> interface ADCControl { Modified: trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #include <ioaduc841.h> #include <adc.h> Modified: trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #ifndef _H_ADC_H Modified: trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <dac.h> interface DACC { Modified: trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <dac.h> interface DACControl { Modified: trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #include <ioaduc841.h> #include <dac.h> Modified: trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #ifndef _H_DAC_H Modified: trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <ioaduc841.h> #include <i2c.h> Modified: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,44 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + + #include <i2c.h> interface I2CControl { Modified: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,44 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + + #include <i2c.h> interface I2CMaster { Modified: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,44 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + */ + #include <i2c.h> interface I2CSlave { Modified: trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #ifndef _H_I2C_H Modified: trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -36,7 +36,7 @@ */ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ Modified: trunk/diku/mcs51/tos/chips/aduc841/pwm/Haladuc841SimplePWMP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pwm/Haladuc841SimplePWMP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/pwm/Haladuc841SimplePWMP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #include <ioaduc841.h> #include <pwm.h> Modified: trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMC.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMC.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,44 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + + #include <adc.h> interface ADCC { Modified: trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMControl.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMControl.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,44 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + + #include <pwm.h> interface PWMControl { Modified: trunk/diku/mcs51/tos/chips/aduc841/pwm/pwm.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pwm/pwm.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/pwm/pwm.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,42 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ #ifndef _H_PWM_H Modified: trunk/diku/mcs51/tos/chips/aduc841/spi/Haladuc841SimpleSPIP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/spi/Haladuc841SimpleSPIP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/spi/Haladuc841SimpleSPIP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -51,7 +51,7 @@ */ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ Modified: trunk/diku/mcs51/tos/chips/aduc841/spi/SpiByte.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/spi/SpiByte.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/spi/SpiByte.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -26,7 +26,7 @@ */ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ Modified: trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841Counter.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841Counter.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841Counter.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -36,7 +36,7 @@ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ Modified: trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841TimerP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841TimerP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841TimerP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -47,7 +47,7 @@ */ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ Modified: trunk/diku/mcs51/tos/chips/aduc841/timer/aduc841-timer.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/timer/aduc841-timer.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/timer/aduc841-timer.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -35,7 +35,7 @@ */ /** - * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * @modified Alfonso Mart\xEDnez <alf...@al...> * for ADUC841 */ #ifndef _H_aduc841_timer_H Modified: trunk/diku/mcs51/tos/chips/aduc841/uart/Haladuc841SimpleUart0P.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/uart/Haladuc841SimpleUart0P.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/uart/Haladuc841SimpleUart0P.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,10 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> - * for Aduc841 + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include "serial.h" #include "aduc841-timer.h" Modified: trunk/diku/mcs51/tos/chips/aduc841/uart/serial.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/uart/serial.h 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/chips/aduc841/uart/serial.h 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #ifndef _H_SERIAL_H #define _H_SERIAL_H Modified: trunk/diku/mcs51/tos/platforms/cookie841/ActiveMessageC.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cookie841/ActiveMessageC.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/platforms/cookie841/ActiveMessageC.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,9 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include "AM.h" Modified: trunk/diku/mcs51/tos/platforms/cookie841/DS18S20C.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cookie841/DS18S20C.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/platforms/cookie841/DS18S20C.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,10 +1,45 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + + interface DS18S20C { Modified: trunk/diku/mcs51/tos/platforms/cookie841/HalTelegesisRadioP.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cookie841/HalTelegesisRadioP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/platforms/cookie841/HalTelegesisRadioP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -2,8 +2,43 @@ /** *Hal for Telegesis ETRX2 * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <ioaduc841.h> #include <radio.h> Modified: trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841DS18S20P.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841DS18S20P.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841DS18S20P.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * + * @author Alfonso Mart\xEDnez <alf...@al...> + */ + #include <ioaduc841.h> Modified: trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841OneWireP.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841OneWireP.nc 2010-01-30 21:53:33 UTC (rev 1107) +++ trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841OneWireP.nc 2010-02-22 11:54:51 UTC (rev 1108) @@ -1,8 +1,43 @@ /** * - * @author Alfonso Mart\xEDnez <Alf...@ho...> + * /* + * Copyright (c) 2010 Centro de Electr\xF3nica Industrial (CEI) Universidad + * Polit\xE9cnica de Madrid (Technical University of Madrid) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of CEI nor Universidad Polit\xE9cnica de Madrid nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CEI, UNIVERSIDAD + * POLIT\xC9CNICA DE MADRID OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR... [truncated message content] |
From: <qz...@us...> - 2010-01-30 21:53:56
|
Revision: 1107 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1107&view=rev Author: qzban Date: 2010-01-30 21:53:33 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Removed zzz from reentrant mangling Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:52:17 UTC (rev 1106) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:53:33 UTC (rev 1107) @@ -410,7 +410,7 @@ # 1. before ; or before { # 2. after ) if (!s{([^;\{]+)}{$1 reentrant}) { - $_ = "zzz" . $_; + # $_ = "zzz" . $_; s{\)}{\) reentrant}; } printf STDERR "Fixed reentrant function: '%s'\n",$funcName; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2010-01-30 21:52:45
|
Revision: 1106 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1106&view=rev Author: qzban Date: 2010-01-30 21:52:17 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Mangle script update Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:21:32 UTC (rev 1105) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:52:17 UTC (rev 1106) @@ -172,10 +172,9 @@ } print STDERR "Reentrant stop\n"; - if (open (RFILE, ">$reentFile")) { foreach my $fn (@reentrantFunctions) {print RFILE "$fn\n";} - close RFILE; + # close RFILE; } @@ -400,7 +399,7 @@ foreach my $reentrantFunc (@reentrantFunctions) { my $funcName = quotemeta($reentrantFunc); # Match a functioname (that is not a substring - if (m{[\s^\*]$funcName\s*\(}gi) { + if (m{[\/\s^\*]$funcName\s*\(}gi) { # Check that this is a one-line definition if ( tr/\(// != tr/\)// ) { # Paranthesis levels do not match. Wait for ")". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2010-01-30 21:21:59
|
Revision: 1105 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1105&view=rev Author: qzban Date: 2010-01-30 21:21:32 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Added a correct help message... Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/baud.extra Modified: trunk/diku/mcs51/support/make/mcs51/baud.extra =================================================================== --- trunk/diku/mcs51/support/make/mcs51/baud.extra 2010-01-30 21:15:33 UTC (rev 1104) +++ trunk/diku/mcs51/support/make/mcs51/baud.extra 2010-01-30 21:21:32 UTC (rev 1105) @@ -18,6 +18,6 @@ BUILD_DEPS += baud_check .PHONY: baud_check baud_check: - @env CHK=`echo $(BAUD) | egrep "B[[:digit:]]+"` /bin/bash -c 'if test -z $$CHK; then echo "Use syntax B2400 for baud rate"; false; fi;' + @env CHK=`echo $(BAUD) | egrep "B[[:digit:]]+"` /bin/bash -c 'if test -z $$CHK; then echo "Use syntax baud,B2400 for baud rate"; false; fi;' PFLAGS += -DDEFAULT_BAUDRATE=$(BAUD) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2010-01-30 21:15:40
|
Revision: 1104 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1104&view=rev Author: mleopold Date: 2010-01-30 21:15:33 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Mangle script not handles reentrant even after CIL Modified Paths: -------------- trunk/diku/mcs51/doc/ChangeLog trunk/diku/mcs51/support/make/mcs51/inline.extra trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/tiny15four/support/make/tiny15four.extra Removed Paths: ------------- trunk/diku/mcs51/tos/platforms/cc2430em/PlatformStdOutC.nc Property Changed: ---------------- trunk/diku/tiny15four/apps/debugConsoleTest/ Modified: trunk/diku/mcs51/doc/ChangeLog =================================================================== --- trunk/diku/mcs51/doc/ChangeLog 2010-01-30 21:13:40 UTC (rev 1103) +++ trunk/diku/mcs51/doc/ChangeLog 2010-01-30 21:15:33 UTC (rev 1104) @@ -71,9 +71,11 @@ - Runtime configurable clock (for low-power modes) Sleep modes - Hvad g\xF8r TinyOS - UartC (kompatibilitet m. TEP113) SerialByteComm, SerialFlush - Serial Stack: eksisterende kode afhænger af den != UartC - PlatformSerialC: UartStream, UartByte, ... + UartC and PlatformSerial for all chips and platforms + Comptibile with printf and TOS codebase + PlatformSerialC: UartStream, UartByte, ... + Comptatibe with TEP113 and TEP117: + UartC: UartByteStream, SerialByteComm, SerialFlush SDCC virkende for simple programmer Move Jan debug libraries to common Jan: Reentrant problem: @@ -81,8 +83,18 @@ * L\xF8sn 1: Alle er reentrant * L\xF8ns 2: Marker hver for sig => TOS "mellem funtioner" virker ikke => Hvad med CIL? - Til n\xE6ste gang: CIL, IAR, + NesC async l\xF8sning: + Seperat output fil giver problemer med CIL omskrivninger + Output direkte i app.c => CIL videref\xF8rer attributes + + Til n\xE6ste gang: CIL, IAR, + TOSSIM Tiny4 timer model (missing: radio) + +Krav til release: + UART + printf + CIL + attribute((reentrant)) + 0.2 Timer precision as advertized SimpleMac idle-power-consumption problem Modified: trunk/diku/mcs51/support/make/mcs51/inline.extra =================================================================== --- trunk/diku/mcs51/support/make/mcs51/inline.extra 2010-01-30 21:13:40 UTC (rev 1103) +++ trunk/diku/mcs51/support/make/mcs51/inline.extra 2010-01-30 21:15:33 UTC (rev 1104) @@ -5,7 +5,7 @@ INLINE_FLAGS = --8051 --auto --clean --shorten endif -HOST_SWITCH=`uname -s | tr "[:upper:]" "[:lower:]" ` +HOST_SWITCH=$(shell uname -s | tr "[:upper:]" "[:lower:]") .PHONY: inline inline_target: ncc Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:13:40 UTC (rev 1103) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2010-01-30 21:15:33 UTC (rev 1104) @@ -98,6 +98,23 @@ @input = <FILE>; # +# CIL has a very annoying habbit of inserting newlines and " " after , +# + +my $prevLine = ""; +my @pass = (); +foreach(@input) { + if (s{,\n\s*}{, }g) { + $prevLine = $prevLine . $_; + } else { + s{^\s+}{}g; + push (@pass,($prevLine . $_)); + $prevLine = ""; + } +} +@input = @pass; + +# # Reentrant functions # @@ -131,14 +148,15 @@ # First pass of source: find all functions marked as reentrant foreach (@input) { - if (/([^\s]+?)\(.*?\).*?\s+__attribute(?:__)?\(\(.*?(?:__)?reentrant(?:__)?.*\)\).*?\;/g) { - my $func = $1; - $func =~ s/\$/__/g; - chomp ($func); - push(@reentrantFunctions, "$func"); - printf STDERR "Found reentrant function: '%s'\n",$func; + if (/([\w_\$]+)\([\w\s,\*]+\)\s+__attribute(?:__)?\(\(.*?(?:__)?reentrant(?:__)?.*\)\)\s*;/) { + my $func = $1; + $func =~ s/\$/__/g; + chomp ($func); + push(@reentrantFunctions, "$func"); + printf STDERR "Found reentrant function: '%s'\n",$func; } } + # Eliminate duplicates @reentrantFunctions = map ( lc, @reentrantFunctions); my @new_array = (); @@ -148,11 +166,11 @@ } @reentrantFunctions = @new_array; -print STDERR "Rentrant\n"; +print STDERR "Rentrant functions:\n"; foreach my $ln (@reentrantFunctions) { print STDERR "$ln\n"; } -print STDERR "Rentrant slut\n"; +print STDERR "Reentrant stop\n"; if (open (RFILE, ">$reentFile")) { @@ -365,22 +383,35 @@ # Handle reentrant functions # - if($KEIL && ! m{/\*(?:.*?)\;\*/}) { - s{(.*)__attribute\(\((reentrant)\)\)([^\;\n]*)}{$1$3 __attribute__((__$2__))}; - s{(.*)__attribute(?:__)?\(\((.*?)(?:__)?reentrant(?:__)?,?(.*)\)\)(.*)}{$1reentrant __attribute__(($2$3))$4}; - } - + # We do a relatively complicated match. Any attributes will be commented out later + # here we only mark function as reentrant and move on - the annotation is removed + # elsewhere. This is in part because of the way that CIL handles attributes. + # + # CIL seems to think that __attributes are part of the return type + # and copies them to the front of the expression and propagates the + # reentrant attributes and other undesired places + # + + if ($KEIL) { - # Append the "reentrant" keyword to function prototypes as well. - if (!$braceLevel && !m{reentrant}g) { + # Append the "reentrant" keyword to function prototypes and function + # definitions + if (!$braceLevel){ foreach my $reentrantFunc (@reentrantFunctions) { my $funcName = quotemeta($reentrantFunc); - if (m{$funcName\s*\(}gi) { - if (tr/\(// != tr/\)//) { + # Match a functioname (that is not a substring + if (m{[\s^\*]$funcName\s*\(}gi) { + # Check that this is a one-line definition + if ( tr/\(// != tr/\)// ) { # Paranthesis levels do not match. Wait for ")". + # We are not at the end of the line (; not found) $reentrantWait = 1; } else { - if (!s{([^\;\{]+)}{$1 reentrant}) { + # Put reentrant definition: + # 1. before ; or before { + # 2. after ) + if (!s{([^;\{]+)}{$1 reentrant}) { + $_ = "zzz" . $_; s{\)}{\) reentrant}; } printf STDERR "Fixed reentrant function: '%s'\n",$funcName; @@ -388,10 +419,9 @@ } # $i++; } - } + } - if ($reentrantWait && m{\)}) { - print STDERR "WAIT\n"; + if (!$braceLevel && $reentrantWait && m{\)}) { s{\)}{\) reentrant}; $reentrantWait = 0; } @@ -426,13 +456,14 @@ # # First check if the line has been uncommmented sinces comments in comments # are a nono... + # Removes any attributes including empty ones # Remove empty attributes (a leftover from reentrant and interrupt handling). - s{(__attribute(?:__)?\s*\(\(.*\)\))}{}g; + s{(__attribute(?:__)?\s*\(\(\)\))}{}g; if (! (m{^.*/\*} || # /* style comment m{^.*//})){ # // style comment - s{(__attribute(?:__)?\s*\(\(.*?\)\))}{/*$1*/}g; + s{(__attribute(?:__)?\s*\(\([,\w_\s]*\)\))}{/*$1*/}g; } # @@ -550,7 +581,7 @@ if($IAR) { s/(?!x)(.)data/$1atad/g; } else { - s/(?!x)(.)data/$1_data/g; + s/data/_data/g; } } $memory_att_match=0; # One line at a time... Deleted: trunk/diku/mcs51/tos/platforms/cc2430em/PlatformStdOutC.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/cc2430em/PlatformStdOutC.nc 2010-01-30 21:13:40 UTC (rev 1103) +++ trunk/diku/mcs51/tos/platforms/cc2430em/PlatformStdOutC.nc 2010-01-30 21:15:33 UTC (rev 1104) @@ -1,50 +0,0 @@ - -/* - * Copyright (c) 2007 University of Copenhagen - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - Neither the name of University of Copenhagen nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY - * OF COPENHAGEN OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/** - * - * @author Marcus Chang <ma...@di...> - */ - -configuration PlatformStdOutC { - - provides interface SerialByteComm; - -} - -implementation { - - components MainC, HalCC2430SimpleUartC; - MainC.SoftwareInit -> HalCC2430SimpleUartC; - - SerialByteComm = HalCC2430SimpleUartC; - -} Property changes on: trunk/diku/tiny15four/apps/debugConsoleTest ___________________________________________________________________ Added: svn:ignore + build Modified: trunk/diku/tiny15four/support/make/tiny15four.extra =================================================================== --- trunk/diku/tiny15four/support/make/tiny15four.extra 2010-01-30 21:13:40 UTC (rev 1103) +++ trunk/diku/tiny15four/support/make/tiny15four.extra 2010-01-30 21:15:33 UTC (rev 1104) @@ -32,7 +32,7 @@ TINY15FOUR_DIR := $(realpath $(dir $(filter %tiny15four.extra,$(MAKEFILE_LIST)))../../) endif -NESC_FLAGS=-Wnesc-data-race -Wnesc-async -Wno-nesc-fnptr -Wnesc-combine +NESC_FLAGS += -Wnesc-data-race -Wnesc-async -Wno-nesc-fnptr -Wnesc-combine # Using SDCC for the 8051 platform requires additional arguements # to disable the wird "runtime stack" and a wierd local variable location This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2010-01-30 21:13:47
|
Revision: 1103 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1103&view=rev Author: mleopold Date: 2010-01-30 21:13:40 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Remove buid directory Removed Paths: ------------- trunk/diku/tiny15four/apps/debugConsoleTest/build/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2010-01-30 20:37:30
|
Revision: 1102 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1102&view=rev Author: qzban Date: 2010-01-30 20:36:57 +0000 (Sat, 30 Jan 2010) Log Message: ----------- Tiny15Four TOSSIM simulator changes Modified Paths: -------------- trunk/diku/tiny15four/tos/chips/cc2430/phy/cc2430CspHandlerP.nc trunk/diku/tiny15four/tos/chips/cc2430/phy/cc2430PhyTransmitP.nc trunk/diku/tiny15four/tos/interfaces/debug/CommandInterpreter.nc trunk/diku/tiny15four/tos/lib/debug/CommandInterpreterP.nc trunk/diku/tiny15four/tos/lib/mac/MacAddressM.nc trunk/diku/tiny15four/tos/lib/tools/endianconv.h trunk/diku/tiny15four/tos/platforms/nano/CC2430ClockConfig.h Added Paths: ----------- trunk/diku/tiny15four/apps/debugConsoleTest/ trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestC.nc trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestP.nc trunk/diku/tiny15four/apps/debugConsoleTest/Makefile trunk/diku/tiny15four/apps/debugConsoleTest/build/ trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/ trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/EDOUT trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/OUTPUT trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.asm trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.c trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.c.gz trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.exe trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.map trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.pre trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.s19 trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/compile.tar.gz trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/http_headers trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/memusage.txt trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/ trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/APP trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/APP.SBR trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/CC2430-F128-TINY15FOUR.bat trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/DebugConsoleTestC.s trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.c trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.hex trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.lst trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.map trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.preMangle.c trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/app.reg trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/startup.LST trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/startup.a51 trunk/diku/tiny15four/apps/debugConsoleTest/build/nano/startup.bat trunk/diku/tiny15four/apps/timerTest/TimerTestP.nc trunk/diku/tiny15four/support/make/t15fSim.target trunk/diku/tiny15four/tos/lib/debug/CommandInterpreterTossimP.nc trunk/diku/tiny15four/tos/lib/debug/DebugTossimC.nc trunk/diku/tiny15four/tos/lib/debug/DebugTossimP.nc trunk/diku/tiny15four/tos/platforms/t15fSim/ trunk/diku/tiny15four/tos/platforms/t15fSim/.platform trunk/diku/tiny15four/tos/platforms/t15fSim/sim/ trunk/diku/tiny15four/tos/platforms/t15fSim/sim/.platform trunk/diku/tiny15four/tos/platforms/t15fSim/sim/DebugC.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/HPLTimerP.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/PlatformInitC.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/RadioChannelP.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/SimTime.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/SimpleRadioP.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/Tiny15FourPhyC.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/Tiny15FourTimerC.nc trunk/diku/tiny15four/tos/platforms/t15fSim/sim/simRadioSpecs.h Removed Paths: ------------- trunk/diku/tiny15four/apps/timerTest/TimerTestP.nc Property Changed: ---------------- trunk/diku/tiny15four/apps/consoleTest/ trunk/diku/tiny15four/apps/timerTest/ Property changes on: trunk/diku/tiny15four/apps/consoleTest ___________________________________________________________________ Added: svn:ignore + simbuild build app.xml _TOSSIMmodule.so TOSSIM.py TOSSIM.pyc Added: trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestC.nc =================================================================== --- trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestC.nc (rev 0) +++ trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestC.nc 2010-01-30 20:36:57 UTC (rev 1102) @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2009, Jan Flora <jan...@di...> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the University of Copenhagen nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @author Jan Flora <jan...@di...> + */ + +configuration DebugConsoleTestC +{ +} +implementation +{ + components MainC, + DebugC, + PlatformInitC, + DebugConsoleTestP; + + DebugConsoleTestP.Boot -> MainC.Boot; + DebugConsoleTestP.Debug -> DebugC.Debug; + DebugConsoleTestP.CommandInterpreter -> DebugC.CommandInterpreter; + + MainC.SoftwareInit -> PlatformInitC.Init; + MainC.SoftwareInit -> DebugConsoleTestP.Init; +} \ No newline at end of file Added: trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestP.nc =================================================================== --- trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestP.nc (rev 0) +++ trunk/diku/tiny15four/apps/debugConsoleTest/DebugConsoleTestP.nc 2010-01-30 20:36:57 UTC (rev 1102) @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2009, Jan Flora <jan...@di...> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the University of Copenhagen nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @author Jan Flora <jan...@di...> + */ + +module DebugConsoleTestP +{ + provides + { + interface Init; + } + uses + { + interface Boot; + + // Debugging + interface Debug; + interface CommandInterpreter; + } +} +implementation +{ + #define DBG_LEVEL 1 + #include "Debug.h" + + // Forward declaration. + void test1(); + void test2(); + + command error_t Init.init() + { + call CommandInterpreter.addCommand("test1", test1); + call CommandInterpreter.addCommand("test2", test2); + + return SUCCESS; + } + + event void Boot.booted() + { + DBG_STR("Booted DebugConsoleTest...",1); + + call CommandInterpreter.setPrompt("\r\n[Debug Console Test]> "); + } + + void test1() + { + DBG_STR("Executing Debug Console Test 1",1); + DBG_STR("Test line 1...",1); + DBG_STR("Test line 2...",1); + DBG_STR("Test line 3...",1); + DBG_STR("Test line 4...",1); + + call CommandInterpreter.prompt(); + } + + void test2() + { + DBG_STR("Executing Debug Console Test 2",1); + DBG_STR("Test line 1...",1); + DBG_STR("Test line 2...",1); + DBG_STR("Test line 3...",1); + DBG_STR("Test line 4...",1); + + call CommandInterpreter.prompt(); + } +} \ No newline at end of file Added: trunk/diku/tiny15four/apps/debugConsoleTest/Makefile =================================================================== --- trunk/diku/tiny15four/apps/debugConsoleTest/Makefile (rev 0) +++ trunk/diku/tiny15four/apps/debugConsoleTest/Makefile 2010-01-30 20:36:57 UTC (rev 1102) @@ -0,0 +1,2 @@ +COMPONENT=DebugConsoleTestC +include $(MAKERULES) Added: trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/OUTPUT =================================================================== --- trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/OUTPUT (rev 0) +++ trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/OUTPUT 2010-01-30 20:36:57 UTC (rev 1102) @@ -0,0 +1,200 @@ +"c:/Program Files/Metrowerks/CW08 V3.1/"/prog/chc08.exe -TE4uE -F2 -Lp -Cs08 -Ont=a -Oi=c0 -Lasm=%n.asm -Ll=memusage.txt -Lasmc=h -OnB=b -NoBeep -WStdoutOn -WOutFileOff -IC:/cygwin/home/tinyos/contrib/diku/evb13192/tos/platform/hcs08/ app.c +app.c +Command Line: '-TE4uE -F2 -Lp -Cs08 -Ont=a -Oi=c0 -Lasm=%n.asm -Ll=memusage.txt -Lasmc=h -OnB=b -NoBeep -WStdoutOn -WOutFileOff -IC:/cygwin/home/tinyos/contrib/diku/evb13192/tos/platform/hcs08/ app.c' +C:\cygwin\tmp\compilehost-bkdCK22098\app.c + C:/cygwin/home/tinyos/contrib/diku/evb13192/tos/platform/hcs08\hcs08gt60_interrupts.h +Listing of preprocessing to 'C:\cygwin\tmp\compilehost-bkdCK22098\app.pre' +Option -Lasm: Generating listing file 'C:\cygwin\tmp\compilehost-bkdCK22098\app.asm' +Option -Ll: Writing logfile info to 'C:\cygwin\tmp\compilehost-bkdCK22098\memusage.txt' +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5349): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5355): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5361): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5367): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5373): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5407): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5413): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5419): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5425): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5431): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5542): WARNING C2705: Possible loss of data +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5612): WARNING C2705: Possible loss of data +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(5644): WARNING C1404: Return expected +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(6333): WARNING C2705: Possible loss of data +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(6580): INFORMATION C4000: Condition always TRUE +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(6607): INFORMATION C5703: Parameter 'id' declared in function 'SchedulerBasicP__TaskBasic__default__runTask' but not referenced +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(6673): WARNING C5909: Assignment in condition +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(7014): INFORMATION C5703: Parameter 'id' declared in function 'HPLTimerP__Channel__default__fired' but not referenced +C:\cygwin\tmp\compilehost-bkdCK22098\app.c(6580): INFORMATION C4000: Condition always TRUE +Object file: C:\cygwin\tmp\compilehost-bkdCK22098\app.o, format ELF/Dwarf 2.0 +The following function(s) have been inlined: (name, code) + static SchedulerBasicP__Scheduler__init 24 + static RealMainP__Scheduler__init 24 + static HplHcs08GeneralIOP__27__IO__set 3 + static Hcs08GpioC__2__HplGeneralIO__set 3 + static Hcs08GpioC__2__GeneralIO__set 3 + static LedsP__Led2__set 3 + static HplHcs08GeneralIOP__25__IO__set 3 + static Hcs08GpioC__1__HplGeneralIO__set 3 + static Hcs08GpioC__1__GeneralIO__set 3 + static LedsP__Led1__set 3 + static HplHcs08GeneralIOP__24__IO__set 3 + static Hcs08GpioC__0__HplGeneralIO__set 3 + static Hcs08GpioC__0__GeneralIO__set 3 + static LedsP__Led0__set 3 + static HplHcs08GeneralIOP__27__IO__makeOutput 3 + static Hcs08GpioC__2__HplGeneralIO__makeOutput 3 + static Hcs08GpioC__2__GeneralIO__makeOutput 3 + static LedsP__Led2__makeOutput 3 + static HplHcs08GeneralIOP__25__IO__makeOutput 3 + static Hcs08GpioC__1__HplGeneralIO__makeOutput 3 + static Hcs08GpioC__1__GeneralIO__makeOutput 3 + static LedsP__Led1__makeOutput 3 + static HplHcs08GeneralIOP__24__IO__makeOutput 3 + static Hcs08GpioC__0__HplGeneralIO__makeOutput 3 + static Hcs08GpioC__0__GeneralIO__makeOutput 3 + static LedsP__Led0__makeOutput 3 + static LedsP__Init__init 14 + static Hcs08ClockP__Hcs08ClockInit__defaultInitTimer2 11 + static PlatformP__Hcs08ClockInit__defaultInitTimer2 11 + static PlatformP__Hcs08ClockInit__initTimer2 11 + static Hcs08ClockP__Hcs08ClockInit__initTimer2 11 + static Hcs08ClockP__Hcs08ClockInit__defaultInitTimer1 1 + static PlatformP__Hcs08ClockInit__defaultInitTimer1 1 + static PlatformP__Hcs08ClockInit__initTimer1 1 + static Hcs08ClockP__Hcs08ClockInit__initTimer1 1 + static PlatformP__Hcs08ClockInit__initClocks 6 + static Hcs08ClockP__Hcs08ClockInit__initClocks 6 + static Hcs08ClockP__Init__init 27 + static PlatformP__Init__init 8 + static RealMainP__Scheduler__runNextTask 3 + static ecombine 13 + static DebugConsoleTestP__CommandInterpreter__prompt 3 + static DebugConsoleTestP__Debug__debugStr 3 + static CommandInterpreterP__Interpreter__addCommand 44 + static DebugConsoleTestP__CommandInterpreter__addCommand 58 + static DebugConsoleTestP__Init__init 106 + static HPLTimerP__Init__init 20 + static McuSleepC__McuPowerState__update 6 + static Hcs08SerialByteCommP__0__McuPowerState__update 6 + static HplHcs08UartP__0__Uart__enableRxIntr 4 + static HplHcs08UartP__0__Uart__enable 6 + static HplHcs08UartP__0__Uart__setBaudrate 30 + static Hcs08SerialByteCommP__0__StdControl__start 26 + static UartControlP__Init__init 3 + static enterFEEMode 167 + static ClockSetupP__Init__init 101 + static HplSpiP__StdControl__start 20 + static FIFOQueueM__0__FIFOQueue__initQueue 28 + static BufferedUartP__Init__init 17 + static TOSH_PULLUP_RADIO_RESET_DISABLE 3 + static TOSH_MAKE_RADIO_CE_OUTPUT 3 + static TOSH_MAKE_RADIO_ATTN_OUTPUT 3 + static TOSH_MAKE_RADIO_RXTXEN_OUTPUT 3 + static TOSH_MAKE_RADIO_RESET_OUTPUT 3 + static TOSH_MAKE_RADIO_OOI_INPUT 3 + static TOSH_PULLUP_RADIO_OOI_ENABLE 3 + static TOSH_MAKE_RADIO_CRC_INPUT 3 + static TOSH_PULLUP_RADIO_CRC_ENABLE 3 + static TOSH_MAKE_RADIO_ANT_CTRL_OUTPUT 3 + static TOSH_MAKE_RADIO_LNA_CTRL_OUTPUT 3 + static TOSH_SET_RADIO_ATTN_PIN 3 + static TOSH_CLR_RADIO_RXTXEN_PIN 3 + static TOSH_CLR_RADIO_RESET_PIN 3 + static TOSH_CLR_RADIO_ANT_CTRL_PIN 3 + static TOSH_CLR_RADIO_LNA_CTRL_PIN 3 + static TOSH_SET_RADIO_RESET_PIN 3 + static mc13192RadioInitM__bootup 56 + static TOSH_SET_RADIO_CE_PIN 3 + static HplSpiP__SPI__fastReadWord 36 + static mc13192RadioInitM__SPI__fastReadWord 39 + static HplSpiP__SPI__fastWriteByte 14 + static mc13192RadioInitM__SPI__fastWriteByte 18 + static TOSH_CLR_RADIO_CE_PIN 3 + static mc13192RadioInitM__readRegisterFast 73 + static mc13192RadioInitM__initialize 108 + static HplSpiP__SPI__fastWriteWord 28 + static mc13192RadioInitM__SPI__fastWriteWord 34 + static mc13192RadioInitM__writeRegisterFast 64 + static DebugConsoleP__ConsoleOut__print 3 + static FIFOQueueM__0__FIFOQueue__enqueue 85 + static BufferedUartP__BufferedUart__send 12 + static FIFOQueueM__0__FIFOQueue__peek 60 + static HplHcs08UartP__0__Uart__tx 12 + static Hcs08SerialByteCommP__0__SerialByteComm__put 3 + static BufferedUartP__Uart__put 3 + static FIFOQueueM__0__FIFOQueue__dequeue 97 + static ConsoleP__McuSleep__sleep 3 + static McuSleepC__McuPowerOverride__default__lowestState 3 + static McuSleepC__McuPowerOverride__lowestState 3 + static McuSleepC__getPowerState 47 + static mcombine 9 + static McuSleepC__setStopMode 43 + static HplHcs08GeneralIOP__24__IO__toggle 14 + static Hcs08GpioC__0__HplGeneralIO__toggle 14 + static Hcs08GpioC__0__GeneralIO__toggle 14 + static LedsP__Led0__toggle 14 + static LedsP__Leds__led0Toggle 14 + static ConsoleP__Leds__led0Toggle 14 + static ConsoleP__ConsoleOut__printHex 46 + static CommandInterpreterP__Interpreter__setPrompt 4 + static DebugConsoleTestP__CommandInterpreter__setPrompt 4 + static DebugConsoleTestP__Boot__booted 15 + static RealMainP__Boot__booted 15 + static PlatformP__nullTask__runTask 1 + static SchedulerBasicP__TaskBasic__default__runTask 1 + static SchedulerBasicP__McuSleep__sleep 3 + static SchedulerBasicP__popTask 35 + static RealMainP__Scheduler__taskLoop 3 + static Hcs08UartInterruptsP__SCI1TX__default__fired 1 + static Hcs08UartInterruptsP__SCI1TX__fired 1 + static Hcs08UartInterruptsP__SCI1RX__default__fired 1 + static Hcs08UartInterruptsP__SCI1RX__fired 1 + static Hcs08UartInterruptsP__SCI1ERR__default__fired 1 + static Hcs08UartInterruptsP__SCI1ERR__fired 1 + static Hcs08SerialByteCommP__0__HplUart__txComplete 1 + static BufferedUartP__Uart__putDone 3 + static Hcs08SerialByteCommP__0__SerialByteComm__putDone 3 + static Hcs08SerialByteCommP__0__HplUart__txDone 3 + static HplHcs08UartP__0__Uart__txDone 3 + static HplHcs08UartP__0__TX__fired 17 + static Hcs08UartInterruptsP__SCI2TX__fired 17 + static CommandInterpreterP__Output__print 3 + static CommandInterpreterP__strcmp 60 + static ConsoleP__ConsoleIn__get 3 + static ConsoleP__Uart__get 3 + static BufferedUartP__BufferedUart__get 3 + static BufferedUartP__Uart__get 71 + static Hcs08SerialByteCommP__0__HplUart__rxDone 3 + static HplHcs08UartP__0__Uart__rxDone 3 + static HplHcs08UartP__0__RX__fired 9 + static Hcs08UartInterruptsP__SCI2RX__fired 9 + static Hcs08UartInterruptsP__SCI2ERR__default__fired 1 + static Hcs08UartInterruptsP__SCI2ERR__fired 1 + static HPLTimerP__Counter__default__wrap 1 + static HPLTimerP__Counter__wrap 1 + static HPLTimerP__Channel__default__fired 1 + static HPLTimerP__Channel__fired 1 + static hcs08_disable_interrupt 2 + static getCCR 8 + static hcs08_enable_interrupt 2 + static __nesc_atomic_end 6 +Code Size: 2290 (without inlined functions) +Global objects: 260, Data Size (RAM): 344, Const Data Size (ROM): 24, String Size: 341 +HC08 Compiler: *** 0 error(s), 5 warning(s), 14 information message(s) *** +HC08 Compiler: *** Processing ok *** +DEFAULTDIR=. TEXTPATH=. "c:/Program Files/Metrowerks/CW08 V3.1/"/prog/Linker.exe -NoBeep -WStdoutOn -WOutFileOff \ + -O./app.exe -Addapp.o -Addc:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/start08s.o -Addc:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/ansiis.lib C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERA~2.PRM +C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERA~2.PRM +Command Line: '-NoBeep -WStdoutOn -WOutFileOff -O./app.exe -Addapp.o -Addc:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/start08s.o -Addc:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/ansiis.lib C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERA~2.PRM' +Linking C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERA~2.PRM +Reading file 'C:\cygwin\tmp\compilehost-bkdCK22098\app.o' +Reading file 'c:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/start08s.o' +Reading file 'c:/PROGRA~1/METROW~1/CW08V3~1.1/lib/hc08c/lib/ansiis.lib' +Generating Symbol table +Generating DWARF data version 2.0 +Code Size: 3299 +Generating MAP file '.\app.map' +SmartLinker: *** 0 error(s), 0 warning(s), 0 information message(s) *** +SmartLinker: *** Processing ok *** +BurnIn=app.exe BurnOut=app.s19 "c:/Program Files/Metrowerks/CW08 V3.1/"/prog/Burner.exe -NoBeep -WStdoutOn -WOutFileOff -f C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERI~1.BBL +Command Line: '-NoBeep -WStdoutOn -WOutFileOff -f C:/cygwin/home/tinyos/contrib/diku/evb13192/lib/GENERI~1.BBL' Added: trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.asm =================================================================== --- trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.asm (rev 0) +++ trunk/diku/tiny15four/apps/debugConsoleTest/build/dig528/app.asm 2010-01-30 20:36:57 UTC (rev 1102) @@ -0,0 +1,9872 @@ +ANSI-C/cC++ Compiler for HC08 V-5.0.19 (beta 0) Build 4210, Jul 29 2004 + + 1: #define MANGLED_NESC_APP_C + 2: #pragma MESSAGE DISABLE C1106 // disable bitfield warnings + 3: #pragma MESSAGE DISABLE C1420 // Result of function-call is ignored + 4: #pragma MESSAGE DISABLE C4002 // Result not used + 5: #pragma MESSAGE DISABLE C4301 // Inline expansion done for function call + 6: #include "hcs08gt60_interrupts.h" + 7: #define nx_struct struct + 8: #define nx_union union + 9: //# 8 "/usr/local/lib/ncc/deputy_nodeputy.h" + 10: struct __nesc_attr_nonnull { + 11: int foo; }; + 12: //#line 9 + 13: struct __nesc_attr_bnd { + 14: //#line 9 + 15: void *lo, *hi; + 16: } ; + 17: //#line 10 + 18: struct __nesc_attr_bnd_nok { + 19: //#line 10 + 20: void *lo, *hi; + 21: } ; + 22: //#line 11 + 23: struct __nesc_attr_count { + 24: //#line 11 + 25: int n; + 26: } ; + 27: //#line 12 + 28: struct __nesc_attr_count_nok { + 29: //#line 12 + 30: int n; + 31: } ; + 32: //#line 13 + 33: struct __nesc_attr_one { + 34: int foo; }; + 35: //#line 14 + 36: struct __nesc_attr_one_nok { + 37: int foo; }; + 38: //#line 15 + 39: struct __nesc_attr_dmemset { + 40: //#line 15 + 41: int a1, a2, a3; + 42: } ; + 43: //#line 16 + 44: struct __nesc_attr_dmemcpy { + 45: //#line 16 + 46: int a1, a2, a3; + 47: } ; + 48: //#line 17 + 49: struct __nesc_attr_nts { + 50: int foo; }; + 51: //# 13 "/Volumes/Data/Documents/tinyos/diku/freescale/tos/platforms/dig528/include/inttypes.h" + 52: typedef unsigned char uint8_t; + 53: + 54: + 55: + 56: + 57: + 58: typedef signed char int8_t; + 59: + 60: + 61: + 62: + 63: + 64: typedef unsigned short uint16_t; + 65: + 66: + 67: + 68: + 69: + 70: typedef signed short int16_t; + 71: + 72: + 73: + 74: typedef unsigned int size_t; + 75: + 76: + 77: + 78: + 79: + 80: typedef unsigned long uint32_t; + 81: + 82: + 83: + 84: + 85: + 86: typedef signed long int32_t; + 87: + 88: + 89: + 90: + 91: + 92: typedef unsigned long long uint64_t; + 93: + 94: + 95: + 96: + 97: + 98: typedef signed long long int64_t; + 99: //# 385 "/usr/local/lib/ncc/nesc_nx.h" + 100: typedef struct { unsigned char data[1]; } /*__attribute__((packed))*/ nx_int8_t;typedef int8_t __nesc_nxbase_nx_int8_t ; + 101: typedef struct { unsigned char data[2]; } /*__attribute__((packed))*/ nx_int16_t;typedef int16_t __nesc_nxbase_nx_int16_t ; + 102: typedef struct { unsigned char data[4]; } /*__attribute__((packed))*/ nx_int32_t;typedef int32_t __nesc_nxbase_nx_int32_t ; + 103: typedef struct { unsigned char data[8]; } /*__attribute__((packed))*/ nx_int64_t;typedef int64_t __nesc_nxbase_nx_int64_t ; + 104: typedef struct { unsigned char data[1]; } /*__attribute__((packed))*/ nx_uint8_t;typedef uint8_t __nesc_nxbase_nx_uint8_t ; + 105: typedef struct { unsigned char data[2]; } /*__attribute__((packed))*/ nx_uint16_t;typedef uint16_t __nesc_nxbase_nx_uint16_t ; + 106: typedef struct { unsigned char data[4]; } /*__attribute__((packed))*/ nx_uint32_t;typedef uint32_t __nesc_nxbase_nx_uint32_t ; + 107: typedef struct { unsigned char data[8]; } /*__attribute__((packed))*/ nx_uint64_t;typedef uint64_t __nesc_nxbase_nx_uint64_t ; + 108: + 109: + 110: typedef struct { unsigned char data[1]; } /*__attribute__((packed))*/ nxle_int8_t;typedef int8_t __nesc_nxbase_nxle_int8_t ; + 111: typedef struct { unsigned char data[2]; } /*__attribute__((packed))*/ nxle_int16_t;typedef int16_t __nesc_nxbase_nxle_int16_t ; + 112: typedef struct { unsigned char data[4]; } /*__attribute__((packed))*/ nxle_int32_t;typedef int32_t __nesc_nxbase_nxle_int32_t ; + 113: typedef struct { unsigned char data[8]; } /*__attribute__((packed))*/ nxle_int64_t;typedef int64_t __nesc_nxbase_nxle_int64_t ; + 114: typedef struct { unsigned char data[1]; } /*__attribute__((packed))*/ nxle_uint8_t;typedef uint8_t __nesc_nxbase_nxle_uint8_t ; + 115: typedef struct { unsigned char data[2]; } /*__attribute__((packed))*/ nxle_uint16_t;typedef uint16_t __nesc_nxbase_nxle_uint16_t ; + 116: typedef struct { unsigned char data[4]; } /*__attribute__((packed))*/ nxle_uint32_t;typedef uint32_t __nesc_nxbase_nxle_uint32_t ; + 117: typedef struct { unsigned char data[8]; } /*__attribute__((packed))*/ nxle_uint64_t;typedef uint64_t __nesc_nxbase_nxle_uint64_t ; + 118: //# 6 "/Volumes/Data/Documents/tinyos/diku/freescale/tos/platforms/dig528/include/stdlib.h" + 119: #pragma INLINE + 120: static /*inline*/ void *memset(void *s, unsigned char c, int n); + 121: //# 23 "/Volumes/Data/Documents/tinyos/tinyos-2.x/tos/system/tos.h" + 122: typedef uint8_t bool; + 123: enum __nesc_unnamed4242 { + 124: //#line 24 + 125: FALSE = 0, TRUE = 1 + 126: }; + 127: typedef nx_int8_t nx_bool; + 128: + 129: + 130: + 131: + 132: + 133: + 134: + 135: struct __nesc_attr_atmostonce { + 136: int foo; }; + 137: //#line 35 + 138: struct __nesc_attr_atleastonce { + 139: int foo; }; + 140: //#line 36 + 141: struct __nesc_attr_exactlyonce { + 142: int foo; }; + 143: //# 40 "/Volumes/Data/Documents/tinyos/tinyos-2.x/tos/types/TinyError.h" + 144: enum __nesc_unnamed4243 { + 145: SUCCESS = 0, + 146: FAIL = 1, + 147: ESIZE = 2, + 148: ECANCEL = 3, + 149: EOFF = 4, + 150: EBUSY = 5, + 151: EINVAL = 6, + 152: ERETRY = 7, + 153: ERESERVE = 8, + 154: EALREADY = 9, + 155: ENOMEM = 10, + 156: ENOACK = 11, + 157: ELAST = 11 + 158: }; + 159: + 160: typedef uint8_t error_t ; + 161: + 162: #pragma INLINE + 163: static /*inline*/ error_t ecombine(error_t r1, error_t r2) ; + 164: //# 60 "/Volumes/Data/Documents/tinyos/diku/freescale/tos/chips/hcs08/hcs08gt60_interrupts.h" + 165: #pragma INLINE + 166: static /*inline*/ void hcs08_disable_interrupt(); + 167: + 168: #pragma INLINE + 169: static /*inline*/ void hcs08_enable_interrupt(); + 170: //# 12 "/Volumes/Data/Documents/tinyos/diku/freescale/tos/chips/hcs08/hcs08regs.h" + 171: enum __nesc_unnamed4244 { + 172: //#line 12 + 173: PTAD_Addr = 0x00 + 174: }; + 175: + 176: + 177: + 178: + 179: + 180: + 181: + 182: + 183: + 184: + 185: //#line 14 + 186: typedef struct __nesc_unnamed4245 { + 187: + 188: uint8_t PTAD0 : 1; + 189: uint8_t PTAD1 : 1; + 190: uint8_t PTAD2 : 1; + 191: uint8_t PTAD3 : 1; + 192: uint8_t PTAD4 : 1; + 193: uint8_t PTAD5 : 1; + 194: uint8_t PTAD6 : 1; + 195: uint8_t PTAD7 : 1; + 196: } PTAD_t; + 197: //#line 40 + 198: enum __nesc_unnamed4246 { + 199: //#line 40 + 200: PTAPE_Addr = 0x01 + 201: }; + 202: + 203: + 204: + 205: + 206: + 207: + 208: + 209: + 210: + 211: + 212: //#line 42 + 213: typedef struct __nesc_unnamed4247 { + 214: + 215: uint8_t PTAPE0 : 1; + 216: uint8_t PTAPE1 : 1; + 217: uint8_t PTAPE2 : 1; + 218: uint8_t PTAPE3 : 1; + 219: uint8_t PTAPE4 : 1; + 220: uint8_t PTAPE5 : 1; + 221: uint8_t PTAPE6 : 1; + 222: uint8_t PTAPE7 : 1; + 223: } PTAPE_t; + 224: //#line 68 + 225: enum __nesc_unnamed4248 { + 226: //#line 68 + 227: PTASE_Addr = 0x02 + 228: }; + 229: + 230: + 231: + 232: + 233: + 234: + 235: + 236: + 237: + 238: + 239: //#line 70 + 240: typedef struct __nesc_unnamed4249 { + 241: + 242: uint8_t PTASE0 : 1; + 243: uint8_t PTASE1 : 1; + 244: uint8_t PTASE2 : 1; + 245: uint8_t PTASE3 : 1; + 246: uint8_t PTASE4 : 1; + 247: uint8_t PTASE5 : 1; + 248: uint8_t PTASE6 : 1; + 249: uint8_t PTASE7 : 1; + 250: } PTASE_t; + 251: //#line 96 + 252: enum __nesc_unnamed4250 { + 253: //#line 96 + 254: PTADD_Addr = 0x03 + 255: }; + 256: + 257: + 258: + 259: + 260: + 261: + 262: + 263: + 264: + 265: + 266: //#line 98 + 267: typedef struct __nesc_unnamed4251 { + 268: + 269: uint8_t PTADD0 : 1; + 270: uint8_t PTADD1 : 1; + 271: uint8_t PTADD2 : 1; + 272: uint8_t PTADD3 : 1; + 273: uint8_t PTADD4 : 1; + 274: uint8_t PTADD5 : 1; + 275: uint8_t PTADD6 : 1; + 276: uint8_t PTADD7 : 1; + 277: } PTADD_t; + 278: //#line 124 + 279: enum __nesc_unnamed4252 { + 280: //#line 124 + 281: PTBD_Addr = 0x04 + 282: }; + 283: + 284: + 285: + 286: + 287: + 288: + 289: + 290: + 291: + 292: + 293: //#line 126 + 294: typedef struct __nesc_unnamed4253 { + 295: + 296: uint8_t PTBD0 : 1; + 297: uint8_t PTBD1 : 1; + 298: uint8_t PTBD2 : 1; + 299: uint8_t PTBD3 : 1; + 300: uint8_t PTBD4 : 1; + 301: uint8_t PTBD5 : 1; + 302: uint8_t PTBD6 : 1; + 303: uint8_t PTBD7 : 1; + 304: } PTBD_t; + 305: //#line 152 + 306: enum __nesc_unnamed4254 { + 307: //#line 152 + 308: PTBPE_Addr = 0x05 + 309: }; + 310: + 311: + 312: + 313: + 314: + 315: + 316: + 317: + 318: + 319: + 320: //#line 154 + 321: typedef struct __nesc_unnamed4255 { + 322: + 323: uint8_t PTBPE0 : 1; + 324: uint8_t PTBPE1 : 1; + 325: uint8_t PTBPE2 : 1; + 326: uint8_t PTBPE3 : 1; + 327: uint8_t PTBPE4 : 1; + 328: uint8_t PTBPE5 : 1; + 329: uint8_t PTBPE6 : 1; + 330: uint8_t PTBPE7 : 1; + 331: } PTBPE_t; + 332: //#line 180 + 333: enum __nesc_unnamed4256 { + 334: //#line 180 + 335: PTBSE_Addr = 0x06 + 336: }; + 337: + 338: + 339: + 340: + 341: + 342: + 343: + 344: + 345: + 346: + 347: //#line 182 + 348: typedef struct __nesc_unnamed4257 { + 349: + 350: uint8_t PTBSE0 : 1; + 351: uint8_t PTBSE1 : 1; + 352: uint8_t PTBSE2 : 1; + 353: uint8_t PTBSE3 : 1; + 354: uint8_t PTBSE4 : 1; + 355: uint8_t PTBSE5 : 1; + 356: uint8_t PTBSE6 : 1; + 357: uint8_t PTBSE7 : 1; + 358: } PTBSE_t; + 359: //#line 208 + 360: enum __nesc_unnamed4258 { + 361: //#line 208 + 362: PTBDD_Addr = 0x07 + 363: }; + 364: + 365: + 366: + 367: + 368: + 369: + 370: + 371: + 372: + 373: + 374: //#line 210 + 375: typedef struct __nesc_unnamed4259 { + 376: + 377: uint8_t PTBDD0 : 1; + 378: uint8_t PTBDD1 : 1; + 379: uint8_t PTBDD2 : 1; + 380: uint8_t PTBDD3 : 1; + 381: uint8_t PTBDD4 : 1; + 382: uint8_t PTBDD5 : 1; + 383: uint8_t PTBDD6 : 1; + 384: uint8_t PTBDD7 : 1; + 385: } PTBDD_t; + 386: //#line 236 + 387: enum __nesc_unnamed4260 { + 388: //#line 236 + 389: PTCD_Addr = 0x08 + 390: }; + 391: + 392: + 393: + 394: + 395: + 396: + 397: + 398: + 399: + 400: + 401: //#line 238 + 402: typedef struct __nesc_unnamed4261 { + 403: + 404: uint8_t PTCD0 : 1; + 405: uint8_t PTCD1 : 1; + 406: uint8_t PTCD2 : 1; + 407: uint8_t PTCD3 : 1; + 408: uint8_t PTCD4 : 1; + 409: uint8_t PTCD5 : 1; + 410: uint8_t PTCD6 : 1; + 411: uint8_t PTCD7 : 1; + 412: } PTCD_t; + 413: //#line 264 + 414: enum __nesc_unnamed4262 { + 415: //#line 264 + 416: PTCPE_Addr = 0x09 + 417: }; + 418: + 419: + 420: + 421: + 422: + 423: + 424: + 425: + 426: + 427: + 428: //#line 266 + 429: typedef struct __nesc_unnamed4263 { + 430: + 431: uint8_t PTCPE0 : 1; + 432: uint8_t PTCPE1 : 1; + 433: uint8_t PTCPE2 : 1; + 434: uint8_t PTCPE3 : 1; + 435: uint8_t PTCPE4 : 1; + 436: uint8_t PTCPE5 : 1; + 437: uint8_t PTCPE6 : 1; + 438: uint8_t PTCPE7 : 1; + 439: } PTCPE_t; + 440: //#line 292 + 441: enum __nesc_unnamed4264 { + 442: //#line 292 + 443: PTCSE_Addr = 0x0A + 444: }; + 445: + 446: + 447: + 448: + 449: + 450: + 451: + 452: + 453: + 454: + 455: //#line 294 + 456: typedef struct __nesc_unnamed4265 { + 457: + 458: uint8_t PTCSE0 : 1; + 459: uint8_t PTCSE1 : 1; + 460: uint8_t PTCSE2 : 1; + 461: uint8_t PTCSE3 : 1; + 462: uint8_t PTCSE4 : 1; + 463: uint8_t PTCSE5 : 1; + 464: uint8_t PTCSE6 : 1; + 465: uint8_t PTCSE7 : 1; + 466: } PTCSE_t; + 467: //#line 320 + 468: enum __nesc_unnamed4266 { + 469: //#line 320 + 470: PTCDD_Addr = 0x0B + 471: }; + 472: + 473: + 474: + 475: + 476: + 477: + 478: + 479: + 480: + 481: + 482: //#line 322 + 483: typedef struct __nesc_unnamed4267 { + 484: + 485: uint8_t PTCDD0 : 1; + 486: uint8_t PTCDD1 : 1; + 487: uint8_t PTCDD2 : 1; + 488: uint8_t PTCDD3 : 1; + 489: uint8_t PTCDD4 : 1; + 490: uint8_t PTCDD5 : 1; + 491: uint8_t PTCDD6 : 1; + 492: uint8_t PTCDD7 : 1; + 493: } PTCDD_t; + 494: //#line 348 + 495: enum __nesc_unnamed4268 { + 496: //#line 348 + 497: PTDD_Addr = 0x0C + 498: }; + 499: + 500: + 501: + 502: + 503: + 504: + 505: + 506: + 507: + 508: + 509: //#line 350 + 510: typedef struct __nesc_unnamed4269 { + 511: + 512: uint8_t PTDD0 : 1; + 513: uint8_t PTDD1 : 1; + 514: uint8_t PTDD2 : 1; + 515: uint8_t PTDD3 : 1; + 516: uint8_t PTDD4 : 1; + 517: uint8_t PTDD5 : 1; + 518: uint8_t PTDD6 : 1; + 519: uint8_t PTDD7 : 1; + 520: } PTDD_t; + 521: //#line 376 + 522: enum __nesc_unnamed4270 { + 523: //#line 376 + 524: PTDPE_Addr = 0x0D + 525: }; + 526: + 527: + 528: + 529: + 530: + 531: + 532: + 533: + 534: + 535: + 536: //#line 378 + 537: typedef struct __nesc_unnamed4271 { + 538: + 539: uint8_t PTDPE0 : 1; + 540: uint8_t PTDPE1 : 1; + 541: uint8_t PTDPE2 : 1; + 542: uint8_t PTDPE3 : 1; + 543: uint8_t PTDPE4 : 1; + 544: uint8_t PTDPE5 : 1; + 545: uint8_t PTDPE6 : 1; + 546: uint8_t PTDPE7 : 1; + 547: } PTDPE_t; + 548: //#line 404 + 549: enum __nesc_unnamed4272 { + 550: //#line 404 + 551: PTDSE_Addr = 0x0E + 552: }; + 553: + 554: + 555: + 556: + 557: + 558: + 559: + 560: + 561: + 562: + 563: //#line 406 + 564: typedef struct __nesc_unnamed4273 { + 565: + 566: uint8_t PTDSE0 : 1; + 567: uint8_t PTDSE1 : 1; + 568: uint8_t PTDSE2 : 1; + 569: uint8_t PTDSE3 : 1; + 570: uint8_t PTDSE4 : 1; + 571: uint8_t PTDSE5 : 1; + 572: uint8_t PTDSE6 : 1; + 573: uint8_t PTDSE7 : 1; + 574: } PTDSE_t; + 575: //#line 432 + 576: enum __nesc_unnamed4274 { + 577: //#line 432 + 578: PTDDD_Addr = 0x0F + 579: }; + 580: + 581: + 582: + 583: + 584: + 585: + 586: + 587: + 588: + 589: + 590: //#line 434 + 591: typedef struct __nesc_unnamed4275 { + 592: + 593: uint8_t PTDDD0 : 1; + 594: uint8_t PTDDD1 : 1; + 595: uint8_t PTDDD2 : 1; + 596: uint8_t PTDDD3 : 1; + 597: uint8_t PTDDD4 : 1; + 598: uint8_t PTDDD5 : 1; + 599: uint8_t PTDDD6 : 1; + 600: uint8_t PTDDD7 : 1; + 601: } PTDDD_t; + 602: //#line 460 + 603: enum __nesc_unnamed4276 { + 604: //#line 460 + 605: PTED_Addr = 0x10 + 606: }; + 607: + 608: + 609: + 610: + 611: + 612: + 613: + 614: + 615: + 616: + 617: //#line 462 + 618: typedef struct __nesc_unnamed4277 { + 619: + 620: uint8_t PTED0 : 1; + 621: uint8_t PTED1 : 1; + 622: uint8_t PTED2 : 1; + 623: uint8_t PTED3 : 1; + 624: uint8_t PTED4 : 1; + 625: uint8_t PTED5 : 1; + 626: uint8_t PTED6 : 1; + 627: uint8_t PTED7 : 1; + 628: } PTED_t; + 629: //#line 488 + 630: enum __nesc_unnamed4278 { + 631: //#line 488 + 632: PTEPE_Addr = 0x11 + 633: }; + 634: + 635: + 636: + 637: + 638: + 639: + 640: + 641: + 642: + 643: + 644: //#line 490 + 645: typedef struct __nesc_unnamed4279 { + 646: + 647: uint8_t PTEPE0 : 1; + 648: uint8_t PTEPE1 : 1; + 649: uint8_t PTEPE2 : 1; + 650: uint8_t PTEPE3 : 1; + 651: uint8_t PTEPE4 : 1; + 652: uint8_t PTEPE5 : 1; + 653: uint8_t PTEPE6 : 1; + 654: uint8_t PTEPE7 : 1; + 655: } PTEPE_t; + 656: //#line 516 + 657: enum __nesc_unnamed4280 { + 658: //#line 516 + 659: PTESE_Addr = 0x12 + 660: }; + 661: + 662: + 663: + 664: + 665: + 666: + 667: + 668: + 669: + 670: + 671: //#line 518 + 672: typedef struct __nesc_unnamed4281 { + 673: + 674: uint8_t PTESE0 : 1; + 675: uint8_t PTESE1 : 1; + 676: uint8_t PTESE2 : 1; + 677: uint8_t PTESE3 : 1; + 678: uint8_t PTESE4 : 1; + 679: uint8_t PTESE5 : 1; + 680: uint8_t PTESE6 : 1; + 681: uint8_t PTESE7 : 1; + 682: } PTESE_t; + 683: //#line 544 + 684: enum __nesc_unnamed4282 { + 685: //#line 544 + 686: PTEDD_Addr = 0x13 + 687: }; + 688: + 689: + 690: + 691: + 692: + 693: + 694: + 695: + 696: + 697: + 698: //#line 546 + 699: typedef struct __nesc_unnamed4283 { + 700: + 701: uint8_t PTEDD0 : 1; + 702: uint8_t PTEDD1 : 1; + 703: uint8_t PTEDD2 : 1; + 704: uint8_t PTEDD3 : 1; + 705: uint8_t PTEDD4 : 1; + 706: uint8_t PTEDD5 : 1; + 707: uint8_t PTEDD6 : 1; + 708: uint8_t PTEDD7 : 1; + 709: } PTEDD_t; + 710: //#line 572 + 711: enum __nesc_unnamed4284 { + 712: //#line 572 + 713: IRQSC_Addr = 0x14 + 714: }; + 715: + 716: + 717: + 718: + 719: + 720: + 721: + 722: + 723: + 724: + 725: //#line 574 + 726: typedef struct __nesc_unnamed4285 { + 727: + 728: uint8_t IRQMOD : 1; + 729: uint8_t IRQIE : 1; + 730: uint8_t IRQACK : 1; + 731: uint8_t IRQF : 1; + 732: uint8_t IRQPE : 1; + 733: uint8_t IRQEDG : 1; + 734: uint8_t bit6 : 1; + 735: uint8_t bit7 : 1; + 736: } IRQSC_t; + 737: //#line 598 + 738: enum __nesc_unnamed4286 { + 739: //#line 598 + 740: KBISC_Addr = 0x16 + 741: }; + 742: + 743: + 744: + 745: + 746: + 747: + 748: + 749: + 750: + 751: + 752: //#line 600 + 753: typedef struct __nesc_unnamed4287 { + 754: + 755: uint8_t KBIMOD : 1; + 756: uint8_t KBIE : 1; + 757: uint8_t KBACK : 1; + 758: uint8_t KBF : 1; + 759: uint8_t KBEDG4 : 1; + 760: uint8_t KBEDG5 : 1; + 761: uint8_t KBEDG6 : 1; + 762: uint8_t KBEDG7 : 1; + 763: } KBISC_t; + 764: //#line 626 + 765: enum __nesc_unnamed4288 { + 766: //#line 626 + 767: KBIPE_Addr = 0x17 + 768: }; + 769: + 770: + 771: + 772: + 773: + 774: + 775: + 776: + 777: + 778: + 779: //#line 628 + 780: typedef struct __nesc_unnamed4289 { + 781: + 782: uint8_t KBIPE0 : 1; + 783: uint8_t KBIPE1 : 1; + 784: uint8_t KBIPE2 : 1; + 785: uint8_t KBIPE3 : 1; + 786: uint8_t KBIPE4 : 1; + 787: uint8_t KBIPE5 : 1; + 788: uint8_t KBIPE6 : 1; + 789: uint8_t KBIPE7 : 1; + 790: } KBIPE_t; + 791: //#line 654 + 792: enum __nesc_unnamed4290 { + 793: //#line 654 + 794: SCI1BDH_Addr = 0x18 + 795: }; + 796: + 797: + 798: + 799: + 800: + 801: + 802: + 803: + 804: + 805: + 806: //#line 656 + 807: typedef struct __nesc_unnamed4291 { + 808: + 809: uint8_t SBR8 : 1; + 810: uint8_t SBR9 : 1; + 811: uint8_t SBR10 : 1; + 812: uint8_t SBR11 : 1; + 813: uint8_t SBR12 : 1; + 814: uint8_t bit5 : 1; + 815: uint8_t bit6 : 1; + 816: uint8_t bit7 : 1; + 817: } SCI1BDH_t; + 818: //#line 680 + 819: enum __nesc_unnamed4292 { + 820: //#line 680 + 821: SCI1BDL_Addr = 0x19 + 822: }; + 823: + 824: + 825: + 826: + 827: + 828: + 829: + 830: + 831: + 832: + 833: //#line 682 + 834: typedef struct __nesc_unnamed4293 { + 835: + 836: uint8_t SBR0 : 1; + 837: uint8_t SBR1 : 1; + 838: uint8_t SBR2 : 1; + 839: uint8_t SBR3 : 1; + 840: uint8_t SBR4 : 1; + 841: uint8_t SBR5 : 1; + 842: uint8_t SBR6 : 1; + 843: uint8_t SBR7 : 1; + 844: } SCI1BDL_t; + 845: //#line 708 + 846: enum __nesc_unnamed4294 { + 847: //#line 708 + 848: SCI1C1_Addr = 0x1A + 849: }; + 850: + 851: + 852: + 853: + 854: + 855: + 856: + 857: + 858: + 859: + 860: //#line 710 + 861: typedef struct __nesc_unnamed4295 { + 862: + 863: uint8_t PT : 1; + 864: uint8_t PE : 1; + 865: uint8_t ILT : 1; + 866: uint8_t WAKE : 1; + 867: uint8_t M : 1; + 868: uint8_t RSRC : 1; + 869: uint8_t SCISWAI : 1; + 870: uint8_t LOOPS : 1; + 871: } SCI1C1_t; + 872: //#line 736 + 873: enum __nesc_unnamed4296 { + 874: //#line 736 + 875: SCI1C2_Addr = 0x1B + 876: }; + 877: + 878: + 879: + 880: + 881: + 882: + 883: + 884: + 885: + 886: + 887: //#line 738 + 888: typedef struct __nesc_unnamed4297 { + 889: + 890: uint8_t SBK : 1; + 891: uint8_t RWU : 1; + 892: uint8_t RE : 1; + 893: uint8_t TE : 1; + 894: uint8_t ILIE : 1; + 895: uint8_t RIE : 1; + 896: uint8_t TCIE : 1; + 897: uint8_t TIE : 1; + 898: } SCI1C2_t; + 899: //#line 764 + 900: enum __nesc_unnamed4298 { + 901: //#line 764 + 902: SCI1S1_Addr = 0x1C + 903: }; + 904: + 905: + 906: + 907: + 908: + 909: + 910: + 911: + 912: + 913: + 914: //#line 766 + 915: typedef struct __nesc_unnamed4299 { + 916: + 917: uint8_t PF : 1; + 918: uint8_t FE : 1; + 919: uint8_t NF : 1; + 920: uint8_t OR : 1; + 921: uint8_t IDLE : 1; + 922: uint8_t RDRF : 1; + 923: uint8_t TC : 1; + 924: uint8_t TDRE : 1; + 925: } SCI1S1_t; + 926: //#line 792 + 927: enum __nesc_unnamed4300 { + 928: //#line 792 + 929: SCI1S2_Addr = 0x1D + 930: }; + 931: + 932: + 933: + 934: + 935: + 936: + 937: + 938: + 939: + 940: + 941: //#line 794 + 942: typedef struct __nesc_unnamed4301 { + 943: + 944: uint8_t RAF : 1; + 945: uint8_t bit1 : 1; + 946: uint8_t bit2 : 1; + 947: uint8_t bit3 : 1; + 948: uint8_t bit4 : 1; + 949: uint8_t bit5 : 1; + 950: uint8_t bit6 : 1; + 951: uint8_t bit7 : 1; + 952: } SCI1S2_t; + 953: + 954: + 955: + 956: + 957: + 958: + 959: + 960: + 961: enum __nesc_unnamed4302 { + 962: //#line 813 + 963: SCI1C3_Addr = 0x1E + 964: }; + 965: + 966: + 967: + 968: + 969: + 970: + 971: + 972: + 973: + 974: + 975: //#line 815 + 976: typedef struct __nesc_unnamed4303 { + 977: + 978: uint8_t PEIE : 1; + 979: uint8_t FEIE : 1; + 980: uint8_t NEIE : 1; + 981: uint8_t ORIE : 1; + 982: uint8_t bit4 : 1; + 983: uint8_t TXDIR : 1; + 984: uint8_t T8 : 1; + 985: uint8_t R8 : 1; + 986: } SCI1C3_t; + 987: //#line 840 + 988: enum __nesc_unnamed4304 { + 989: //#line 840 + 990: SCI1D_Addr = 0x1F + 991: }; + 992: + 993: + 994: + 995: + 996: + 997: + 998: + 999: + 1000: + 1001: + 1002: //#line 842 + 1003: typedef struct __nesc_unnamed4305 { + 1004: + 1005: uint8_t bit0 : 1; + 1006: uint8_t bit1 : 1; + 1007: uint8_t bit2 : 1; + 1008: uint8_t bit3 : 1; + 1009: uint8_t bit4 : 1; + 1010: uint8_t bit5 : 1; + 1011: uint8_t bit6 : 1; + 1012: uint8_t bit7 : 1; + 1013: } SCI1D_t; + 1014: + 1015: + 1016: + 1017: + 1018: + 1019: + 1020: + 1021: enum __nesc_unnamed4306 { + 1022: //#line 860 + 1023: SCI2BDH_Addr = 0x20 + 1024: }; + 1025: + 1026: + 1027: + 1028: + 1029: + 1030: + 1031: + 1032: + 1033: + 1034: + 1035: //#line 862 + 1036: typedef struct __nesc_unnamed4307 { + 1037: + 1038: uint8_t SBR8 : 1; + 1039: uint8_t SBR9 : 1; + 1040: uint8_t SBR10 : 1; + 1041: uint8_t SBR11 : 1; + 1042: uint8_t SBR12 : 1; + 1043: uint8_t bit5 : 1; + 1044: uint8_t bit6 : 1; + 1045: uint8_t bit7 : 1; + 1046: } SCI2BDH_t; + 1047: //#line 886 + 1048: enum __nesc_unnamed4308 { + 1049: //#line 886 + 1050: SCI2BDL_Addr = 0x21 + 1051: }; + 1052: + 1053: + 1054: + 1055: + 1056: + 1057: + 1058: + 1059: + 1060: + 1061: + 1062: //#line 888 + 1063: typedef struct __nesc_unnamed4309 { + 1064: + 1065: uint8_t SBR0 : 1; + 1066: uint8_t SBR1 : 1; + 1067: uint8_t SBR2 : 1; + 1068: uint8_t SBR3 : 1; + 1069: uint8_t SBR4 : 1; + 1070: uint8_t SBR5 : 1; + 1071: uint8_t SBR6 : 1; + 1072: uint8_t SBR7 : 1; + 1073: } SCI2BDL_t; + 1074: //#line 914 + 1075: enum __nesc_unnamed4310 { + 1076: //#line 914 + 1077: SCI2C1_Addr = 0x22 + 1078: }; + 1079: + 1080: + 1081: + 1082: + 1083: + 1084: + 1085: + 1086: + 1087: + 1088: + 1089: //#line 916 + 1090: typedef struct __nesc_unnamed4311 { + 1091: + 1092: uint8_t PT : 1; + 1093: uint8_t PE : 1; + 1094: uint8_t ILT : 1; + 1095: uint8_t WAKE : 1; + 1096: uint8_t M : 1; + 1097: uint8_t RSRC : 1; + 1098: uint8_t SCISWAI : 1; + 1099: uint8_t LOOPS : 1; + 1100: } SCI2C1_t; + 1101: //#line 942 + 1102: enum __nesc_unnamed4312 { + 1103: //#line 942 + 1104: SCI2C2_Addr = 0x23 + 1105: }; + 1106: + 1107: + 1108: + 1109: + 1110: + 1111: + 1112: + 1113: + 1114: + 1115: + 1116: //#line 944 + 1117: typedef struct __nesc_unnamed4313 { + 1118: + 1119: uint8_t SBK : 1; + 1120: uint8_t RWU : 1; + 1121: uint8_t RE : 1; + 1122: uint8_t TE : 1; + 1123: uint8_t ILIE : 1; + 1124: uint8_t RIE : 1; + 1125: uint8_t TCIE : 1; + 1126: uint8_t TIE : 1; + 1127: } SCI2C2_t; + 1128: //#line 970 + 1129: enum __nesc_unnamed4314 { + 1130: //#line 970 + 1131: SCI2S1_Addr = 0x24 + 1132: }; + 1133: + 1134: + 1135: + 1136: + 1137: + 1138: + 1139: + 1140: + 1141: + 1142: + 1143: //#line 972 + 1144: typedef struct __nesc_unnamed4315 { + 1145: + 1146: uint8_t PF : 1; + 1147: uint8_t FE : 1; + 1148: uint8_t NF : 1; + 1149: uint8_t OR : 1; + 1150: uint8_t IDLE : 1; + 1151: uint8_t RDRF : 1; + 1152: uint8_t TC : 1; + 1153: uint8_t TDRE : 1; + 1154: } SCI2S1_t; + 1155: //#line 998 + 1156: enum __nesc_unnamed4316 { + 1157: //#line 998 + 1158: SCI2S2_Addr = 0x25 + 1159: }; + 1160: + 1161: + 1162: + 1163: + 1164: + 1165: + 1166: + 1167: + 1168: + 1169: + 1170: //#line 1000 + 1171: typedef struct __nesc_unnamed4317 { + 1172: + 1173: uint8_t RAF : 1; + 1174: uint8_t bit1 : 1; + 1175: uint8_t bit2 : 1; + 1176: uint8_t bit3 : 1; + 1177: uint8_t bit4 : 1; + 1178: uint8_t bit5 : 1; + 1179: uint8_t bit6 : 1; + 1180: uint8_t bit7 : 1; + 1181: } SCI2S2_t; + 1182: + 1183: + 1184: + 1185: + 1186: + 1187: + 1188: + 1189: + 1190: enum __nesc_unnamed4318 { + 1191: //#line 1019 + 1192: SCI2C3_Addr = 0x26 + 1193: }; + 1194: + 1195: + 1196: + 1197: + 1198: + 1199: + 1200: + 1201: + 1202: + 1203: + 1204: //#line 1021 + 1205: typedef struct __nesc_unnamed4319 { + 1206: + 1207: uint8_t PEIE : 1; + 1208: uint8_t FEIE : 1; + 1209: uint8_t NEIE : 1; + 1210: uint8_t ORIE : 1; + 1211: uint8_t bit4 : 1; + 1212: uint8_t TXDIR : 1; + 1213: uint8_t T8 : 1; + 1214: uint8_t R8 : 1; + 1215: } SCI2C3_t; + 1216: //#line 1046 + 1217: enum __nesc_unnamed4320 { + 1218: //#line 1046 + 1219: SCI2D_Addr = 0x27 + 1220: }; + 1221: + 1222: + 1223: + 1224: + 1225: + 1226: + 1227: + 1228: + 1229: + 1230: + 1231: //#line 1048 + 1232: typedef struct __nesc_unnamed4321 { + 1233: + 1234: uint8_t bit0 : 1; + 1235: uint8_t bit1 : 1; + 1236: uint8_t bit2 : 1; + 1237: uint8_t bit3 : 1; + 1238: uint8_t bit4 : 1; + 1239: uint8_t bit5 : 1; + 1240: uint8_t bit6 : 1; + 1241: uint8_t bit7 : 1; + 1242: } SCI2D_t; + 1243: + 1244: + 1245: + 1246: + 1247: + 1248: + 1249: + 1250: enum __nesc_unnamed4322 { + 1251: //#line 1066 + 1252: SPIC1_Addr = 0x28 + 1253: }; + 1254: + 1255: + 1256: + 1257: + 1258: + 1259: + 1260: + 1261: + 1262: + 1263: + 1264: //#line 1068 + 1265: typedef struct __nesc_unnamed4323 { + 1266: + 1267: uint8_t LSBFE : 1; + 1268: uint8_t SSOE : 1; + 1269: uint8_t CPHA : 1; + 1270: uint8_t CPOL : 1; + 1271: uint8_t MSTR : 1; + 1272: uint8_t SPTIE : 1; + 1273: uint8_t SPE : 1; + 1274: uint8_t SPIE : 1; + 1275: } SPIC1_t; + 1276: //#line 1094 + 1277: enum __nesc_unnamed4324 { + 1278: //#line 1094 + 1279: SPIC2_Addr = 0x29 + 1280: }; + 1281: + 1282: + 1283: + 1284: + 1285: + 1286: + 1287: + 1288: + 1289: + 1290: + 1291: //#line 1096 + 1292: typedef struct __nesc_unnamed4325 { + 1293: + 1294: uint8_t SPC0 : 1; + 1295: uint8_t SPISWAI : 1; + 1296: uint8_t bit2 : 1; + 1297: uint8_t BIDIROE : 1; + 1298: uint8_t MODFEN : 1; + 1299: uint8_t bit5 : 1; + 1300: uint8_t bit6 : 1; + 1301: uint8_t bit7 : 1; + 1302: } SPIC2_t; + 1303: //#line 1118 + 1304: enum __nesc_unnamed4326 { + 1305: //#line 1118 + 1306: SPIBR_Addr = 0x2A + 1307: }; + 1308: + 1309: + 1310: + 1311: + 1312: + 1313: + 1314: + 1315: + 1316: + 1317: + 1318: //#line 1120 + 1319: typedef struct __nesc_unnamed4327 { + 1320: + 1321: uint8_t SPR0 : 1; + 1322: uint8_t SPR1 : 1; + 1323: uint8_t SPR2 : 1; + 1324: uint8_t bit3 : 1; + 1325: uint8_t SPPR0 : 1; + 1326: uint8_t SPPR1 : 1; + 1327: uint8_t SPPR2 : 1; + 1328: uint8_t bit7 : 1; + 1329: } SPIBR_t; + 1330: //#line 1144 + 1331: enum __nesc_unnamed4328 { + 1332: //#line 1144 + 1333: SPIS_Addr = 0x2B + 1334: }; + 1335: + 1336: + 1337: + 1338: + 1339: + 1340: + 1341: + 1342: + 1343: + 1344: + 1345: //#line 1146 + 1346: typedef struct __nesc_unnamed4329 { + 1347: + 1348: uint8_t bit0 : 1; + 1349: uint8_t bit1 : 1; + 1350: uint8_t bit2 : 1; + 1351: uint8_t bit3 : 1; + 1352: uint8_t MODF : 1; + 1353: uint8_t SPTEF : 1; + 1354: uint8_t bit6 : 1; + 1355: uint8_t SPRF : 1; + 1356: } SPIS_t; + 1357: + 1358: + 1359: + 1360: + 1361: + 1362: + 1363: + 1364: + 1365: + 1366: + 1367: enum __nesc_unnamed4330 { + 1368: //#line 1167 + 1369: SPID_Addr = 0x2D + 1370: }; + 1371: + 1372: + 1373: + 1374: + 1375: + 1376: + 1377: + 1378: + 1379: + 1380: + 1381: //#line 1169 + 1382: typedef struct __nesc_unnamed4331 { + 1383: + 1384: uint8_t bit0 : 1; + 1385: uint8_t bit1 : 1; + 1386: uint8_t bit2 : 1; + 1387: uint8_t bit3 : 1; + 1388: uint8_t bit4 : 1; + 1389: uint8_t bit5 : 1; + 1390: uint8_t bit6 : 1; + 1391: uint8_t bit7 : 1; + 1392: } SPID_t; + 1393: + 1394: + 1395: + 1396: + 1397: + 1398: + 1399: + 1400: enum __nesc_unnamed4332 { + 1401: //#line 1187 + 1402: TPM1SC_Addr = 0x30 + 1403: }; + 1404: + 1405: + 1406: + 1407: + 1408: + 1409: + 1410: + 1411: + 1412: + 1413: + 1414: //#line 1189 + 1415: typedef struct __nesc_unnamed4333 { + 1416: + 1417: uint8_t PS0 : 1; + 1418: uint8_t PS1 : 1; + 1419: uint8_t PS2 : 1; + 1420: uint8_t CLKSA : 1; + 1421: uint8_t CLKSB : 1; + 1422: uint8_t CPWMS : 1; + 1423: uint8_t TOIE : 1; + 1424: uint8_t TOF : 1; + 1425: } TPM1SC_t; + 1426: //#line 1215 + 1427: enum __nesc_unnamed4334 { + 1428: //#line 1215 + 1429: TPM1CNTH_Addr = 0x31 + 1430: }; + 1431: + 1432: + 1433: + 1434: + 1435: + 1436: + 1437: + 1438: + 1439: + 1440: + 1441: //#line 1217 + 1442: typedef struct __nesc_unnamed4335 { + 1443: + 1444: uint8_t bit8 : 1; + 1445: uint8_t bit9 : 1; + 1446: uint8_t bit10 : 1; + 1447: uint8_t bit11 : 1; + 1448: uint8_t bit12 : 1; + 1449: uint8_t bit13 : 1; + 1450: uint8_t bit14 : 1; + 1451: uint8_t bit15 : 1; + 1452: } TPM1CNTH_t; + 1453: + 1454: + 1455: + 1456: + 1457: + 1458: + 1459: + 1460: + 1461: enum __nesc_unnamed4336 { + 1462: //#line 1236 + 1463: TPM1CNTL_Addr = 0x32 + 1464: }; + 1465: + 1466: + 1467: + 1468: + 1469: + 1470: + 1471: + 1472: + 1473: + 1474: + 1475: //#line 1238 + 1476: typedef struct __nesc_unnamed4337 { + 1477: + 1478: uint8_t bit0 : 1; + 1479: uint8_t bit1 : 1; + 1480: uint8_t bit2 : 1; + 1481: uint8_t bit3 : 1; + 1482: uint8_t bit4 : 1; + 1483: uint8_t bit5 : 1; + 1484: uint8_t bit6 : 1; + 1485: uint8_t bit7 : 1; + 1486: } TPM1CNTL_t; + 1487: + 1488: + 1489: + 1490: + 1491: + 1492: + 1493: + 1494: enum __nesc_unnamed4338 { + 1495: //#line 1256 + 1496: TPM1MODH_Addr = 0x33 + 1497: }; + 1498: + 1499: + 1500: + 1501: + 1502: + 1503: + 1504: + 1505: + 1506: + 1507: + 1508: //#line 1258 + 1509: typedef struct __nesc_unnamed4339 { + 1510: + 1511: uint8_t bit8 : 1; + 1512: uint8_t bit9 : 1; + 1513: uint8_t bit10 : 1; + 1514: uint8_t bit11 : 1; + 1515: uint8_t bit12 : 1; + 1516: uint8_t bit13 : 1; + 1517: uint8_t bit14 : 1; + 1518: uint8_t bit15 : 1; + 1519: } TPM1MODH_t; + 1520: + 1521: + 1522: + 1523: + 1524: + 1525: + 1526: + 1527: + 1528: enum __nesc_unnamed4340 { + 1529: //#line 1277 + 1530: TPM1MODL_Addr = 0x34 + 1531: }; + 1532: + 1533: + 1534: + 1535: + 1536: + 1537: + 1538: + 1539: + 1540: + 1541: + 1542: //#line 1279 + 1543: typedef struct __nesc_unnamed4341 { + 1544: + 1545: uint8_t bit0 : 1; + 1546: uint8_t bit1 : 1; + 1547: uint8_t bit2 : 1; + 1548: uint8_t bit3 : 1; + 1549: uint8_t bit4 : 1; + 1550: uint8_t bit5 : 1; + 1551: uint8_t bit6 : 1; + 1552: uint8_t bit7 : 1; + 1553: } TPM1MODL_t; + 1554: + 1555: + 1556: + 1557: + 1558: + 1559: + 1560: + 1561: enum __nesc_unnamed4342 { + 1562: //#line 1297 + 1563: TPM1C0SC_Addr = 0x35 + 1564: }; + 1565: + 1566: + 1567: + 1568: + 1569: + 1570: + 1571: + 1572: + 1573: + 1574: + 1575: //#line 1299 + 1576: typedef struct __nesc_unnamed4343 { + 1577: + 1578: uint8_t bit0 : 1; + 1579: uint8_t bit1 : 1; + 1580: uint8_t ELS0A : 1; + 1581: uint8_t ELS0B : 1; + 1582: uint8_t MS0A : 1; + 1583: uint8_t MS0B : 1; + 1584: uint8_t CH0IE : 1; + 1585: uint8_t CH0F : 1; + 1586: } TPM1C0SC_t; + 1587: //#line 1323 + 1588: enum __nesc_unnamed4344 { + 1589: //#line 1323 + 1590: TPM1C0VH_Addr = 0x36 + 1591: }; + 1592: + 1593: + 1594: + 1595: + 1596: + 1597: + 1598: + 1599: + 1600: + 1601: + 1602: //#line 1325 + 1603: typedef struct __nesc_unnamed4345 { + 1604: + 1605: uint8_t bit8 : 1; + 1606: uint8_t bit9 : 1; + 1607: uint8_t bit10 : 1; + 1608: uint8_t bit11 : 1; + 1609: uint8_t bit12 : 1; + 1610: uint8_t bit13 : 1; + 1611: uint8_t bit14 : 1; + 1612: uint8_t bit15 : 1; + 1613: } TPM1C0VH_t; + 1614: + 1615: + 1616: + 1617: + 1618: + 1619: + 1620: + 1621: + 1622: enum __nesc_unnamed4346 { + 1623: //#line 1344 + 1624: TPM1C0VL_Addr = 0x37 + 1625: }; + 1626: + 1627: + 1628: + 1629: + 1630: + 1631: + 1632: + 1633: + 1634: + 1635: + 1636: //#line 1346 + 1637: typedef struct __nesc_unnamed4347 { + 1638: + 1639: uint8_t bit0 : 1; + 1640: uint8_t bit1 : 1; + 1641: uint8_t bit2 : 1; + 1642: uint8_t bit3 : 1; + 1643: uint8_t bit4 : 1; + 1644: uint8_t bit5 : 1; + 1645: uint8_t bit6 : 1; + 1646: uint8_t bit7 : 1; + 1647: } TPM1C0VL_t; + 1648: + 1649: + 1650: + 1651: + 1652: + 1653: + 1654: + 1655: enum __nesc_unnamed4348 { + 1656: //#line 1364 + 1657: TPM1C1SC_Addr = 0x38 + 1658: }; + 1659: + 1660: + 1661: + 1662: + 1663: + 1664: + 1665: + 1666: + 1667: + 1668: + 1669: //#line 1366 + 1670: typedef struct __nesc_unnamed4349 { + 1671: + 1672: uint8_t bit0 : 1; + 1673: uint8_t bit1 : 1; + 1674: uint8_t ELS1A : 1; + 1675: uint8_t ELS1B : 1; + 1676: uint8_t MS1A : 1; + 1677: uint8_t MS1B : 1; + 1678: uint8_t CH1IE : 1; + 1679: uint8_t CH1F : 1; + 1680: } TPM1C1SC_t; + 1681: //#line 1390 + 1682: enum __nesc_unnamed4350 { + 1683: //#line 1390 + 1684: TPM1C1VH_Addr = 0x39 + 1685: }; + 1686: + 1687: + 1688: + 1689: + 1690: + 1691: + 1692: + 1693: + 1694: + 1695: + 1696: //#line 1392 + 1697: typedef struct __nesc_unnamed4351 { + 1698: + 1699: uint8_t bit8 : 1; + 1700: uint8_t bit9 : 1; + 1701: uint8_t bit10 : 1; + 1702: uint8_t bit11 : 1; + 1703: uint8_t bit12 : 1; + 1704: uint8_t bit13 : 1; + 1705: uint8_t bit14 : 1; + 1706: uint8_t bit15 : 1; + 1707: } TPM1C1VH_t; + 1708: + 1709: + 1710: + 1711: + 1712: + 1713: + 1714: + 1715: + 1716: enum __nesc_unnamed4352 { + 1717: //#line 1411 + 1718: TPM1C1VL_Addr = 0x3A + 1719: }; + 1720: + 1721: + 1722: + 1723: + 1724: + 1725: + 1726: + 1727: + 1728: + 1729: + 1730: //#line 1413 + 1731: typedef struct __nesc_unnamed4353 { + 1732: + 1733: uint8_t bit0 : 1; + 1734: uint8_t bit1 : 1; + 1735: uint8_t bit2 : 1; + 1736: uint8_t bit3 ... [truncated message content] |
From: <mle...@us...> - 2010-01-19 19:58:36
|
Revision: 1101 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1101&view=rev Author: mleopold Date: 2010-01-19 19:58:29 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Removed erroneous file Removed Paths: ------------- trunk/diku/mcs51/tos/platforms/cookie841/modified/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2010-01-19 19:56:59
|
Revision: 1100 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1100&view=rev Author: mleopold Date: 2010-01-19 19:56:49 +0000 (Tue, 19 Jan 2010) Log Message: ----------- cookie841 platform courtesy of Alfonso Martinez De La Torre Added Paths: ----------- trunk/diku/mcs51/support/make/cookie841.target trunk/diku/mcs51/support/make/mcs51/cookie841.bat trunk/diku/mcs51/tos/chips/aduc841/ trunk/diku/mcs51/tos/chips/aduc841/McuSleepC.nc trunk/diku/mcs51/tos/chips/aduc841/README trunk/diku/mcs51/tos/chips/aduc841/adc/ trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h trunk/diku/mcs51/tos/chips/aduc841/aduc841hardware.h trunk/diku/mcs51/tos/chips/aduc841/dac/ trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h trunk/diku/mcs51/tos/chips/aduc841/i2c/ trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h trunk/diku/mcs51/tos/chips/aduc841/ioaduc841.h trunk/diku/mcs51/tos/chips/aduc841/pins/ trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc trunk/diku/mcs51/tos/chips/aduc841/pins/Hpladuc841GeneralIOC.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/ trunk/diku/mcs51/tos/chips/aduc841/pwm/Haladuc841SimplePWMP.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMC.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/PWMControl.nc trunk/diku/mcs51/tos/chips/aduc841/pwm/pwm.h trunk/diku/mcs51/tos/chips/aduc841/spi/ trunk/diku/mcs51/tos/chips/aduc841/spi/Haladuc841SimpleSPIP.nc trunk/diku/mcs51/tos/chips/aduc841/spi/SpiByte.nc trunk/diku/mcs51/tos/chips/aduc841/spi/SpiControl.nc trunk/diku/mcs51/tos/chips/aduc841/spi/spi.h trunk/diku/mcs51/tos/chips/aduc841/timer/ trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841Counter.nc trunk/diku/mcs51/tos/chips/aduc841/timer/HplAduc841TimerP.nc trunk/diku/mcs51/tos/chips/aduc841/timer/aduc841-timer.h trunk/diku/mcs51/tos/chips/aduc841/uart/ trunk/diku/mcs51/tos/chips/aduc841/uart/Haladuc841SimpleUart0P.nc trunk/diku/mcs51/tos/chips/aduc841/uart/SerialByteComm.nc trunk/diku/mcs51/tos/chips/aduc841/uart/SerialControl.nc trunk/diku/mcs51/tos/chips/aduc841/uart/serial.h trunk/diku/mcs51/tos/platforms/cookie841/ trunk/diku/mcs51/tos/platforms/cookie841/.platform trunk/diku/mcs51/tos/platforms/cookie841/AMReceiverC.nc trunk/diku/mcs51/tos/platforms/cookie841/AMSenderC.nc trunk/diku/mcs51/tos/platforms/cookie841/ActiveMessageC.nc trunk/diku/mcs51/tos/platforms/cookie841/Aduc841Msg.h trunk/diku/mcs51/tos/platforms/cookie841/DS18S20C.nc trunk/diku/mcs51/tos/platforms/cookie841/HalTelegesisRadioP.nc trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841DS18S20P.nc trunk/diku/mcs51/tos/platforms/cookie841/Haladuc841OneWireP.nc trunk/diku/mcs51/tos/platforms/cookie841/HilTimerMilliC.nc trunk/diku/mcs51/tos/platforms/cookie841/OneWireC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformADCC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformDACC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformDS18S20C.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformI2CC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformLedsC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformOneWireC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformP.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformPWMC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformRadioC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformSPIC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformTimerC.nc trunk/diku/mcs51/tos/platforms/cookie841/PlatformUARTC.nc trunk/diku/mcs51/tos/platforms/cookie841/RadioC.nc trunk/diku/mcs51/tos/platforms/cookie841/RadioControl.nc trunk/diku/mcs51/tos/platforms/cookie841/Send.nc trunk/diku/mcs51/tos/platforms/cookie841/UartC.nc trunk/diku/mcs51/tos/platforms/cookie841/hardware.h trunk/diku/mcs51/tos/platforms/cookie841/modified/ trunk/diku/mcs51/tos/platforms/cookie841/modified/.platform trunk/diku/mcs51/tos/platforms/cookie841/onewire.h trunk/diku/mcs51/tos/platforms/cookie841/platform.h trunk/diku/mcs51/tos/platforms/cookie841/platform_message.h trunk/diku/mcs51/tos/platforms/cookie841/radio.h Added: trunk/diku/mcs51/support/make/cookie841.target =================================================================== --- trunk/diku/mcs51/support/make/cookie841.target (rev 0) +++ trunk/diku/mcs51/support/make/cookie841.target 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,11 @@ +PLATFORM = cookie841 +MCS51_KEIL_SCRIPT=cookie841.bat + +ifdef PLATFORM +PFLAGS += -D__$(PLATFORM)__=1 +endif + +$(call TOSMake_include_platform,mcs51) + +cookie841: $(BUILD_DEPS) + @: Added: trunk/diku/mcs51/support/make/mcs51/cookie841.bat =================================================================== --- trunk/diku/mcs51/support/make/mcs51/cookie841.bat (rev 0) +++ trunk/diku/mcs51/support/make/mcs51/cookie841.bat 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,21 @@ +echo off +SET C51INC=C:\Keil\C51\INC\ADI\;C:\Keil\C51\INC\ +SET C51LIB=C:\Keil\C51\LIB +SET CPU_TYPE=ADUC841 +SET CPU_VENDOR=Analog Devices, Inc. +SET UV2_TARGET=Target 1 +SET CPU_XTAL=0x016E3600 +echo on + +rem Compile app.c to app.obj +C:\Keil\C51\BIN\C51.EXE "app.c" BROWSE DEBUG OBJECTEXTEND LARGE CODE LISTINCLUDE SYMBOLS PRINT(.\app.lst) OBJECT(.\app.obj) + +rem Link startup.obj/app.obj and convert to hex +C:\Keil\C51\BIN\BL51.EXE "startup.obj", "app.obj" TO "app" PRINT (app.map) CODE(0-0xFBFF) RAMSIZE (256) XDATA (0X0000-0X07FF) REGFILE(app.reg) +C:\Keil\C51\BIN\OH51.EXE "app" + +rem Link using LX51 which should contain some optimisations... +rem LX51 is only available in the "professional edition" +C:\Keil\C51\BIN\LX51.EXE "startup.obj", "app.obj" TO "app" PRINT (app.map) CLASSES( XDATA(X:0x0000-X:0x0FFF), IDATA(I:0-I:0xFF)) REGFILE(app.reg) +C:\Keil\C51\BIN\OHX51.EXE "app" + Added: trunk/diku/mcs51/tos/chips/aduc841/McuSleepC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/McuSleepC.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/McuSleepC.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2007 University of Copenhagen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of University of Copenhagen nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY + * OF COPENHAGEN OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * + * Dummy sleep mode for 8051 + * + * @author Martin Leopold <le...@di...> + */ + + /** + * @modified Yana E. Krasteva <yan...@up...> + *for ADUC841 + */ + + + +#include "aduc841hardware.h" +#include "ioaduc841.h" + +module McuSleepC { + provides { + interface McuSleep; + interface McuPowerState; + } +} +implementation { + + async command void McuSleep.sleep() { + // Allow interrupts to squize in... (See TEP112) + __nesc_enable_interrupt(); + {uint8_t q=0; + while(q<10) { + q++; + } + //__nesc_enable_interrupt(); + //SBUF='A'; + } + __nesc_disable_interrupt(); + } + + async command void McuPowerState.update() { + } +} Added: trunk/diku/mcs51/tos/chips/aduc841/README =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/README (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/README 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,4 @@ +Analog Devices 8051 base +====================== + +Common ancestor of the Analog Device 8051 (www.analog.com) Added: trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/ADCC.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,15 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <adc.h> + +interface ADCC { + + async command uint16_t getData(); + + async command uint8_t getChannel(); + +} Added: trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/ADCControl.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,32 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <adc.h> + +interface ADCControl { + + /** + * Set ADC mode + * + * @param mode mode flags as defined in adc.h + */ + + command error_t setMode(type_power mode); + command error_t setRef(type_ref ref); + command error_t setCLKDivison(type_div di); + command error_t setAcq(type_acq acq); + command error_t enableT2C(); + command error_t disableT2C(); + command error_t enableEXC(); + command error_t disableEXC(); + async command error_t enableCCONV(); + async command error_t disableCCONV(); + async command error_t enableSCONV(); + command error_t enableDMA(); + command error_t setChannel(type_cha channel); + + +} Added: trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/Haladuc841ADCP.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,168 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <ioaduc841.h> +#include <adc.h> + +module Haladuc841ADCP { + provides interface ADCC; + provides interface ADCControl; + provides interface StdControl; + provides interface Init; + + +} implementation { + + error_t a; + + command error_t Init.init(){ + + ADCCON1 = 0x00; + ADCCON2 = 0x00; + ADCCON3 = 0x00; + a = call StdControl.start(); + return (a); + } + + command error_t StdControl.stop() { + ADCCON1 &= 0x7F; + return SUCCESS; + } + + command error_t StdControl.start() { + + call ADCControl.setMode(ADC_POWER_UP); + call ADCControl.setCLKDivison(ADC_CLK_DIV_8); + call ADCControl.setAcq(ADC_ACQ_4); + return SUCCESS; + } + + command error_t ADCControl.setMode(type_power new_mode) { + atomic { + ADCCON1 &= 0x7F; + ADCCON1 |= new_mode; + } + return SUCCESS; + } + + command error_t ADCControl.setRef(type_ref new_ref){ + atomic { + ADCCON1 &= 0xBF; + ADCCON1 |= new_ref; + } + return SUCCESS; + } + + command error_t ADCControl.setCLKDivison(type_div new_div){ + atomic { + ADCCON1 &= 0xCF; + ADCCON1 |= new_div; + } + return SUCCESS; + } + + command error_t ADCControl.setAcq(type_acq new_acq){ + atomic { + ADCCON1 &= 0xF3; + ADCCON1 |= new_acq; + } + return SUCCESS; + } + + command error_t ADCControl.enableT2C(){ + atomic { + ADCCON1 |= 0x02; + } + return SUCCESS; + } + + command error_t ADCControl.disableT2C(){ + atomic { + ADCCON1 &= 0xFD; + } + return SUCCESS; + } + + command error_t ADCControl.enableEXC(){ + atomic { + ADCCON1 |= 0x01; + } + return SUCCESS; + } + + command error_t ADCControl.disableEXC(){ + atomic { + ADCCON1 &= 0xFE; + } + return SUCCESS; + } + + async command error_t ADCControl.enableCCONV(){ + atomic { + ADCCON2 |= 0x20; + } + return SUCCESS; + } + + async command error_t ADCControl.disableCCONV(){ + atomic { + ADCCON2 &= 0xDF; + } + return SUCCESS; + } + + async command error_t ADCControl.enableSCONV(){ + atomic { + ADCCON2 |= 0x10; + + while (ADCCON2 & 0x10) {} + } + return SUCCESS; + } + + command error_t ADCControl.enableDMA(){ + atomic { + ADCCON2 |= 0x40; + } + return SUCCESS; + } + + command error_t ADCControl.setChannel(type_cha new_channel){ + + atomic { + ADCCON2 &= 0xF0; + ADCCON2 |= new_channel; + } + return SUCCESS; + } + + + + async command uint16_t ADCC.getData() { + uint16_t data; + atomic { + EADC=0; + data = ADCDATAH & 0x0F; + data = data << 8; + data |= ADCDATAL; + ADCI=0; + EADC=1; + } + return(data); + } + + + async command uint8_t ADCC.getChannel() { + uint8_t ch; + ch = ADCDATAH & 0xF0; + ch = ch >> 4; + return(ch); + } + + + +} + Added: trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/adc/adc.h 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,53 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + + +#ifndef _H_ADC_H +#define _H_ADC_H + +/** + * Bit numbers for adc + */ +typedef enum { + ADC_EXT_REF = 0x40, + ADC_INT_REF = 0x00 +} type_ref; +typedef enum { + ADC_POWER_UP = 0x80, + ADC_POWER_DOWN = 0x00 +} type_power; +typedef enum { + ADC_CLK_DIV_32 = 0x00, + ADC_CLK_DIV_8 = 0x20, + ADC_CLK_DIV_4 = 0x10, + ADC_CLK_DIV_2 = 0x30 +} type_div; +typedef enum { + ADC_ACQ_1 = 0x00, + ADC_ACQ_2 = 0x04, + ADC_ACQ_3 = 0x08, + ADC_ACQ_4 = 0x0C +} type_acq; +typedef enum { + ADC_CHA_0 = 0x00, + ADC_CHA_1 = 0x01, + ADC_CHA_2 = 0x02, + ADC_CHA_3 = 0x03, + ADC_CHA_4 = 0x04, + ADC_CHA_5 = 0x05, + ADC_CHA_6 = 0x06, + ADC_CHA_7 = 0x07, + ADC_CHA_TEMP_MON = 0x08, + ADC_CHA_DAC0 = 0x09, + ADC_CHA_DAC1 = 0x0A, + ADC_CHA_AGND = 0x0B, + ADC_CHA_VREF = 0x0C, + ADC_CHA_DIS_DMA = 0x0F +} type_cha; + + +#endif _H_ADC_H + Added: trunk/diku/mcs51/tos/chips/aduc841/aduc841hardware.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/aduc841hardware.h (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/aduc841hardware.h 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2007 University of Copenhagen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of University of Copenhagen nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY + * OF COPENHAGEN OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * + * Ported to 8051 by Martin Leopold, Sidsel Jensen & Anders Egeskov Petersen, + * Dept of Computer Science, University of Copenhagen + * + * @author Martin Leopold <le...@di...> + * @author Sidsel Jensen, + * @authro Anders Egeskov Petersen + */ + + +#ifndef _H_aduc841hardware_H +#define _H_aduc841hardware_H + +#include <ioaduc841.h> +// At some point someone is probably going to use these from avrlibc =] + +#ifndef _BV +#define _BV(bit) (1 << (bit)) +#endif + +// Borrow these from atm128hardware +// Using these for IO seems rather silly as IO ports are bit accessible as +// Px_y (where x is the port and y is the pin) +#define SET_BIT(port, bit) ((port) |= _BV(bit)) +#define CLR_BIT(port, bit) ((port) &= ~_BV(bit)) +#define READ_BIT(port, bit) (((port) & _BV(bit)) != 0) +#define FLIP_BIT(port, bit) ((port) ^= _BV(bit)) + +// Define the input/output direction of the Px_DIR registers +// this is the classic 8051 implementation, some variants +// have other definitions + +#define MAKE_IO_PIN_OUTPUT(dir_reg, pin) dir_reg |= _BV(pin) +#define MAKE_IO_PIN_INPUT(dir_reg, pin) dir_reg &= ~_BV(pin) + +// Test whether an IO pin is set to input or output +#define IS_IO_PIN_OUTPUT(dir_reg, pin) dir_reg | _BV(pin) +#define IS_IO_PIN_INPUT(dir_reg, pin) !(dir_reg & _BV(pin)) + +/* + * We need slightly different defs than SIGNAL, INTERRUPT + * See gcc manual for explenation of gcc-attributes + * See nesC Language Reference Manual for nesc attributes + * + * signal: Interrupts are disabled inside function. + * interrupt: Sets up interrupt vector, but doesn't disable interrupts + * spontaneous: nesc attribute to indicate that there are "inisible" calls to this + * function i.e. interrupts + + * It seems that 8051 compilers only define the interrupt keyword (not + * signal). It is unclear wether interrupts are disabled or enabled by + * default. + + * We use AVR-like syntax so the mangle script looks for something like: + * void __vector_9() __attribute((interrupt))) { + * + * Which is mangled to + * void __vector interrupt 9 () { + * + * NOTE: This means that the interrupt number is passed as part of the + * name - so don't change it! This name is further passed to the + * CIL-inliner script in order for it to leave it there. + */ + +// Interrupt: interrupts are enabled (probably =) +#define ADUC841_INTERRUPT(signame) \ +void signame() __attribute((interrupt, spontaneous, C)) + +// atomic statement runtime support +typedef uint8_t __nesc_atomic_t; + +inline void __nesc_disable_interrupt() { EA=0; } +inline void __nesc_enable_interrupt() { EA=1; } + +inline __nesc_atomic_t __nesc_atomic_start(void) __attribute((spontaneous)) { + __nesc_atomic_t tmp = EA; + EA = 0; + return tmp; +} + +inline void __nesc_atomic_end(__nesc_atomic_t oldSreg) __attribute__((spontaneous)) { + EA = oldSreg; +} + +#endif //_H_aduc841hardware_H Added: trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/DACC.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,16 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <dac.h> + +interface DACC { + + + async command error_t writeDataDAC0(uint16_t data); + + async command error_t writeDataDAC1(uint16_t data); + +} Added: trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/DACControl.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,40 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <dac.h> + +interface DACControl { + + /** + * Set DAC mode + * + * @param mode mode flags as defined in dac.h + */ + + command error_t setMode(uint8_t mode); + + command error_t setRangeDAC1(uint8_t rng1); + + command error_t setRangeDAC0(uint8_t rng0); + + command void setDAC0to0(); + + command void setDAC1to0(); + + command void setDAC0toV(); + + command void setDAC1toV(); + + command void PowerOnDAC0(); + + command void PowerOffDAC0(); + + command void PowerOnDAC1(); + + command void PowerOffDAC1(); + + +} Added: trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/Haladuc841DACP.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,148 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <ioaduc841.h> +#include <dac.h> + +module Haladuc841DACP { + provides interface DACC; + provides interface DACControl; + provides interface StdControl; + provides interface Init; + + +} implementation { + + error_t a; + + command error_t Init.init(){ + + DACCON = 0x1C; + ADCCON1 = 0x80; + a = call StdControl.start(); + return (a); + } + + command error_t StdControl.stop() { + call DACControl.PowerOffDAC0(); + call DACControl.PowerOffDAC1(); + return SUCCESS; + } + + command error_t StdControl.start() { + + call DACControl.setMode(DAC_MODE_12); + call DACControl.setRangeDAC0(DAC_RNG_0_VREF); + call DACControl.setRangeDAC1(DAC_RNG_1_VREF); + call DACControl.PowerOnDAC0(); + call DACControl.PowerOnDAC1(); + return SUCCESS; + } + + command error_t DACControl.setMode(uint8_t new_mode) { + atomic { + DACCON &= 0x7F; + DACCON |= new_mode; + } + return SUCCESS; + } + + command error_t DACControl.setRangeDAC1(uint8_t new_rng1){ + atomic { + DACCON &= 0xBF; + DACCON |= new_rng1; + } + return SUCCESS; + } + + command error_t DACControl.setRangeDAC0(uint8_t new_rng0){ + atomic { + DACCON &= 0xDF; + DACCON |= new_rng0; + } + return SUCCESS; + } + + command void DACControl.setDAC0to0(){ + atomic { + DACCON &= 0xF7; + } + } + + command void DACControl.setDAC1to0(){ + atomic { + DACCON &= 0xEF; + } + } + + command void DACControl.setDAC0toV(){ + atomic { + DACCON |= 0x08; + } + } + + command void DACControl.setDAC1toV(){ + atomic { + DACCON |= 0x10; + } + } + + command void DACControl.PowerOnDAC0(){ + atomic { + DACCON |= 0x01; + } + } + + command void DACControl.PowerOnDAC1(){ + atomic { + DACCON |= 0x02; + } + } + + command void DACControl.PowerOffDAC0(){ + atomic { + DACCON &= 0xFE; + } + } + + command void DACControl.PowerOffDAC1(){ + atomic { + DACCON &= 0xFD; + } + } + + async command error_t DACC.writeDataDAC0(uint16_t data) { + atomic DACCON &= 0xFB; + if ((DACCON & 0x80) == 0x00) { + DAC0L=data&0x00FF; + DAC0H=(data>>8)&0x000F; + } + else { + DAC0L=data&0x00FF; + } + atomic DACCON |= 0x04; + return SUCCESS; + } + + async command error_t DACC.writeDataDAC1(uint16_t data) { + atomic DACCON &= 0xFB; + if ((DACCON & 0x80) == 0x00) { + DAC1L=data&0x00FF; + DAC1H=(data>>8)&0x000F; + } + else { + DAC1L=data&0x00FF; + } + atomic DACCON |= 0x04; + return SUCCESS; + } + + + + + +} + Added: trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/dac/dac.h 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,25 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + + +#ifndef _H_DAC_H +#define _H_DAC_H + +/** + * Bit numbers for dac + */ +enum { + DAC_MODE_8 = 0x80, + DAC_MODE_12 = 0x00, + DAC_RNG_1_VDD = 0x40, + DAC_RNG_1_VREF = 0x00, + DAC_RNG_0_VDD = 0x20, + DAC_RNG_0_VREF = 0x00 +}; + + +#endif _H_DAC_H + Added: trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/Haladuc841SimpleI2CP.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,350 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <ioaduc841.h> +#include <i2c.h> + +module Haladuc841SimpleI2CP { + provides interface I2CMaster; + provides interface I2CSlave; + provides interface I2CControl; + provides interface StdControl; + provides interface Init; + + +} implementation { + + uint8_t mode, buf; + error_t a; + + command error_t StdControl.stop() { + IEIP2&=0xFE; // Disable I2C interrupt + call I2CControl.disableI2C(); + return SUCCESS; + } + + command error_t StdControl.start() { + call I2CControl.setMode(mode); + IEIP2|=0x01; // Enable I2C interrupt + call I2CControl.enableI2C(); + MDE=1; + MDI=0; + return SUCCESS; + } + + command error_t I2CControl.setMode(uint8_t new_mode) { + + atomic { + I2CCON &= 0xF7; + I2CCON |= new_mode; + } + return SUCCESS; + } + + command error_t I2CControl.enableI2C() { + atomic SPE = 0; // Enable I2C + return SUCCESS; + } + + command error_t I2CControl.disableI2C(){ + atomic SPE = 1; // Disable I2C + return SUCCESS; + } + + command error_t Init.init(){ + mode = I2C_MASTER; + + a = call StdControl.start(); + return (a); + + } + + + + async command void I2CMaster.sendADD( uint8_t ADD ) { + uint8_t i; + uint8_t p = 0; + + + atomic { + for(i=0;i<7;i++) + { + if((ADD&0x80)==0) + MDO = 0; + else + MDO = 1; + while (p<1) { + p++; + }p = 0; + MCO = 1; + while (p<1) { + p++; + }p = 0; + MCO = 0; + while (p<1) { + p++; + }p = 0; + ADD<<=1; + + } + MDO=0; + } + } + + async command void I2CMaster.sendDAT( uint8_t DAT ) { + uint8_t i;uint8_t p = 0; + atomic { + for(i=0;i<8;i++) + { + MDO=(DAT>>(7-i))&0x01; + while (p<1) { + p++; + }p = 0; + MCO = 1; + while (p<1) { + p++; + }p = 0; + MCO = 0; + + } + MDO=0; + + } + } + + default async event void I2CSlave.sendDAT() { + atomic { + I2CGC=0; + I2CDAT=buf; + } + } + + default async event void I2CSlave.readDAT() { + atomic I2CGC=0; + atomic buf=I2CDAT; + } + + + + async command uint8_t I2CSlave.readRW() { + uint8_t data = 0x00; + data = I2CTX; + atomic I2CTX = 0; + return(data); + } + + + + + async command uint8_t I2CMaster.readDAT() { + uint8_t p = 0; + uint8_t i,data; + atomic { + MDE=0; + data=0x00; + for(i=0;i<8;i++) + { + MCO = 1; + while (p<1) { + p++; + }p = 0; + data<<=1; + if(MDI) + data |=1; + + MCO = 0; + while (p<1) { + p++; + }p = 0; + } + MDE=1; + } + return data; + } + + async command error_t I2CMaster.sendSimpleData( uint8_t ADD, uint8_t DAT) { + call I2CMaster.sendSTART(); + call I2CMaster.sendADD(ADD); + call I2CMaster.sendWRITE(); + if (call I2CMaster.readACK()){ + call I2CMaster.sendDAT(DAT); + } + call I2CMaster.sendSTOP(); + return SUCCESS; + } + + async command uint8_t I2CMaster.readSimpleData( uint8_t ADD) { + uint8_t b; + call I2CMaster.sendSTART(); + call I2CMaster.sendADD(ADD); + call I2CMaster.sendREAD(); + if (call I2CMaster.readACK()){ + b = call I2CMaster.readDAT(); + } + call I2CMaster.sendSTOP(); + return b; + } + + + async command void I2CMaster.sendSTART() { + uint8_t p = 0; + atomic { + MDO=1; + while (p<1) { + p++; + }p = 0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MDO=0; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + } + } + + async command void I2CMaster.sendSTOP() { + uint8_t p = 0; + atomic { + MCO=1; + while (p<1) { + p++; + }p = 0; + MDO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + MDO=0; + } + } + + async command void I2CMaster.sendREAD() { + uint8_t p = 0; + atomic { + MDO=1; + while (p<1) { + p++; + }p = 0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + MDO=0; + } + } + async command void I2CMaster.sendWRITE() { + uint8_t p = 0; + atomic { + MDO=0; + while (p<1) { + p++; + }p = 0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + } + } + async command bool I2CMaster.readACK() { + uint8_t p = 0; + atomic { + MDE=0; + while (p<1) { + p++; + }p = 0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + MDE=1; + } + if (MDI==0) p=1; + return (p); + } + + async command void I2CMaster.sendACK() { + uint8_t p = 0; + atomic { + MDO=0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + } + } + + async command void I2CMaster.sendNACK() { + uint8_t p = 0; + atomic { + MDO=1; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + } + + } + + async command bool I2CMaster.readNACK() { + uint8_t p = 0; + atomic { + MDE=0; + MCO=1; + while (p<1) { + p++; + }p = 0; + MCO=0; + while (p<1) { + p++; + }p = 0; + MDE=1; + } + if (MDI==1) p=1; + return (p); + } + + + ADUC841_INTERRUPT(SIG_SPI_I2C) { + + if (!(call I2CSlave.readRW())){ + signal I2CSlave.readDAT(); + } + else { + signal I2CSlave.sendDAT(); + } + } + +} + Added: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CControl.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,23 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <i2c.h> + +interface I2CControl { + + /** + * Set I2C mode + * + * @param mode mode flags as defined in i2c.h + */ + + command error_t setMode(uint8_t mode); + + command error_t enableI2C(); + + command error_t disableI2C(); + +} Added: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CMaster.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,40 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <i2c.h> + +interface I2CMaster { + + async command void sendADD( uint8_t ADD ); + + async command void sendDAT( uint8_t DAT ); + + async command uint8_t readDAT(); + + async command void sendSTART(); + + async command void sendSTOP(); + + async command void sendREAD(); + + async command void sendWRITE(); + + async command bool readACK(); + + async command void sendACK(); + + async command void sendNACK(); + + async command bool readNACK(); + + async command error_t sendSimpleData( uint8_t ADD, uint8_t DAT); + + async command uint8_t readSimpleData( uint8_t ADD); + + + + +} Added: trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/I2CSlave.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,18 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + +#include <i2c.h> + +interface I2CSlave { + + async event void sendDAT(); + + async event void readDAT(); + + async command uint8_t readRW(); + + +} \ No newline at end of file Added: trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/i2c/i2c.h 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,20 @@ + +/** + * + * @author Alfonso Mart\xEDnez <Alf...@ho...> + */ + + +#ifndef _H_I2C_H +#define _H_I2C_H + +/** + * Bit numbers for I2C + */ +enum { + I2C_SLAVE = 0x00, + I2C_MASTER = 0x08, +}; + +#endif _H_I2C_H + Added: trunk/diku/mcs51/tos/chips/aduc841/ioaduc841.h =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/ioaduc841.h (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/ioaduc841.h 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,427 @@ +/* + * Copyright (c) 2008 Polaric + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of Polaric nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL POLARIC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @author Martin Leopold <le...@po...> + */ + + +/** + * @modified Yana E. Krasteva <yan...@up...> + * 1. elminar los registro que no existen en el adu841 -ok + * 2. modificar los que se repiten - ok + * 3. aniadir nuevos + */ + + +#ifndef _H_aduc841_H +#define _H_aduc841_H + +/* + * Bit locations for SCON + */ + + +enum { + aduc841_SCON_S0MODE = 0x7, + aduc841_SCON_MCE0 = 0x5, + aduc841_SCON_REN0 = 0x4, + aduc841_SCON_TB80 = 0x3, + aduc841_SCON_RB80 = 0x2, + aduc841_SCON_TI0 = 0x1, + aduc841_SCON_RI0 = 0x0 +}; + + +/* + * Bit locations for SPICON + */ + + /* YEK: + * Modificado(ADuC841 manual pagina 46) + */ +enum { + ADUC841_SPICON_ISPI = 0x7, + ADUC841_SPICON_WCOL = 0x6, + ADUC841_SPICON_SPIE = 0x5, + ADUC841_SPICON_SPIM = 0x4, + ADUC841_SPICON_CPOL = 0x3, + ADUC841_SPICON_CPHA = 0x2, + ADUC841_SPICON_SPR1 = 0x1, + ADUC841_SPICON_SPR0 = 0x0 +}; + +/* + * Bit locations for CFG841 + */ + +enum { + ADUC841_CFG841_DIV_32 = 0x00, + ADUC841_CFG841_DIV_64 = 0x04, + ADUC841_CFG841_DIV_128 = 0x08, + ADUC841_CFG841_DIV_256 = 0x0C, + ADUC841_CFG841_DIV_512 = 0x10, + ADUC841_CFG841_DIV_1024 = 0x14 +}; + +/* + * Bit locations for CLKMUL + */ + + /* YEK: + * No existe en el aduc8051 + * codigo comentado + */ + +/* +enum { + ADUC841_CLKMUL_MULEN = 0x7, + ADUC841_CLKMUL_MULINT = 0x6, + ADUC841_CLKMUL_MULRDY = 0x5 +};*/ + +/* + * Bit locations for IT01CF + */ + + /* YEK: + * No existe en el aduc8051 + * codigo comentado + */ + +/*enum { + ADUC841_IT01CF_IN1PL = 0x7, + ADUC841_IT01CF_IN0PL = 0x3, + ADUC841_IT01CF_IN0SL_MASK = 0x7, + ADUC841_IT01CF_IN1SL_MASK = 0x70 +};*/ + + + +/** + * Special Function Register (sfr) definitions + */ + + /* YEK: + * Modificado(ADuC841 manual pagina 22) +*/ + +uint8_t volatile TMOD __attribute((sfrAT0x89)); +uint8_t volatile TL0 __attribute((sfrAT0x8A)); +uint8_t volatile TL1 __attribute((sfrAT0x8B)); +uint8_t volatile TH0 __attribute((sfrAT0x8C)); +uint8_t volatile TH1 __attribute((sfrAT0x8D)); + +uint8_t volatile PCON __attribute((sfrAT0x87)); +uint8_t volatile TCON __attribute((sfrAT0x88)); +uint8_t volatile DPP __attribute((sfrAT0x84));//Port 2 (P2)data pointer page byte +uint8_t volatile DPH __attribute((sfrAT0x83)); +uint8_t volatile DPL __attribute((sfrAT0x82)); +uint8_t volatile SP __attribute((sfrAT0x81)); + + +uint8_t volatile P1 __attribute((sfrAT0x90)); // Port 1 Latch +uint8_t volatile I2CADD1 __attribute((sfrAT0x91));//I2C Address Register +uint8_t volatile I2CADD2 __attribute((sfrAT0x92)); //I2C Address Register +uint8_t volatile I2CADD3 __attribute((sfrAT0x93)); //I2C Address Register + +uint8_t volatile SCON __attribute((sfrAT0x98)); // UART0 Control +uint8_t volatile SBUF __attribute((sfrAT0x99)); // UART0 Data Buffer +uint8_t volatile I2CDAT __attribute((sfrAT0x9A)); //I2C Data Register +uint8_t volatile I2CADD __attribute((sfrAT0x9B)); //I2C Address Register +uint8_t volatile T3FD __attribute((sfrAT0x9D)); // Timer 3 Generated Baud Rate +uint8_t volatile T3CON __attribute((sfrAT0x9E)); // baud rate control SFR + + +uint8_t volatile P2 __attribute((sfrAT0xA0)); // Port 2 Latch +uint8_t volatile TIMECON __attribute((sfrAT0xA1)); // Time interval counter, +uint8_t volatile HTHSEC __attribute((sfrAT0xA2)); // Hundredths Seconds Time Register +uint8_t volatile SEC __attribute((sfrAT0xA3)); // Seconds Time Register +uint8_t volatile MIM __attribute((sfrAT0xA4)); // Minutes Time Register +uint8_t volatile HOUR __attribute((sfrAT0xA5)); // Hours Time Register +uint8_t volatile INTVAL __attribute((sfrAT0xA6)); // User Time Interval Select Register +uint8_t volatile DPCON __attribute((sfrAT0xA7)); // DUAL DATA POINTER + + +uint8_t volatile IE __attribute((sfrAT0xA8)); // Interrupt Enable +uint8_t volatile IEIP2 __attribute((sfrAT0xA9)); // Secondary Interrupt Enable Register +uint8_t volatile PWMCON __attribute((sfrAT0xAE)); // PULSE-WIDTH MODULATOR Control +uint8_t volatile CFG841 __attribute((sfrAT0xAF)); // The output pins that the PWM uses are determined by the CFG841/CFG842 register + + +uint8_t volatile P3 __attribute((sfrAT0xB0)); //General configuration port, +uint8_t volatile PWM0L __attribute((sfrAT0xB1)); //PULSE-WIDTH MODULATOR VALUES +uint8_t volatile PWM0H __attribute((sfrAT0xB2)); //PULSE-WIDTH MODULATOR VALUES +uint8_t volatile PWM1L __attribute((sfrAT0xB3)); //PULSE-WIDTH MODULATOR VALUES +uint8_t volatile PWM1H __attribute((sfrAT0xB4)); //PULSE-WIDTH MODULATOR VALUES +uint8_t volatile SPH __attribute((sfrAT0xB7)); //Stack Pointer + +uint8_t volatile IP __attribute((sfrAT0xB8)); //Interrupt Priority +uint8_t volatile ECON __attribute((sfrAT0xB9)); //Flash/EE Memory Control SFR +uint8_t volatile EDATA1 __attribute((sfrAT0xBC)); //Flash/EE data +uint8_t volatile EDATA2 __attribute((sfrAT0xBD)); //Flash/EE data +uint8_t volatile EDATA3 __attribute((sfrAT0xBE)); //Flash/EE data +uint8_t volatile EDATA4 __attribute((sfrAT0xBF)); //Flash/EE data + +uint8_t volatile WDCON __attribute((sfrAT0xC0)); //WATCHDOG TIMER +uint8_t volatile CHIPID __attribute((sfrAT0xC2)); // +uint8_t volatile EDARL __attribute((sfrAT0xC6)); // +uint8_t volatile EDARH __attribute((sfrAT0xC7)); // + +uint8_t volatile T2CON __attribute((sfrAT0xC8)); //Timer/Counter 2 Control +uint8_t volatile RCAP2L __attribute((sfrAT0xCA)); //Timer/Counter 2 capture/reload Low +uint8_t volatile RCAP2H __attribute((sfrAT0xCB)); //Timer/Counter 2 capture/reload High +uint8_t volatile TL2 __attribute((sfrAT0xCC)); //Timer/Counter 2 DATA Low +uint8_t volatile TH2 __attribute((sfrAT0xCD)); //Timer/Counter 2 DATA High + +uint8_t volatile PSW __attribute((sfrAT0xD0)); //Program Status Word +uint8_t volatile DMAL __attribute((sfrAT0xD2)); //DMA mode address pointer +uint8_t volatile DMAH __attribute((sfrAT0xD3)); //DMA mode address pointer +uint8_t volatile DMAP __attribute((sfrAT0xD4)); //DMA mode address pointer +uint8_t volatile PLLCON __attribute((sfrAT0xD7)); //PLL control register + +uint8_t volatile ADCCON2 __attribute((sfrAT0xD8)); //ADC Control +uint8_t volatile ADCDATAL __attribute((sfrAT0xD9)); //ADC DATA +uint8_t volatile ADCDATAH __attribute((sfrAT0xDA)); //ADC DATA +uint8_t volatile PSMCON __attribute((sfrAT0xDF)); //POWER SUPPLY MONITOR CONTROL + + +uint8_t volatile I2CCON __attribute((sfrAT0xE8)); // I2C Control Register +uint8_t volatile ADCCON1 __attribute((sfrAT0xEF)); // ADC conversion and acquisition time control + + +uint8_t volatile B __attribute((sfrAT0xF0)); // B Register +uint8_t volatile ADCOFSL __attribute((sfrAT0xF1)); // ADC Offset Calibration Coefficients +uint8_t volatile ADCOFSH __attribute((sfrAT0xF2)); // ADC Offset Calibration Coefficients +uint8_t volatile ADCGAINL __attribute((sfrAT0xF3)); // ADC Gain Calibration Coefficients +uint8_t volatile ADCGAINH __attribute((sfrAT0xF4)); // ADC Gain Calibration Coefficients +uint8_t volatile ADCCON3 __attribute((sfrAT0xF5)); // ADC calibration +uint8_t volatile SPIDAT __attribute((sfrAT0xF7)); // SPI Data Register + + +uint8_t volatile SPICON __attribute((sfrAT0xF8)); // SPI Control +uint8_t volatile DAC0L __attribute((sfrAT0xF9)); // DAC Data Registers +uint8_t volatile DAC0H __attribute((sfrAT0xFA)); // DAC Data Registers +uint8_t volatile DAC1L __attribute((sfrAT0xFB)); // DAC Data Registers +uint8_t volatile DAC1H __attribute((sfrAT0xFC)); // DAC Data Registers +uint8_t volatile DACCON __attribute((sfrAT0xFD)); // DAC Control + + + +/** + * Bit adresseable locations + */ + + // I2CCON Slave 0xE8 +uint8_t volatile I2CSI __attribute((sbitAT0xEF)); +uint8_t volatile I2CGC __attribute((sbitAT0xEE)); +uint8_t volatile I2CID1 __attribute((sbitAT0xED)); +uint8_t volatile I2CID0 __attribute((sbitAT0xEC)); +uint8_t volatile I2CM __attribute((sbitAT0xEB)); +uint8_t volatile I2CRS __attribute((sbitAT0xEA)); +uint8_t volatile I2CTX __attribute((sbitAT0xE9)); +uint8_t volatile I2CI __attribute((sbitAT0xE8)); + + // IP 0xB8 +uint8_t volatile PADC __attribute((sbitAT0xBE)); +uint8_t volatile PT2 __attribute((sbitAT0xBD)); +uint8_t volatile PS __attribute((sbitAT0xBC)); +uint8_t volatile PT1 __attribute((sbitAT0xBB)); +uint8_t volatile PX1 __attribute((sbitAT0xBA)); +uint8_t volatile PT0 __attribute((sbitAT0xB9)); +uint8_t volatile PX0 __attribute((sbitAT0xB8)); + + + // ADCCON2 0xD8 +uint8_t volatile ADCI __attribute((sbitAT0xDF)); +uint8_t volatile DMA __attribute((sbitAT0xDE)); +uint8_t volatile CCONV __attribute((sbitAT0xDD)); +uint8_t volatile SCONV __attribute((sbitAT0xDC)); +uint8_t volatile CS3 __attribute((sbitAT0xDB)); +uint8_t volatile CS2 __attribute((sbitAT0xDA)); +uint8_t volatile CS1 __attribute((sbitAT0xD9)); +uint8_t volatile CS0 __attribute((sbitAT0xD8)); + + //I2CC0N + +uint8_t volatile MDO __attribute((sbitAT0xEF)); // Multiprocessor Communication Enable Bit +uint8_t volatile MDE __attribute((sbitAT0xEE)); // Receive enable +uint8_t volatile MCO __attribute((sbitAT0xED)); // Transmit bit 8 +uint8_t volatile MDI __attribute((sbitAT0xEC)); // Receive bit 8 +uint8_t volatile I2CM __attribute((sbitAT0xEB)); + + +// SCON0 0x98 +uint8_t volatile SM0 __attribute((sbitAT0x9F)); // UART Serial Mode Select Bit 0 +uint8_t volatile SM1 __attribute((sbitAT0x9E)); // UART Serial Mode Select Bit 1 +uint8_t volatile SM2 __attribute((sbitAT0x9D)); // Multiprocessor Communication Enable Bit +uint8_t volatile REN __attribute((sbitAT0x9C)); // Receive enable +uint8_t volatile TB8 __attribute((sbitAT0x9B)); // Transmit bit 8 +uint8_t volatile RB8 __attribute((sbitAT0x9A)); // Receive bit 8 +uint8_t volatile TI __attribute((sbitAT0x99)); // Transmit interrupt flag +uint8_t volatile RI __attribute((sbitAT0x98)); // Receive interrupt flag + +// IE 0xA8 + +uint8_t volatile EA __attribute((sbitAT0xAF)); // Global interrupt enable +uint8_t volatile EADC __attribute((sbitAT0xAE)); // Enable, or cleared to disable ADC interrupts. +uint8_t volatile ET2 __attribute((sbitAT0xAD)); // Enable, or cleared to disable Timer 2 interrupts +uint8_t volatile ES __attribute((sbitAT0xAC)); // UART0 interrupt enable +uint8_t volatile ET1 __attribute((sbitAT0xAB)); // Timer1 interrupt enable +uint8_t volatile EX1 __attribute((sbitAT0xAA)); // External interrupt 1 enable +uint8_t volatile ET0 __attribute((sbitAT0xA9)); // Timer0 interrupt enable +uint8_t volatile EX0 __attribute((sbitAT0xA8)); // External interrupt 0 enable + + +/* TCON */ + +uint8_t volatile TF1 __attribute((sbitAT0x8F)); +uint8_t volatile TR1 __attribute((sbitAT0x8E)); +uint8_t volatile TF0 __attribute((sbitAT0x8D)); +uint8_t volatile TR0 __attribute((sbitAT0x8C)); +uint8_t volatile IE1 __attribute((sbitAT0x8B)); +uint8_t volatile IT1 __attribute((sbitAT0x8A)); +uint8_t volatile IE0 __attribute((sbitAT0x89)); +uint8_t volatile IT0 __attribute((sbitAT0x88)); + + + + +/* P3 (0xB0) bit adressable locations */ + +uint8_t volatile P3_0 __attribute((sbitAT0xB0)); +uint8_t volatile P3_1 __attribute((sbitAT0xB1)); +uint8_t volatile P3_2 __attribute((sbitAT0xB2)); +uint8_t volatile P3_3 __attribute((sbitAT0xB3)); +uint8_t volatile P3_4 __attribute((sbitAT0xB4)); +uint8_t volatile P3_5 __attribute((sbitAT0xB5)); +uint8_t volatile P3_6 __attribute((sbitAT0xB6)); +uint8_t volatile P3_7 __attribute((sbitAT0xB7)); + +/* P3 (0xB0) special functions */ +uint8_t volatile RD __attribute((sbitAT0xB7)); //Read Control Signal, Logic Output. Enables the external data memory to Port 0. +uint8_t volatile WE __attribute((sbitAT0xB6)); //Write Control Signal, Logic Output. Latches the data byte from Port 0 into the external data memory. +uint8_t volatile T1 __attribute((sbitAT0xB5)); //Timer/Counter 1 Input. +uint8_t volatile T0 __attribute((sbitAT0xB4)); //Timer/Counter 0 Input. +uint8_t volatile INT1 __attribute((sbitAT0xB3)); //Interrupt 1. Programmable edge or level triggered interrupt input; +uint8_t volatile INT0 __attribute((sbitAT0xB2)); //Interrupt 0. Programmable edge or level triggered interrupt input; +uint8_t volatile TXD __attribute((sbitAT0xB1)); //Transmitter Data Output (Asynchronous) or Clock Output (Synchronous) of the Serial (UART) Port. +uint8_t volatile RXD __attribute((sbitAT0xB0)); //Receiver Data Input (Asynchronous) or Data Input/Output (Synchronous) of the Serial (UART) Port. + +/* SPIC0N (0xF8) bit adressable locations */ + +uint8_t volatile ISPI __attribute((sbitAT0xFF)); // SPI interrupt flag +uint8_t volatile WCOL __attribute((sbitAT0xFE)); // SPI write collision flag +uint8_t volatile SPE __attribute((sbitAT0xFD)); // SPI Interface Enable Bit. +uint8_t volatile SPIM __attribute((sbitAT0xFC)); // SPI Master/Slave Mode Select Bit. +uint8_t volatile CPOL __attribute((sbitAT0xFB)); // Clock Polarity Select Bit +uint8_t volatile CPHA __attribute((sbitAT0xFA)); // Clock Phase Select Bit. +uint8_t volatile SPR1 __attribute((sbitAT0xF9)); // SPI Bit Rate Select Bits. +uint8_t volatile SPR0 __attribute((sbitAT0xF8)); // SPI Bit Rate Select Bits. + +/* P0 bit adressable locations */ + +uint8_t volatile P0_0 __attribute((sbitAT0x80)); +uint8_t volatile P0_1 __attribute((sbitAT0x81)); +uint8_t volatile P0_2 __attribute((sbitAT0x82)); +uint8_t volatile P0_3 __attribute((sbitAT0x83)); +uint8_t volatile P0_4 __attribute((sbitAT0x84)); +uint8_t volatile P0_5 __attribute((sbitAT0x85)); +uint8_t volatile P0_6 __attribute((sbitAT0x86)); +uint8_t volatile P0_7 __attribute((sbitAT0x87)); + +/* P1 bit adressable locations */ + +uint8_t volatile P1_0 __attribute((sbitAT0x90)); +uint8_t volatile P1_1 __attribute((sbitAT0x91)); +uint8_t volatile P1_2 __attribute((sbitAT0x92)); +uint8_t volatile P1_3 __attribute((sbitAT0x93)); +uint8_t volatile P1_4 __attribute((sbitAT0x94)); +uint8_t volatile P1_5 __attribute((sbitAT0x95)); +uint8_t volatile P1_6 __attribute((sbitAT0x96)); +uint8_t volatile P1_7 __attribute((sbitAT0x97)); + +/* P2 bit adressable locations */ +uint8_t volatile P2_0 __attribute((sbitAT0xA0)); +uint8_t volatile P2_1 __attribute((sbitAT0xA1)); +uint8_t volatile P2_2 __attribute((sbitAT0xA2)); +uint8_t volatile P2_3 __attribute((sbitAT0xA3)); +uint8_t volatile P2_4 __attribute((sbitAT0xA4)); +uint8_t volatile P2_5 __attribute((sbitAT0xA5)); +uint8_t volatile P2_6 __attribute((sbitAT0xA6)); +uint8_t volatile P2_7 __attribute((sbitAT0xA7)); + + +/* Interrupt vector definitions */ + +#define SIG_INT0 __vector_0 // External Interrupt 0 +#define SIG_TIMER0 __vector_1 // Timer0 Overflow +#define SIG_INT1 __vector_2 // External Interrupt 1 +#define SIG_TIMER1 __vector_3 // Timer1 Overflow +#define SIG_UART0 __vector_4 // Serial Port 0 +#define SIG_TIMER2 __vector_5 // Timer2 Overflow +#define SIG_SPI __vector_6 // Serial Peripheral Interface 0 +#define SIG_SPI_I2C __vector_7 // SMBus0 Interface +#define SIG_USB0 __vector_8 // USB Interface +#define SIG_ADC0_WINDOW __vector_9 // ADC0 Window Comparison +#define SIG_ADC0_EOC __vector_10 // ADC0 End Of Conversion +#define SIG_PCA0 __vector_11 // PCA0 Peripheral +#define SIG_COMPARATOR0 __vector_12 // Comparator0 +#define SIG_COMPARATOR1 __vector_13 // Comparator1 +#define SIG_TIMER3 __vector_14 // Timer3 Overflow +#define SIG_VBUS_LEVEL __vector_15 // VBUS level-triggered interrupt +#define SIG_UART1 __vector_16 // Serial Port 1 + + +/*PARA BORRAR EN FUTURO, CUANDO EL SISTEMA ESTE ESTABLE HAY QUE MODIFICAR LOS INTEFACES DE IO Y QUITAR ESTA VARIABLES*/ +/* P3 (0xB0) bit adressable locations */ + +/*uint8_t volatile P0MDOUT __attribute((sbitAT0x00)); +uint8_t volatile P1MDOUT __attribute((sbitAT0x00)); +uint8_t volatile P2MDOUT __attribute((sbitAT0x00)); +uint8_t volatile P3MDOUT __attribute((sbitAT0x00)); +uint8_t volatile P0MDIN __attribute((sbitAT0x00)); +uint8_t volatile P1MDIN __attribute((sbitAT0x00)); +uint8_t volatile P2MDIN __attribute((sbitAT0x00)); +uint8_t volatile P3MDIN __attribute((sbitAT0x00)); +uint8_t volatile P0SKIP __attribute((sbitAT0x00)); +uint8_t volatile P1SKIP __attribute((sbitAT0x00)); +uint8_t volatile P2SKIP __attribute((sbitAT0x00)); +uint8_t volatile P3SKIP __attribute((sbitAT0x00));*/ + +uint8_t volatile P0_DIR __attribute((sfrAT0xFF)); +uint8_t volatile P1_DIR __attribute((sfrAT0xFF)); +uint8_t volatile P2_DIR __attribute((sfrAT0xFF)); + + + +#endif //_H_aduc841_H Added: trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/pins/Haladuc841LedPinP.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2008 Polaric + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of Polaric nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL POLARIC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * + * @author Martin Leopold <le...@po...> + */ + + /** + * @modified Alfonso Mart\xEDnez <Alf...@ho...> + * for ADUC841 + */ + +generic module Haladuc841LedPinP() { + provides { + interface Init; + interface HalMcs51Led as Led; + } + uses { + interface GeneralIO as Led_pin; + } +} +implementation { + + /* + * Initialize the led to off: set the pin as output and set it + * high. It should also select the function of the pin by setting + * the P?SEL register (this is unsupported by the interface at this + * time). + */ + command error_t Init.init() { + call Led_pin.makeOutput(); + call Led_pin.set(); + return SUCCESS; + } + + async inline command void Led.on() { + call Led_pin.set(); + } + + async inline command void Led.off() { + call Led_pin.clr(); + } + + async inline command void Led.toggle() { + if(call Led_pin.get()){ + call Led_pin.set();} + else { + call Led_pin.clr();} + } +} + Added: trunk/diku/mcs51/tos/chips/aduc841/pins/Hpladuc841GeneralIOC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/aduc841/pins/Hpladuc841GeneralIOC.nc (rev 0) +++ trunk/diku/mcs51/tos/chips/aduc841/pins/Hpladuc841GeneralIOC.nc 2010-01-19 19:56:49 UTC (rev 1100) @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2007 University of Copenhagen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * - Neither the name of University of Copenhagen nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY + * OF COPENHAGEN OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * This file is identical to HplMcs51GeneralIOC, except it adds + * the additional IO ports found on the ADuC841 that were not found + * in the classic 8051. + * + * @author Martin Leopold <le...@di...> + * + */ + + /* + * @modified Alfonso Mart\xEDnez de la Torre + * + */ + +#include <ioaduc841.h> + +module Hpladuc841GeneralIOC { + provides interface GeneralIO as P00; + provides interface GeneralIO as P01; + provides interface GeneralIO as P02; + provides interface GeneralIO as P03; + provides interface GeneralIO as P04; + provides interface GeneralIO as P05; + provides interface GeneralIO as P06; + provides interface GeneralIO as P07; + + provides interface GeneralIO as P10; + provides interface GeneralIO as P11; + provides interface GeneralIO as P12; + provides interface GeneralIO as P13; + provides interface GeneralIO as P14; + provides interface GeneralIO as P15; + provides interface GeneralIO as P16; + provides interface GeneralIO as P17; + + provides interface GeneralIO as P20; + provides interface GeneralIO as P21; + provides interface GeneralIO as P22; + provides interface GeneralIO as P23; + provides interface GeneralIO as P24; + provides interface GeneralIO as P25; + provides interface GeneralIO as P26; + provides interface GeneralIO as P27; + + + provides interface GeneralIO as P30; + provides interface GeneralIO as P31; + provides interface GeneralIO as P32; + provides interface GeneralIO as P33; + provides interface GeneralIO as P34; + provides interface GeneralIO as P35; + provides interface GeneralIO as P36; + provides interface GeneralIO as P37; + + provides interface Init; +} + +implementation { +#define MAKE_NEW_PIN(name, pin, pin_dir, pin_dir_bit) \ + inline async command bool name.get() { return ( pin != 0); } \ + inline async command void name.set() { pin = 1; } \ + inline async command void name.clr() { pin = 0; } \ + async command void name.toggle() { atomic { pin = ~pin; } } \ + inline async command bool name.isInput() { IS_IO_PIN_INPUT(pin_dir, pin_dir_bit); } \ + inline async command bool name.isOutput() { IS_IO_PIN_OUTPUT(pin_dir, pin_dir_bit); } \ + inline async command void name.makeInput() { MAKE_IO_PIN_INPUT (pin_dir, pin_dir_bit); } \ + inline async command void name.makeOutput() { MAKE_IO_PIN_OUTPUT(pin_dir, pin_dir_bit); } + + // The syntax for defining the sbit (bit accessible registers) is + // compiler specfic, but the usage should be compiler independant + + MAKE_NEW_PIN(P00, P0_0, P0_DIR, 0); + MAKE_NEW_PIN(P01, P0_1, P0_DIR, 1); + MAKE_NEW_PIN(P02, P0_2, P0_DIR, 2); + MAKE_NEW_PIN(P03, P0_3, P0_DIR, 3); + MAKE_NEW_PIN(P04, P0_4, P0_DIR, 4); + MAKE_NEW_PIN(P05, P0_5, P0_DIR, 5); + MAKE_NEW_PIN(P06, P0_6, P0_DIR, 6); + MAKE_NEW_PIN(P07, P0_7, P0_DIR, 7); + + MAKE_NEW_PIN(P10, P1_0, P1_DIR, 0); + MAKE_NEW_PIN(P11, P1_1, P1_DIR, 1); + MAKE_NEW_PIN(P12, P1_2, P1_DIR, 2); + MAKE_NEW_PIN(P13, P1_3, P1_DIR, 3... [truncated message content] |
From: <mle...@us...> - 2009-11-19 15:07:42
|
Revision: 1099 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1099&view=rev Author: mleopold Date: 2009-11-19 15:07:33 +0000 (Thu, 19 Nov 2009) Log Message: ----------- SDCC friendly updates, thanks to Pavel Pisa Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/mcs51/tos/chips/mcs51/mcs51hardware.h Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-09 12:23:50 UTC (rev 1098) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-11-19 15:07:33 UTC (rev 1099) @@ -360,6 +360,7 @@ # (for some reason nesc doesn't produce prototypes and function defs the same way.. s{^(\s*void(?:.*?)__vector_\d+\s*\(\s*void\s*\)\s+__attribute(?:__)?\(\((?:.*?)(?:__)?interrupt(?:__)?,?(?:.*)\)\)\s*\;)}{/*$1*/}; + # # Handle reentrant functions # @@ -576,8 +577,7 @@ if ( $KEIL || $SDCC || $IAR) { s{\b((?:__)?inline)\b}{ /*$1*/ } } - - + ######################################################################## # Convert datatypes # ######################################################################## Modified: trunk/diku/mcs51/tos/chips/mcs51/mcs51hardware.h =================================================================== --- trunk/diku/mcs51/tos/chips/mcs51/mcs51hardware.h 2009-10-09 12:23:50 UTC (rev 1098) +++ trunk/diku/mcs51/tos/chips/mcs51/mcs51hardware.h 2009-11-19 15:07:33 UTC (rev 1099) @@ -104,16 +104,16 @@ // atomic statement runtime support typedef uint8_t __nesc_atomic_t; -inline void __nesc_disable_interrupt() { EA=0; } -inline void __nesc_enable_interrupt() { EA=1; } +static inline void __nesc_disable_interrupt() { EA=0; } +static inline void __nesc_enable_interrupt() { EA=1; } -inline __nesc_atomic_t __nesc_atomic_start(void) __attribute((spontaneous)) { +inline __nesc_atomic_t __nesc_atomic_start(void) @safe() { __nesc_atomic_t tmp = EA; - EA = 0; + EA = 0; //__nesc_disable_interrupt(); return tmp; } -inline void __nesc_atomic_end(__nesc_atomic_t oldSreg) __attribute__((spontaneous)) { +inline void __nesc_atomic_end(__nesc_atomic_t oldSreg) @safe() { EA = oldSreg; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-10-09 12:24:00
|
Revision: 1098 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1098&view=rev Author: mleopold Date: 2009-10-09 12:23:50 +0000 (Fri, 09 Oct 2009) Log Message: ----------- Brace counting robust to comments, added match for uncalled segment (as opposed uncalled function) Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-06 06:02:33 UTC (rev 1097) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-09 12:23:50 UTC (rev 1098) @@ -116,14 +116,17 @@ close RFILE; } - my @mapInput = `grep -A1 \"MULTIPLE CALL TO FUNCTION\" $mapFile`; + my @mapInput = `grep -A2 \"MULTIPLE CALL TO FUNCTION\" $mapFile`; @mapInput = grep(/NAME/, @mapInput); map (s/^.*NAME:\s*_*(\w+)\/.*/$1/, @mapInput); chomp @mapInput; + push(@reentrantFunctions, @mapInput); - foreach my $fn (@mapInput) { - push(@reentrantFunctions, "$fn"); - } + @mapInput = `grep -A2 \"MULTIPLE CALL TO SEGMENT\" $mapFile`; + @mapInput = grep(/SEGMENT:/, @mapInput); + map (s/^.*SEGMENT:\s*(?:\?PR\?)?_?(\w+)\?.*/$1/, @mapInput); + chomp @mapInput; + push(@reentrantFunctions, @mapInput); } # First pass of source: find all functions marked as reentrant @@ -145,6 +148,13 @@ } @reentrantFunctions = @new_array; +print STDERR "Rentrant\n"; + foreach my $ln (@reentrantFunctions) { + print STDERR "$ln\n"; + } +print STDERR "Rentrant slut\n"; + + if (open (RFILE, ">$reentFile")) { foreach my $fn (@reentrantFunctions) {print RFILE "$fn\n";} close RFILE; @@ -365,11 +375,13 @@ foreach my $reentrantFunc (@reentrantFunctions) { my $funcName = quotemeta($reentrantFunc); if (m{$funcName\s*\(}gi) { - if (m{\(} != m{\)}) { + if (tr/\(// != tr/\)//) { # Paranthesis levels do not match. Wait for ")". $reentrantWait = 1; } else { - s{([^\;\{]+)}{$1 reentrant}; + if (!s{([^\;\{]+)}{$1 reentrant}) { + s{\)}{\) reentrant}; + } printf STDERR "Fixed reentrant function: '%s'\n",$funcName; } } @@ -377,25 +389,25 @@ } } - if ($reentrantWait && m{\);}) { - s{\)}{) reentrant}; - $reentrantWait = 0; + if ($reentrantWait && m{\)}) { + print STDERR "WAIT\n"; + s{\)}{\) reentrant}; + $reentrantWait = 0; } - # Make the TinyOS task poster function reentrant as well. - # NOTE: This will not work if the BasicScheduler is replaced. - s{(error_t\s*SchedulerBasicP__TaskBasic__postTask\s*\(\s*uint8_t\s*id\s*\))}{$1 reentrant}; + # Make the TinyOS task poster function reentrant as well. + # NOTE: This will not work if the BasicScheduler is replaced. + s{(error_t\s*SchedulerBasicP__TaskBasic__postTask\s*\(\s*uint8_t\s*id\s*\))}{$1 reentrant}; - if ($schedulerBasicReentrant) { - if (m{\;}) { - $schedulerBasicReentrant = 0; - s{\;}{ reentrant\;}; - } - } + if ($schedulerBasicReentrant) { + if (s{\;}{ reentrant\;}) { + $schedulerBasicReentrant = 0; + } + } - if (m{error_t\s*SchedulerBasicP__TaskBasic__postTask} && !m{reentrant}) { - $schedulerBasicReentrant = 1; - } + if (m{error_t\s*SchedulerBasicP__TaskBasic__postTask} && !m{reentrant}) { + $schedulerBasicReentrant = 1; + } } # @@ -695,7 +707,7 @@ # $typedef_struct_lines = 0; # $typedef_struct_empty = 0; # we are done - don't match any more! -# doneProcessing($_); +# doneProcessing($_,$comment_level); # next; # } else { # Output the whole structure at once! # $_ = ""; @@ -742,18 +754,28 @@ close(FILE); +# Arguments: +# 1: $line - line to process + sub doneProcessing { my $line = $_[0]; + # Remove all // and /**/ style commnets + my $line_nocomment = $line; + $line_nocomment =~ s/(.*)\/\//$1/; + # someting /*comment*/ something + while ($line_nocomment =~ s/(.*)\/\*.*\*\/(.*)/$1 $2/g) {}; + $line_nocomment =~ s/(.*)\/\*.*$/$1/g; # <something> /* + $line_nocomment =~ s/^.*\*\/(.*)/$1/; # comment */ <something> + # Update parentheses levels. - $braceLevel += ($line =~ m{\{}g); - $braceLevel -= ($line =~ m{\}}g); - $bracketLevel += $line =~ m{\[}g; - $bracketLevel -= $line =~ m{\]}g; - $parenthesesLevel += $line =~ m{\(}g; - $parenthesesLevel -= $line =~ m{\)}g; - + $braceLevel += $line_nocomment =~ tr/\{//; + $braceLevel -= $line_nocomment =~ tr/\}//; + $bracketLevel += $line_nocomment =~ tr/\[//; + $bracketLevel -= $line_nocomment =~ tr/\]//; + $parenthesesLevel += $line_nocomment =~ tr/\(//; + $parenthesesLevel -= $line_nocomment =~ tr/\)//; $output .= $line; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-10-06 06:02:42
|
Revision: 1097 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1097&view=rev Author: mleopold Date: 2009-10-06 06:02:33 +0000 (Tue, 06 Oct 2009) Log Message: ----------- Forgot to remove junk Modified Paths: -------------- trunk/diku/common/apps/Echo/EchoP.nc Modified: trunk/diku/common/apps/Echo/EchoP.nc =================================================================== --- trunk/diku/common/apps/Echo/EchoP.nc 2009-10-05 22:42:17 UTC (rev 1096) +++ trunk/diku/common/apps/Echo/EchoP.nc 2009-10-06 06:02:33 UTC (rev 1097) @@ -35,9 +35,6 @@ * @author Martin Leopold <le...@di...> */ -//#define _XIXX(addr) (*(( uint8_t __attribute((sfr))*) addr)) -#define _XIXX(addr) (*(( uint8_t *) addr)) - module EchoP { uses { interface Boot; @@ -57,7 +54,6 @@ } event void Boot.booted() { - _XIXX(0x86) = 0xFF; call Leds.led0On(); call uart0.put(buf); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-10-05 22:42:27
|
Revision: 1096 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1096&view=rev Author: mleopold Date: 2009-10-05 22:42:17 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Attempt to fix reentrant problem automatically using Keil debug information Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/mcs51/tos/chips/cc2430/usart/HalCC2430SimpleUartP.nc trunk/diku/mcs51/tos/chips/mcs51/io8051.h Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-05 19:47:07 UTC (rev 1095) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-05 22:42:17 UTC (rev 1096) @@ -97,16 +97,60 @@ @input = <FILE>; -# Find names of all reentrant functions. +# +# Reentrant functions +# + +# A crude hack to Keil to mark appropriate functions as reentrant + +my $reentFile = $file; +$reentFile =~ s/app.(?:\w|\.)+/app.reent/; + +if ( $KEIL ){ + my $mapFile = $file; + $mapFile =~ s/app.(?:\w|\.)+/app.map/; + + if (open (RFILE, "<$reentFile")) { + @reentrantFunctions = <RFILE>; + chomp @reentrantFunctions; + close RFILE; + } + + my @mapInput = `grep -A1 \"MULTIPLE CALL TO FUNCTION\" $mapFile`; + @mapInput = grep(/NAME/, @mapInput); + map (s/^.*NAME:\s*_*(\w+)\/.*/$1/, @mapInput); + chomp @mapInput; + + foreach my $fn (@mapInput) { + push(@reentrantFunctions, "$fn"); + } +} + +# First pass of source: find all functions marked as reentrant foreach (@input) { if (/([^\s]+?)\(.*?\).*?\s+__attribute(?:__)?\(\(.*?(?:__)?reentrant(?:__)?.*\)\).*?\;/g) { my $func = $1; $func =~ s/\$/__/g; + chomp ($func); push(@reentrantFunctions, "$func"); printf STDERR "Found reentrant function: '%s'\n",$func; } } +# Eliminate duplicates +@reentrantFunctions = map ( lc, @reentrantFunctions); +my @new_array = (); +my %seen; +foreach my $i (@reentrantFunctions) { + push(@new_array, $i) unless ($seen{$i}++); +} +@reentrantFunctions = @new_array; +if (open (RFILE, ">$reentFile")) { + foreach my $fn (@reentrantFunctions) {print RFILE "$fn\n";} + close RFILE; +} + + # Write header stuff. $output .= "#define MANGLED_NESC_APP_C\n"; @@ -203,6 +247,7 @@ # drawback is that it seems that sometimes CIL (the inliner) seems # to be too clever and replace the typedef'ed type with the original. # *(uint8_t_xdata* 0x??) = xx + # uint8_t_xdata j; # # 2. Use the attribute syntax all the way and create an expression # similar to GCC. This unfortunate seems to clash with the @@ -210,6 +255,7 @@ # that fails in Keil on certain occations (e.g. if an extra (int) is # inserted this becomes (int xdata) which Keil does not accept). # *(uint8_t __attribute((xdata)) *) 0x?? = xx + # uint8_t j; # # 3. As above define a list of global variables these as variables # with absolute locations: @@ -316,20 +362,19 @@ if ($KEIL) { # Append the "reentrant" keyword to function prototypes as well. if (!$braceLevel && !m{reentrant}g) { - # my $i=0; - foreach my $reentrantFunc (@reentrantFunctions) { - my $funcName = quotemeta($reentrantFunc); - if (m{\s+$funcName\s*\(}g) { - if (m{\(} != m{\)}) { - # Paranthesis levels do not match. Wait for ")". - $reentrantWait = 1; - } else { - s{([^\;]*)}{$1 reentrant}; - printf STDERR "Fixed reentrant function prototype: '%s'\n",$funcName; - } + foreach my $reentrantFunc (@reentrantFunctions) { + my $funcName = quotemeta($reentrantFunc); + if (m{$funcName\s*\(}gi) { + if (m{\(} != m{\)}) { + # Paranthesis levels do not match. Wait for ")". + $reentrantWait = 1; + } else { + s{([^\;\{]+)}{$1 reentrant}; + printf STDERR "Fixed reentrant function: '%s'\n",$funcName; + } + } + # $i++; } - # $i++; - } } if ($reentrantWait && m{\);}) { @@ -697,7 +742,6 @@ close(FILE); - sub doneProcessing { my $line = $_[0]; @@ -712,3 +756,4 @@ $output .= $line; } + Modified: trunk/diku/mcs51/tos/chips/cc2430/usart/HalCC2430SimpleUartP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/usart/HalCC2430SimpleUartP.nc 2009-10-05 19:47:07 UTC (rev 1095) +++ trunk/diku/mcs51/tos/chips/cc2430/usart/HalCC2430SimpleUartP.nc 2009-10-05 22:42:17 UTC (rev 1096) @@ -48,7 +48,6 @@ } implementation { - //uint8_t volatile UTX0IE __attribute((sbitAT0x9C)); bool busy = FALSE; command error_t Init.init() @@ -86,7 +85,7 @@ return SUCCESS; } - async command error_t uart0.put(uint8_t data) __attribute((reentrant)) + async command error_t uart0.put(uint8_t data) { bool wasBusy; Modified: trunk/diku/mcs51/tos/chips/mcs51/io8051.h =================================================================== --- trunk/diku/mcs51/tos/chips/mcs51/io8051.h 2009-10-05 19:47:07 UTC (rev 1095) +++ trunk/diku/mcs51/tos/chips/mcs51/io8051.h 2009-10-05 22:42:17 UTC (rev 1096) @@ -175,8 +175,8 @@ to vary. On chipcon this register is name IE0EN */ -norace uint8_t volatile IE __attribute((sfrAT0A8)); -norace norace uint8_t volatile EA __attribute((sbitAT0xAF)); +norace uint8_t volatile IE __attribute((sfrAT0A8)); +norace uint8_t volatile EA __attribute((sbitAT0xAF)); /* IP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-10-05 19:47:18
|
Revision: 1095 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1095&view=rev Author: mleopold Date: 2009-10-05 19:47:07 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Updating xdata variables to use the more mangling robust __attribute((xdata)) construct Modified Paths: -------------- trunk/diku/common/apps/CompressionTest/CompressionTestM.nc trunk/diku/common/apps/Echo/EchoP.nc trunk/diku/common/apps/TestAll/TestAppP.nc trunk/diku/common/lib/usb/usb-cdc.h trunk/diku/common/lib/usb/usb.h trunk/diku/common/tools/compression/buffer.c trunk/diku/common/tools/compression/lz77/lz77_comp.c trunk/diku/common-private/apps/DataAcquisition/DataAcquisitionP.nc trunk/diku/common-private/apps/DataAcquisitionAdv2/DataAcquisitionAdvP.nc trunk/diku/common-private/apps/DataAcquisitionAdv2MacDuty/DataAcquisitionAdvP.nc trunk/diku/common-private/apps/DataAcquisitionMac/DataAcquisitionP.nc trunk/diku/common-private/apps/DataAcquisitionMacDuty/DataAcquisitionP.nc trunk/diku/common-private/apps/PrintfTester/PrintfTesterP.nc trunk/diku/common-private/apps/SampleStoreForward/SampleStoreForwardP.nc trunk/diku/common-private/apps/TestSeqFlash/TestAppP.nc trunk/diku/common-private/apps/UartStreamTester/UartStreamTesterP.nc trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/mcs51/tos/chips/cc2430/cc2420/HplCC2430RadioP.nc trunk/diku/mcs51/tos/chips/cc2430/flash/HalFlashP.nc trunk/diku/mcs51/tos/chips/cc2430/ioCC2430.h trunk/diku/mcs51/tos/chips/cc2430/radio/HalCC2430RadioP.nc trunk/diku/mcs51/tos/chips/cc2430/radio/HplCC2430RadioC.nc trunk/diku/mcs51/tos/chips/mcs51/io8051.h trunk/diku/mcs51-private/apps/Test2430All/TestAppP.nc trunk/diku/mcs51-private/apps/Test2430DMA/TestCC2430P.nc trunk/diku/mcs51-private/apps/Test2430Flash/TestCC2430P.nc trunk/diku/mcs51-private/apps/Test2430HPL/RadioTestP.nc Modified: trunk/diku/common/apps/CompressionTest/CompressionTestM.nc =================================================================== --- trunk/diku/common/apps/CompressionTest/CompressionTestM.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/apps/CompressionTest/CompressionTestM.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -66,11 +66,10 @@ enum state_t state; - uint8_t recv_buffer[258] __attribute((xdata)); // 256 bytes + 2 bytes for CRC + uint8_t __attribute((xdata)) recv_buffer[258]; // 256 bytes + 2 bytes for CRC uint16_t recv_pos; - //uint8_t memory_buffer[4096]; - uint8_t memory_buffer[4096] __attribute((xdata)); + uint8_t __attribute((xdata)) memory_buffer[4096]; uint8_t buffers = sizeof(memory_buffer) / 256; uint16_t memslot; @@ -115,7 +114,7 @@ return SUCCESS; } - uint8_t tmp_buffer[259] __attribute((xdata)); + uint8_t __attribute((xdata)) tmp_buffer[259]; bool halt_compression = FALSE; uint16_t do_compress_memslot; uint8_t do_compress_pos; Modified: trunk/diku/common/apps/Echo/EchoP.nc =================================================================== --- trunk/diku/common/apps/Echo/EchoP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/apps/Echo/EchoP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -35,6 +35,9 @@ * @author Martin Leopold <le...@di...> */ +//#define _XIXX(addr) (*(( uint8_t __attribute((sfr))*) addr)) +#define _XIXX(addr) (*(( uint8_t *) addr)) + module EchoP { uses { interface Boot; @@ -54,6 +57,7 @@ } event void Boot.booted() { + _XIXX(0x86) = 0xFF; call Leds.led0On(); call uart0.put(buf); } Modified: trunk/diku/common/apps/TestAll/TestAppP.nc =================================================================== --- trunk/diku/common/apps/TestAll/TestAppP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/apps/TestAll/TestAppP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -76,9 +76,9 @@ #endif #ifdef __cc2430__ -#define FLASH_BASE (uint8_t_xdata *) 0x7B00 +#define FLASH_BASE (uint8_t __attribute((xdata)) *) 0x7B00u #elif __micro4__ -#define FLASH_BASE (uint8_t *) 0xF100 +#define FLASH_BASE (uint8_t *) 0xF100u #endif /*****************************************************************************/ @@ -110,10 +110,10 @@ transmitPacketPtr = (packet_t *) transmitPacket; // Beacon packet - transmitPacketPtr->length = 127; //7 + 118 + 2; - transmitPacketPtr->fcf = 0x0000; + transmitPacketPtr->length = 127u; //7 + 118 + 2; + transmitPacketPtr->fcf = 0x0000u; transmitPacketPtr->data_seq_no = sequence++; - transmitPacketPtr->dest = 0xFFFF; + transmitPacketPtr->dest = 0xFFFFu; transmitPacketPtr->src = 0; /* // 118 bytes Modified: trunk/diku/common/lib/usb/usb-cdc.h =================================================================== --- trunk/diku/common/lib/usb/usb-cdc.h 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/lib/usb/usb-cdc.h 2009-10-05 19:47:07 UTC (rev 1095) @@ -19,14 +19,14 @@ uint8_t databit; // Data bits: 5, 6, 7, 8, 16 } line_coding_t; -const line_coding_t cdc_230400_8n1 __attribute__((code)) = { +const line_coding_t __attribute__((code)) cdc_230400_8n1 = { hostToUsb32(230400), // baudrate 0, // stop bit: 1 0, // parity: none 8 // data bits: 8 }; -const line_coding_t cdc_9600_8n1 __attribute__((code)) = { +const line_coding_t __attribute__((code)) cdc_9600_8n1 = { hostToUsb32(9600), // baudrate 0, // stop bit: 1 0, // parity: none Modified: trunk/diku/common/lib/usb/usb.h =================================================================== --- trunk/diku/common/lib/usb/usb.h 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/lib/usb/usb.h 2009-10-05 19:47:07 UTC (rev 1095) @@ -166,7 +166,7 @@ #define DSC_NUM_STRING 4 #define DEV_REV 0x0000 -const usb_device_descriptor_t MyDeviceDesc __attribute__((code)) = { +const usb_device_descriptor_t __attribute__((code)) MyDeviceDesc = { 18, //sizeof(usb_device_descriptor_t), USB_DESCRIPTOR_TYPE_DEVICE, @@ -276,7 +276,7 @@ #define DSC_EP_BULK 0x02 #define DSC_EP_INTERRUPT 0x03 -const configuration_desc_set_t MyConfigDescSet __attribute__((code)) = { +const configuration_desc_set_t __attribute__((code)) MyConfigDescSet = { { // Configuration descriptor sizeof(configuration_descriptor_t), // bLength USB_DESCRIPTOR_TYPE_CONFIG, // bDescriptorType @@ -363,13 +363,13 @@ }; //end of Configuration #define STR0LEN 4 -const uint8_t String0Desc[STR0LEN] __attribute__((code)) = { +const uint8_t __attribute__((code)) String0Desc[STR0LEN] = { STR0LEN, USB_DESCRIPTOR_TYPE_STRING, 0x09, 0x04 }; #define STR1LEN sizeof("Polaric")*2 -const uint8_t String1Desc[STR1LEN] __attribute__((code)) = { +const uint8_t __attribute__((code)) String1Desc[STR1LEN] = { STR1LEN, USB_DESCRIPTOR_TYPE_STRING, 'P', 0, 'o', 0, @@ -381,7 +381,7 @@ }; #define STR2LEN sizeof("SWM1702DK")*2 -const uint8_t String2Desc[STR2LEN] __attribute__((code)) = { +const uint8_t __attribute__((code)) String2Desc[STR2LEN] = { STR2LEN, USB_DESCRIPTOR_TYPE_STRING, 'S', 0, 'W', 0, @@ -396,7 +396,7 @@ #define STR3LEN sizeof("0001")*2 -const uint8_t String3Desc[STR3LEN] __attribute__((code))= { +const uint8_t __attribute__((code)) String3Desc[STR3LEN] = { STR3LEN, USB_DESCRIPTOR_TYPE_STRING, '0', 0, '0', 0, @@ -404,15 +404,15 @@ '1', 0 }; -const uint8_t *StringDescTable[4] __attribute__((code)) = { +const uint8_t __attribute__((code)) *StringDescTable[4] = { String0Desc, String1Desc, String2Desc, String3Desc }; -const uint8_t OnesPacket[2] __attribute__((code)) = {1,0}; -const uint8_t ZerosPacket[2] __attribute__((code)) = {1,0}; +const uint8_t __attribute__((code)) OnesPacket[2] = {1,0}; +const uint8_t __attribute__((code)) ZerosPacket[2] = {1,0}; /* typedef struct { */ /* configuration_descriptor_t ConfigDescriptor; */ @@ -421,7 +421,7 @@ /* endpoint_descriptor_t EndpointDescriptor1; */ /* } USB_CONFIG_DATA; */ -/* const USB_CONFIG_DATA ConfigurationDescriptor __attribute((code)) = { */ +/* const USB_CONFIG_DATA __attribute((code)) ConfigurationDescriptor = { */ /* { /\* configuration descriptor *\/ */ /* sizeof(configuration_descriptor_t), /\* bLength *\/ */ /* USB_DESCRIPTOR_TYPE_CONFIG, /\* bDescriptorType *\/ */ Modified: trunk/diku/common/tools/compression/buffer.c =================================================================== --- trunk/diku/common/tools/compression/buffer.c 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/tools/compression/buffer.c 2009-10-05 19:47:07 UTC (rev 1095) @@ -17,7 +17,7 @@ # define assert(x) #endif -uint8_t membuffer[MEMBUFSIZE] __attribute((xdata)); +uint8_t __attribute((xdata)) membuffer[MEMBUFSIZE]; uint8_t *buf_pos; uint8_t write_bits_used; Modified: trunk/diku/common/tools/compression/lz77/lz77_comp.c =================================================================== --- trunk/diku/common/tools/compression/lz77/lz77_comp.c 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common/tools/compression/lz77/lz77_comp.c 2009-10-05 19:47:07 UTC (rev 1095) @@ -20,7 +20,7 @@ #include <string.h> -uint8_t window[WINDOW_SIZE] __attribute((xdata)); +uint8_t __attribute((xdata)) window[WINDOW_SIZE]; uint8_t *search_start = window ; uint8_t *search_end = window ; /* Doubles as look_ahead_start */ uint8_t *look_ahead_end = window; Modified: trunk/diku/common-private/apps/DataAcquisition/DataAcquisitionP.nc =================================================================== --- trunk/diku/common-private/apps/DataAcquisition/DataAcquisitionP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/DataAcquisition/DataAcquisitionP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -73,12 +73,12 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u #elif __micro4__ -#define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define TIMER_2_SECONDS 2048u +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u #endif #define TIMER_INTERVAL TIMER_2_SECONDS/20 Modified: trunk/diku/common-private/apps/DataAcquisitionAdv2/DataAcquisitionAdvP.nc =================================================================== --- trunk/diku/common-private/apps/DataAcquisitionAdv2/DataAcquisitionAdvP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/DataAcquisitionAdv2/DataAcquisitionAdvP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -28,14 +28,14 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 - uint8_t_xdata sourcepage[256]; - uint8_t_xdata readbuf[256]; +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u + uint8_t __attribute((xdata)) sourcepage[256]; + uint8_t __attribute((xdata)) readbuf[256]; #elif __micro4__ #define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u uint8_t sourcepage[256]; uint8_t readbuf[256]; #endif Modified: trunk/diku/common-private/apps/DataAcquisitionAdv2MacDuty/DataAcquisitionAdvP.nc =================================================================== --- trunk/diku/common-private/apps/DataAcquisitionAdv2MacDuty/DataAcquisitionAdvP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/DataAcquisitionAdv2MacDuty/DataAcquisitionAdvP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -29,14 +29,14 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 - uint8_t_xdata sourcepage[256]; - uint8_t_xdata readbuf[256]; +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u + uint8_t __attribute((xdata)) sourcepage[256]; + uint8_t __attribute((xdata)) readbuf[256]; #elif __micro4__ -#define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define TIMER_2_SECONDS 2048u +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u uint8_t sourcepage[256]; uint8_t readbuf[256]; #endif Modified: trunk/diku/common-private/apps/DataAcquisitionMac/DataAcquisitionP.nc =================================================================== --- trunk/diku/common-private/apps/DataAcquisitionMac/DataAcquisitionP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/DataAcquisitionMac/DataAcquisitionP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -73,12 +73,12 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u #elif __micro4__ #define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u #endif #define TIMER_INTERVAL TIMER_2_SECONDS/10 Modified: trunk/diku/common-private/apps/DataAcquisitionMacDuty/DataAcquisitionP.nc =================================================================== --- trunk/diku/common-private/apps/DataAcquisitionMacDuty/DataAcquisitionP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/DataAcquisitionMacDuty/DataAcquisitionP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -73,12 +73,12 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u #elif __micro4__ #define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u #endif #define TIMER_INTERVAL TIMER_2_SECONDS/20 Modified: trunk/diku/common-private/apps/PrintfTester/PrintfTesterP.nc =================================================================== --- trunk/diku/common-private/apps/PrintfTester/PrintfTesterP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/PrintfTester/PrintfTesterP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -4,7 +4,7 @@ uses interface Boot; } implementation { - char *s __attribute__((code)) = "Hello World\n\r"; + char __attribute__((code)) *s = "Hello World\n\r"; task void doStuff() { } Modified: trunk/diku/common-private/apps/SampleStoreForward/SampleStoreForwardP.nc =================================================================== --- trunk/diku/common-private/apps/SampleStoreForward/SampleStoreForwardP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/SampleStoreForward/SampleStoreForwardP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -72,12 +72,12 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u #elif __micro4__ #define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u #endif #define TIMER_INTERVAL TIMER_2_SECONDS/20 Modified: trunk/diku/common-private/apps/TestSeqFlash/TestAppP.nc =================================================================== --- trunk/diku/common-private/apps/TestSeqFlash/TestAppP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/TestSeqFlash/TestAppP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -23,14 +23,14 @@ #ifdef __cc2430em__ #define TIMER_2_SECONDS 968058UL -#define FLASH_READ_ADDRESS (uint8_t_xdata*) 0x7B00 -#define FLASH_ADDRESS (uint8_t *) 0x7B00 - uint8_t_xdata sourcepage[256]; - uint8_t_xdata readbuf[256]; +#define FLASH_READ_ADDRESS (uint8_t __attribute((xdata))*) 0x7B00u +#define FLASH_ADDRESS (uint8_t *) 0x7B00u + uint8_t __attribute((xdata)) sourcepage[256]; + uint8_t __attribute((xdata)) readbuf[256]; #elif __micro4__ -#define TIMER_2_SECONDS 2048 -#define FLASH_READ_ADDRESS (uint8_t *) 0xF100 -#define FLASH_ADDRESS (uint8_t *) 0xF100 +#define TIMER_2_SECONDS 2048u +#define FLASH_READ_ADDRESS (uint8_t *) 0xF100u +#define FLASH_ADDRESS (uint8_t *) 0xF100u uint8_t sourcepage[256]; uint8_t readbuf[256]; #endif Modified: trunk/diku/common-private/apps/UartStreamTester/UartStreamTesterP.nc =================================================================== --- trunk/diku/common-private/apps/UartStreamTester/UartStreamTesterP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/common-private/apps/UartStreamTester/UartStreamTesterP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -3,7 +3,7 @@ uses interface Boot; } implementation { - char *s __attribute__((code)) = "Hello World\n\r"; + char __attribute__((code)) *s = "Hello World\n\r"; task void doStuff() { call UartStream.send((uint8_t*)s, 13); Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-10-05 19:47:07 UTC (rev 1095) @@ -141,16 +141,6 @@ # # Replace sfr related definitions with non ANSI-C dialekts # - # Kill the dummy typedef's - # REPLACED! - # s{^(typedef uint8_t sfr;)}{//$1}; - # s{^(typedef uint16_t sfr16;)}{//$1}; - # s{^(typedef uint8_t sbit;)}{//$1}; - # Should these be replaced to please CIL? - s{^(typedef uint8_t uint8_t_xdata;)}{//$1}; - s{^(typedef uint16_t uint16_t_xdata;)}{//$1}; - s{^(typedef uint8_t uint8_t_code;)}{//$1}; - s{^(typedef uint16_t uint16_t_code;)}{//$1}; # Replace # uint8_t volatile P0 __attribute((sfrAT0x86)) @@ -190,52 +180,59 @@ $_ = $_ . "#include \"stdbool.h\"\n"; } - # Replace dummy code types with type and storrage class specifier - s{uint(8|16)_t_code}{uint$1_t code}g; # -# Remove string.h definitions (memset, memcpy, strnlen, ..). Get Keil versions from string.h -# +# Replace memory-specifier mangling +# - # Replaced by custom string.h - # - # if( $string_h_match==1 || - # /^.*extern size_t strlen\(/ || - # /^.*extern void \*memset\(/ || - # /^.*extern void \*memcpy\(/ - # ) { - # $_ = "//" . $_; - # $string_h_match=1; - # if ($string_h_seen == 0) { - # $string_h_seen = 1; - # $_ = $_ . "#include <string.h>\n" ; - # } - # } - # # look for the ")" and ";" of the function - # if ($string_h_match==1 && /^.*\).*;.*/) { - # $string_h_match=0; - # } - # + # In the following we define a few strategies for extending + # variables with memory-specifier information. Each of the + # strategies add additional tags to the variables, but have + # different implications in the suite of tools run on the code + # (Nesc, CIL). + # + # The memory specifiers are used in a number of places. First they + # can be used to force a particular variable to a certain location, + # second they can be used to specify the storrage class on the fly + # (for register access). + # Below are 3 alternative strategies 1 and 2 are implemented (see + # for example ioCC2430.h for more): + # + # 1. Define typedef'ed data types and type cast addresses using this + # datatype. Later this is mangled to the correct syntax. The + # drawback is that it seems that sometimes CIL (the inliner) seems + # to be too clever and replace the typedef'ed type with the original. + # *(uint8_t_xdata* 0x??) = xx + # + # 2. Use the attribute syntax all the way and create an expression + # similar to GCC. This unfortunate seems to clash with the + # typeforwading from CIL making it produce an extra type forward + # that fails in Keil on certain occations (e.g. if an extra (int) is + # inserted this becomes (int xdata) which Keil does not accept). + # *(uint8_t __attribute((xdata)) *) 0x?? = xx + # + # 3. As above define a list of global variables these as variables + # with absolute locations: + # uint8_t xdata MDMCTRL0H_VAR at addr; + # + # Note: these variables should probably be marked volatile, but + # unfortunately this seems to clash with CIL in the same way as 2) + # (i.e. (int) becomes (int volatile) which is not accepted by Keil) + # + # + # -# Replace uint8_t_xdata types with real types these are used to -# on-the-fly access to specific memory locations in name memory -# areas. This is usefull to address registers in say xdata memory in a -# way that looks slightly like ansi-C. -# -# (*(uint16_t_xdata*)) = ? -# -# As an alternative you could imagine defining these as variables -# with absolute locations: -# uint8_t xdata MDMCTRL0H_VAR at addr; -# -# However mangling this in a compiler agnostic way is probaby more -# difficult than stickting to something that looks like ANSI-C -# -# - $memory_att_match = 0; - # Replace dummy xdata types with type and storrage class specifier + # Kill the dummy typedef's + # Should these be replaced to please CIL? + s{^(typedef uint8_t uint8_t_xdata;)}{//$1}; + s{^(typedef uint16_t uint16_t_xdata;)}{//$1}; + s{^(typedef uint8_t uint8_t_code;)}{//$1}; + s{^(typedef uint16_t uint16_t_code;)}{//$1}; + + # Replace dummy code/xdata types with type and storrage class specifier + s{uint(8|16)_t_code}{uint$1_t code}g; if ($KEIL && s{uint(8|16)_t_xdata}{uint$1_t xdata}g) { $memory_att_match = 1; # Don't replace data with _data } @@ -249,20 +246,23 @@ # For Keil the small memory model puts all variables in data # the large model all goes in xdata # -# Replace uint8_t j __attribute((xdata)); with -# Keil, SDCC: uint8_t xdata j; -# IAR : uint8_t __xdata j; +# Replace __attribute((xdata)) with xdata (or __xdata for IAR/SDCC) +# This handles two cases in which memory segment ideintifiers are +# used (i.e. manual variable placement and direct xdata access): +# +# uint8_t __attribute((xdata)) j; +# *(uint8_t __attribute((xdata)) *) 0xxx = ? if( ($KEIL ) && - s{\s+((?:\w)+(?:\[(?:.*)\])?)\s+__attribute(?:__)?\(\((?:__)?((?:x|p)?data|code)(?:__)?\)\)} - { $2 $1} ) { + s{__attribute_*\(\(_*((?:x|p)?data|code)_*\)\)} + {$1}g ) { $memory_att_match = 1; # Dont replace with _data later on } if( ( $IAR || $SDCC) && - s{\s+(.*)\s+__attribute(?:__)?\(\((?:__)?((?:x|p)?data|code)(?:__)?\)\)} - { __$2 $1} ) { # Drop types and rely on default for now.. + s{__attribute_*\(\(_*((?:x|p)?data|code)_*\)\)} + {__$1} ) { $memory_att_match = 1; # Dont replace with _data later on } Modified: trunk/diku/mcs51/tos/chips/cc2430/cc2420/HplCC2430RadioP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/cc2420/HplCC2430RadioP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/cc2430/cc2420/HplCC2430RadioP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -209,12 +209,12 @@ // The generic-module system does not allow pointers, so we cast a bit async command cc2420_status_t Reg.read[ uint16_t addr ]( uint16_t* data ) { - *data = *((uint16_t_xdata*) addr); + *data = *((uint16_t __attribute((xdata))*) addr); return SUCCESS; } async command cc2420_status_t Reg.write[ uint16_t addr ]( uint16_t data ) { - *((uint16_t_xdata*) addr) = data; + *((uint16_t __attribute((xdata))*) addr) = data; return SUCCESS; } Modified: trunk/diku/mcs51/tos/chips/cc2430/flash/HalFlashP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/flash/HalFlashP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/cc2430/flash/HalFlashP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -50,9 +50,9 @@ ** eraseFlashProcStart/eraseFlashProcEnd and eraseFlashProcStart/ ** eraseFlashProcEnd need to be inserted **************************************************************************/ - uint8_t_xdata eraseFunctionBuffer[] = + uint8_t __attribute((xdata)) eraseFunctionBuffer[] = { 0x75, 0xAE, 0x01, 0x00, 0xE5, 0xAE, 0x54, 0x80, 0x70, 0xFA, 0x22 }; - uint8_t_xdata writeFunctionBuffer[] = + uint8_t __attribute((xdata)) writeFunctionBuffer[] = { 0x7B, 0x01, 0x10, 0xAF, 0x02, 0x7B, 0x00, 0xC0, 0x83, 0xC0, 0x82, 0xC0, 0x85, 0xC0, 0x84, 0xC0, 0x92, 0xEA, 0xF5, 0x83, 0xE9, 0xF5, 0x82, 0x75, 0x92, 0x00, 0xE5, 0xAE, 0x54, 0x80, @@ -79,7 +79,8 @@ command error_t HalFlash.read(uint8_t * destination, uint8_t * source, uint16_t length) { - memcpy((uint8_t_xdata*)destination, (uint8_t_xdata*)source, length); + memcpy((uint8_t __attribute((xdata))*)destination, + (uint8_t __attribute((xdata))*)source, length); return SUCCESS; } Modified: trunk/diku/mcs51/tos/chips/cc2430/ioCC2430.h =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/ioCC2430.h 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/cc2430/ioCC2430.h 2009-10-05 19:47:07 UTC (rev 1095) @@ -417,101 +417,117 @@ * The registers are not double buffered (latched) and thus the * read/write order does not make a difference. * + * Below are a few strategies to mangling this * - * As an alternative you could imagine defining these as variables - * with absolute locations: - * uint8_t xdata MDMCTRL0H_VAR at addr; + * 1. Define typedef'ed data types and type cast addresses using this + * datatype. Later this is mangled to the correct syntax. The + * drawback is that it seems that sometimes CIL (the inliner) seems + * to be too clever and replace the typedef'ed type with the original. + * *(uint8_t_xdata* 0x??) = xx * - * However mangling this in a compiler agnostic way is probaby more - * difficult than stickting to something that looks like ANSI-C + * 2. Use the attribute syntax all the way and create an expression + * similar to GCC. This unfortunate seems to clash with the + * typeforwading from CIL making it produce an extra type forward + * that fails in Keil on certain occations (e.g. if an extra (int) is + * inserted this becomes (int xdata) which Keil does not accept). + * *(uint8_t __attribute((xdata)) *) 0x?? = xx * + * 3. As above define a list of global variables these as variables + * with absolute locations: + * uint8_t xdata MDMCTRL0H_VAR at addr; * + * Note: these variables should probably be marked volatile, but + * unfortunately this seems to clash with CIL in the same way as 2) + * (i.e. (int) becomes (int volatile) which is not accepted by Keil) + * + * */ +/* Alternative 1 */ typedef uint16_t uint16_t_xdata; // will be replaced by uint16_t xdata typedef uint8_t uint8_t_xdata; // will be replaced by uint8_t xdata typedef uint16_t uint16_t_code; // will be replaced by uint16_t code typedef uint8_t uint8_t_code; // will be replaced by uint8_t code - -// I would say these should be volatile, but nesc throws up -//#define _XIO16(addr) (*((volatile unint16_t_xdata*) addr)) -//#define _XIO8(addr) (*((uint8_t volatile_xdata*) addr)) - #define _XIO16(addr) (*(( uint16_t_xdata*) addr)) #define _XIO8(addr) (*(( uint8_t_xdata*) addr)) -#define _CC2430_MDMCTRL0 _XIO16(0xDF02 ) /* Modem Control 0 */ -#define _CC2430_MDMCTRL0H _XIO8( 0xDF02 ) /* Modem Control 0 High Byte */ -#define _CC2430_MDMCTRL0L _XIO8( 0xDF03 ) /* Modem Control 0 Low Byte */ -#define _CC2430_MDMCTRL1 _XIO16(0xDF04 ) /* Modem Control 1 */ -#define _CC2430_MDMCTRL1H _XIO8( 0xDF04 ) /* Modem Control 1 High Byte */ -#define _CC2430_MDMCTRL1L _XIO8( 0xDF05 ) /* Modem Control 1 Low Byte */ -#define _CC2430_RSSIH _XIO8( 0xDF06 ) /* RSSI and CCA Status and Control High Byte */ -#define _CC2430_RSSIL _XIO8( 0xDF07 ) /* RSSI and CCA Status and Control Low Byte */ -#define _CC2430_SYNCWORD _XIO16(0xDF08 ) /* Synchronization and Control */ -#define _CC2430_SYNCWORDH _XIO8( 0xDF08 ) /* Synchronization and Control High Byte */ -#define _CC2430_SYNCWORDL _XIO8( 0xDF09 ) /* Synchronization and Control Low Byte */ -#define _CC2430_TXCTRL _XIO16(0xDF0A ) /* Transmit Control */ -#define _CC2430_TXCTRLH _XIO8( 0xDF0A ) /* Transmit Control High Byte */ -#define _CC2430_TXCTRLL _XIO8( 0xDF0B ) /* Transmit Control Low Byte */ -#define _CC2430_RXCTRL0 _XIO16(0xDF0C ) /* Receive Control 0 */ -#define _CC2430_RXCTRL0H _XIO8( 0xDF0C ) /* Receive Control 0 High Byte */ -#define _CC2430_RXCTRL0L _XIO8( 0xDF0D ) /* Receive Control 0 Low Byte */ -#define _CC2430_RXCTRL1 _XIO8( 0xDF0E ) /* Receive Control 1 */ -#define _CC2430_RXCTRL1H _XIO8( 0xDF0E ) /* Receive Control 1 High Byte */ -#define _CC2430_RXCTRL1L _XIO8( 0xDF0F ) /* Receive Control 1 Low Byte */ -#define _CC2430_FSCTRL _XIO16(0xDF10 ) /* Frequency Synthesizer Control and Status */ -#define _CC2430_FSCTRLH _XIO8( 0xDF10 ) /* Frequency Synthesizer Control and Status High Byte*/ -#define _CC2430_FSCTRLL _XIO8( 0xDF11 ) /* Frequency Synthesizer Control and Status Low Byte */ -#define _CC2430_CSPX _XIO8( 0xDF12 ) /* CSMA/CA Strobe Processor X Data Register */ -#define _CC2430_CSPY _XIO8( 0xDF13 ) /* CSMA/CA Strobe Processor Y Data Register */ -#define _CC2430_CSPZ _XIO8( 0xDF14 ) /* CSMA/CA Strobe Processor Z Data Register */ -#define _CC2430_CSPCTRL _XIO8( 0xDF15 ) /* CSMA/CA Strobe Processor CPU Control Input */ -#define _CC2430_CSPT _XIO8( 0xDF16 ) /* CSMA/CA Strobe Processor T Data Register */ -#define _CC2430_RFPWR _XIO8( 0xDF17 ) /* Radio Power */ -#define _CC2430_FSMTCH _XIO8( 0xDF20 ) /* Finite State Machine Time Constants High Byte */ -#define _CC2430_FSMTCL _XIO8( 0xDF21 ) /* Finite State Machine Time Constants Low Byte */ -#define _CC2430_MANANDH _XIO8( 0xDF22 ) /* Manual Signal AND Override High Byte */ -#define _CC2430_MANANDL _XIO8( 0xDF23 ) /* Manual Signal AND Override Low Byte */ -#define _CC2430_MANORH _XIO8( 0xDF24 ) /* Manual Signal OR Override High Byte */ -#define _CC2430_MANORL _XIO8( 0xDF25 ) /* Manual Signal OR Override High Byte */ -#define _CC2430_AGCCTRLH _XIO8( 0xDF26 ) /* AGC Control High Byte */ -#define _CC2430_AGCCTRLL _XIO8( 0xDF27 ) /* AGC Control Low Byte */ -#define _CC2430_FSMSTATE _XIO8( 0xDF39 ) /* Finite State Machine State */ -#define _CC2430_ADCTSTH _XIO8( 0xDF3A ) /* ADC Test High Byte */ -#define _CC2430_ADCTSTL _XIO8( 0xDF3B ) /* ADC Test Low Byte */ -#define _CC2430_DACTSTH _XIO8( 0xDF3C ) /* DAC Test High Byte */ -#define _CC2430_DACTSTL _XIO8( 0xDF3D ) /* DAC Test Low Byte */ -#define _CC2430_IEEE_ADDR0 _XIO8( 0xDF43 ) /* IEEE Address Byte 0 (LSB) */ -#define _CC2430_IEEE_ADDR1 _XIO8( 0xDF44 ) /* IEEE Address Byte 1 */ -#define _CC2430_IEEE_ADDR2 _XIO8( 0xDF45 ) /* IEEE Address Byte 2 */ -#define _CC2430_IEEE_ADDR3 _XIO8( 0xDF46 ) /* IEEE Address Byte 3 */ -#define _CC2430_IEEE_ADDR4 _XIO8( 0xDF47 ) /* IEEE Address Byte 4 */ -#define _CC2430_IEEE_ADDR5 _XIO8( 0xDF48 ) /* IEEE Address Byte 5 */ -#define _CC2430_IEEE_ADDR6 _XIO8( 0xDF49 ) /* IEEE Address Byte 6 */ -#define _CC2430_IEEE_ADDR7 _XIO8( 0xDF4A ) /* IEEE Address Byte 7 (MSB) */ +/* Alternative 2 */ -#define _CC2430_PANID _XIO16(0xDF4B ) /* PAN Identifier */ -#define _CC2430_PANIDH _XIO8( 0xDF4B ) /* PAN Identifier High Byte */ -#define _CC2430_PANIDL _XIO8( 0xDF4C ) /* PAN Identifier Low Byte */ +/* #define _XIO16(addr) (*(( uint16_t __attribute((xdata))*) addr)) */ +/* #define _XIO8(addr) (*(( uint8_t __attribute((xdata))*) addr)) */ -#define _CC2430_SHORTADDR _XIO16(0xDF4D ) /* Short Address */ -#define _CC2430_SHORTADDRH _XIO8( 0xDF4D ) /* Short Address High Byte */ -#define _CC2430_SHORTADDRL _XIO8( 0xDF4E ) /* Short Address Low Byte */ -#define _CC2430_IOCFG01 _XIO16(0xDF4F ) /* Input/Output Control 0+1 */ -#define _CC2430_IOCFG0 _XIO8( 0xDF4F ) /* Input/Output Control 0 */ -#define _CC2430_IOCFG1 _XIO8( 0xDF50 ) /* Input/Output Control 1 */ -#define _CC2430_IOCFG23 _XIO16(0xDF51 ) /* Input/Output Control 2+3 */ -#define _CC2430_IOCFG2 _XIO8( 0xDF51 ) /* Input/Output Control 2 */ -#define _CC2430_IOCFG3 _XIO8( 0xDF52 ) /* Input/Output Control 3 */ -#define _CC2430_RXFIFOCNT _XIO8( 0xDF53 ) /* Receive FIFO Count */ -#define _CC2430_FSMTC1 _XIO8( 0xDF54 ) /* Finite State Machine Time Constants */ -#define _CC2430_CHVER _XIO8( 0xDF60 ) /* Chip Revision Number */ -#define _CC2430_CHIPID _XIO8( 0xDF61 ) /* Chip ID Number */ -#define _CC2430_RFSTATUS _XIO8( 0xDF62 ) /* Radio Status */ +#define _CC2430_MDMCTRL0 _XIO16(0xDF02u ) /* Modem Control 0 */ +#define _CC2430_MDMCTRL0H _XIO8( 0xDF02u ) /* Modem Control 0 High Byte */ +#define _CC2430_MDMCTRL0L _XIO8( 0xDF03u ) /* Modem Control 0 Low Byte */ +#define _CC2430_MDMCTRL1 _XIO16(0xDF04u ) /* Modem Control 1 */ +#define _CC2430_MDMCTRL1H _XIO8( 0xDF04u ) /* Modem Control 1 High Byte */ +#define _CC2430_MDMCTRL1L _XIO8( 0xDF05u ) /* Modem Control 1 Low Byte */ +#define _CC2430_RSSIH _XIO8( 0xDF06u ) /* RSSI and CCA Status and Control High Byte */ +#define _CC2430_RSSIL _XIO8( 0xDF07u ) /* RSSI and CCA Status and Control Low Byte */ +#define _CC2430_SYNCWORD _XIO16(0xDF08u ) /* Synchronization and Control */ +#define _CC2430_SYNCWORDH _XIO8( 0xDF08u ) /* Synchronization and Control High Byte */ +#define _CC2430_SYNCWORDL _XIO8( 0xDF09u ) /* Synchronization and Control Low Byte */ +#define _CC2430_TXCTRL _XIO16(0xDF0Au ) /* Transmit Control */ +#define _CC2430_TXCTRLH _XIO8( 0xDF0Au ) /* Transmit Control High Byte */ +#define _CC2430_TXCTRLL _XIO8( 0xDF0Bu ) /* Transmit Control Low Byte */ +#define _CC2430_RXCTRL0 _XIO16(0xDF0Cu ) /* Receive Control 0 */ +#define _CC2430_RXCTRL0H _XIO8( 0xDF0Cu ) /* Receive Control 0 High Byte */ +#define _CC2430_RXCTRL0L _XIO8( 0xDF0Du ) /* Receive Control 0 Low Byte */ +#define _CC2430_RXCTRL1 _XIO8( 0xDF0Eu ) /* Receive Control 1 */ +#define _CC2430_RXCTRL1H _XIO8( 0xDF0Eu ) /* Receive Control 1 High Byte */ +#define _CC2430_RXCTRL1L _XIO8( 0xDF0Fu ) /* Receive Control 1 Low Byte */ +#define _CC2430_FSCTRL _XIO16(0xDF10u ) /* Frequency Synthesizer Control and Status */ +#define _CC2430_FSCTRLH _XIO8( 0xDF10u ) /* Frequency Synthesizer Control and Status High Byte*/ +#define _CC2430_FSCTRLL _XIO8( 0xDF11u ) /* Frequency Synthesizer Control and Status Low Byte */ +#define _CC2430_CSPX _XIO8( 0xDF12u ) /* CSMA/CA Strobe Processor X Data Register */ +#define _CC2430_CSPY _XIO8( 0xDF13u ) /* CSMA/CA Strobe Processor Y Data Register */ +#define _CC2430_CSPZ _XIO8( 0xDF14u ) /* CSMA/CA Strobe Processor Z Data Register */ +#define _CC2430_CSPCTRL _XIO8( 0xDF15u ) /* CSMA/CA Strobe Processor CPU Control Input */ +#define _CC2430_CSPT _XIO8( 0xDF16u ) /* CSMA/CA Strobe Processor T Data Register */ +#define _CC2430_RFPWR _XIO8( 0xDF17u ) /* Radio Power */ +#define _CC2430_FSMTCH _XIO8( 0xDF20u ) /* Finite State Machine Time Constants High Byte */ +#define _CC2430_FSMTCL _XIO8( 0xDF21u ) /* Finite State Machine Time Constants Low Byte */ +#define _CC2430_MANANDH _XIO8( 0xDF22u ) /* Manual Signal AND Override High Byte */ +#define _CC2430_MANANDL _XIO8( 0xDF23u ) /* Manual Signal AND Override Low Byte */ +#define _CC2430_MANORH _XIO8( 0xDF24u ) /* Manual Signal OR Override High Byte */ +#define _CC2430_MANORL _XIO8( 0xDF25u ) /* Manual Signal OR Override High Byte */ +#define _CC2430_AGCCTRLH _XIO8( 0xDF26u ) /* AGC Control High Byte */ +#define _CC2430_AGCCTRLL _XIO8( 0xDF27u ) /* AGC Control Low Byte */ +#define _CC2430_FSMSTATE _XIO8( 0xDF39u ) /* Finite State Machine State */ +#define _CC2430_ADCTSTH _XIO8( 0xDF3Au ) /* ADC Test High Byte */ +#define _CC2430_ADCTSTL _XIO8( 0xDF3Bu ) /* ADC Test Low Byte */ +#define _CC2430_DACTSTH _XIO8( 0xDF3Cu ) /* DAC Test High Byte */ +#define _CC2430_DACTSTL _XIO8( 0xDF3Du ) /* DAC Test Low Byte */ +#define _CC2430_IEEE_ADDR0 _XIO8( 0xDF43u ) /* IEEE Address Byte 0 (LSB) */ +#define _CC2430_IEEE_ADDR1 _XIO8( 0xDF44u ) /* IEEE Address Byte 1 */ +#define _CC2430_IEEE_ADDR2 _XIO8( 0xDF45u ) /* IEEE Address Byte 2 */ +#define _CC2430_IEEE_ADDR3 _XIO8( 0xDF46u ) /* IEEE Address Byte 3 */ +#define _CC2430_IEEE_ADDR4 _XIO8( 0xDF47u ) /* IEEE Address Byte 4 */ +#define _CC2430_IEEE_ADDR5 _XIO8( 0xDF48u ) /* IEEE Address Byte 5 */ +#define _CC2430_IEEE_ADDR6 _XIO8( 0xDF49u ) /* IEEE Address Byte 6 */ +#define _CC2430_IEEE_ADDR7 _XIO8( 0xDF4Au ) /* IEEE Address Byte 7 (MSB) */ +#define _CC2430_PANID _XIO16(0xDF4Bu ) /* PAN Identifier */ +#define _CC2430_PANIDH _XIO8( 0xDF4Bu ) /* PAN Identifier High Byte */ +#define _CC2430_PANIDL _XIO8( 0xDF4Cu ) /* PAN Identifier Low Byte */ + +#define _CC2430_SHORTADDR _XIO16(0xDF4Du ) /* Short Address */ +#define _CC2430_SHORTADDRH _XIO8( 0xDF4Du ) /* Short Address High Byte */ +#define _CC2430_SHORTADDRL _XIO8( 0xDF4Eu ) /* Short Address Low Byte */ +#define _CC2430_IOCFG01 _XIO16(0xDF4Fu ) /* Input/Output Control 0+1 */ +#define _CC2430_IOCFG0 _XIO8( 0xDF4Fu ) /* Input/Output Control 0 */ +#define _CC2430_IOCFG1 _XIO8( 0xDF50u ) /* Input/Output Control 1 */ +#define _CC2430_IOCFG23 _XIO16(0xDF51u ) /* Input/Output Control 2+3 */ +#define _CC2430_IOCFG2 _XIO8( 0xDF51u ) /* Input/Output Control 2 */ +#define _CC2430_IOCFG3 _XIO8( 0xDF52u ) /* Input/Output Control 3 */ +#define _CC2430_RXFIFOCNT _XIO8( 0xDF53u ) /* Receive FIFO Count */ +#define _CC2430_FSMTC1 _XIO8( 0xDF54u ) /* Finite State Machine Time Constants */ +#define _CC2430_CHVER _XIO8( 0xDF60u ) /* Chip Revision Number */ +#define _CC2430_CHIPID _XIO8( 0xDF61u ) /* Chip ID Number */ +#define _CC2430_RFSTATUS _XIO8( 0xDF62u ) /* Radio Status */ + /* Bit fields for xdata registers */ enum { Modified: trunk/diku/mcs51/tos/chips/cc2430/radio/HalCC2430RadioP.nc =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/radio/HalCC2430RadioP.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/cc2430/radio/HalCC2430RadioP.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -87,7 +87,7 @@ *** StdControl **************************************************************************************************/ // uint16_t mcr0 = 0x0AE2, iocfg0 = 0x007F; - uint16_t mcr0 = 0x0000, iocfg0 = 0x007F; + uint16_t mcr0 = 0x0000u, iocfg0 = 0x007Fu; MDMCTRL0_t * mcr0Ptr; ieee_mac_addr_t ieeeAddress; Modified: trunk/diku/mcs51/tos/chips/cc2430/radio/HplCC2430RadioC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/cc2430/radio/HplCC2430RadioC.nc 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/cc2430/radio/HplCC2430RadioC.nc 2009-10-05 19:47:07 UTC (rev 1095) @@ -209,12 +209,12 @@ // The generic-module system does not allow pointers, so we cast a bit async command cc2420_status_t Reg.read[ uint16_t addr ]( uint16_t* data ) { - *data = *((uint16_t_xdata*) addr); + *data = *((uint16_t __attribute((xdata))*) addr); return SUCCESS; } async command cc2420_status_t Reg.write[ uint16_t addr ]( uint16_t data ) { - *((uint16_t_xdata*) addr) = data; + *((uint16_t __attribute((xdata))*) addr) = data; return SUCCESS; } Modified: trunk/diku/mcs51/tos/chips/mcs51/io8051.h =================================================================== --- trunk/diku/mcs51/tos/chips/mcs51/io8051.h 2009-09-27 19:51:12 UTC (rev 1094) +++ trunk/diku/mcs51/tos/chips/mcs51/io8051.h 2009-10-05 19:47:07 UTC (rev 1095) @@ -32,31 +32,41 @@ /** * * This file defines properties shared among 8051 variants. Chip - * specific additions are found in the directories for those chips + * specific additions are found in the directories for those chips. * * The special function register definitions are created in a slightly * odd way in order to allow special attributes to pass through nescc - * unchanged and then be modified by a mangle script later. + * unchanged and then be modified by a mangle script later. For Keil + * the sfr/sbit definitions cannot be created inside a function body - + * they have to be made outside (see "Cx51 User" under sfr/bit types) + * so we create a list of global variables and mark them with the NesC + * keyword norace. This is no less safe than the GCC approach, that + * addresses registers as an on the fly pointer access (e.g. *(int* + * 0x?) = ?). * - * For Keil the sfr/sbit definitions cannot be created inside a - * function body - they have to be made outside (see "Cx51 User" under - * sfr/bit types). - * * The __attribute(()) will be removed by the mangle script and * the content x will be used to construct: * sfr at x ... * - * Alternative to stay within ANSI-C one could imagine using a - * structure with bit fields say struct { int P0:1 }, however the - * silly architecture of the 8051 forces us to controll whether code - * using direct or indirect addressing is generated. I can't se how - * this could be done using ANSI-C. + * An alternative to this approach would be to try and mimick the way + * GCC defines register values, by defineing a macro that expands to + * the appropriate memory type specifier. However that is not + * supported by Keil for sfr and sbit data type + * REGX = xx => * (* uint8_t xdata) <REGX_ADDR> = xx + * REGY = xx => * (* sfr ) <REGX_ADDR> = xx (not supported) * + * To stay within ANSI-C one could imagine using a structure with bit + * fields say struct { int P0:1 }, however the silly architecture of + * the 8051 forces us to controll whether code using direct or + * indirect addressing is generated. I can't se how this could be done + * using ANSI-C. + * * The above scheme allows nescc to parse the code and sdcc to to * generate the appropriate code. * - * Interrupt definitions are moved to the include file for each architectore as - * no lowest commen denominator could be found. See mcs51hardware.h for more. + * Interrupt definitions are moved to the include file for each + * architectore as no lowest commen denominator could be found. See + * mcs51hardware.h for more. * * @author Martin Leopold <le...@di...> * @author Sidsel Jensen @@ -78,84 +88,84 @@ MCS51_PCON_IDLE = 0 }; -uint8_t volatile P0 __attribute((sfrAT0x80)); -uint8_t volatile SP __attribute((sfrAT0x81)); -uint8_t volatile DPL __attribute((sfrAT0x82)); -uint8_t volatile DPH __attribute((sfrAT0x83)); -uint8_t volatile DPL1 __attribute((sfrAT0x84)); -uint8_t volatile DPH1 __attribute((sfrAT0x85)); +norace uint8_t volatile P0 __attribute((sfrAT0x80)); +norace uint8_t volatile SP __attribute((sfrAT0x81)); +norace uint8_t volatile DPL __attribute((sfrAT0x82)); +norace uint8_t volatile DPH __attribute((sfrAT0x83)); +norace uint8_t volatile DPL1 __attribute((sfrAT0x84)); +norace uint8_t volatile DPH1 __attribute((sfrAT0x85)); // 0x86 used differently by CC2430/nRF24E1 -uint8_t volatile PCON __attribute((sfrAT0x87)); -uint8_t volatile TCON __attribute((sfrAT0x88)); -uint8_t volatile TMOD __attribute((sfrAT0x89)); -uint8_t volatile TL0 __attribute((sfrAT0x8A)); -uint8_t volatile TL1 __attribute((sfrAT0x8B)); -uint8_t volatile TH0 __attribute((sfrAT0x8C)); -uint8_t volatile TH1 __attribute((sfrAT0x8D)); -uint8_t volatile CKCON __attribute((sfrAT0x8E)); -uint8_t volatile P1 __attribute((sfrAT0x90)); -uint8_t volatile EXIF __attribute((sfrAT0x91)); -uint8_t volatile MPAGE __attribute((sfrAT0x92)); -uint8_t volatile SCON __attribute((sfrAT0x98)); -uint8_t volatile SBUF __attribute((sfrAT0x99)); -uint8_t volatile T2CON __attribute((sfrAT0xC8)); -uint8_t volatile RCAP2L __attribute((sfrAT0xCA)); -uint8_t volatile RCAP2H __attribute((sfrAT0xCB)); -uint8_t volatile TL2 __attribute((sfrAT0xCC)); -uint8_t volatile TH2 __attribute((sfrAT0xCD)); -uint8_t volatile PSW __attribute((sfrAT0xD0)); -uint8_t volatile EICON __attribute((sfrAT0xD8)); -uint8_t volatile ACC __attribute((sfrAT0xE0)); -uint8_t volatile B __attribute((sfrAT0xF0)); +norace uint8_t volatile PCON __attribute((sfrAT0x87)); +norace uint8_t volatile TCON __attribute((sfrAT0x88)); +norace uint8_t volatile TMOD __attribute((sfrAT0x89)); +norace uint8_t volatile TL0 __attribute((sfrAT0x8A)); +norace uint8_t volatile TL1 __attribute((sfrAT0x8B)); +norace uint8_t volatile TH0 __attribute((sfrAT0x8C)); +norace uint8_t volatile TH1 __attribute((sfrAT0x8D)); +norace uint8_t volatile CKCON __attribute((sfrAT0x8E)); +norace uint8_t volatile P1 __attribute((sfrAT0x90)); +norace uint8_t volatile EXIF __attribute((sfrAT0x91)); +norace uint8_t volatile MPAGE __attribute((sfrAT0x92)); +norace uint8_t volatile SCON __attribute((sfrAT0x98)); +norace uint8_t volatile SBUF __attribute((sfrAT0x99)); +norace uint8_t volatile T2CON __attribute((sfrAT0xC8)); +norace uint8_t volatile RCAP2L __attribute((sfrAT0xCA)); +norace uint8_t volatile RCAP2H __attribute((sfrAT0xCB)); +norace uint8_t volatile TL2 __attribute((sfrAT0xCC)); +norace uint8_t volatile TH2 __attribute((sfrAT0xCD)); +norace uint8_t volatile PSW __attribute((sfrAT0xD0)); +norace uint8_t volatile EICON __attribute((sfrAT0xD8)); +norace uint8_t volatile ACC __attribute((sfrAT0xE0)); +norace uint8_t volatile B __attribute((sfrAT0xF0)); // Interrupt control at 0xE8 is used differently -uint8_t volatile EIP __attribute((sfrAT0xF8)); -uint8_t volatile P1_ALT __attribute((sfrAT0x97)); -uint8_t volatile P2 __attribute((sfrAT0xA0)); -uint8_t volatile ADCCON __attribute((sfrAT0xA1)); -uint8_t volatile ADCDATAH __attribute((sfrAT0xA2)); -uint8_t volatile ADCDATAL __attribute((sfrAT0xA3)); -uint8_t volatile ADCSTATIC __attribute((sfrAT0xA4)); -uint8_t volatile PWMCON __attribute((sfrAT0xA9)); -uint8_t volatile PWMDUTY __attribute((sfrAT0xAA)); -uint8_t volatile REGX_MSB __attribute((sfrAT0xAB)); -uint8_t volatile REGX_LSB __attribute((sfrAT0xAC)); -uint8_t volatile REGX_CTRL __attribute((sfrAT0xAD)); -uint8_t volatile RSTREAS __attribute((sfrAT0xB1)); -uint8_t volatile SPI_DATA __attribute((sfrAT0xB2)); -uint8_t volatile SPI_CTRL __attribute((sfrAT0xB3)); -uint8_t volatile SPICLK __attribute((sfrAT0xB4)); -uint8_t volatile TICK_DV __attribute((sfrAT0xB5)); -uint8_t volatile CK_CTRL __attribute((sfrAT0xB6)); +norace uint8_t volatile EIP __attribute((sfrAT0xF8)); +norace uint8_t volatile P1_ALT __attribute((sfrAT0x97)); +norace uint8_t volatile P2 __attribute((sfrAT0xA0)); +norace uint8_t volatile ADCCON __attribute((sfrAT0xA1)); +norace uint8_t volatile ADCDATAH __attribute((sfrAT0xA2)); +norace uint8_t volatile ADCDATAL __attribute((sfrAT0xA3)); +norace uint8_t volatile ADCSTATIC __attribute((sfrAT0xA4)); +norace uint8_t volatile PWMCON __attribute((sfrAT0xA9)); +norace uint8_t volatile PWMDUTY __attribute((sfrAT0xAA)); +norace uint8_t volatile REGX_MSB __attribute((sfrAT0xAB)); +norace uint8_t volatile REGX_LSB __attribute((sfrAT0xAC)); +norace uint8_t volatile REGX_CTRL __attribute((sfrAT0xAD)); +norace uint8_t volatile RSTREAS __attribute((sfrAT0xB1)); +norace uint8_t volatile SPI_DATA __attribute((sfrAT0xB2)); +norace uint8_t volatile SPI_CTRL __attribute((sfrAT0xB3)); +norace uint8_t volatile SPICLK __attribute((sfrAT0xB4)); +norace uint8_t volatile TICK_DV __attribute((sfrAT0xB5)); +norace uint8_t volatile CK_CTRL __attribute((sfrAT0xB6)); /* BIT Registers */ /* PSW */ -uint8_t volatile CY __attribute((sbitAT0xD7)); -uint8_t volatile AC __attribute((sbitAT0xD6)); -uint8_t volatile F0 __attribute((sbitAT0xD5)); -uint8_t volatile RS1 __attribute((sbitAT0xD4)); -uint8_t volatile RS0 __attribute((sbitAT0xD3)); -uint8_t volatile OV __attribute((sbitAT0xD2)); -uint8_t volatile F1 __attribute((sbitAT0xD1)); -uint8_t volatile P __attribute((sbitAT0xD0)); +norace uint8_t volatile CY __attribute((sbitAT0xD7)); +norace uint8_t volatile AC __attribute((sbitAT0xD6)); +norace uint8_t volatile F0 __attribute((sbitAT0xD5)); +norace uint8_t volatile RS1 __attribute((sbitAT0xD4)); +norace uint8_t volatile RS0 __attribute((sbitAT0xD3)); +norace uint8_t volatile OV __attribute((sbitAT0xD2)); +norace uint8_t volatile F1 __attribute((sbitAT0xD1)); +norace uint8_t volatile P __attribute((sbitAT0xD0)); /* TCON */ -uint8_t volatile TF1 __attribute((sbitAT0x8F)); -uint8_t volatile TR1 __attribute((sbitAT0x8E)); -uint8_t volatile TF0 __attribute((sbitAT0x8D)); -uint8_t volatile TR0 __attribute((sbitAT0x8C)); -uint8_t volatile IE1 __attribute((sbitAT0x8B)); -uint8_t volatile IT1 __attribute((sbitAT0x8A)); -uint8_t volatile IE0 __attribute((sbitAT0x89)); -uint8_t volatile IT0 __attribute((sbitAT0x88)); +norace uint8_t volatile TF1 __attribute((sbitAT0x8F)); +norace uint8_t volatile TR1 __attribute((sbitAT0x8E)); +norace uint8_t volatile TF0 __attribute((sbitAT0x8D)); +norace uint8_t volatile TR0 __attribute((sbitAT0x8C)); +norace uint8_t volatile IE1 __attribute((sbitAT0x8B)); +norace uint8_t volatile IT1 __attribute((sbitAT0x8A)); +norace uint8_t volatile IE0 __attribute((sbitAT0x89)); +norace uint8_t volatile IT0 __attribute((sbitAT0x88)); /* IE */ @@ -165,126 +175,126 @@ to vary. On chipcon this register is name IE0EN */ -uint8_t volatile IE __attribute((sfrAT0A8)); -norace uint8_t volatile EA __attribute((sbitAT0xAF)); +norace uint8_t volatile IE __attribute((sfrAT0A8)); +norace norace uint8_t volatile EA __attribute((sbitAT0xAF)); /* IP */ -uint8_t volatile PT2 __attribute((sbitAT0xBD)); -uint8_t volatile PS __attribute((sbitAT0xBC)); -uint8_t volatile PT1 __attribute((sbitAT0xBB)); -uint8_t volatile PX1 __attribute((sbitAT0xBA)); -uint8_t volatile PT0 __attribute((sbitAT0xB9)); -uint8_t volatile PX0 __attribute((sbitAT0xB8)); +norace uint8_t volatile PT2 __attribute((sbitAT0xBD)); +norace uint8_t volatile PS __attribute((sbitAT0xBC)); +norace uint8_t volatile PT1 __attribute((sbitAT0xBB)); +norace uint8_t volatile PX1 __attribute((sbitAT0xBA)); +norace uint8_t volatile PT0 __attribute((sbitAT0xB9)); +norace uint8_t volatile PX0 __attribute((sbitAT0xB8)); /* P0 bit adressable locations */ -uint8_t volatile P0_0 __attribute((sbitAT0x80)); -uint8_t volatile P0_1 __attribute((sbitAT0x81)); -uint8_t volatile P0_2 __attribute((sbitAT0x82)); -uint8_t volatile P0_3 __attribute((sbitAT0x83)); -uint8_t volatile P0_4 __attribute((sbitAT0x84)); -uint8_t volatile P0_5 __attribute((sbitAT0x85)); -uint8_t volatile P0_6 __attribute((sbitAT0x86)); -uint8_t volatile P0_7 __attribute((sbitAT0x87)); +norace uint8_t volatile P0_0 __attribute((sbitAT0x80)); +norace uint8_t volatile P0_1 __attribute((sbitAT0x81)); +norace uint8_t volatile P0_2 __attribute((sbitAT0x82)); +norace uint8_t volatile P0_3 __attribute((sbitAT0x83)); +norace uint8_t volatile P0_4 __attribute((sbitAT0x84)); +norace uint8_t volatile P0_5 __attribute((sbitAT0x85)); +norace uint8_t volatile P0_6 __attribute((sbitAT0x86)); +norace uint8_t volatile P0_7 __attribute((sbitAT0x87)); /* P0 alternate functions */ -uint8_t volatile T1 __attribute((sbitAT0x86)); -uint8_t volatile T0 __attribute((sbitAT0x85)); -uint8_t volatile INT1 __attribute((sbitAT0x84)); -uint8_t volatile INT0 __attribute((sbitAT0x83)); +norace uint8_t volatile T1 __attribute((sbitAT0x86)); +norace uint8_t volatile T0 __attribute((sbitAT0x85)); +norace uint8_t volatile INT1 __attribute((sbitAT0x84)); +norace uint8_t volatile INT0 __attribute((sbitAT0x83)); /* P1 bit adressable locations */ -uint8_t volatile P1_0 __attribute((sbitAT0x90)); -uint8_t volatile P1_1 __attribute((sbitAT0x91)); -uint8_t volatile P1_2 __attribute((sbitAT0x92)); -uint8_t volatile P1_3 __attribute((sbitAT0x93)); -uint8_t volatile P1_4 __attribute((sbitAT0x94)); -uint8_t volatile P1_5 __attribute((sbitAT0x95)); -uint8_t volatile P1_6 __attribute((sbitAT0x96)); -uint8_t volatile P1_7 __attribute((sbitAT0x97)); +norace uint8_t volatile P1_0 __attribute((sbitAT0x90)); +norace uint8_t volatile P1_1 __attribute((sbitAT0x91)); +norace uint8_t volatile P1_2 __attribute((sbitAT0x92)); +norace uint8_t volatile P1_3 __attribute((sbitAT0x93)); +norace uint8_t volatile P1_4 __attribute((sbitAT0x94)); +norace uint8_t volatile P1_5 __attribute((sbitAT0x95)); +norace uint8_t volatile P1_6 __attribute((sbitAT0x96)); +norace uint8_t volatile P1_7 __attribute((sbitAT0x97)); /* P1 alternate functions*/ -uint8_t volatile T2 __attribute((sbitAT0x90)); +norace uint8_t volatile T2 __attribute((sbitAT0x90)); /* P2 bit adressable locations */ /* On some platforms (eg. cc2430) not all are available */ -uint8_t volatile P2_0 __attribute((sbitAT0xA0)); -uint8_t volatile P2_1 __attribute((sbitAT0xA1)); -uint8_t volatile P2_2 __attribute((sbitAT0xA2)); -uint8_t volatile P2_3 __attribute((sbitAT0xA3)); -uint8_t volatile P2_4 __attribute((sbitAT0xA4)); -uint8_t volatile P2_5 __attribute((sbitAT0xA5)); -uint8_t volatile P2_6 __attribute((sbitAT0xA6)); -uint8_t volatile P2_7 __attribute((sbitAT0xA7)); +norace uint8_t volatile P2_0 __attribute((sbitAT0xA0)); +norace uint8_t volatile P2_1 __attribute((sbitAT0xA1)); +norace uint8_t volatile P2_2 __attribute((sbitAT0xA2)); +norace uint8_t volatile P2_3 __attribute((sbitAT0xA3)); +norace uint8_t volatile P2_4 __attribute((sbitAT0xA4)); +norace uint8_t volatile P2_5 __attribute((sbitAT0xA5)); +norace uint8_t volatile P2_6 __attribute((sbitAT0xA6)); +norace uint8_t volatile P2_7 __attribute((sbitAT0xA7)); /* SCON */ -uint8_t volatile SM0 __attribute((sbitAT0x9F)); -uint8_t volatile SM1 __attribute((sbitAT0x9E)); -uint8_t volatile SM2 __attribute((sbitAT0x9D)); -uint8_t volatile REN __attribute((sbitAT0x9C)); -uint8_t volatile TB8 __attribute((sbitAT0x9B)); -uint8_t volatile RB8 __attribute((sbitAT0x9A)); -uint8_t volatile TI __attribute((sbitAT0x99)); -uint8_t volatile RI __attribute((sbitAT0x98)); +norace uint8_t volatile SM0 __attribute((sbitAT0x9F)); +norace uint8_t volatile SM1 __attribute((sbitAT0x9E)); +norace uint8_t volatile SM2 __attribute((sbitAT0x9D)); +norace uint8_t volatile REN __attribute((sbitAT0x9C)); +norace uint8_t volatile TB8 __attribute((sbitAT0x9B)); +norace uint8_t volatile RB8 __attribute((sbitAT0x9A)); +norace uint8_t volatile TI __attribute((sbitAT0x99)); +norace uint8_t volatile RI __attribute((sbitAT0x98)); /* T2CON */ -uint8_t volatile TF2 __attribute((sbitAT0xCF)); -uint8_t volatile EXF2 __attribute((sbitAT0xCE)); -uint8_t volatile RCLK __attribute((sbitAT0xCD)); -uint8_t volatile TCLK __attribute((sbitAT0xCC)); -uint8_t volatile EXEN2 __attribute((sbitAT0xCB)); -uint8_t volatile TR2 __attribute((sbitAT0xCA)); -uint8_t volatile C_T2 __attribute((sbitAT0xC9)); -uint8_t volatile CP_RL2 __attribute((sbitAT0xC8)); +norace uint8_t volatile TF2 __attribute((sbitAT0xCF)); +norace uint8_t volatile EXF2 __attribute((sbitAT0xCE)); +norace uint8_t volatile RCLK __attribute((sbitAT0xCD)); +norace uint8_t volatile TCLK __attribute((sbitAT0xCC)); +norace uint8_t volatile EXEN2 __attribute((sbitAT0xCB)); +norace uint8_t volatile TR2 __attribute((sbitAT0xCA)); +norace uint8_t volatile C_T2 __attribute((sbitAT0xC9)); +norace uint8_t volatile CP_RL2 __attribute((sbitAT0xC8)); /* EICON */ -uint8_t volatile SMOD1 __attribute((sbitAT0xDF)); -uint8_t volatile WDTI __attribute((sbitAT0xDB)); +norace uint8_t volatile SMOD1 __attribute((sbitAT0xDF)); +norace uint8_t volatile WDTI __attribute((sbitAT0xDB)); /* EIE */ -uint8_t volatile EWDI __attribute((sbitAT0xEC)); -uint8_t volatile EX5 __attribute((sbitAT0xEB)); -uint8_t volatile EX4 __attribute((sbitAT0xEA)); -uint8_t volatile EX3 __attribute((sbitAT0xE9)); -uint8_t volatile EX2 __attribute((sbitAT0xE8)); +norace uint8_t volatile EWDI __attribute((sbitAT0xEC)); +norace uint8_t volatile EX5 __attribute((sbitAT0xEB)); +norace uint8_t volatile EX4 __attribute((sbitAT0xEA)); +norace uint8_t volatile EX3 __attribute((sbitAT0xE9)); +norace uint8_t volatile EX2 __attribute((sbitAT0xE8)); /* EIP */ -uint8_t volatile PWDI __attribute((sbitAT0xFC)); -uint8_t volatile PX5 __attribute((sbitAT0xFB)); -uint8_t volatile PX4 __attribute((sbitAT0xFA)); -uint8_t volatile PX3 __attribute((sbitAT0xF9)); -uint8_t volatile PX2 __attribute((sbitAT0xF8)); +norace uint8_t volatile PWDI __attribute((sbitAT0xFC)); +norace uint8_t volatile PX5 __attribute((sbitAT0xFB)); +norace uint8_t volatile... [truncated message content] |
From: <mle...@us...> - 2009-09-27 19:51:27
|
Revision: 1094 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1094&view=rev Author: mleopold Date: 2009-09-27 19:51:12 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Lower case host name in switch Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/inline.extra Modified: trunk/diku/mcs51/support/make/mcs51/inline.extra =================================================================== --- trunk/diku/mcs51/support/make/mcs51/inline.extra 2009-09-27 13:42:10 UTC (rev 1093) +++ trunk/diku/mcs51/support/make/mcs51/inline.extra 2009-09-27 19:51:12 UTC (rev 1094) @@ -5,13 +5,15 @@ INLINE_FLAGS = --8051 --auto --clean --shorten endif +HOST_SWITCH=`uname -s | tr "[:upper:]" "[:lower:]" ` + .PHONY: inline inline_target: ncc @echo " Inlining $(BUILDDIR)/app.preInline.c to $(APP_C)" @echo " Build host is: $(BUILD_HOST)" cp $(APP_C) $(BUILDDIR)/app.preInline.c # $(MCS51_MAKE_PATH)/mcs51/cilly.utah.linux.8051.valueset.may.exe --out $(APP_C) $(CIL_FLAGS) $(BUILDDIR)/app.preInline.c - $(MCS51_MAKE_PATH)/mcs51/utah-inliner.pl --$(BUILD_HOST) --cilly-path=$(MCS51_MAKE_PATH)/mcs51 $(INLINE_FLAGS) --out=$(APP_C) $(BUILDDIR)/app.preInline.c + $(MCS51_MAKE_PATH)/mcs51/utah-inliner.pl --$(HOST_SWITCH) --cilly-path=$(MCS51_MAKE_PATH)/mcs51 $(INLINE_FLAGS) --out=$(APP_C) $(BUILDDIR)/app.preInline.c @mv $(APP_C) $(APP_C).tmp @echo "/* Inline flags $(INLINE_FLAGS) */" > $(APP_C) @cat $(APP_C).tmp >> $(APP_C) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-27 13:42:21
|
Revision: 1093 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1093&view=rev Author: mleopold Date: 2009-09-27 13:42:10 +0000 (Sun, 27 Sep 2009) Log Message: ----------- IAR check removed by mistake Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh Modified: trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-27 09:49:50 UTC (rev 1092) +++ trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-27 13:42:10 UTC (rev 1093) @@ -44,24 +44,26 @@ fi fi -if [ $MC == "keil" ]; then +if [ $MC = "iar" ]; then if [ -z $ISCYGWIN ]; then - if [ -z "$MCS51_WINE_KEIL_PATH" ]; then - echo "MCS51_WINE_KEIL_PATH not set (using $MCS51_WINE_KEIL_PATH_DEFAULT)" - CP=$MCS51_WINE_KEIL_PATH_DEFAULT - else + if [ ! -z "$MCS51_WINE_IAR_PATH" ]; then + if [ ! "$VERBOSE" -eq 0 ]; then + CP=$MCS51_WINE_IAR_PATH_DEFAULT + echo "MCS51_WINE_IAR_PATH not set (using $CP)" + fi + CP=$MCS51_WINE_IAR_PATH_DEFAULT + else if [ ! "$VERBOSE" -eq 0 ]; then - echo "MCS51_WINE_KEIL_PATH=$MCS51_WINE_KEIL_PATH" + echo "MCS51_WINE_IAR_PATH=$MCS51_WINE_IAR_PATH" fi - CP=$MCS51_WINE_KEIL_PATH - fi - CP=$CP/dosdevices/c:/Keil + CP=$MCS51_WINE_IAR_PATH + fi + CP=$CP/dosdevices/c:/$MCS51_IAR_PATH else - CP="c:Keil" + CP="c:$MCS51_IAR_PATH" fi fi - if [ $MC = "sdcc" ]; then CP=`which sdcc` fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-27 09:49:59
|
Revision: 1092 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1092&view=rev Author: mleopold Date: 2009-09-27 09:49:50 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Added meaninful sdcc check Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh Modified: trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-27 09:38:20 UTC (rev 1091) +++ trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-27 09:49:50 UTC (rev 1092) @@ -44,23 +44,28 @@ fi fi -if [ $MC = "iar" ]; then +if [ $MC == "keil" ]; then if [ -z $ISCYGWIN ]; then - if [ ! -z "$MCS51_WINE_IAR_PATH" ]; then + if [ -z "$MCS51_WINE_KEIL_PATH" ]; then + echo "MCS51_WINE_KEIL_PATH not set (using $MCS51_WINE_KEIL_PATH_DEFAULT)" + CP=$MCS51_WINE_KEIL_PATH_DEFAULT + else if [ ! "$VERBOSE" -eq 0 ]; then - echo "MCS51_WINE_IAR_PATH=$MCS51_WINE_IAR_PATH" + echo "MCS51_WINE_KEIL_PATH=$MCS51_WINE_KEIL_PATH" fi - CP=$MCS51_WINE_IAR_PATH - else - echo "MCS51_WINE_IAR_PATH not set (using $MCS51_WINE_IAR_PATH_DEFAULT)" - CP=$MCS51_WINE_IAR_PATH_DEFAULT + CP=$MCS51_WINE_KEIL_PATH fi - CP=$CP/dosdevices/c\:/$MCS51_IAR_PATH + CP=$CP/dosdevices/c:/Keil else - CP="c:$MCS51_IAR_PATH" + CP="c:Keil" fi fi + +if [ $MC = "sdcc" ]; then + CP=`which sdcc` +fi + #if [ "$MC" = "sdcc" ]; then #fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-27 09:38:29
|
Revision: 1091 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1091&view=rev Author: mleopold Date: 2009-09-27 09:38:20 +0000 (Sun, 27 Sep 2009) Log Message: ----------- More IAR path cleanup Modified Paths: -------------- trunk/diku/env trunk/diku/mcs51/support/make/mcs51/mcs51.rules trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh Modified: trunk/diku/env =================================================================== --- trunk/diku/env 2009-09-26 23:10:33 UTC (rev 1090) +++ trunk/diku/env 2009-09-27 09:38:20 UTC (rev 1091) @@ -13,4 +13,4 @@ export MCS51_WINE_KEIL_PATH=$HOME/.wine.keil # If using IAR set the path to the executable -export MCS51_IAR_PATH=Program\ Files/IAR\ Systems/Embedded\ Workbench\ 4.0\ Evaluation\ version/common/bin/ +export MCS51_IAR_PATH=Program\ Files/IAR\ Systems/Embedded\ Workbench\ 5.3\ Evaluation\ version/common/bin/ Modified: trunk/diku/mcs51/support/make/mcs51/mcs51.rules =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 23:10:33 UTC (rev 1090) +++ trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-27 09:38:20 UTC (rev 1091) @@ -126,7 +126,7 @@ iar: mangle builddir cp $(MCS51_MAKE_PATH)/mcs51/iar* $(BUILDDIR) - cd $(BUILDDIR) && $(MCS51_WINE_IAR) "C:$(MCS51_IAR_PATH)/iarbuild.exe" iar-app-project.ewp -build Debug + cd $(BUILDDIR) && $(MCS51_WINE_IAR) "c:$(MCS51_IAR_PATH)/iarbuild.exe" iar-app-project.ewp -build Debug @grep "SEGMENTS IN ADDRESS ORDER" -B 3 -A 20 $(BUILDDIR)/Debug/List/iar-app-project.map @grep "END OF CROSS REFERENCE" -A 8 $(BUILDDIR)/Debug/List/iar-app-project.map | grep memory cp $(BUILDDIR)/Debug/Exe/iar-app-project.a51 $(BUILDDIR)/app.hex Modified: trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-26 23:10:33 UTC (rev 1090) +++ trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-27 09:38:20 UTC (rev 1091) @@ -27,7 +27,7 @@ MC=`echo $MCS51_COMPILER | tr "[:upper:]" "[:lower:]"` CP='' -if [ "$MC"=="keil" ]; then +if [ $MC == "keil" ]; then if [ -z $ISCYGWIN ]; then if [ -z "$MCS51_WINE_KEIL_PATH" ]; then echo "MCS51_WINE_KEIL_PATH not set (using $MCS51_WINE_KEIL_PATH_DEFAULT)" @@ -40,30 +40,12 @@ fi CP=$CP/dosdevices/c:/Keil else - CP="c:/Keil" + CP="c:Keil" fi fi -if [ "$MC" = "sdcc" ]; then +if [ $MC = "iar" ]; then if [ -z $ISCYGWIN ]; then - if [ ! -z "$MCS51_WINE_SDCC_PATH" ]; then - if [ ! "$VERBOSE" -eq 0 ]; then - echo "MCS51_WINE_SDCC_PATH=$MCS51_WINE_SDCC_PATH" - fi - CP=$MCS51_WINE_SDCC_PATH - else - echo "MCS51_WINE_SDCC_PATH not set (using $MCS51_WINE_SDCC_PATH_DEFAULT)" - CP=$MCS51_WINE_SDCC_PATH_DEFAULT - fi - CP=$CP/dosdevices/c:/$MCS51_SDCC_PATH - else - CP=c:/$MCS51_SDCC_PATH - fi -fi - - -if [ "$MC" = "iar" ]; then - if [ -z $ISCYGWIN ]; then if [ ! -z "$MCS51_WINE_IAR_PATH" ]; then if [ ! "$VERBOSE" -eq 0 ]; then echo "MCS51_WINE_IAR_PATH=$MCS51_WINE_IAR_PATH" @@ -73,9 +55,9 @@ echo "MCS51_WINE_IAR_PATH not set (using $MCS51_WINE_IAR_PATH_DEFAULT)" CP=$MCS51_WINE_IAR_PATH_DEFAULT fi - CP=$CP/dosdevices/c:/$MCS51_IAR_PATH + CP=$CP/dosdevices/c\:/$MCS51_IAR_PATH else - CP=c:/$MCS51_IAR_PATH + CP="c:$MCS51_IAR_PATH" fi fi @@ -89,9 +71,6 @@ echo "Compiler check OK ($CP)." fi - - - if [ ! "$VERBOSE" -eq 0 ]; then if [ ! "$RETURN" -eq "0" ]; then echo "Environment check FAILED" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-26 23:10:43
|
Revision: 1090 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1090&view=rev Author: mleopold Date: 2009-09-26 23:10:33 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Fix IAR paths Modified Paths: -------------- trunk/diku/mcs51/doc/ChangeLog trunk/diku/mcs51/support/make/mcs51/mcs51.rules trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh Modified: trunk/diku/mcs51/doc/ChangeLog =================================================================== --- trunk/diku/mcs51/doc/ChangeLog 2009-09-26 20:16:06 UTC (rev 1089) +++ trunk/diku/mcs51/doc/ChangeLog 2009-09-26 23:10:33 UTC (rev 1090) @@ -4,6 +4,10 @@ * fake string.h to handle both Keil, IAR and SDCC varriants * leftover comment-in comment in mangleAppC.pl caused havock * produce propper interrupt definitions + * fixed a bug in constructing the IAR path in the Makefile + * updated to project file for IAR Workbench 7 or later depricating prior versions + * SDCC support updated + * Memory setup was incomplete * mangleAppC.pl support MacOS X * Baud setting now possible on commandline using make baud,B9600 cc2430em Modified: trunk/diku/mcs51/support/make/mcs51/mcs51.rules =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 20:16:06 UTC (rev 1089) +++ trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 23:10:33 UTC (rev 1090) @@ -72,7 +72,7 @@ ifeq ($(findstring CYGWIN,$(OSNAME)),CYGWIN) MCS51_IAR_PATH:=/cygdrive/c/$(MCS51_IAR_PATH) else - MCS51_IAR_PATH:=C:$(MCS51_IAR_PATH) + MCS51_IAR_PATH:=$(MCS51_IAR_PATH) ifndef MCS51_WINE_IAR_PATH MCS51_WINE_IAR_PATH := $(HOME)/.wine.iar endif @@ -126,7 +126,7 @@ iar: mangle builddir cp $(MCS51_MAKE_PATH)/mcs51/iar* $(BUILDDIR) - cd $(BUILDDIR) && $(MCS51_WINE_IAR) "$(MCS51_IAR_PATH)/iarbuild.exe" iar-app-project.ewp -build Debug + cd $(BUILDDIR) && $(MCS51_WINE_IAR) "C:$(MCS51_IAR_PATH)/iarbuild.exe" iar-app-project.ewp -build Debug @grep "SEGMENTS IN ADDRESS ORDER" -B 3 -A 20 $(BUILDDIR)/Debug/List/iar-app-project.map @grep "END OF CROSS REFERENCE" -A 8 $(BUILDDIR)/Debug/List/iar-app-project.map | grep memory cp $(BUILDDIR)/Debug/Exe/iar-app-project.a51 $(BUILDDIR)/app.hex @@ -155,7 +155,7 @@ # Build to .hex using $(MCS51_KEIL_SCRIPT) from keil: mangle $(BUILDDIR)/startup.OBJ $(BUILDDIR)/$(KEIL_BAT_SCRIPT) - cd $(BUILDDIR) $(OSTYPE) && $(MCS51_WINE_KEIL) ./$(MCS51_KEIL_SCRIPT) + cd $(BUILDDIR) $(OSTYPE) && $(MCS51_WINE_KEIL) ./$(MCS51_KEIL_SCRIPT) @bash -c "if [ -f $(COMPONENT).s ]; then mv $(COMPONENT).s build/$(PLATFORM)/; fi" @echo " compiled $(COMPONENT) to a $(PLATFORM) binary" @echo "Code size of app.o" Modified: trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-26 20:16:06 UTC (rev 1089) +++ trunk/diku/mcs51/support/make/mcs51/mcs51_env_check.sh 2009-09-26 23:10:33 UTC (rev 1090) @@ -44,6 +44,24 @@ fi fi +if [ "$MC" = "sdcc" ]; then + if [ -z $ISCYGWIN ]; then + if [ ! -z "$MCS51_WINE_SDCC_PATH" ]; then + if [ ! "$VERBOSE" -eq 0 ]; then + echo "MCS51_WINE_SDCC_PATH=$MCS51_WINE_SDCC_PATH" + fi + CP=$MCS51_WINE_SDCC_PATH + else + echo "MCS51_WINE_SDCC_PATH not set (using $MCS51_WINE_SDCC_PATH_DEFAULT)" + CP=$MCS51_WINE_SDCC_PATH_DEFAULT + fi + CP=$CP/dosdevices/c:/$MCS51_SDCC_PATH + else + CP=c:/$MCS51_SDCC_PATH + fi +fi + + if [ "$MC" = "iar" ]; then if [ -z $ISCYGWIN ]; then if [ ! -z "$MCS51_WINE_IAR_PATH" ]; then @@ -68,9 +86,7 @@ echo "Compiler not found not found ($CP)." RETURN=1 else - if [ ! "$VERBOSE" -eq 0 ]; then - echo "Keil found ($CP)." - fi + echo "Compiler check OK ($CP)." fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-26 20:16:18
|
Revision: 1089 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1089&view=rev Author: mleopold Date: 2009-09-26 20:16:06 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Removed binary Modified Paths: -------------- trunk/diku/mcs51/doc/ChangeLog Removed Paths: ------------- trunk/diku/common/tools/compression/average Deleted: trunk/diku/common/tools/compression/average =================================================================== (Binary files differ) Modified: trunk/diku/mcs51/doc/ChangeLog =================================================================== --- trunk/diku/mcs51/doc/ChangeLog 2009-09-26 17:57:12 UTC (rev 1088) +++ trunk/diku/mcs51/doc/ChangeLog 2009-09-26 20:16:06 UTC (rev 1089) @@ -72,6 +72,12 @@ PlatformSerialC: UartStream, UartByte, ... SDCC virkende for simple programmer Move Jan debug libraries to common + Jan: Reentrant problem: + * Alle funktion som bliver kaldt fra sync og async kontekst er defekte + * L\xF8sn 1: Alle er reentrant + * L\xF8ns 2: Marker hver for sig => TOS "mellem funtioner" virker ikke + => Hvad med CIL? + Til n\xE6ste gang: CIL, IAR, 0.2 Timer precision as advertized This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mle...@us...> - 2009-09-26 17:57:22
|
Revision: 1088 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1088&view=rev Author: mleopold Date: 2009-09-26 17:57:12 +0000 (Sat, 26 Sep 2009) Log Message: ----------- SDCC memory setup for CC2430 was incomplete Modified Paths: -------------- trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc trunk/diku/common/tools/compression/average trunk/diku/common/tools/compression/frequency.cc trunk/diku/mcs51/support/make/cc2430em.target trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/mcs51/support/make/mcs51/mcs51.rules trunk/diku/mcs51/support/make/nano.target trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc trunk/diku/tiny15four/support/make/tiny15four.extra Added Paths: ----------- trunk/diku/common/lib/compression/compressor.h Removed Paths: ------------- trunk/diku/common/lib/compression/compressor.h trunk/diku/common/tools/compression/frequency Modified: trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc =================================================================== --- trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc 2009-09-26 17:57:12 UTC (rev 1088) @@ -49,28 +49,26 @@ task void delay(); event void Boot.booted() { - call Leds.led0On(); - call Leds.led1On(); - call Leds.led2On(); + call Leds.led0Off(); + call Leds.led1Off(); + call Leds.led2Off(); post delay(); } task void delay() { - uint16_t i,j; - - for (i=0 ; i<0x1FFU ; i++) { - for (j=0 ; j<0xA0 ; j++) { + uint16_t i,j; + for (i=0 ; i<0x1FFU ; i++) { + for (j=0 ; j<0xA0 ; j++) { + } } + post toggle(); } - post toggle(); - post delay(); - } task void toggle() { - call Leds.led0Toggle(); call Leds.led1Toggle(); call Leds.led2Toggle(); + post delay(); } } Deleted: trunk/diku/common/lib/compression/compressor.h =================================================================== --- trunk/diku/common/lib/compression/compressor.h 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/lib/compression/compressor.h 2009-09-26 17:57:12 UTC (rev 1088) @@ -1 +0,0 @@ -link lz77.h \ No newline at end of file Added: trunk/diku/common/lib/compression/compressor.h =================================================================== --- trunk/diku/common/lib/compression/compressor.h (rev 0) +++ trunk/diku/common/lib/compression/compressor.h 2009-09-26 17:57:12 UTC (rev 1088) @@ -0,0 +1 @@ +link lz77.h \ No newline at end of file Property changes on: trunk/diku/common/lib/compression/compressor.h ___________________________________________________________________ Added: svn:special + * Modified: trunk/diku/common/tools/compression/average =================================================================== (Binary files differ) Deleted: trunk/diku/common/tools/compression/frequency =================================================================== (Binary files differ) Modified: trunk/diku/common/tools/compression/frequency.cc =================================================================== --- trunk/diku/common/tools/compression/frequency.cc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/tools/compression/frequency.cc 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,6 +1,8 @@ #include <stdio.h> #include <iostream> #include <queue> +#include <string.h> +#include <stdlib.h> uint32_t *raw[5]; uint32_t *diffs[5]; Modified: trunk/diku/mcs51/support/make/cc2430em.target =================================================================== --- trunk/diku/mcs51/support/make/cc2430em.target 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/cc2430em.target 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,5 +1,6 @@ PLATFORM = cc2430em MCS51_KEIL_SCRIPT=CC2430-F128.bat +SDCC_CFLAGS_MEM=--xram-loc 0xE000 --xram-size 0x1F00 ifdef PLATFORM PFLAGS += -D__$(PLATFORM)__ -D__cc2430__ Modified: trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat =================================================================== --- trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat 2009-09-26 17:57:12 UTC (rev 1088) @@ -10,7 +10,7 @@ rem C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OPTIMIZE(0,SIZE) OBJECT(.\app.obj) rem Compile app.c to app.obj -C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OBJECT(.\app.obj) SYMBOLS +C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OBJECT(.\app.obj) SYMBOLS DEBUG CODE rem Link startup.obj/app.obj and convert to hex rem C:\Keil\C51\BIN\BL51.EXE "startup.obj", "app.obj" TO "app" PRINT (app.map) XDATA( 0XE000-0XFF00 ) RAMSIZE(256) REGFILE(app.reg) Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-26 17:57:12 UTC (rev 1088) @@ -370,7 +370,7 @@ # are a nono... # Remove empty attributes (a leftover from reentrant and interrupt handling). - s{(__attribute(?:__)?\s*\(\(\)\))}{}g; + s{(__attribute(?:__)?\s*\(\(.*\)\))}{}g; if (! (m{^.*/\*} || # /* style comment m{^.*//})){ # // style comment Modified: trunk/diku/mcs51/support/make/mcs51/mcs51.rules =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 17:57:12 UTC (rev 1088) @@ -12,12 +12,17 @@ NCC = ncc SDCC = sdcc -# hmm.. should be --model-large, but that seems to fail # --std-sdcc99 allows inline +# Additional interesting options include +# --nogcse: In case of overflow of "*_sloc" in the DSEG area +# --nooverlay: If function pointers are used + ifndef SDCC_CFLAGS - SDCC_CFLAGS = -mmcs51 --model-large --no-c-code-in-asm --std-sdcc99 + SDCC_CFLAGS = -mmcs51 --std-sdcc99 --model-large --no-c-code-in-asm --out-fmt-ihx --main-return endif +# --short-is-8bit + BUILDDIR = build/$(PLATFORM) MAIN_EXE = $(BUILDDIR)/APP MAIN_SREC = $(BUILDDIR)/main.srec @@ -131,8 +136,7 @@ .PHONY: sdcc sdcc: mangle - $(SDCC) $(SDCC_CFLAGS) $(APP_C) -o$(BUILDDIR)/app - packihx $(BUILDDIR)/app > $(BUILDDIR)/app.hex + $(SDCC) $(SDCC_CFLAGS) $(SDCC_CFLAGS_MEM) $(SDCC_CFLAGS_EXTRA) $(APP_C) -o$(BUILDDIR)/app.hex @echo "Segment sizes" @grep -A 1 "OSEG" $(BUILDDIR)/app.sym @grep -A 1 "SSEG" $(BUILDDIR)/app.sym Modified: trunk/diku/mcs51/support/make/nano.target =================================================================== --- trunk/diku/mcs51/support/make/nano.target 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/nano.target 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,5 +1,6 @@ PLATFORM = nano MCS51_KEIL_SCRIPT=CC2430-F128.bat +SDCC_CFLAGS_MEM=--xram-loc 0xE000 --xram-size 0x1F00 # Check if we are using the 802.15.4 library. ifneq ($(filter $(MAKECMDGOALS),tiny15four),) Modified: trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc 2009-09-26 17:57:12 UTC (rev 1088) @@ -71,7 +71,7 @@ inline async command bool name.get() { return ( pin != 0); } \ inline async command void name.set() { pin = 1; } \ inline async command void name.clr() { pin = 0; } \ - async command void name.toggle() { atomic { pin = ~pin; } } \ + async command void name.toggle() { atomic { pin = (pin)?0:1; } } \ inline async command bool name.isInput() { IS_IO_PIN_INPUT(pin_dir, pin_dir_bit); } \ inline async command bool name.isOutput() { IS_IO_PIN_OUTPUT(pin_dir, pin_dir_bit); } \ inline async command void name.makeInput() { MAKE_IO_PIN_INPUT (pin_dir, pin_dir_bit); } \ Modified: trunk/diku/tiny15four/support/make/tiny15four.extra =================================================================== --- trunk/diku/tiny15four/support/make/tiny15four.extra 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/tiny15four/support/make/tiny15four.extra 2009-09-26 17:57:12 UTC (rev 1088) @@ -34,6 +34,12 @@ NESC_FLAGS=-Wnesc-data-race -Wnesc-async -Wno-nesc-fnptr -Wnesc-combine +# Using SDCC for the 8051 platform requires additional arguements +# to disable the wird "runtime stack" and a wierd local variable location +# optimization that seems to fill up the "DSEG" area + +SDCC_CFLAGS_EXTRA=--nogcse --nooverlay + # Get includes from the platform.t15f file for the chosen platform. include $(TINY15FOUR_DIR)/tos/platforms/$(PLATFORM)/platform.t15f This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2009-09-26 14:54:23
|
Revision: 1087 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1087&view=rev Author: qzban Date: 2009-09-26 14:53:58 +0000 (Sat, 26 Sep 2009) Log Message: ----------- PhyTypes.h case problem corrected. Modified Paths: -------------- trunk/diku/tiny15four/tos/interfaces/phy/PhyEnergyDetect.nc Modified: trunk/diku/tiny15four/tos/interfaces/phy/PhyEnergyDetect.nc =================================================================== --- trunk/diku/tiny15four/tos/interfaces/phy/PhyEnergyDetect.nc 2009-09-23 15:40:52 UTC (rev 1086) +++ trunk/diku/tiny15four/tos/interfaces/phy/PhyEnergyDetect.nc 2009-09-26 14:53:58 UTC (rev 1087) @@ -28,7 +28,7 @@ @author Jan Flora <jan...@di...> */ -#include "phyTypes.h" +#include "PhyTypes.h" interface PhyEnergyDetect { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2009-09-23 15:41:27
|
Revision: 1086 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1086&view=rev Author: qzban Date: 2009-09-23 15:40:52 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Mangle script update. Even more reentrant issues... Modified Paths: -------------- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-08 09:22:59 UTC (rev 1085) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-23 15:40:52 UTC (rev 1086) @@ -71,6 +71,7 @@ my %typedef_struct_empty_ident = (); my $line_no = 0; my $schedulerBasicReentrant = 0; +my $reentrantWait = 0; # Parenthesis levels. my $bracketLevel = 0; @@ -319,12 +320,22 @@ foreach my $reentrantFunc (@reentrantFunctions) { my $funcName = quotemeta($reentrantFunc); if (m{\s+$funcName\s*\(}g) { - s{([^\;]*)}{$1 reentrant}; - printf STDERR "Fixed reentrant function prototype: '%s'\n",$funcName; + if (m{\(} != m{\)}) { + # Paranthesis levels do not match. Wait for ")". + $reentrantWait = 1; + } else { + s{([^\;]*)}{$1 reentrant}; + printf STDERR "Fixed reentrant function prototype: '%s'\n",$funcName; + } } # $i++; } } + + if ($reentrantWait && m{\);}) { + s{\)}{) reentrant}; + $reentrantWait = 0; + } # Make the TinyOS task poster function reentrant as well. # NOTE: This will not work if the BasicScheduler is replaced. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2009-09-08 09:23:24
|
Revision: 1085 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1085&view=rev Author: qzban Date: 2009-09-08 09:22:59 +0000 (Tue, 08 Sep 2009) Log Message: ----------- Remove __attributes that are not catched in the HCS08 mangle-script... Modified Paths: -------------- trunk/diku/freescale/support/make/CodeWarrior/hcs08MangleAppC.pl Modified: trunk/diku/freescale/support/make/CodeWarrior/hcs08MangleAppC.pl =================================================================== --- trunk/diku/freescale/support/make/CodeWarrior/hcs08MangleAppC.pl 2009-09-07 09:20:16 UTC (rev 1084) +++ trunk/diku/freescale/support/make/CodeWarrior/hcs08MangleAppC.pl 2009-09-08 09:22:59 UTC (rev 1085) @@ -121,7 +121,7 @@ } # Remove attributes that has not been processed. - s{(__attribute(?:__)?\s*\(\(.*\)\))}{/*$1*/}g; + s{(?:\/\*)*(__attribute(?:__)?\s*\(\(.*\)\))(?:\*\/)*}{/*$1*/}g; $sourceCode .= $_; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qz...@us...> - 2009-09-07 09:21:56
|
Revision: 1084 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1084&view=rev Author: qzban Date: 2009-09-07 09:20:16 +0000 (Mon, 07 Sep 2009) Log Message: ----------- New UART code with added generic support for TinyOS 2.x UartByte, UartStream and SerialFlush. Only implemented on the nano platform, as it still needs testing! Modified Paths: -------------- trunk/diku/mcs51/tos/platforms/nano/UartC.nc Modified: trunk/diku/mcs51/tos/platforms/nano/UartC.nc =================================================================== --- trunk/diku/mcs51/tos/platforms/nano/UartC.nc 2009-09-07 09:18:57 UTC (rev 1083) +++ trunk/diku/mcs51/tos/platforms/nano/UartC.nc 2009-09-07 09:20:16 UTC (rev 1084) @@ -43,7 +43,7 @@ { interface SerialByteComm; interface SerialFlush; - interface UartStream: + interface UartStream; } } implementation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |