Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPISettings while keeping __SPISettings as an alias for wiring layer #2138

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions wiring/inc/spark_wiring_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ enum FrequencyScale
};

namespace particle {
class __SPISettings : public Printable {
class SPISettings : public Printable {
public:
__SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode)
SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode)
: default_{false},
clock_{clock},
bitOrder_{bitOrder},
dataMode_{dataMode}
{
}

__SPISettings()
SPISettings()
{
}

bool operator==(const __SPISettings& other) const
bool operator==(const SPISettings& other) const
{
if (default_ && other.default_)
return true;
Expand All @@ -77,7 +77,7 @@ class __SPISettings : public Printable {
return false;
}

bool operator>=(const __SPISettings& other) const
bool operator>=(const SPISettings& other) const
{
if (default_ && other.default_)
return true;
Expand All @@ -93,7 +93,7 @@ class __SPISettings : public Printable {
return false;
}

bool operator<=(const __SPISettings& other) const
bool operator<=(const SPISettings& other) const
{
if (default_ && other.default_)
return true;
Expand All @@ -109,7 +109,7 @@ class __SPISettings : public Printable {
return false;
}

bool operator!=(const __SPISettings& other) const
bool operator!=(const SPISettings& other) const
{
return !(other == *this);
}
Expand All @@ -133,6 +133,7 @@ class __SPISettings : public Printable {
uint8_t bitOrder_ = 0;
uint8_t dataMode_ = 0;
};
typedef SPISettings __SPISettings;
}

// NOTE: when modifying this class (method signatures, adding/removing methods)
Expand Down