Hi,
Please find below the part of the code.
Code:
// a structure used in the code
typedef struct
{
unsigned long up;
unsigned long down;
}LOAD;
static void update_load(
LOAD *cpl,
void *mesg,
unsigned short pkt
)
{
unsigned char c;
for (c=0; c<3; c++)
{
update_first(&(cpl[c]), &(cpl[0]), m_size_us);
}
update_second(&(cpl[0]), m_size_us);
}
// Where the function update_load is
static void update_first(LOAD *load_p, LOAD *p_link, unsigned long m_size_us)
{
unsigned long start;
start = p_link_p->up;
load_p->down += m_size_us;
}
static void update_second(LOAD *load_p, unsigned long m_size_us)
{
load_p->up += m_size_us;
}
I have pasted some code, Will look to the inputs.
Thanks,