Search:

Type: Posts; User: ridgerunnersjw

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,545

    GCC compiler warning???

    Hello all...
    I am getting a warning from my compiler and would like to know how to resolve it??

    I have an h file with the following code:

    typedef struct mainScreen_t{
    uint8_t line;
    ...
  2. Coding question? Following yields error, not sure how to fix?

    Can someone tell me how to fix the following error? I am not a software guy and have tried multiple things but not figured it out.

    H file:

    typedef struct mainScreen_t{
    uint8_t line;
    ...
  3. don't know how to solve pointer to union of two different types??

    I have the following simplified code and I need to have a formula take a uint16_t. This value however comes from multiple sources (ie multiple types) depending on who is calling the formula. The...
  4. Replies
    3
    Views
    2,589

    looking to use sizeof for enum?

    I have a type enum and would like to use the sizeof command to get a value....Can I do this? For instance my enum is:


    typedef enum {EMPTY, RST, PWM_DIV, PWM_DUTYCYCLE, DAC_REF, ADC_SAMP_TIME =...
  5. Best way to convert ascii UART characters??

    Hello...
    I have a UART and am sending 4 characters + return character....Example:

    '32', '34', '41', '33', '0d' (24A3 + return)...the 2 is a command and will be used in a switch statement. I...
  6. Replies
    4
    Views
    2,161

    t_SenseDataRaw SensorData = {0};float...

    t_SenseDataRaw SensorData = {0};float *pSensorData;
    pSensorData = &SensorData.Vbias[0][0];




    typedef struct {
    float Vbias[3][4]; //indexing reading 1/2/3 ; 10/50/100/200 mA
    float...
  7. Replies
    4
    Views
    2,161

    how to advance pointer in a for loop?

    Hello....
    Can someone help me here as I clearly don't know what I am doing:

    1. I would like to know how to create a pointer to the following structure?

    2. Then how to advance the pointer to...
  8. Yea that is where I ended up.....Was hoping that...

    Yea that is where I ended up.....Was hoping that within voltage function there was a way to do the assignment in a loop rather than line by line assigning....idk maybe that is not possible?
  9. John..... My hope is to somehow put each member...

    John.....
    My hope is to somehow put each member of the structure into a common array name so that I can then do math on it in a for loop. So to your question....Yes I would like to convert each...
  10. Trying to make the following work but getting invalid type conversion?

    Hi All....
    I am getting a type conversion within the following function call. Can someone explain how I can fix this? I have 4 pieces of info in the struct and would like to use a for loop to...
  11. Replies
    2
    Views
    1,427

    Thanks

    Thanks
  12. Replies
    2
    Views
    1,427

    Order of Precedence

    Quick question:

    In C are


    &TIM1->CCR1

    and
  13. Replies
    3
    Views
    3,121

    single for loop --- two conditions??

    How do you write the following as two nested loops?


    for (int low = 0, high = n - 1; low < high; low++, high--)
  14. Replies
    9
    Views
    7,107

    As erikkonstas points out ....it is accessible...

    As erikkonstas points out ....it is accessible throughout the program WITH the help of extern
  15. Replies
    9
    Views
    7,107

    Fair enough.....let me ask you this....is it true...

    Fair enough.....let me ask you this....is it true that in file a.c where int a =5; is defined (which is outside all functions within that file) that this variable will not be destroyed but be...
  16. Replies
    9
    Views
    7,107

    global variable question?

    File a.c

    int a = 5;


    file b.c

    #include <stdio.h>int main()
    {
    printf("%d", a);
  17. Replies
    7
    Views
    5,843

    Thank you all for the help!

    Thank you all for the help!
  18. Replies
    7
    Views
    5,843

    This is an embedded block of code looking at a...

    This is an embedded block of code looking at a register on an STM32 processor. The following compiles without error:


    #include <stdint.h>

    #define RCC_BASE_ADDR 0x40023800U


    int main(void)...
  19. Replies
    7
    Views
    5,843

    pointer struggles ???

    Pointers continually elude me.....See below two 'supposedly' equivalent examples:

    int A;
    int *pA;
    pA = &A;


    int A;
    int *pA = (int *)A;
  20. Replies
    1
    Views
    2,851

    Explanation on order of precedence?

    I am under the impression that the -> takes precedence over '.' Is this true? The first statement below works but looks to me like there should be parenthesis.

    Can someone tell me what each of...
  21. Replies
    1
    Views
    3,086

    Best approach for tackling search??

    I am working on an embedded 16 bit platform and have an array that when empty is stuffed with 0xFF. The array depth is 50. During a configuration process this array will take on values 0x00 for...
  22. Replies
    4
    Views
    1,882

    Thank you....That works. I understand your...

    Thank you....That works. I understand your comment on 0xFF vs "FF".
  23. Replies
    4
    Views
    1,882

    Other than using a for loop I was looking for a...

    Other than using a for loop I was looking for a way to verify that permanent_Info was loaded with 0xFF. I would like the mVk =1 in the above situation and it doesn't. Actually had to move int sW,...
  24. Replies
    4
    Views
    1,882

    memcmp not stepping into

    Can someone tell me why the following isn't working?


    #include <string.h>

    int main(void)
    {
    int sW, mVk;
    char permanent_Info[4] = { [0 ... 3] = 0xFF};
  25. Replies
    2
    Views
    4,485

    Perfect

    Perfect
Results 1 to 25 of 91
Page 1 of 4 1 2 3 4