i have seen in some places of coding where a function is used in return statement. Why is it done? Any advantage?
Example
int SubFunction1(void)
{
return subfunction2();
Type: Posts; User: Satya
i have seen in some places of coding where a function is used in return statement. Why is it done? Any advantage?
Example
int SubFunction1(void)
{
return subfunction2();
I am really trying understand pointer to pointer in function arguments. I am seeing a lot in my example projects using double pointer. I want to know what is the main use of them? One example...
The document is very big. Can you help me if it answers my question. Please advise.
FreeRTOS
I know that RTOS executes the tasks at the exact time. But i have one clarification suppose if i create two taska at 10ms and 20ms. When the first 10ms is over it executes 10ms task but when another...
I am getting strict orders to limit the number of global variables to be used. So i am trying to change the logic if possible. One such scenario is the application gives a request to transmit a group...
Yeah i did so much programming but every time i start writing a new program/logic nervousness comes in. Just want to know the exact steps to follow before I jump to coding. I think i am doing a big...
I have seen implementation of getversioninfo in each c file of a set of files. I did not understand the purpose of version information of each file separately? I have seen that the generated files do...
Structures add padding bytes i should not worry about that ?
Yes the static library did the job. Thanks.
Please help me to come out of this confusion. whenever i start a project and start developing i declare global variables based on the requirement like int, float etc. But lot of people suggesting me...
It is an embedded project for micro controllers i am not sure if DLL files will be available for them.
It is little bit difficult for me to explain this scenario. I have a project developed by manufacturers and i downloaded and it compiles with their project environment. They provide some API which i...
Why is it so ? And how shall i proceed ? Can i just neglect and proceed ? Please advise.
According to me C program should execute sequentially. I am referring to one of the standard C example projects developed by the micro controller chip manufacturers, i see in some of the functions...
Thank you very much for the reply. Can you please explain me
with one example? How do i know whether it is aligned or not aligned correctly? Please help.
I am confused with pointer type casting. I read that i cannot type case an integer pointer to float pointer. Am I correct? The code is
#include <stdio.h>
int main(void)
{
int...
It is a micro controller based application. I am writing a driver for 1ms now i want to give to application an interface such that he can use it for example if he wants to call a particular task...
Generally when developing an application or a logic we need to write a function. There is always chance that you can write either as void function with no arguments or something with function...
What you said is correct. Thank you. I will try to rewrite the code. I am using git version control.
What you say is correct but i am right now at every advance stage of project. So i am not sure at this stage i can take the risk of re writing the code.
I have a large c project with several files. The problem is frequently i get issues and need to relook each and every variable for debugging. I need some tools which can generate a kind of all...
I have a number of #defines as of now it is around 50. I have to create an array of these number of #defines. In future the number of defines may increase so the array. Is it possible to count the...
I wanted to have part number as global variable as in future it may change for every new version and change frequently, i want to provide at a place where it can be changed easily.
Ok, Thank you. I modified the code as follows
#include <stdio.h>
typedef unsigned char uint8_t;
typedef unsigned long uint64_t;
/*
The partnumber should be transmitted as BCD
The...