leo25 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

SPI_CLOCK_DIV64 is redifined #567

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In SPI.h, SPI_CLOCK_DIV64 is defined twice. Below is the code from SPI.h.  It 
is defined as 0x02, and then redifined as 0x07.

#define SPI_CLOCK_DIV4 0x00
#define SPI_CLOCK_DIV16 0x01
#define SPI_CLOCK_DIV64 0x02
#define SPI_CLOCK_DIV128 0x03
#define SPI_CLOCK_DIV2 0x04
#define SPI_CLOCK_DIV8 0x05
#define SPI_CLOCK_DIV32 0x06
#define SPI_CLOCK_DIV64 0x07

I'm writing CMake build scripts to compile the arduino code into static 
libraries.  This was the compiler warning:

In file included from 
/home/devind/Projects/Arduino/src/Ethernet/utility/w5100.h:14:0,                

                 from /home/devind/Projects/Arduino/src/Ethernet/Ethernet.cpp:1:
/home/devind/Projects/Arduino/include/SPI/SPI.h:25:0: warning: 
"SPI_CLOCK_DIV64" redefined
/home/devind/Projects/Arduino/include/SPI/SPI.h:20:0: note: this is the 
location of the previous definition

I'm using the arduino-0022 code on Gentoo Linux, but the OS doesn't really 
matter.

Original issue reported on code.google.com by devindel...@gmail.com on 3 Jul 2011 at 4:25

GoogleCodeExporter commented 9 years ago
I can confirm this, i wasn't sure which one was actually correct. But i 
commented the bottom one out.

Original comment by robindegen on 10 Oct 2011 at 10:25

GoogleCodeExporter commented 9 years ago
This issue is a duplicate of issue 208.

It has been fixed by a patch applied on Oct 2, 2011.

https://github.com/arduino/Arduino/commit/85c109f255c44ca2bb89af0f6503ca9ab675b1
6a

Original comment by paul.sto...@gmail.com on 14 Oct 2011 at 9:18

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 14 Oct 2011 at 5:49