Program Listing for File IO_QSPI_OVER.h#
↰ Return to documentation for file (src/generated/enums/IO_QSPI_OVER.h)
#pragma once
#ifndef RP2040_ENUMS_IO_QSPI_OVER_H
#define RP2040_ENUMS_IO_QSPI_OVER_H
#include "../ifgen/common.h"
#include <cstdint>
#include <cstring>
namespace RP2040
{
enum class IO_QSPI_OVER : uint8_t
{
NORMAL ,
INVERT = 1
,
LOW = 2 ,
HIGH = 3
};
static_assert(sizeof(IO_QSPI_OVER) == 1);
inline const char *to_string(IO_QSPI_OVER instance)
{
const char *result = "UNKNOWN IO_QSPI_OVER";
switch (instance)
{
case IO_QSPI_OVER::NORMAL:
result = "NORMAL";
break;
case IO_QSPI_OVER::INVERT:
result = "INVERT";
break;
case IO_QSPI_OVER::LOW:
result = "LOW";
break;
case IO_QSPI_OVER::HIGH:
result = "HIGH";
break;
}
return result;
}
inline std::ostream &operator<<(std::ostream &stream, IO_QSPI_OVER instance)
{
stream << to_string(instance);
return stream;
}
inline bool from_string(const char *data, IO_QSPI_OVER &output)
{
bool result = false;
if ((result = !strncmp(data, "NORMAL", 6)))
{
output = IO_QSPI_OVER::NORMAL;
}
else if ((result = !strncmp(data, "INVERT", 6)))
{
output = IO_QSPI_OVER::INVERT;
}
else if ((result = !strncmp(data, "LOW", 3)))
{
output = IO_QSPI_OVER::LOW;
}
else if ((result = !strncmp(data, "HIGH", 4)))
{
output = IO_QSPI_OVER::HIGH;
}
return result;
}
}; // namespace RP2040
#endif