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;
...
Type: Posts; User: ridgerunnersjw
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;
...
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;
...
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...
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 =...
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...
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...
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...
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?
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...
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...
Thanks
Quick question:
In C are
&TIM1->CCR1
and
How do you write the following as two nested loops?
for (int low = 0, high = n - 1; low < high; low++, high--)
As erikkonstas points out ....it is accessible throughout the program WITH the help of extern
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...
File a.c
int a = 5;
file b.c
#include <stdio.h>int main()
{
printf("%d", a);
Thank you all for the help!
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)...
Pointers continually elude me.....See below two 'supposedly' equivalent examples:
int A;
int *pA;
pA = &A;
int A;
int *pA = (int *)A;
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...
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...
Thank you....That works. I understand your comment on 0xFF vs "FF".
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,...
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};
Perfect