Author |
Message |
Topic: returning structs by value |
cwedgwood
Replies: 13
Views: 14236
|
Forum: General CCS C Discussion Posted: Thu Sep 20, 2012 3:23 am Subject: returning structs by value |
Anybody managed to make return struct by value work?
I've used it before. (and had it work)
-Ben
Thanks Ben. |
Topic: returning structs by value |
cwedgwood
Replies: 13
Views: 14236
|
Forum: General CCS C Discussion Posted: Wed Sep 19, 2012 9:01 am Subject: returning structs by value |
OK
18F26K22
4.132 |
Topic: returning structs by value |
cwedgwood
Replies: 13
Views: 14236
|
Forum: General CCS C Discussion Posted: Wed Sep 19, 2012 8:20 am Subject: returning structs by value |
Please read the sticky thread on top of this forum before posting!
- Always post your compiler version number (as it might be an old bug that has already been solved).
- Always post your used PIC nu ... |
Topic: returning structs by value |
cwedgwood
Replies: 13
Views: 14236
|
Forum: General CCS C Discussion Posted: Wed Sep 19, 2012 6:43 am Subject: returning structs by value |
typedef struct
{
float r,i;
} complex;
complex cadd(complex a, complex b)
{
complex c;
c.r=a.r+b.r;
c.i=a.i+b.i;
return c;
}
So, this should ... |
Topic: RTOS compile issue |
cwedgwood
Replies: 2
Views: 5763
|
Forum: General CCS C Discussion Posted: Thu Apr 05, 2012 2:43 am Subject: RTOS compile issue |
I have the answer to this.
My definition of the max macro causes a problem with the #task line, because the max= gets macro substituted. |
Topic: RTOS compile issue |
cwedgwood
Replies: 2
Views: 5763
|
Forum: General CCS C Discussion Posted: Wed Mar 28, 2012 3:29 am Subject: RTOS compile issue |
Using PIC 18F26K22, PCWH Version 4.119
I get this error
*** Error 9 "main.c" Line54(6,37) Macro identifier requires parameters
*** Error 100 "main.c" Line 54(6,37): USE par ... |
Topic: 18F26K22 with spi and I2c |
cwedgwood
Replies: 7
Views: 10188
|
Forum: General CCS C Discussion Posted: Wed Mar 28, 2012 3:14 am Subject: 18F26K22 with spi and I2c |
Thanks PCM, problem all fixed now. |
Topic: 18F26K22 with spi and I2c |
cwedgwood
Replies: 7
Views: 10188
|
Forum: General CCS C Discussion Posted: Mon Mar 26, 2012 9:50 am Subject: 18F26K22 with spi and I2c |
Thanks, but would this cause the code to hang? |
Topic: 18F26K22 with spi and I2c |
cwedgwood
Replies: 7
Views: 10188
|
Forum: General CCS C Discussion Posted: Mon Mar 26, 2012 9:17 am Subject: 18F26K22 with spi and I2c |
Thanks,
No pullups, i'm using NOFLOAT_HIGH instead. |
Topic: 18F26K22 with spi and I2c |
cwedgwood
Replies: 7
Views: 10188
|
Forum: General CCS C Discussion Posted: Mon Mar 26, 2012 9:11 am Subject: 18F26K22 with spi and I2c |
Does anyone have working code for this chip with both spi and I2C working?
My config is spi_2 and I2c on 1.
It seem to hang on any write to the I2C.
Thanks for any help.
Chris |
Topic: Debugger problem 18F26K22 |
cwedgwood
Replies: 1
Views: 26864
|
Forum: CCS ICD / Mach X / Load-n-Go Posted: Fri Mar 16, 2012 6:46 am Subject: Debugger problem 18F26K22 |
Solved.. it was a faulty PIC. |
Topic: Debugger problem 18F26K22 |
cwedgwood
Replies: 1
Views: 26864
|
Forum: CCS ICD / Mach X / Load-n-Go Posted: Fri Mar 16, 2012 3:07 am Subject: Debugger problem 18F26K22 |
Hi All,
I have an odd issue, I get a verify error from the degugger for a memory location not in the device :(
So, compile, reset the debugger, it then loads the code and I get a dialog error bo ... |
|