[En-Nut-Discussion] SW SPI bus reading data

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Sep 19 09:42:09 CEST 2016


Hi,

I assume you missed to include

#include <dev/spibus.h>

Best regards,

Ole Reinhardt


Am 19.09.2016 um 06:48 schrieb Aigars:
> 259 line is this:
> 
> NUTSPINODE my_node = {
> 
> In context:
> 
> NUTSPINODE my_node = {
>     &spiBus0Gpio, /* Pointer to the bus controller driver. */
>     NULL, /* Optional pointer to device specific settings. */
>     10000, /* SPI clock rate. */
>     3, /* SPI mode. */
>     8, /* SPI data bits. */
>     0,  /* Chip select index. */
> };
> 
> I suspect that something else is needed in 4.6.5 version of NutOS (I use
> this because Charon2 is not working with newer NutOS).
> Aigars
> 
> On 2016.09.16. 13:09, Uwe Bonnes wrote:
>>>>>>> "Aigars" == Aigars  <aigars at egle.cs.rtu.lv> writes:
>>      Aigars> On re configuring NutOS&rebuilding and adding to httpserv.c
>>      Aigars> file: NUTSPINODE my_node = { &spiBus0Gpio, /* Pointer to
>> the bus
>>      Aigars> controller driver. */ NULL, /* Optional pointer to device
>>      Aigars> specific settings. */ 10000, /* SPI clock rate. */ 3, /* SPI
>>      Aigars> mode. */ 8, /* SPI data bits. */ 0, /* Chip select index.
>> */ };
>>      Aigars> I get: c:\ethernut-4.6.5\nutapp_charon2\httpd>make
>> avr-gcc -c
>>      Aigars> -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
>>      Aigars> -Wstrict-prototypes -Wa,-ahlms=httpserv.lst -DCHARON2
>>      Aigars> -D__HARVARD_ARCH__ -I../../nutbld_charon2/include
>>      Aigars> -I../../nut/include httpserv.c -o httpserv.o httpserv.c:259:
>>      Aigars> error: expected '=', ',', ';', 'asm' or '__attribute__'
>> before
>>      Aigars> 'my_node' httpserv.c: In function 'NutAppMain':
>> httpserv.c:886:
>>      Aigars> warning: no return statement in function returning non-void
>>      Aigars> make: *** [httpserv.o] Error 1
>>
>> Your error output refers to line 259 in changed code that you don't
>> show. So
>> I can not decipher or reproduce.
>>
>> And please, quote less...
>>
>> Bye
>>
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
> 

-- 
Embedded-IT
Alter Weg 3
57223 Kreuztal
http://www.embedded-it.de

Tel.: +49-177-7420433


More information about the En-Nut-Discussion mailing list