• Problem with structs as return values
    I am using functions, which returns structs. This shouldn't be a problem in C. And it works mostly. But are there contexts where this is not allowed? Maybe there a conflicts because those structs...
  • Function returning a struct
    Hi, How come the 51 compiler V7.04 cannot compile the following code? typedef struct { int i; } S; S jj(void) { S k; return(k); } S i(void) { return(jj()); } void main(void...
  • gmtime in time.h not generating correct values
    Hi guys, I have the following code for a Freescale KL25Z-based Cortex-M0+, which attempts to generate hours, minutes, seconds etc from an epoch time that I'm extracting from the RTC: #include...
  • local variables not showing correct value
    Hi, Am I doing something wrong? The local variable below called 'test_byte' is used to hold return values from function 'ser_buff_read_byte ()'. The value returned is always 0x1D both in the watch...
  • Correction
    Hi guys, Thanks for the help! Last night, I was lying in bed and came across the manual section it stated that you need to declare & define the code variable in one statement. I think I had read...