Ah yeah, ofcourse.
Thanks grumpy, I used your first suggestion and it works like a charm. I wanted a proper logic so I set the define ENABLE to 1. Makes more sense from the outside.
Thanks ye...
Type: Posts; User: freeindy
Ah yeah, ofcourse.
Thanks grumpy, I used your first suggestion and it works like a charm. I wanted a proper logic so I set the define ENABLE to 1. Makes more sense from the outside.
Thanks ye...
No, It didn't work. I tried:
#if SET_WD!=ENABLE
#undef SET_WD
#endif
Indy
Hi.
I have a Makefile with following definition:
CFLAGS += -DSET_WD=ENABLE
And in my header file, I want to have a macro funtion that determines if the SET_WD is set to ENABLE or DISABLE....
Thanks lads. That clears the mind :-)
Indy
Hi, I have a thought that i'd like to clear out.
I allocate memory say;
char* p = malloc(20);
p = p + 5;
//do stuff
Thanks, it works!
Inderjit
gcc with nesc 1.1.3.
Hi,
I want to divide a 64 bit value. I have a struct as following:
struct T
{
uint32_t high32;
uint32_t low32;
};
And in for example in my main:
I guess I have to hard code it... can't use assert function... thanks though.
Indy
Hi,
I need help on calculating sizeof through a macro. I have the folloing layout.
In file "One.h"
typedef uint16_t tTime;
And in file "Two.h" I want to calculate as follwing:
i know about the readability/maintainability. the first reason was to use only arithmetic operation is for faster execution on the target machine which is not a pc. It's an atmel processor with a...
ah yeah ofcourse... i was sitting and trying with % + / *.
thanks mike_g
Hi,
I want to make a programming procedure a bit more compact if possible:
I have the following code:
available = QUEUE_SIZE - sendQ.count;
if(available < length)
copySize = available;
Sorry. The code works. My fault. The error is a call in between... sorry for that.
Regards,
Indy
Hi,
I have a little problem. I have a function as follows:
int getData(char** pStream)
{
char data[LENGTH];
...
// Addming data to the array
Thanks for the code. Looks a lot better. Regarding NesC. You're right, it is possible but only if you create an component. The reason goes in basic implementation of a nesc/tinyos design. Creating a...
Hi again,
I changed the structure to this:
typedef struct
{
word addr;
byte slot;
byte frame;
Thanks for the reply. My mistake, I got lost in the code that I forgot the obvious...
Sorry for the delay, I've been away. I'll try it now
Hi, I'm getting a crash on the routine on a device and i'm not sure why:
I have the following structures:
struct NodeSlotFrame
{
word addr;
byte slot;
Hi,
I have a problem concerning time synchronization with two devices. Both devices has the following interrupt routine:
uint16_t time;
uint16_t mark;
INTERVAL = 10;