So why not
Code:
void CanTransmit(uint8_t *TxData)
{
}
void CalculateCurrent(uint8_t *TxData, int offset)
{
uint8_t current = 12;
TxData[offset] = current ;
}
void CalVoltage(uint8_t *TxData, int offset)
{
uint8_t voltage = 15;
TxData[offset] = voltage;
}
int main(void)
{
uint8 TxData[8];
while(1)
{
CalculateCurrent(TxData,0);
CalVoltage(TxData,1);
CanTransmit(TxData);
}
}
> The problem is multiple people work on the software.
It's called design, and agreeing on an interface specification for the boundaries between functional/work areas.
> Call the FillBuffer code periodically.
Well a while(1) loop will do that.
At the very least, you need some means of measuring time if you want to call something say once a second.
Ideally, you have an OS of some sort to make this easier.