activated the new workaround...

This commit is contained in:
joxe 2010-03-19 14:50:07 +00:00
parent 7e6919cc8c
commit e99c906caf
2 changed files with 44 additions and 44 deletions

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* @(#)$Id: msp430.c,v 1.11 2010/03/19 14:39:45 joxe Exp $ * @(#)$Id: msp430.c,v 1.12 2010/03/19 14:50:07 joxe Exp $
*/ */
#include <io.h> #include <io.h>
#include <signal.h> #include <signal.h>
@ -39,28 +39,28 @@
#include "net/uip.h" #include "net/uip.h"
/* /\*---------------------------------------------------------------------------*\/ */ /* /\*---------------------------------------------------------------------------*\/ */
/* void * */ void *
/* w_memcpy(void *out, const void *in, size_t n) */ w_memcpy(void *out, const void *in, size_t n)
/* { */ {
/* uint8_t *src, *dest; */ uint8_t *src, *dest;
/* src = (uint8_t *) in; */ src = (uint8_t *) in;
/* dest = (uint8_t *) out; */ dest = (uint8_t *) out;
/* while(n-- > 0) { */ while(n-- > 0) {
/* *dest++ = *src++; */ *dest++ = *src++;
/* } */ }
/* return out; */ return out;
/* } */ }
/* /\*---------------------------------------------------------------------------*\/ */ /*---------------------------------------------------------------------------*/
/* void * */ void *
/* w_memset(void *out, int value, size_t n) */ w_memset(void *out, int value, size_t n)
/* { */ {
/* uint8_t *dest; */ uint8_t *dest;
/* dest = (uint8_t *) out; */ dest = (uint8_t *) out;
/* while(n-- > 0) { */ while(n-- > 0) {
/* *dest++ = value & 0xff; */ *dest++ = value & 0xff;
/* } */ }
/* return out; */ return out;
/* } */ }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
msp430_init_dco(void) msp430_init_dco(void)

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)$Id: msp430def.h,v 1.4 2010/03/19 14:39:45 joxe Exp $ * @(#)$Id: msp430def.h,v 1.5 2010/03/19 14:50:07 joxe Exp $
*/ */
#ifndef MSP430DEF_H #ifndef MSP430DEF_H
@ -76,29 +76,29 @@ spl_t splhigh_(void);
#ifndef memcpy #ifndef memcpy
#include <string.h> #include <string.h>
/* void *w_memcpy(void *out, const void *in, size_t n); */ void *w_memcpy(void *out, const void *in, size_t n);
#define memcpy(dest, src, count) w_memcpy(dest, src, count)
/* #define memcpy(dest, src, count) w_memcpy(dest, src, count) */ /* #define memcpy(dest, src, count) do { \ */
#define memcpy(dest, src, count) do { \ /* if(count == 2) { \ */
if(count == 2) { \ /* *((uint8_t *)dest) = *((uint8_t *)src); \ */
*((uint8_t *)dest) = *((uint8_t *)src); \ /* *((uint8_t *)dest + 1) = *((uint8_t *)src + 1); \ */
*((uint8_t *)dest + 1) = *((uint8_t *)src + 1); \ /* } else { \ */
} else { \ /* memcpy(dest, src, count); \ */
memcpy(dest, src, count); \ /* } \ */
} \ /* } while(0) */
} while(0)
/* void *w_memset(void *out, int value, size_t n); */ void *w_memset(void *out, int value, size_t n);
#define memset(dest, value, count) w_memset(dest, value, count)
/* #define memset(dest, value, count) w_memset(dest, value, count) */ /* #define memset(dest, value, count) do { \ */
#define memset(dest, value, count) do { \ /* if(count == 2) { \ */
if(count == 2) { \ /* *((uint8_t *)dest) = (uint8_t)value; \ */
*((uint8_t *)dest) = (uint8_t)value; \ /* *((uint8_t *)dest + 1) = (uint8_t)value; \ */
*((uint8_t *)dest + 1) = (uint8_t)value; \ /* } else { \ */
} else { \ /* memset(dest, value, count); \ */
memset(dest, value, count); \ /* } \ */
} \ /* } while(0) */
} while(0)
#endif /* memcpy */ #endif /* memcpy */
#endif /* __GNUC__ && __MSP430__ && MSP430_MEMCPY_WORKAROUND */ #endif /* __GNUC__ && __MSP430__ && MSP430_MEMCPY_WORKAROUND */