newrpl/hal.c

32 lines
589 B
C
Raw Normal View History

2014-05-21 19:47:14 +02:00
/*
* Copyright (c) 2014, Claudio Lapilli and the newRPL Team
* All rights reserved.
* This file is released under the 3-clause BSD license.
* See the file LICENSE.txt that shipped with this distribution.
*/
2014-04-28 00:53:11 +02:00
// HARDWARE DEPENDENT LAYER
#include "hal.h"
#ifdef TARGET_PC_SIMULATOR
// NEWSIZE IS IN 32-BIT WORDS!
2014-10-17 14:22:00 +02:00
WORDPTR *halGrowMemory(BINT zone, WORDPTR *base, BINT newsize)
2014-04-28 00:53:11 +02:00
{
if(!base) return malloc(MAX_RAM);
else {
if((newsize<<2)>MAX_RAM) return 0;
return base;
}
}
#endif
// FOR OTHER TARGETS, THIS FUNCTION WILL BE SUPPLIED BY THE FIRMWARE