Skip to content

SPI library: invalid operands #1

Description

@ball-hayden

Configuration

Operating system:

Fedora 25

PlatformIO Version (platformio --version):

PlatformIO, version 3.2.1

PlatformIO Environment

[env:genuino101]
platform = intel_arc32
board = genuino101
framework = arduino

Description of problem

A project including the SPI library fails to compile.

Steps to Reproduce

  1. Create a new platformio project with the environment above
  2. Create a main.ino with only:
#include <SPI.h>
  1. Build the project

Expected Results

The project should build

Actual Results

In file included from /home/hayden/.platformio/packages/framework-arduinointel/libraries/SPI/src/SPI.h:20:0,
from /home/hayden/Desktop/test/src/main.ino:1:
/home/hayden/.platformio/packages/framework-arduinointel/libraries/SPI/src/SPI.h: In constructor ‘SPISettings::SPISettings(uint32_t, uint8_t, uint8_t)’:
/home/hayden/.platformio/packages/framework-arduinointel/libraries/SPI/src/SPI_registers.h:53:42: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator&’
#define     SPI_CLOCK_MASK        (0xFFFE)  /* Clock divider: any even value
^
/home/hayden/.platformio/packages/framework-arduinointel/libraries/SPI/src/SPI.h:82:40: note: in expansion of macro ‘SPI_CLOCK_MASK’
baudr = (SPI_BASE_CLOCK / clock) & SPI_CLOCK_MASK;
^
*** [.pioenvs/genuino101/src/main.ino.o] Error 1
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40476257-spi-library-invalid-operands?utm_campaign=plugin&utm_content=tracker%2F38213350&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38213350&utm_medium=issues&utm_source=github).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions