Search:

Type: Posts; User: freeindy

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,930

    Ah yeah, ofcourse. Thanks grumpy, I used your...

    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...
  2. Replies
    6
    Views
    2,930

    No, It didn't work. I tried: #if...

    No, It didn't work. I tried:


    #if SET_WD!=ENABLE
    #undef SET_WD
    #endif


    Indy
  3. Replies
    6
    Views
    2,930

    macro function

    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....
  4. Replies
    5
    Views
    1,499

    Thanks lads. That clears the mind :-) Indy

    Thanks lads. That clears the mind :-)

    Indy
  5. Replies
    5
    Views
    1,499

    malloc,free pointer question.

    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
  6. Replies
    4
    Views
    2,411

    Thanks, it works! Inderjit

    Thanks, it works!

    Inderjit
  7. Replies
    4
    Views
    2,411

    gcc with nesc 1.1.3.

    gcc with nesc 1.1.3.
  8. Replies
    4
    Views
    2,411

    Divide 64bit number

    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:
  9. I guess I have to hard code it... can't use...

    I guess I have to hard code it... can't use assert function... thanks though.

    Indy
  10. Calculation of sizof through macro. Possible?

    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:
  11. Replies
    10
    Views
    2,752

    i know about the readability/maintainability. the...

    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...
  12. Replies
    10
    Views
    2,752

    ah yeah ofcourse... i was sitting and trying with...

    ah yeah ofcourse... i was sitting and trying with % + / *.
    thanks mike_g
  13. Replies
    10
    Views
    2,752

    arithmetic help

    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;
  14. Replies
    1
    Views
    1,407

    Sorry. The code works. My fault. The error is a...

    Sorry. The code works. My fault. The error is a call in between... sorry for that.

    Regards,
    Indy
  15. Replies
    1
    Views
    1,407

    Loosing data in array after allocation

    Hi,

    I have a little problem. I have a function as follows:


    int getData(char** pStream)
    {
    char data[LENGTH];
    ...
    // Addming data to the array
  16. Replies
    6
    Views
    1,801

    Thanks for the code. Looks a lot better....

    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...
  17. Replies
    6
    Views
    1,801

    Hi again, I changed the structure to this: ...

    Hi again,

    I changed the structure to this:


    typedef struct
    {
    word addr;
    byte slot;
    byte frame;
  18. Replies
    6
    Views
    1,801

    Thanks for the reply. My mistake, I got lost in...

    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
  19. Replies
    6
    Views
    1,801

    Malloc problem

    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;
  20. Replies
    1
    Views
    2,007

    time synchronization problem

    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;
Results 1 to 20 of 20