diff --git a/hardware/studuino/studuino/avr/boards.txt b/hardware/studuino/avr/boards.txt similarity index 100% rename from hardware/studuino/studuino/avr/boards.txt rename to hardware/studuino/avr/boards.txt diff --git a/hardware/studuino/studuino/avr/platform.txt b/hardware/studuino/avr/platform.txt similarity index 100% rename from hardware/studuino/studuino/avr/platform.txt rename to hardware/studuino/avr/platform.txt diff --git a/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.cpp b/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.cpp deleted file mode 100644 index f3e8187..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.cpp +++ /dev/null @@ -1,384 +0,0 @@ -#include - -#if !defined(SPI_INTERFACES_COUNT) || \ - (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) - -/*! - * @brief Create a register we access over an I2C Device (which defines the - * bus and address) - * @param i2cdevice The I2CDevice to use for underlying I2C access - * @param reg_addr The address pointer value for the I2C/SMBus register, can - * be 8 or 16 bits - * @param width The width of the register data itself, defaults to 1 byte - * @param byteorder The byte order of the register (used when width is > 1), - * defaults to LSBFIRST - * @param address_width The width of the register address itself, defaults - * to 1 byte - */ -Adafruit_BusIO_Register::Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, - uint16_t reg_addr, - uint8_t width, - uint8_t byteorder, - uint8_t address_width) { - _i2cdevice = i2cdevice; - _spidevice = nullptr; - _addrwidth = address_width; - _address = reg_addr; - _byteorder = byteorder; - _width = width; -} - -/*! - * @brief Create a register we access over an SPI Device (which defines the - * bus and CS pin) - * @param spidevice The SPIDevice to use for underlying SPI access - * @param reg_addr The address pointer value for the SPI register, can - * be 8 or 16 bits - * @param type The method we use to read/write data to SPI (which is not - * as well defined as I2C) - * @param width The width of the register data itself, defaults to 1 byte - * @param byteorder The byte order of the register (used when width is > 1), - * defaults to LSBFIRST - * @param address_width The width of the register address itself, defaults - * to 1 byte - */ -Adafruit_BusIO_Register::Adafruit_BusIO_Register(Adafruit_SPIDevice *spidevice, - uint16_t reg_addr, - Adafruit_BusIO_SPIRegType type, - uint8_t width, - uint8_t byteorder, - uint8_t address_width) { - _spidevice = spidevice; - _spiregtype = type; - _i2cdevice = nullptr; - _addrwidth = address_width; - _address = reg_addr; - _byteorder = byteorder; - _width = width; -} - -/*! - * @brief Create a register we access over an I2C or SPI Device. This is a - * handy function because we can pass in nullptr for the unused interface, - * allowing libraries to mass-define all the registers - * @param i2cdevice The I2CDevice to use for underlying I2C access, if - * nullptr we use SPI - * @param spidevice The SPIDevice to use for underlying SPI access, if - * nullptr we use I2C - * @param reg_addr The address pointer value for the I2C/SMBus/SPI register, - * can be 8 or 16 bits - * @param type The method we use to read/write data to SPI (which is not - * as well defined as I2C) - * @param width The width of the register data itself, defaults to 1 byte - * @param byteorder The byte order of the register (used when width is > 1), - * defaults to LSBFIRST - * @param address_width The width of the register address itself, defaults - * to 1 byte - */ -Adafruit_BusIO_Register::Adafruit_BusIO_Register( - Adafruit_I2CDevice *i2cdevice, Adafruit_SPIDevice *spidevice, - Adafruit_BusIO_SPIRegType type, uint16_t reg_addr, uint8_t width, - uint8_t byteorder, uint8_t address_width) { - _spidevice = spidevice; - _i2cdevice = i2cdevice; - _spiregtype = type; - _addrwidth = address_width; - _address = reg_addr; - _byteorder = byteorder; - _width = width; -} - -/*! - * @brief Create a register we access over a GenericDevice - * @param genericdevice Generic device to use - * @param reg_addr Register address we will read/write - * @param width Width of the register in bytes (1-4) - * @param byteorder Byte order of register data (LSBFIRST or MSBFIRST) - * @param address_width Width of the register address in bytes (1 or 2) - */ -Adafruit_BusIO_Register::Adafruit_BusIO_Register( - Adafruit_GenericDevice *genericdevice, uint16_t reg_addr, uint8_t width, - uint8_t byteorder, uint8_t address_width) { - _i2cdevice = nullptr; - _spidevice = nullptr; - _genericdevice = genericdevice; - _addrwidth = address_width; - _address = reg_addr; - _byteorder = byteorder; - _width = width; -} - -/*! - * @brief Write a buffer of data to the register location - * @param buffer Pointer to data to write - * @param len Number of bytes to write - * @return True on successful write (only really useful for I2C as SPI is - * uncheckable) - */ -bool Adafruit_BusIO_Register::write(uint8_t *buffer, uint8_t len) { - uint8_t addrbuffer[2] = {(uint8_t)(_address & 0xFF), - (uint8_t)(_address >> 8)}; - if (_i2cdevice) { - return _i2cdevice->write(buffer, len, true, addrbuffer, _addrwidth); - } - if (_spidevice) { - if (_spiregtype == ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE) { - // very special case! - // pass the special opcode address which we set as the high byte of the - // regaddr - addrbuffer[0] = - (uint8_t)(_address >> 8) & ~0x01; // set bottom bit low to write - // the 'actual' reg addr is the second byte then - addrbuffer[1] = (uint8_t)(_address & 0xFF); - // the address appears to be a byte longer - return _spidevice->write(buffer, len, addrbuffer, _addrwidth + 1); - } - if (_spiregtype == ADDRBIT8_HIGH_TOREAD) { - addrbuffer[0] &= ~0x80; - } - if (_spiregtype == ADDRBIT8_HIGH_TOWRITE) { - addrbuffer[0] |= 0x80; - } - if (_spiregtype == AD8_HIGH_TOREAD_AD7_HIGH_TOINC) { - addrbuffer[0] &= ~0x80; - addrbuffer[0] |= 0x40; - } - return _spidevice->write(buffer, len, addrbuffer, _addrwidth); - } - if (_genericdevice) { - return _genericdevice->writeRegister(addrbuffer, _addrwidth, buffer, len); - } - return false; -} - -/*! - * @brief Write up to 4 bytes of data to the register location - * @param value Data to write - * @param numbytes How many bytes from 'value' to write - * @return True on successful write (only really useful for I2C as SPI is - * uncheckable) - */ -bool Adafruit_BusIO_Register::write(uint32_t value, uint8_t numbytes) { - if (numbytes == 0) { - numbytes = _width; - } - if (numbytes > 4) { - return false; - } - - // store a copy - _cached = value; - - for (int i = 0; i < numbytes; i++) { - if (_byteorder == LSBFIRST) { - _buffer[i] = value & 0xFF; - } else { - _buffer[numbytes - i - 1] = value & 0xFF; - } - value >>= 8; - } - return write(_buffer, numbytes); -} - -/*! - * @brief Read data from the register location. This does not do any error - * checking! - * @return Returns 0xFFFFFFFF on failure, value otherwise - */ -uint32_t Adafruit_BusIO_Register::read(void) { - if (!read(_buffer, _width)) { - return -1; - } - - uint32_t value = 0; - - for (int i = 0; i < _width; i++) { - value <<= 8; - if (_byteorder == LSBFIRST) { - value |= _buffer[_width - i - 1]; - } else { - value |= _buffer[i]; - } - } - - return value; -} - -/*! - * @brief Read cached data from last time we wrote to this register - * @return Returns 0xFFFFFFFF on failure, value otherwise - */ -uint32_t Adafruit_BusIO_Register::readCached(void) { return _cached; } - -/*! - @brief Read a number of bytes from a register into a buffer - @param buffer Buffer to read data into - @param len Number of bytes to read into the buffer - @return true on successful read, otherwise false -*/ -bool Adafruit_BusIO_Register::read(uint8_t *buffer, uint8_t len) { - uint8_t addrbuffer[2] = {(uint8_t)(_address & 0xFF), - (uint8_t)(_address >> 8)}; - if (_i2cdevice) { - return _i2cdevice->write_then_read(addrbuffer, _addrwidth, buffer, len); - } - if (_spidevice) { - if (_spiregtype == ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE) { - // very special case! - // pass the special opcode address which we set as the high byte of the - // regaddr - addrbuffer[0] = - (uint8_t)(_address >> 8) | 0x01; // set bottom bit high to read - // the 'actual' reg addr is the second byte then - addrbuffer[1] = (uint8_t)(_address & 0xFF); - // the address appears to be a byte longer - return _spidevice->write_then_read(addrbuffer, _addrwidth + 1, buffer, - len); - } - if (_spiregtype == ADDRBIT8_HIGH_TOREAD) { - addrbuffer[0] |= 0x80; - } - if (_spiregtype == ADDRBIT8_HIGH_TOWRITE) { - addrbuffer[0] &= ~0x80; - } - if (_spiregtype == AD8_HIGH_TOREAD_AD7_HIGH_TOINC) { - addrbuffer[0] |= 0x80 | 0x40; - } - return _spidevice->write_then_read(addrbuffer, _addrwidth, buffer, len); - } - if (_genericdevice) { - return _genericdevice->readRegister(addrbuffer, _addrwidth, buffer, len); - } - return false; -} - -/*! - * @brief Read 2 bytes of data from the register location - * @param value Pointer to uint16_t variable to read into - * @return True on successful write (only really useful for I2C as SPI is - * uncheckable) - */ -bool Adafruit_BusIO_Register::read(uint16_t *value) { - if (!read(_buffer, 2)) { - return false; - } - - if (_byteorder == LSBFIRST) { - *value = _buffer[1]; - *value <<= 8; - *value |= _buffer[0]; - } else { - *value = _buffer[0]; - *value <<= 8; - *value |= _buffer[1]; - } - return true; -} - -/*! - * @brief Read 1 byte of data from the register location - * @param value Pointer to uint8_t variable to read into - * @return True on successful write (only really useful for I2C as SPI is - * uncheckable) - */ -bool Adafruit_BusIO_Register::read(uint8_t *value) { - if (!read(_buffer, 1)) { - return false; - } - - *value = _buffer[0]; - return true; -} - -/*! - * @brief Pretty printer for this register - * @param s The Stream to print to, defaults to &Serial - */ -void Adafruit_BusIO_Register::print(Stream *s) { - uint32_t val = read(); - s->print("0x"); - s->print(val, HEX); -} - -/*! - * @brief Pretty printer for this register - * @param s The Stream to print to, defaults to &Serial - */ -void Adafruit_BusIO_Register::println(Stream *s) { - print(s); - s->println(); -} - -/*! - * @brief Create a slice of the register that we can address without - * touching other bits - * @param reg The Adafruit_BusIO_Register which defines the bus/register - * @param bits The number of bits wide we are slicing - * @param shift The number of bits that our bit-slice is shifted from LSB - */ -Adafruit_BusIO_RegisterBits::Adafruit_BusIO_RegisterBits( - Adafruit_BusIO_Register *reg, uint8_t bits, uint8_t shift) { - _register = reg; - _bits = bits; - _shift = shift; -} - -/*! - * @brief Read 4 bytes of data from the register - * @return data The 4 bytes to read - */ -uint32_t Adafruit_BusIO_RegisterBits::read(void) { - uint32_t val = _register->read(); - val >>= _shift; - return val & ((1 << (_bits)) - 1); -} - -/*! - * @brief Write 4 bytes of data to the register - * @param data The 4 bytes to write - * @return True on successful write (only really useful for I2C as SPI is - * uncheckable) - */ -bool Adafruit_BusIO_RegisterBits::write(uint32_t data) { - uint32_t val = _register->read(); - - // mask off the data before writing - uint32_t mask = (1 << (_bits)) - 1; - data &= mask; - - mask <<= _shift; - val &= ~mask; // remove the current data at that spot - val |= data << _shift; // and add in the new data - - return _register->write(val, _register->width()); -} - -/*! - * @brief The width of the register data, helpful for doing calculations - * @returns The data width used when initializing the register - */ -uint8_t Adafruit_BusIO_Register::width(void) { return _width; } - -/*! - * @brief Set the default width of data - * @param width the default width of data read from register - */ -void Adafruit_BusIO_Register::setWidth(uint8_t width) { _width = width; } - -/*! - * @brief Set register address - * @param address the address from register - */ -void Adafruit_BusIO_Register::setAddress(uint16_t address) { - _address = address; -} - -/*! - * @brief Set the width of register address - * @param address_width the width for register address - */ -void Adafruit_BusIO_Register::setAddressWidth(uint16_t address_width) { - _addrwidth = address_width; -} - -#endif // SPI exists diff --git a/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.h b/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.h deleted file mode 100644 index 046e04c..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef Adafruit_BusIO_Register_h -#define Adafruit_BusIO_Register_h - -#include - -#if !defined(SPI_INTERFACES_COUNT) || \ - (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) - -#include -#include -#include - -typedef enum _Adafruit_BusIO_SPIRegType { - ADDRBIT8_HIGH_TOREAD = 0, - /*!< - * ADDRBIT8_HIGH_TOREAD - * When reading a register you must actually send the value 0x80 + register - * address to the device. e.g. To read the register 0x0B the register value - * 0x8B is sent and to write 0x0B is sent. - */ - AD8_HIGH_TOREAD_AD7_HIGH_TOINC = 1, - - /*!< - * ADDRBIT8_HIGH_TOWRITE - * When writing to a register you must actually send the value 0x80 + - * the register address to the device. e.g. To write to the register 0x19 the - * register value 0x99 is sent and to read 0x19 is sent. - */ - ADDRBIT8_HIGH_TOWRITE = 2, - - /*!< - * ADDRESSED_OPCODE_LOWBIT_TO_WRITE - * Used by the MCP23S series, we send 0x40 |'rd with the opcode - * Then set the lowest bit to write - */ - ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE = 3, - -} Adafruit_BusIO_SPIRegType; - -/*! - * @brief The class which defines a device register (a location to read/write - * data from) - */ -class Adafruit_BusIO_Register { -public: - Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, uint16_t reg_addr, - uint8_t width = 1, uint8_t byteorder = LSBFIRST, - uint8_t address_width = 1); - - Adafruit_BusIO_Register(Adafruit_SPIDevice *spidevice, uint16_t reg_addr, - Adafruit_BusIO_SPIRegType type, uint8_t width = 1, - uint8_t byteorder = LSBFIRST, - uint8_t address_width = 1); - - Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, - Adafruit_SPIDevice *spidevice, - Adafruit_BusIO_SPIRegType type, uint16_t reg_addr, - uint8_t width = 1, uint8_t byteorder = LSBFIRST, - uint8_t address_width = 1); - - Adafruit_BusIO_Register(Adafruit_GenericDevice *genericdevice, - uint16_t reg_addr, uint8_t width = 1, - uint8_t byteorder = LSBFIRST, - uint8_t address_width = 1); - - bool read(uint8_t *buffer, uint8_t len); - bool read(uint8_t *value); - bool read(uint16_t *value); - uint32_t read(void); - uint32_t readCached(void); - bool write(uint8_t *buffer, uint8_t len); - bool write(uint32_t value, uint8_t numbytes = 0); - - uint8_t width(void); - - void setWidth(uint8_t width); - void setAddress(uint16_t address); - void setAddressWidth(uint16_t address_width); - -#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL) - void print(Stream *s = &Serial); - void println(Stream *s = &Serial); -#else - void print(Stream *s); - void println(Stream *s); -#endif - -private: - Adafruit_I2CDevice *_i2cdevice; - Adafruit_SPIDevice *_spidevice; - Adafruit_GenericDevice *_genericdevice; - Adafruit_BusIO_SPIRegType _spiregtype; - uint16_t _address; - uint8_t _width, _addrwidth, _byteorder; - uint8_t _buffer[4]; // we won't support anything larger than uint32 for - // non-buffered read - uint32_t _cached = 0; -}; - -/*! - * @brief The class which defines a slice of bits from within a device register - * (a location to read/write data from) - */ -class Adafruit_BusIO_RegisterBits { -public: - Adafruit_BusIO_RegisterBits(Adafruit_BusIO_Register *reg, uint8_t bits, - uint8_t shift); - bool write(uint32_t value); - uint32_t read(void); - -private: - Adafruit_BusIO_Register *_register; - uint8_t _bits, _shift; -}; - -#endif // SPI exists -#endif // BusIO_Register_h diff --git a/libraries/Adafruit_BusIO/Adafruit_GenericDevice.cpp b/libraries/Adafruit_BusIO/Adafruit_GenericDevice.cpp deleted file mode 100644 index 37f9cfd..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_GenericDevice.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - Written with help by Claude! - https://claude.ai/chat/335f50b1-3dd8-435e-9139-57ec7ca26a3c (at this time - chats are not shareable :( -*/ - -#include "Adafruit_GenericDevice.h" - -/*! - * @brief Create a Generic device with the provided read/write functions - * @param obj Pointer to object instance - * @param read_func Function pointer for reading raw data - * @param write_func Function pointer for writing raw data - * @param readreg_func Function pointer for reading registers (optional) - * @param writereg_func Function pointer for writing registers (optional) */ -Adafruit_GenericDevice::Adafruit_GenericDevice( - void *obj, busio_genericdevice_read_t read_func, - busio_genericdevice_write_t write_func, - busio_genericdevice_readreg_t readreg_func, - busio_genericdevice_writereg_t writereg_func) { - _obj = obj; - _read_func = read_func; - _write_func = write_func; - _readreg_func = readreg_func; - _writereg_func = writereg_func; - _begun = false; -} - -/*! @brief Simple begin function (doesn't do much at this time) - @return true always -*/ -bool Adafruit_GenericDevice::begin(void) { - _begun = true; - return true; -} - -/*! -@brief Marks the GenericDevice as no longer in use. -@note: Since this is a GenericDevice, if you are using this with a Serial -object, this does NOT disable serial communication or release the RX/TX pins. -That must be done manually by calling Serial.end(). -*/ -void Adafruit_GenericDevice::end(void) { _begun = false; } - -/*! @brief Write a buffer of data - @param buffer Pointer to buffer of data to write - @param len Number of bytes to write - @return true if write was successful, otherwise false */ -bool Adafruit_GenericDevice::write(const uint8_t *buffer, size_t len) { - if (!_begun) - return false; - return _write_func(_obj, buffer, len); -} - -/*! @brief Read data into a buffer - @param buffer Pointer to buffer to read data into - @param len Number of bytes to read - @return true if read was successful, otherwise false */ -bool Adafruit_GenericDevice::read(uint8_t *buffer, size_t len) { - if (!_begun) - return false; - return _read_func(_obj, buffer, len); -} - -/*! @brief Read from a register location - @param addr_buf Buffer containing register address - @param addrsiz Size of register address in bytes - @param buf Buffer to store read data - @param bufsiz Size of data to read in bytes - @return true if read was successful, otherwise false */ -bool Adafruit_GenericDevice::readRegister(uint8_t *addr_buf, uint8_t addrsiz, - uint8_t *buf, uint16_t bufsiz) { - if (!_begun || !_readreg_func) - return false; - return _readreg_func(_obj, addr_buf, addrsiz, buf, bufsiz); -} - -/*! @brief Write to a register location - @param addr_buf Buffer containing register address - @param addrsiz Size of register address in bytes - @param buf Buffer containing data to write - @param bufsiz Size of data to write in bytes - @return true if write was successful, otherwise false */ -bool Adafruit_GenericDevice::writeRegister(uint8_t *addr_buf, uint8_t addrsiz, - const uint8_t *buf, - uint16_t bufsiz) { - if (!_begun || !_writereg_func) - return false; - return _writereg_func(_obj, addr_buf, addrsiz, buf, bufsiz); -} diff --git a/libraries/Adafruit_BusIO/Adafruit_GenericDevice.h b/libraries/Adafruit_BusIO/Adafruit_GenericDevice.h deleted file mode 100644 index d5cb326..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_GenericDevice.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef ADAFRUIT_GENERICDEVICE_H -#define ADAFRUIT_GENERICDEVICE_H - -#include - -typedef bool (*busio_genericdevice_read_t)(void *obj, uint8_t *buffer, - size_t len); -typedef bool (*busio_genericdevice_write_t)(void *obj, const uint8_t *buffer, - size_t len); -typedef bool (*busio_genericdevice_readreg_t)(void *obj, uint8_t *addr_buf, - uint8_t addrsiz, uint8_t *data, - uint16_t datalen); -typedef bool (*busio_genericdevice_writereg_t)(void *obj, uint8_t *addr_buf, - uint8_t addrsiz, - const uint8_t *data, - uint16_t datalen); - -/*! - * @brief Class for communicating with a device via generic read/write functions - */ -class Adafruit_GenericDevice { -public: - Adafruit_GenericDevice( - void *obj, busio_genericdevice_read_t read_func, - busio_genericdevice_write_t write_func, - busio_genericdevice_readreg_t readreg_func = nullptr, - busio_genericdevice_writereg_t writereg_func = nullptr); - - bool begin(void); - void end(void); - - bool read(uint8_t *buffer, size_t len); - bool write(const uint8_t *buffer, size_t len); - bool readRegister(uint8_t *addr_buf, uint8_t addrsiz, uint8_t *buf, - uint16_t bufsiz); - bool writeRegister(uint8_t *addr_buf, uint8_t addrsiz, const uint8_t *buf, - uint16_t bufsiz); - -protected: - /*! @brief Function pointer for reading raw data from the device */ - busio_genericdevice_read_t _read_func; - /*! @brief Function pointer for writing raw data to the device */ - busio_genericdevice_write_t _write_func; - /*! @brief Function pointer for reading a 'register' from the device */ - busio_genericdevice_readreg_t _readreg_func; - /*! @brief Function pointer for writing a 'register' to the device */ - busio_genericdevice_writereg_t _writereg_func; - - bool _begun; ///< whether we have initialized yet (in case the function needs - ///< to do something) - -private: - void *_obj; ///< Pointer to object instance -}; - -#endif // ADAFRUIT_GENERICDEVICE_H diff --git a/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp b/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp deleted file mode 100644 index 2633cf1..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp +++ /dev/null @@ -1,320 +0,0 @@ -#include "Adafruit_I2CDevice.h" - -// #define DEBUG_SERIAL Serial - -/*! - * @brief Create an I2C device at a given address - * @param addr The 7-bit I2C address for the device - * @param theWire The I2C bus to use, defaults to &Wire - */ -Adafruit_I2CDevice::Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire) { - _addr = addr; - _wire = theWire; - _begun = false; -#ifdef ARDUINO_ARCH_SAMD - _maxBufferSize = 250; // as defined in Wire.h's RingBuffer -#elif defined(ESP32) - _maxBufferSize = I2C_BUFFER_LENGTH; -#else - _maxBufferSize = 32; -#endif -} - -/*! - * @brief Initializes and does basic address detection - * @param addr_detect Whether we should attempt to detect the I2C address - * with a scan. 99% of sensors/devices don't mind, but once in a while they - * don't respond well to a scan! - * @return True if I2C initialized and a device with the addr found - */ -bool Adafruit_I2CDevice::begin(bool addr_detect) { - _wire->begin(); - _begun = true; - - if (addr_detect) { - return detected(); - } - return true; -} - -/*! - * @brief De-initialize device, turn off the Wire interface - */ -void Adafruit_I2CDevice::end(void) { - // Not all port implement Wire::end(), such as - // - ESP8266 - // - AVR core without WIRE_HAS_END - // - ESP32: end() is implemented since 2.0.1 which is latest at the moment. - // Temporarily disable for now to give time for user to update. -#if !(defined(ESP8266) || \ - (defined(ARDUINO_ARCH_AVR) && !defined(WIRE_HAS_END)) || \ - defined(ARDUINO_ARCH_ESP32)) - _wire->end(); - _begun = false; -#endif -} - -/*! - * @brief Scans I2C for the address - note will give a false-positive - * if there's no pullups on I2C - * @return True if I2C initialized and a device with the addr found - */ -bool Adafruit_I2CDevice::detected(void) { - // Init I2C if not done yet - if (!_begun && !begin()) { - return false; - } - - // A basic scanner, see if it ACK's - _wire->beginTransmission(_addr); -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("Address 0x")); - DEBUG_SERIAL.print(_addr, HEX); -#endif -#ifdef ARDUINO_ARCH_MBED - _wire->write(0); // forces a write request instead of a read -#endif - if (_wire->endTransmission() == 0) { -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(F(" Detected")); -#endif - return true; - } -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(F(" Not detected")); -#endif - return false; -} - -/*! - * @brief Write a buffer or two to the I2C device. Cannot be more than - * maxBufferSize() bytes. - * @param buffer Pointer to buffer of data to write. This is const to - * ensure the content of this buffer doesn't change. - * @param len Number of bytes from buffer to write - * @param prefix_buffer Pointer to optional array of data to write before - * buffer. Cannot be more than maxBufferSize() bytes. This is const to - * ensure the content of this buffer doesn't change. - * @param prefix_len Number of bytes from prefix buffer to write - * @param stop Whether to send an I2C STOP signal on write - * @return True if write was successful, otherwise false. - */ -bool Adafruit_I2CDevice::write(const uint8_t *buffer, size_t len, bool stop, - const uint8_t *prefix_buffer, - size_t prefix_len) { - if ((len + prefix_len) > maxBufferSize()) { - // currently not guaranteed to work if more than 32 bytes! - // we will need to find out if some platforms have larger - // I2C buffer sizes :/ -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(F("\tI2CDevice could not write such a large buffer")); -#endif - return false; - } - - _wire->beginTransmission(_addr); - - // Write the prefix data (usually an address) - if ((prefix_len != 0) && (prefix_buffer != nullptr)) { - if (_wire->write(prefix_buffer, prefix_len) != prefix_len) { -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(F("\tI2CDevice failed to write")); -#endif - return false; - } - } - - // Write the data itself - if (_wire->write(buffer, len) != len) { -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(F("\tI2CDevice failed to write")); -#endif - return false; - } - -#ifdef DEBUG_SERIAL - - DEBUG_SERIAL.print(F("\tI2CWRITE @ 0x")); - DEBUG_SERIAL.print(_addr, HEX); - DEBUG_SERIAL.print(F(" :: ")); - if ((prefix_len != 0) && (prefix_buffer != nullptr)) { - for (uint16_t i = 0; i < prefix_len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(prefix_buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - } - } - for (uint16_t i = 0; i < len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (i % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - - if (stop) { - DEBUG_SERIAL.print("\tSTOP"); - } -#endif - - if (_wire->endTransmission(stop) == 0) { -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println(); - // DEBUG_SERIAL.println("Sent!"); -#endif - return true; - } else { -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.println("\tFailed to send!"); -#endif - return false; - } -} - -/*! - * @brief Read from I2C into a buffer from the I2C device. - * Cannot be more than maxBufferSize() bytes. - * @param buffer Pointer to buffer of data to read into - * @param len Number of bytes from buffer to read. - * @param stop Whether to send an I2C STOP signal on read - * @return True if read was successful, otherwise false. - */ -bool Adafruit_I2CDevice::read(uint8_t *buffer, size_t len, bool stop) { - size_t pos = 0; - while (pos < len) { - size_t read_len = - ((len - pos) > maxBufferSize()) ? maxBufferSize() : (len - pos); - bool read_stop = (pos < (len - read_len)) ? false : stop; - if (!_read(buffer + pos, read_len, read_stop)) - return false; - pos += read_len; - } - return true; -} - -bool Adafruit_I2CDevice::_read(uint8_t *buffer, size_t len, bool stop) { -#if defined(TinyWireM_h) - size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len); -#elif defined(ARDUINO_ARCH_MEGAAVR) - size_t recv = _wire->requestFrom(_addr, len, stop); -#else - size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop); -#endif - - if (recv != len) { - // Not enough data available to fulfill our obligation! -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tI2CDevice did not receive enough data: ")); - DEBUG_SERIAL.println(recv); -#endif - return false; - } - - for (uint16_t i = 0; i < len; i++) { - buffer[i] = _wire->read(); - } - -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tI2CREAD @ 0x")); - DEBUG_SERIAL.print(_addr, HEX); - DEBUG_SERIAL.print(F(" :: ")); - for (uint16_t i = 0; i < len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (len % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - DEBUG_SERIAL.println(); -#endif - - return true; -} - -/*! - * @brief Write some data, then read some data from I2C into another buffer. - * Cannot be more than maxBufferSize() bytes. The buffers can point to - * same/overlapping locations. - * @param write_buffer Pointer to buffer of data to write from - * @param write_len Number of bytes from buffer to write. - * @param read_buffer Pointer to buffer of data to read into. - * @param read_len Number of bytes from buffer to read. - * @param stop Whether to send an I2C STOP signal between the write and read - * @return True if write & read was successful, otherwise false. - */ -bool Adafruit_I2CDevice::write_then_read(const uint8_t *write_buffer, - size_t write_len, uint8_t *read_buffer, - size_t read_len, bool stop) { - if (!write(write_buffer, write_len, stop)) { - return false; - } - - return read(read_buffer, read_len); -} - -/*! - * @brief Returns the 7-bit address of this device - * @return The 7-bit address of this device - */ -uint8_t Adafruit_I2CDevice::address(void) { return _addr; } - -/*! - * @brief Change the I2C clock speed to desired (relies on - * underlying Wire support! - * @param desiredclk The desired I2C SCL frequency - * @return True if this platform supports changing I2C speed. - * Not necessarily that the speed was achieved! - */ -bool Adafruit_I2CDevice::setSpeed(uint32_t desiredclk) { -#if defined(__AVR_ATmega328__) || \ - defined(__AVR_ATmega328P__) // fix arduino core set clock - // calculate TWBR correctly - - if ((F_CPU / 18) < desiredclk) { -#ifdef DEBUG_SERIAL - Serial.println(F("I2C.setSpeed too high.")); -#endif - return false; - } - uint32_t atwbr = ((F_CPU / desiredclk) - 16) / 2; - if (atwbr > 16320) { -#ifdef DEBUG_SERIAL - Serial.println(F("I2C.setSpeed too low.")); -#endif - return false; - } - - if (atwbr <= 255) { - atwbr /= 1; - TWSR = 0x0; - } else if (atwbr <= 1020) { - atwbr /= 4; - TWSR = 0x1; - } else if (atwbr <= 4080) { - atwbr /= 16; - TWSR = 0x2; - } else { // if (atwbr <= 16320) - atwbr /= 64; - TWSR = 0x3; - } - TWBR = atwbr; - -#ifdef DEBUG_SERIAL - Serial.print(F("TWSR prescaler = ")); - Serial.println(pow(4, TWSR)); - Serial.print(F("TWBR = ")); - Serial.println(atwbr); -#endif - return true; -#elif (ARDUINO >= 157) && !defined(ARDUINO_STM32_FEATHER) && \ - !defined(TinyWireM_h) - _wire->setClock(desiredclk); - return true; - -#else - (void)desiredclk; - return false; -#endif -} diff --git a/libraries/Adafruit_BusIO/Adafruit_I2CDevice.h b/libraries/Adafruit_BusIO/Adafruit_I2CDevice.h deleted file mode 100644 index 6bda7ba..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_I2CDevice.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef Adafruit_I2CDevice_h -#define Adafruit_I2CDevice_h - -#include -#include - -///< The class which defines how we will talk to this device over I2C -class Adafruit_I2CDevice { -public: - Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire); - uint8_t address(void); - bool begin(bool addr_detect = true); - void end(void); - bool detected(void); - - bool read(uint8_t *buffer, size_t len, bool stop = true); - bool write(const uint8_t *buffer, size_t len, bool stop = true, - const uint8_t *prefix_buffer = nullptr, size_t prefix_len = 0); - bool write_then_read(const uint8_t *write_buffer, size_t write_len, - uint8_t *read_buffer, size_t read_len, - bool stop = false); - bool setSpeed(uint32_t desiredclk); - - /*! @brief How many bytes we can read in a transaction - * @return The size of the Wire receive/transmit buffer */ - size_t maxBufferSize() { return _maxBufferSize; } - -private: - uint8_t _addr; - TwoWire *_wire; - bool _begun; - size_t _maxBufferSize; - bool _read(uint8_t *buffer, size_t len, bool stop); -}; - -#endif // Adafruit_I2CDevice_h diff --git a/libraries/Adafruit_BusIO/Adafruit_I2CRegister.h b/libraries/Adafruit_BusIO/Adafruit_I2CRegister.h deleted file mode 100644 index 186850f..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_I2CRegister.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ADAFRUIT_I2C_REGISTER_H_ -#define _ADAFRUIT_I2C_REGISTER_H_ - -#include -#include - -typedef Adafruit_BusIO_Register Adafruit_I2CRegister; -typedef Adafruit_BusIO_RegisterBits Adafruit_I2CRegisterBits; - -#endif diff --git a/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp b/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp deleted file mode 100644 index 3283de6..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp +++ /dev/null @@ -1,512 +0,0 @@ -#include "Adafruit_SPIDevice.h" - -// #define DEBUG_SERIAL Serial - -#ifdef BUSIO_USE_FAST_PINIO -#define BUSIO_SET_CLOCK_LOW() (*clkPort = *clkPort & ~clkPinMask) -#define BUSIO_SET_CLOCK_HIGH() (*clkPort = *clkPort | clkPinMask) -#define BUSIO_READ_MISO() (*misoPort & misoPinMask) -#define BUSIO_WRITE_MOSI(value) \ - do { \ - if (value) \ - *mosiPort = *mosiPort | mosiPinMask; \ - else \ - *mosiPort = *mosiPort & ~mosiPinMask; \ - } while (0) -#else -#define BUSIO_SET_CLOCK_LOW() digitalWrite(_sck, LOW) -#define BUSIO_SET_CLOCK_HIGH() digitalWrite(_sck, HIGH) -#define BUSIO_READ_MISO() digitalRead(_miso) -#define BUSIO_WRITE_MOSI(value) digitalWrite(_mosi, value) -#endif - -/*! - * @brief Create an SPI device with the given CS pin and settings - * @param cspin The arduino pin number to use for chip select - * @param freq The SPI clock frequency to use, defaults to 1MHz - * @param dataOrder The SPI data order to use for bits within each byte, - * defaults to SPI_BITORDER_MSBFIRST - * @param dataMode The SPI mode to use, defaults to SPI_MODE0 - * @param theSPI The SPI bus to use, defaults to &theSPI - */ -Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, uint32_t freq, - BusIOBitOrder dataOrder, - uint8_t dataMode, SPIClass *theSPI) { -#ifdef BUSIO_HAS_HW_SPI - _cs = cspin; - _sck = _mosi = _miso = -1; - _spi = theSPI; - _begun = false; - _spiSetting = new SPISettings(freq, dataOrder, dataMode); - _freq = freq; - _dataOrder = dataOrder; - _dataMode = dataMode; -#else - // unused, but needed to suppress compiler warns - (void)cspin; - (void)freq; - (void)dataOrder; - (void)dataMode; - (void)theSPI; -#endif -} - -/*! - * @brief Create an SPI device with the given CS pin and settings - * @param cspin The arduino pin number to use for chip select - * @param sckpin The arduino pin number to use for SCK - * @param misopin The arduino pin number to use for MISO, set to -1 if not - * used - * @param mosipin The arduino pin number to use for MOSI, set to -1 if not - * used - * @param freq The SPI clock frequency to use, defaults to 1MHz - * @param dataOrder The SPI data order to use for bits within each byte, - * defaults to SPI_BITORDER_MSBFIRST - * @param dataMode The SPI mode to use, defaults to SPI_MODE0 - */ -Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, int8_t sckpin, - int8_t misopin, int8_t mosipin, - uint32_t freq, BusIOBitOrder dataOrder, - uint8_t dataMode) { - _cs = cspin; - _sck = sckpin; - _miso = misopin; - _mosi = mosipin; - -#ifdef BUSIO_USE_FAST_PINIO - csPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(cspin)); - csPinMask = digitalPinToBitMask(cspin); - if (mosipin != -1) { - mosiPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(mosipin)); - mosiPinMask = digitalPinToBitMask(mosipin); - } - if (misopin != -1) { - misoPort = (BusIO_PortReg *)portInputRegister(digitalPinToPort(misopin)); - misoPinMask = digitalPinToBitMask(misopin); - } - clkPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(sckpin)); - clkPinMask = digitalPinToBitMask(sckpin); -#endif - - _freq = freq; - _dataOrder = dataOrder; - _dataMode = dataMode; - _begun = false; -} - -/*! - * @brief Release memory allocated in constructors - */ -Adafruit_SPIDevice::~Adafruit_SPIDevice() { - if (_spiSetting) - delete _spiSetting; -} - -/*! - * @brief Initializes SPI bus and sets CS pin high - * @return Always returns true because there's no way to test success of SPI - * init - */ -bool Adafruit_SPIDevice::begin(void) { - if (_cs != -1) { - pinMode(_cs, OUTPUT); - digitalWrite(_cs, HIGH); - } - - if (_spi) { // hardware SPI -#ifdef BUSIO_HAS_HW_SPI - _spi->begin(); -#endif - } else { - pinMode(_sck, OUTPUT); - - if ((_dataMode == SPI_MODE0) || (_dataMode == SPI_MODE1)) { - // idle low on mode 0 and 1 - digitalWrite(_sck, LOW); - } else { - // idle high on mode 2 or 3 - digitalWrite(_sck, HIGH); - } - if (_mosi != -1) { - pinMode(_mosi, OUTPUT); - digitalWrite(_mosi, HIGH); - } - if (_miso != -1) { - pinMode(_miso, INPUT); - } - } - - _begun = true; - return true; -} - -/*! - * @brief Transfer (send/receive) a buffer over hard/soft SPI, without - * transaction management - * @param buffer The buffer to send and receive at the same time - * @param len The number of bytes to transfer - */ -void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) { - // - // HARDWARE SPI - // - if (_spi) { -#ifdef BUSIO_HAS_HW_SPI -#if defined(SPARK) - _spi->transfer(buffer, buffer, len, nullptr); -#elif defined(STM32) - for (size_t i = 0; i < len; i++) { - _spi->transfer(buffer[i]); - } -#else - _spi->transfer(buffer, len); -#endif - return; -#endif - } - - // - // SOFTWARE SPI - // - uint8_t startbit; - if (_dataOrder == SPI_BITORDER_LSBFIRST) { - startbit = 0x1; - } else { - startbit = 0x80; - } - - bool towrite, lastmosi = !(buffer[0] & startbit); - uint8_t bitdelay_us = (1000000 / _freq) / 2; - - for (size_t i = 0; i < len; i++) { - uint8_t reply = 0; - uint8_t send = buffer[i]; - - /* - Serial.print("\tSending software SPI byte 0x"); - Serial.print(send, HEX); - Serial.print(" -> 0x"); - */ - - // Serial.print(send, HEX); - for (uint8_t b = startbit; b != 0; - b = (_dataOrder == SPI_BITORDER_LSBFIRST) ? b << 1 : b >> 1) { - - if (bitdelay_us) { - delayMicroseconds(bitdelay_us); - } - - if (_dataMode == SPI_MODE0 || _dataMode == SPI_MODE2) { - towrite = send & b; - if ((_mosi != -1) && (lastmosi != towrite)) { - BUSIO_WRITE_MOSI(towrite); - lastmosi = towrite; - } - - BUSIO_SET_CLOCK_HIGH(); - - if (bitdelay_us) { - delayMicroseconds(bitdelay_us); - } - - if (_miso != -1) { - if (BUSIO_READ_MISO()) - reply |= b; - } - - BUSIO_SET_CLOCK_LOW(); - - } else if (_dataMode == SPI_MODE3) { - - if (_mosi != -1) { // transmit on falling edge - BUSIO_WRITE_MOSI(send & b); - } - - BUSIO_SET_CLOCK_LOW(); - - if (bitdelay_us) { - delayMicroseconds(bitdelay_us); - } - - BUSIO_SET_CLOCK_HIGH(); - - if (bitdelay_us) { - delayMicroseconds(bitdelay_us); - } - - if (_miso != -1) { // read on rising edge - if (BUSIO_READ_MISO()) { - reply |= b; - } - } - - } else { // || _dataMode == SPI_MODE1) - - BUSIO_SET_CLOCK_HIGH(); - - if (bitdelay_us) { - delayMicroseconds(bitdelay_us); - } - - if (_mosi != -1) { - BUSIO_WRITE_MOSI(send & b); - } - - BUSIO_SET_CLOCK_LOW(); - - if (_miso != -1) { - if (BUSIO_READ_MISO()) { - reply |= b; - } - } - } - } - if (_miso != -1) { - buffer[i] = reply; - } - } - return; -} - -/*! - * @brief Transfer (send/receive) one byte over hard/soft SPI, without - * transaction management - * @param send The byte to send - * @return The byte received while transmitting - */ -uint8_t Adafruit_SPIDevice::transfer(uint8_t send) { - uint8_t data = send; - transfer(&data, 1); - return data; -} - -/*! - * @brief Manually begin a transaction (calls beginTransaction if hardware - * SPI) - */ -void Adafruit_SPIDevice::beginTransaction(void) { - if (_spi) { -#ifdef BUSIO_HAS_HW_SPI - _spi->beginTransaction(*_spiSetting); -#endif - } -} - -/*! - * @brief Manually end a transaction (calls endTransaction if hardware SPI) - */ -void Adafruit_SPIDevice::endTransaction(void) { - if (_spi) { -#ifdef BUSIO_HAS_HW_SPI - _spi->endTransaction(); -#endif - } -} - -/*! - * @brief Assert/Deassert the CS pin if it is defined - * @param value The state the CS is set to - */ -void Adafruit_SPIDevice::setChipSelect(int value) { - if (_cs != -1) { - digitalWrite(_cs, value); - } -} - -/*! - * @brief Write a buffer or two to the SPI device, with transaction - * management. - * @brief Manually begin a transaction (calls beginTransaction if hardware - * SPI) with asserting the CS pin - */ -void Adafruit_SPIDevice::beginTransactionWithAssertingCS() { - beginTransaction(); - setChipSelect(LOW); -} - -/*! - * @brief Manually end a transaction (calls endTransaction if hardware SPI) - * with deasserting the CS pin - */ -void Adafruit_SPIDevice::endTransactionWithDeassertingCS() { - setChipSelect(HIGH); - endTransaction(); -} - -/*! - * @brief Write a buffer or two to the SPI device, with transaction - * management. - * @param buffer Pointer to buffer of data to write - * @param len Number of bytes from buffer to write - * @param prefix_buffer Pointer to optional array of data to write before - * buffer. - * @param prefix_len Number of bytes from prefix buffer to write - * @return Always returns true because there's no way to test success of SPI - * writes - */ -bool Adafruit_SPIDevice::write(const uint8_t *buffer, size_t len, - const uint8_t *prefix_buffer, - size_t prefix_len) { - beginTransactionWithAssertingCS(); - - // do the writing -#if defined(ARDUINO_ARCH_ESP32) - if (_spi) { - if (prefix_len > 0) { - _spi->transferBytes((uint8_t *)prefix_buffer, nullptr, prefix_len); - } - if (len > 0) { - _spi->transferBytes((uint8_t *)buffer, nullptr, len); - } - } else -#endif - { - for (size_t i = 0; i < prefix_len; i++) { - transfer(prefix_buffer[i]); - } - for (size_t i = 0; i < len; i++) { - transfer(buffer[i]); - } - } - endTransactionWithDeassertingCS(); - -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tSPIDevice Wrote: ")); - if ((prefix_len != 0) && (prefix_buffer != nullptr)) { - for (uint16_t i = 0; i < prefix_len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(prefix_buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - } - } - for (uint16_t i = 0; i < len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (i % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - DEBUG_SERIAL.println(); -#endif - - return true; -} - -/*! - * @brief Read from SPI into a buffer from the SPI device, with transaction - * management. - * @param buffer Pointer to buffer of data to read into - * @param len Number of bytes from buffer to read. - * @param sendvalue The 8-bits of data to write when doing the data read, - * defaults to 0xFF - * @return Always returns true because there's no way to test success of SPI - * writes - */ -bool Adafruit_SPIDevice::read(uint8_t *buffer, size_t len, uint8_t sendvalue) { - memset(buffer, sendvalue, len); // clear out existing buffer - - beginTransactionWithAssertingCS(); - transfer(buffer, len); - endTransactionWithDeassertingCS(); - -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tSPIDevice Read: ")); - for (uint16_t i = 0; i < len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (len % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - DEBUG_SERIAL.println(); -#endif - - return true; -} - -/*! - * @brief Write some data, then read some data from SPI into another buffer, - * with transaction management. The buffers can point to same/overlapping - * locations. This does not transmit-receive at the same time! - * @param write_buffer Pointer to buffer of data to write from - * @param write_len Number of bytes from buffer to write. - * @param read_buffer Pointer to buffer of data to read into. - * @param read_len Number of bytes from buffer to read. - * @param sendvalue The 8-bits of data to write when doing the data read, - * defaults to 0xFF - * @return Always returns true because there's no way to test success of SPI - * writes - */ -bool Adafruit_SPIDevice::write_then_read(const uint8_t *write_buffer, - size_t write_len, uint8_t *read_buffer, - size_t read_len, uint8_t sendvalue) { - beginTransactionWithAssertingCS(); - // do the writing -#if defined(ARDUINO_ARCH_ESP32) - if (_spi) { - if (write_len > 0) { - _spi->transferBytes((uint8_t *)write_buffer, nullptr, write_len); - } - } else -#endif - { - for (size_t i = 0; i < write_len; i++) { - transfer(write_buffer[i]); - } - } - -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tSPIDevice Wrote: ")); - for (uint16_t i = 0; i < write_len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(write_buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (write_len % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - DEBUG_SERIAL.println(); -#endif - - // do the reading - for (size_t i = 0; i < read_len; i++) { - read_buffer[i] = transfer(sendvalue); - } - -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print(F("\tSPIDevice Read: ")); - for (uint16_t i = 0; i < read_len; i++) { - DEBUG_SERIAL.print(F("0x")); - DEBUG_SERIAL.print(read_buffer[i], HEX); - DEBUG_SERIAL.print(F(", ")); - if (read_len % 32 == 31) { - DEBUG_SERIAL.println(); - } - } - DEBUG_SERIAL.println(); -#endif - - endTransactionWithDeassertingCS(); - - return true; -} - -/*! - * @brief Write some data and read some data at the same time from SPI - * into the same buffer, with transaction management. This is basicaly a wrapper - * for transfer() with CS-pin and transaction management. This /does/ - * transmit-receive at the same time! - * @param buffer Pointer to buffer of data to write/read to/from - * @param len Number of bytes from buffer to write/read. - * @return Always returns true because there's no way to test success of SPI - * writes - */ -bool Adafruit_SPIDevice::write_and_read(uint8_t *buffer, size_t len) { - beginTransactionWithAssertingCS(); - transfer(buffer, len); - endTransactionWithDeassertingCS(); - - return true; -} diff --git a/libraries/Adafruit_BusIO/Adafruit_SPIDevice.h b/libraries/Adafruit_BusIO/Adafruit_SPIDevice.h deleted file mode 100644 index 82a0281..0000000 --- a/libraries/Adafruit_BusIO/Adafruit_SPIDevice.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef Adafruit_SPIDevice_h -#define Adafruit_SPIDevice_h - -#include - -#if !defined(SPI_INTERFACES_COUNT) || \ - (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) -// HW SPI available -#include -#define BUSIO_HAS_HW_SPI -#else -// SW SPI ONLY -enum { SPI_MODE0, SPI_MODE1, SPI_MODE2, SPI_MODE3 }; -typedef uint8_t SPIClass; -#endif - -// some modern SPI definitions don't have BitOrder enum -#if (defined(__AVR__) && !defined(ARDUINO_ARCH_MEGAAVR)) || \ - defined(ESP8266) || defined(TEENSYDUINO) || defined(SPARK) || \ - defined(ARDUINO_ARCH_SPRESENSE) || defined(MEGATINYCORE) || \ - defined(DXCORE) || defined(ARDUINO_AVR_ATmega4809) || \ - defined(ARDUINO_AVR_ATmega4808) || defined(ARDUINO_AVR_ATmega3209) || \ - defined(ARDUINO_AVR_ATmega3208) || defined(ARDUINO_AVR_ATmega1609) || \ - defined(ARDUINO_AVR_ATmega1608) || defined(ARDUINO_AVR_ATmega809) || \ - defined(ARDUINO_AVR_ATmega808) || defined(ARDUINO_ARCH_ARC32) || \ - defined(ARDUINO_ARCH_XMC) - -typedef enum _BitOrder { - SPI_BITORDER_MSBFIRST = MSBFIRST, - SPI_BITORDER_LSBFIRST = LSBFIRST, -} BusIOBitOrder; - -#elif defined(ESP32) || defined(__ASR6501__) || defined(__ASR6502__) - -// some modern SPI definitions don't have BitOrder enum and have different SPI -// mode defines -typedef enum _BitOrder { - SPI_BITORDER_MSBFIRST = SPI_MSBFIRST, - SPI_BITORDER_LSBFIRST = SPI_LSBFIRST, -} BusIOBitOrder; - -#else -// Some platforms have a BitOrder enum but its named MSBFIRST/LSBFIRST -#define SPI_BITORDER_MSBFIRST MSBFIRST -#define SPI_BITORDER_LSBFIRST LSBFIRST -typedef BitOrder BusIOBitOrder; -#endif - -#if defined(__IMXRT1062__) // Teensy 4.x -// *Warning* I disabled the usage of FAST_PINIO as the set/clear operations -// used in the cpp file are not atomic and can effect multiple IO pins -// and if an interrupt happens in between the time the code reads the register -// and writes out the updated value, that changes one or more other IO pins -// on that same IO port, those change will be clobbered when the updated -// values are written back. A fast version can be implemented that uses the -// ports set and clear registers which are atomic. -// typedef volatile uint32_t BusIO_PortReg; -// typedef uint32_t BusIO_PortMask; -// #define BUSIO_USE_FAST_PINIO - -#elif defined(__MBED__) || defined(__ZEPHYR__) -// Boards based on RTOS cores like mbed or Zephyr are not going to expose the -// low level registers needed for fast pin manipulation -#undef BUSIO_USE_FAST_PINIO - -#elif defined(ARDUINO_ARCH_XMC) -#undef BUSIO_USE_FAST_PINIO - -#elif defined(__AVR__) || defined(TEENSYDUINO) -typedef volatile uint8_t BusIO_PortReg; -typedef uint8_t BusIO_PortMask; -#define BUSIO_USE_FAST_PINIO - -#elif defined(ESP8266) || defined(ESP32) || defined(__SAM3X8E__) || \ - defined(ARDUINO_ARCH_SAMD) -typedef volatile uint32_t BusIO_PortReg; -typedef uint32_t BusIO_PortMask; -#define BUSIO_USE_FAST_PINIO - -#elif (defined(__arm__) || defined(ARDUINO_FEATHER52)) && \ - !defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_SILABS) && \ - !defined(ARDUINO_UNOR4_MINIMA) && !defined(ARDUINO_UNOR4_WIFI) && \ - !defined(PORTDUINO) -typedef volatile uint32_t BusIO_PortReg; -typedef uint32_t BusIO_PortMask; -#if !defined(__ASR6501__) && !defined(__ASR6502__) -#define BUSIO_USE_FAST_PINIO -#endif - -#else -#undef BUSIO_USE_FAST_PINIO -#endif - -/**! The class which defines how we will talk to this device over SPI **/ -class Adafruit_SPIDevice { -public: -#ifdef BUSIO_HAS_HW_SPI - Adafruit_SPIDevice(int8_t cspin, uint32_t freq = 1000000, - BusIOBitOrder dataOrder = SPI_BITORDER_MSBFIRST, - uint8_t dataMode = SPI_MODE0, SPIClass *theSPI = &SPI); -#else - Adafruit_SPIDevice(int8_t cspin, uint32_t freq = 1000000, - BusIOBitOrder dataOrder = SPI_BITORDER_MSBFIRST, - uint8_t dataMode = SPI_MODE0, SPIClass *theSPI = nullptr); -#endif - Adafruit_SPIDevice(int8_t cspin, int8_t sck, int8_t miso, int8_t mosi, - uint32_t freq = 1000000, - BusIOBitOrder dataOrder = SPI_BITORDER_MSBFIRST, - uint8_t dataMode = SPI_MODE0); - ~Adafruit_SPIDevice(); - - bool begin(void); - bool read(uint8_t *buffer, size_t len, uint8_t sendvalue = 0xFF); - bool write(const uint8_t *buffer, size_t len, - const uint8_t *prefix_buffer = nullptr, size_t prefix_len = 0); - bool write_then_read(const uint8_t *write_buffer, size_t write_len, - uint8_t *read_buffer, size_t read_len, - uint8_t sendvalue = 0xFF); - bool write_and_read(uint8_t *buffer, size_t len); - - uint8_t transfer(uint8_t send); - void transfer(uint8_t *buffer, size_t len); - void beginTransaction(void); - void endTransaction(void); - void beginTransactionWithAssertingCS(); - void endTransactionWithDeassertingCS(); - -private: -#ifdef BUSIO_HAS_HW_SPI - SPIClass *_spi = nullptr; - SPISettings *_spiSetting = nullptr; -#else - uint8_t *_spi = nullptr; - uint8_t *_spiSetting = nullptr; -#endif - uint32_t _freq; - BusIOBitOrder _dataOrder; - uint8_t _dataMode; - void setChipSelect(int value); - - int8_t _cs, _sck, _mosi, _miso; -#ifdef BUSIO_USE_FAST_PINIO - BusIO_PortReg *mosiPort, *clkPort, *misoPort, *csPort; - BusIO_PortMask mosiPinMask, misoPinMask, clkPinMask, csPinMask; -#endif - bool _begun; -}; - -#endif // Adafruit_SPIDevice_h diff --git a/libraries/Adafruit_BusIO/CMakeLists.txt b/libraries/Adafruit_BusIO/CMakeLists.txt deleted file mode 100644 index 3fcb0b8..0000000 --- a/libraries/Adafruit_BusIO/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Adafruit Bus IO Library -# https://github.com/adafruit/Adafruit_BusIO -# MIT License - -cmake_minimum_required(VERSION 3.5) - -idf_component_register(SRCS "Adafruit_I2CDevice.cpp" "Adafruit_BusIO_Register.cpp" "Adafruit_SPIDevice.cpp" "Adafruit_GenericDevice.cpp" - INCLUDE_DIRS "." - REQUIRES arduino-esp32) - -project(Adafruit_BusIO) diff --git a/libraries/Adafruit_BusIO/LICENSE b/libraries/Adafruit_BusIO/LICENSE deleted file mode 100644 index 860e3e2..0000000 --- a/libraries/Adafruit_BusIO/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Adafruit Industries - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/libraries/Adafruit_BusIO/README.md b/libraries/Adafruit_BusIO/README.md deleted file mode 100644 index 59712ff..0000000 --- a/libraries/Adafruit_BusIO/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Adafruit Bus IO Library [![Build Status](https://github.com/adafruit/Adafruit_BusIO/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit_BusIO/actions) - - -This is a helper library to abstract away I2C, SPI, and 'generic transport' (e.g. UART) transactions and registers - -Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! - -MIT license, all text above must be included in any redistribution diff --git a/libraries/Adafruit_BusIO/component.mk b/libraries/Adafruit_BusIO/component.mk deleted file mode 100644 index 049f190..0000000 --- a/libraries/Adafruit_BusIO/component.mk +++ /dev/null @@ -1 +0,0 @@ -COMPONENT_ADD_INCLUDEDIRS = . diff --git a/libraries/Adafruit_BusIO/examples/genericdevice_uartregtest/genericdevice_uartregtest.ino b/libraries/Adafruit_BusIO/examples/genericdevice_uartregtest/genericdevice_uartregtest.ino deleted file mode 100644 index 59af308..0000000 --- a/libraries/Adafruit_BusIO/examples/genericdevice_uartregtest/genericdevice_uartregtest.ino +++ /dev/null @@ -1,219 +0,0 @@ -/* - Advanced example of using bstracted transport for reading and writing - register data from a UART-based device such as a TMC2209 - - Written with help by Claude! - https://claude.ai/chat/335f50b1-3dd8-435e-9139-57ec7ca26a3c (at this time - chats are not shareable :( -*/ - -#include "Adafruit_BusIO_Register.h" -#include "Adafruit_GenericDevice.h" - -// Debugging macros -#define DEBUG_SERIAL Serial - -#ifdef DEBUG_SERIAL -#define DEBUG_PRINT(x) DEBUG_SERIAL.print(x) -#define DEBUG_PRINTLN(x) DEBUG_SERIAL.println(x) -#define DEBUG_PRINT_HEX(x) \ - do { \ - if (x < 0x10) \ - DEBUG_SERIAL.print('0'); \ - DEBUG_SERIAL.print(x, HEX); \ - DEBUG_SERIAL.print(' '); \ - } while (0) -#else -#define DEBUG_PRINT(x) -#define DEBUG_PRINTLN(x) -#define DEBUG_PRINT_HEX(x) -#endif - -#define TMC2209_IOIN 0x06 - -class TMC2209_UART { -private: - Stream *_uart_stream; - uint8_t _addr; - - static bool uart_read(void *thiz, uint8_t *buffer, size_t len) { - TMC2209_UART *dev = (TMC2209_UART *)thiz; - uint16_t timeout = 100; - while (dev->_uart_stream->available() < len && timeout--) { - delay(1); - } - if (timeout == 0) { - DEBUG_PRINTLN("Read timeout!"); - return false; - } - - DEBUG_PRINT("Reading: "); - for (size_t i = 0; i < len; i++) { - buffer[i] = dev->_uart_stream->read(); - DEBUG_PRINT_HEX(buffer[i]); - } - DEBUG_PRINTLN(""); - - return true; - } - - static bool uart_write(void *thiz, const uint8_t *buffer, size_t len) { - TMC2209_UART *dev = (TMC2209_UART *)thiz; - DEBUG_PRINT("Writing: "); - for (size_t i = 0; i < len; i++) { - DEBUG_PRINT_HEX(buffer[i]); - } - DEBUG_PRINTLN(""); - - dev->_uart_stream->write(buffer, len); - return true; - } - - static bool uart_readreg(void *thiz, uint8_t *addr_buf, uint8_t addrsiz, - uint8_t *data, uint16_t datalen) { - TMC2209_UART *dev = (TMC2209_UART *)thiz; - while (dev->_uart_stream->available()) - dev->_uart_stream->read(); - - uint8_t packet[4] = {0x05, uint8_t(dev->_addr << 1), addr_buf[0], 0x00}; - - packet[3] = calcCRC(packet, 3); - if (!uart_write(thiz, packet, 4)) - return false; - - // Read back echo - uint8_t echo[4]; - if (!uart_read(thiz, echo, 4)) - return false; - - // Verify echo - for (uint8_t i = 0; i < 4; i++) { - if (echo[i] != packet[i]) { - DEBUG_PRINTLN("Echo mismatch"); - return false; - } - } - - uint8_t response[8]; // sync + 0xFF + reg + 4 data bytes + CRC - if (!uart_read(thiz, response, 8)) - return false; - - // Verify response - if (response[0] != 0x05) { - DEBUG_PRINTLN("Invalid sync byte"); - return false; - } - - if (response[1] != 0xFF) { - DEBUG_PRINTLN("Invalid reply address"); - return false; - } - - if (response[2] != addr_buf[0]) { - DEBUG_PRINTLN("Register mismatch"); - return false; - } - - uint8_t crc = calcCRC(response, 7); - if (crc != response[7]) { - DEBUG_PRINTLN("CRC mismatch"); - return false; - } - - memcpy(data, &response[3], 4); - return true; - } - - static bool uart_writereg(void *thiz, uint8_t *addr_buf, uint8_t addrsiz, - const uint8_t *data, uint16_t datalen) { - TMC2209_UART *dev = (TMC2209_UART *)thiz; - while (dev->_uart_stream->available()) - dev->_uart_stream->read(); - - uint8_t packet[8] = {0x05, - uint8_t(dev->_addr << 1), - uint8_t(addr_buf[0] | 0x80), - data[0], - data[1], - data[2], - data[3], - 0x00}; - - packet[7] = calcCRC(packet, 7); - if (!uart_write(thiz, packet, 8)) - return false; - - uint8_t echo[8]; - if (!uart_read(thiz, echo, 8)) - return false; - - for (uint8_t i = 0; i < 8; i++) { - if (echo[i] != packet[i]) { - DEBUG_PRINTLN("Write echo mismatch"); - return false; - } - } - - return true; - } - - static uint8_t calcCRC(uint8_t *data, uint8_t length) { - uint8_t crc = 0; - for (uint8_t i = 0; i < length; i++) { - uint8_t currentByte = data[i]; - for (uint8_t j = 0; j < 8; j++) { - if ((crc >> 7) ^ (currentByte & 0x01)) { - crc = (crc << 1) ^ 0x07; - } else { - crc = crc << 1; - } - currentByte = currentByte >> 1; - } - } - return crc; - } - -public: - TMC2209_UART(Stream *serial, uint8_t addr) - : _uart_stream(serial), _addr(addr) {} - - Adafruit_GenericDevice *createDevice() { - return new Adafruit_GenericDevice(this, uart_read, uart_write, uart_readreg, - uart_writereg); - } -}; - -void setup() { - Serial.begin(115200); - while (!Serial) - ; - delay(100); - Serial.println("TMC2209 Generic Device register read/write test!"); - - Serial1.begin(115200); - - TMC2209_UART uart(&Serial1, 0); - Adafruit_GenericDevice *device = uart.createDevice(); - device->begin(); - - // Create register object for IOIN - Adafruit_BusIO_Register ioin_reg(device, - TMC2209_IOIN, // device and register address - 4, // width = 4 bytes - MSBFIRST, // byte order - 1); // address width = 1 byte - Serial.print("IOIN = 0x"); - Serial.println(ioin_reg.read(), HEX); - - // Create RegisterBits for VERSION field (bits 31:24) - Adafruit_BusIO_RegisterBits version_bits( - &ioin_reg, 8, 24); // 8 bits wide, starting at bit 24 - - Serial.println("Reading VERSION..."); - uint8_t version = version_bits.read(); - - Serial.print("VERSION = 0x"); - Serial.println(version, HEX); -} - -void loop() { delay(1000); } \ No newline at end of file diff --git a/libraries/Adafruit_BusIO/examples/genericdevice_uarttest/genericdevice_uarttest.ino b/libraries/Adafruit_BusIO/examples/genericdevice_uarttest/genericdevice_uarttest.ino deleted file mode 100644 index 6a11dbf..0000000 --- a/libraries/Adafruit_BusIO/examples/genericdevice_uarttest/genericdevice_uarttest.ino +++ /dev/null @@ -1,98 +0,0 @@ -/* - Abstracted transport for reading and writing data from a UART-based - device such as a TMC2209 - - Written with help by Claude! - https://claude.ai/chat/335f50b1-3dd8-435e-9139-57ec7ca26a3c (at this time - chats are not shareable :( -*/ - -#include "Adafruit_GenericDevice.h" - -/** - * Basic UART device class that demonstrates using GenericDevice with a Stream - * interface. This example shows how to wrap a Stream (like HardwareSerial or - * SoftwareSerial) with read/write callbacks that can be used by BusIO's - * register functions. - */ -class UARTDevice { -public: - UARTDevice(Stream *serial) : _serial(serial) {} - - // Static callback for writing data to UART - // Called by GenericDevice when data needs to be sent - static bool uart_write(void *thiz, const uint8_t *buffer, size_t len) { - UARTDevice *dev = (UARTDevice *)thiz; - dev->_serial->write(buffer, len); - return true; - } - - // Static callback for reading data from UART - // Includes timeout and will return false if not enough data available - static bool uart_read(void *thiz, uint8_t *buffer, size_t len) { - UARTDevice *dev = (UARTDevice *)thiz; - uint16_t timeout = 100; - while (dev->_serial->available() < len && timeout--) { - delay(1); - } - if (timeout == 0) { - return false; - } - for (size_t i = 0; i < len; i++) { - buffer[i] = dev->_serial->read(); - } - return true; - } - - // Create a GenericDevice instance using our callbacks - Adafruit_GenericDevice *createDevice() { - return new Adafruit_GenericDevice(this, uart_read, uart_write); - } - -private: - Stream *_serial; // Underlying Stream instance (HardwareSerial, etc) -}; - -void setup() { - Serial.begin(115200); - while (!Serial) - ; - delay(100); - - Serial.println("Generic Device test!"); - - // Initialize UART for device communication - Serial1.begin(115200); - - // Create UART wrapper and BusIO device - UARTDevice uart(&Serial1); - Adafruit_GenericDevice *device = uart.createDevice(); - device->begin(); - - // Test write/read cycle - uint8_t write_buf[4] = {0x5, 0x0, 0x0, 0x48}; - uint8_t read_buf[8]; - - Serial.println("Writing data..."); - if (!device->write(write_buf, 4)) { - Serial.println("Write failed!"); - return; - } - - Serial.println("Reading response..."); - if (!device->read(read_buf, 8)) { - Serial.println("Read failed!"); - return; - } - - // Print response bytes - Serial.print("Got response: "); - for (int i = 0; i < 8; i++) { - Serial.print("0x"); - Serial.print(read_buf[i], HEX); - Serial.print(" "); - } - Serial.println(); -} - -void loop() { delay(1000); } \ No newline at end of file diff --git a/libraries/Adafruit_BusIO/examples/i2c_address_detect/i2c_address_detect.ino b/libraries/Adafruit_BusIO/examples/i2c_address_detect/i2c_address_detect.ino deleted file mode 100644 index f2e6ba7..0000000 --- a/libraries/Adafruit_BusIO/examples/i2c_address_detect/i2c_address_detect.ino +++ /dev/null @@ -1,22 +0,0 @@ -#include - -Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x10); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("I2C address detection test"); - - if (!i2c_dev.begin()) { - Serial.print("Did not find device at 0x"); - Serial.println(i2c_dev.address(), HEX); - while (1) - ; - } - Serial.print("Device found on address 0x"); - Serial.println(i2c_dev.address(), HEX); -} - -void loop() {} diff --git a/libraries/Adafruit_BusIO/examples/i2c_readwrite/i2c_readwrite.ino b/libraries/Adafruit_BusIO/examples/i2c_readwrite/i2c_readwrite.ino deleted file mode 100644 index 4ac2626..0000000 --- a/libraries/Adafruit_BusIO/examples/i2c_readwrite/i2c_readwrite.ino +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#define I2C_ADDRESS 0x60 -Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(I2C_ADDRESS); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("I2C device read and write test"); - - if (!i2c_dev.begin()) { - Serial.print("Did not find device at 0x"); - Serial.println(i2c_dev.address(), HEX); - while (1) - ; - } - Serial.print("Device found on address 0x"); - Serial.println(i2c_dev.address(), HEX); - - uint8_t buffer[32]; - // Try to read 32 bytes - i2c_dev.read(buffer, 32); - Serial.print("Read: "); - for (uint8_t i = 0; i < 32; i++) { - Serial.print("0x"); - Serial.print(buffer[i], HEX); - Serial.print(", "); - } - Serial.println(); - - // read a register by writing first, then reading - buffer[0] = 0x0C; // we'll reuse the same buffer - i2c_dev.write_then_read(buffer, 1, buffer, 2, false); - Serial.print("Write then Read: "); - for (uint8_t i = 0; i < 2; i++) { - Serial.print("0x"); - Serial.print(buffer[i], HEX); - Serial.print(", "); - } - Serial.println(); -} - -void loop() {} diff --git a/libraries/Adafruit_BusIO/examples/i2c_registers/i2c_registers.ino b/libraries/Adafruit_BusIO/examples/i2c_registers/i2c_registers.ino deleted file mode 100644 index 2d44c83..0000000 --- a/libraries/Adafruit_BusIO/examples/i2c_registers/i2c_registers.ino +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include - -#define I2C_ADDRESS 0x60 -Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(I2C_ADDRESS); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("I2C device register test"); - - if (!i2c_dev.begin()) { - Serial.print("Did not find device at 0x"); - Serial.println(i2c_dev.address(), HEX); - while (1) - ; - } - Serial.print("Device found on address 0x"); - Serial.println(i2c_dev.address(), HEX); - - Adafruit_BusIO_Register id_reg = - Adafruit_BusIO_Register(&i2c_dev, 0x0C, 2, LSBFIRST); - uint16_t id; - id_reg.read(&id); - Serial.print("ID register = 0x"); - Serial.println(id, HEX); - - Adafruit_BusIO_Register thresh_reg = - Adafruit_BusIO_Register(&i2c_dev, 0x01, 2, LSBFIRST); - uint16_t thresh; - thresh_reg.read(&thresh); - Serial.print("Initial threshold register = 0x"); - Serial.println(thresh, HEX); - - thresh_reg.write(~thresh); - - Serial.print("Post threshold register = 0x"); - Serial.println(thresh_reg.read(), HEX); -} - -void loop() {} \ No newline at end of file diff --git a/libraries/Adafruit_BusIO/examples/i2corspi_register/i2corspi_register.ino b/libraries/Adafruit_BusIO/examples/i2corspi_register/i2corspi_register.ino deleted file mode 100644 index be04606..0000000 --- a/libraries/Adafruit_BusIO/examples/i2corspi_register/i2corspi_register.ino +++ /dev/null @@ -1,40 +0,0 @@ -#include - -// Define which interface to use by setting the unused interface to NULL! - -#define SPIDEVICE_CS 10 -Adafruit_SPIDevice *spi_dev = NULL; // new Adafruit_SPIDevice(SPIDEVICE_CS); - -#define I2C_ADDRESS 0x5D -Adafruit_I2CDevice *i2c_dev = new Adafruit_I2CDevice(I2C_ADDRESS); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("I2C or SPI device register test"); - - if (spi_dev && !spi_dev->begin()) { - Serial.println("Could not initialize SPI device"); - } - - if (i2c_dev) { - if (i2c_dev->begin()) { - Serial.print("Device found on I2C address 0x"); - Serial.println(i2c_dev->address(), HEX); - } else { - Serial.print("Did not find I2C device at 0x"); - Serial.println(i2c_dev->address(), HEX); - } - } - - Adafruit_BusIO_Register id_reg = - Adafruit_BusIO_Register(i2c_dev, spi_dev, ADDRBIT8_HIGH_TOREAD, 0x0F); - uint8_t id = 0; - id_reg.read(&id); - Serial.print("ID register = 0x"); - Serial.println(id, HEX); -} - -void loop() {} diff --git a/libraries/Adafruit_BusIO/examples/spi_modetest/spi_modetest.ino b/libraries/Adafruit_BusIO/examples/spi_modetest/spi_modetest.ino deleted file mode 100644 index ebf14f9..0000000 --- a/libraries/Adafruit_BusIO/examples/spi_modetest/spi_modetest.ino +++ /dev/null @@ -1,35 +0,0 @@ -#include - -#define SPIDEVICE_CS 10 -Adafruit_SPIDevice spi_dev = - Adafruit_SPIDevice(SPIDEVICE_CS, 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); -// Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS, 13, 12, 11, -// 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("SPI device mode test"); - - if (!spi_dev.begin()) { - Serial.println("Could not initialize SPI device"); - while (1) - ; - } -} - -void loop() { - Serial.println("\n\nTransfer test"); - for (uint16_t x = 0; x <= 0xFF; x++) { - uint8_t i = x; - Serial.print("0x"); - Serial.print(i, HEX); - spi_dev.read(&i, 1, i); - Serial.print("/"); - Serial.print(i, HEX); - Serial.print(", "); - delay(25); - } -} \ No newline at end of file diff --git a/libraries/Adafruit_BusIO/examples/spi_readwrite/spi_readwrite.ino b/libraries/Adafruit_BusIO/examples/spi_readwrite/spi_readwrite.ino deleted file mode 100644 index 4b9ecf1..0000000 --- a/libraries/Adafruit_BusIO/examples/spi_readwrite/spi_readwrite.ino +++ /dev/null @@ -1,43 +0,0 @@ -#include - -#define SPIDEVICE_CS 10 -Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("SPI device read and write test"); - - if (!spi_dev.begin()) { - Serial.println("Could not initialize SPI device"); - while (1) - ; - } - - uint8_t buffer[32]; - - // Try to read 32 bytes - spi_dev.read(buffer, 32); - Serial.print("Read: "); - for (uint8_t i = 0; i < 32; i++) { - Serial.print("0x"); - Serial.print(buffer[i], HEX); - Serial.print(", "); - } - Serial.println(); - - // read a register by writing first, then reading - buffer[0] = 0x8F; // we'll reuse the same buffer - spi_dev.write_then_read(buffer, 1, buffer, 2, false); - Serial.print("Write then Read: "); - for (uint8_t i = 0; i < 2; i++) { - Serial.print("0x"); - Serial.print(buffer[i], HEX); - Serial.print(", "); - } - Serial.println(); -} - -void loop() {} diff --git a/libraries/Adafruit_BusIO/examples/spi_register_bits/spi_register_bits.ino b/libraries/Adafruit_BusIO/examples/spi_register_bits/spi_register_bits.ino deleted file mode 100644 index d11b440..0000000 --- a/libraries/Adafruit_BusIO/examples/spi_register_bits/spi_register_bits.ino +++ /dev/null @@ -1,268 +0,0 @@ -/*************************************************** - - This is an example for how to use Adafruit_BusIO_RegisterBits from - Adafruit_BusIO library. - - Designed specifically to work with the Adafruit RTD Sensor - ----> https://www.adafruit.com/products/3328 - uisng a MAX31865 RTD-to-Digital Converter - ----> https://datasheets.maximintegrated.com/en/ds/MAX31865.pdf - - This sensor uses SPI to communicate, 4 pins are required to - interface. - A fifth pin helps to detect when a new conversion is ready. - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - Example written (2020/3) by Andreas Hardtung/AnHard. - BSD license, all text above must be included in any redistribution - ****************************************************/ - -#include -#include - -#define MAX31865_SPI_SPEED (5000000) -#define MAX31865_SPI_BITORDER (SPI_BITORDER_MSBFIRST) -#define MAX31865_SPI_MODE (SPI_MODE1) - -#define MAX31865_SPI_CS (10) -#define MAX31865_READY_PIN (2) - -Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice( - MAX31865_SPI_CS, MAX31865_SPI_SPEED, MAX31865_SPI_BITORDER, - MAX31865_SPI_MODE, &SPI); // Hardware SPI -// Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice( MAX31865_SPI_CS, 13, 12, 11, -// MAX31865_SPI_SPEED, MAX31865_SPI_BITORDER, MAX31865_SPI_MODE); // Software -// SPI - -// MAX31865 chip related -// ********************************************************************************************* -Adafruit_BusIO_Register config_reg = - Adafruit_BusIO_Register(&spi_dev, 0x00, ADDRBIT8_HIGH_TOWRITE, 1, MSBFIRST); -Adafruit_BusIO_RegisterBits bias_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 7); -Adafruit_BusIO_RegisterBits auto_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 6); -Adafruit_BusIO_RegisterBits oneS_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 5); -Adafruit_BusIO_RegisterBits wire_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 4); -Adafruit_BusIO_RegisterBits faultT_bits = - Adafruit_BusIO_RegisterBits(&config_reg, 2, 2); -Adafruit_BusIO_RegisterBits faultR_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 1); -Adafruit_BusIO_RegisterBits fi50hz_bit = - Adafruit_BusIO_RegisterBits(&config_reg, 1, 0); - -Adafruit_BusIO_Register rRatio_reg = - Adafruit_BusIO_Register(&spi_dev, 0x01, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); -Adafruit_BusIO_RegisterBits rRatio_bits = - Adafruit_BusIO_RegisterBits(&rRatio_reg, 15, 1); -Adafruit_BusIO_RegisterBits fault_bit = - Adafruit_BusIO_RegisterBits(&rRatio_reg, 1, 0); - -Adafruit_BusIO_Register maxRratio_reg = - Adafruit_BusIO_Register(&spi_dev, 0x03, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); -Adafruit_BusIO_RegisterBits maxRratio_bits = - Adafruit_BusIO_RegisterBits(&maxRratio_reg, 15, 1); - -Adafruit_BusIO_Register minRratio_reg = - Adafruit_BusIO_Register(&spi_dev, 0x05, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); -Adafruit_BusIO_RegisterBits minRratio_bits = - Adafruit_BusIO_RegisterBits(&minRratio_reg, 15, 1); - -Adafruit_BusIO_Register fault_reg = - Adafruit_BusIO_Register(&spi_dev, 0x07, ADDRBIT8_HIGH_TOWRITE, 1, MSBFIRST); -Adafruit_BusIO_RegisterBits range_high_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 7); -Adafruit_BusIO_RegisterBits range_low_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 6); -Adafruit_BusIO_RegisterBits refin_high_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 5); -Adafruit_BusIO_RegisterBits refin_low_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 4); -Adafruit_BusIO_RegisterBits rtdin_low_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 3); -Adafruit_BusIO_RegisterBits voltage_fault_bit = - Adafruit_BusIO_RegisterBits(&fault_reg, 1, 2); - -// Print the details of the configuration register. -void printConfig(void) { - Serial.print("BIAS: "); - if (bias_bit.read()) - Serial.print("ON"); - else - Serial.print("OFF"); - Serial.print(", AUTO: "); - if (auto_bit.read()) - Serial.print("ON"); - else - Serial.print("OFF"); - Serial.print(", ONES: "); - if (oneS_bit.read()) - Serial.print("ON"); - else - Serial.print("OFF"); - Serial.print(", WIRE: "); - if (wire_bit.read()) - Serial.print("3"); - else - Serial.print("2/4"); - Serial.print(", FAULTCLEAR: "); - if (faultR_bit.read()) - Serial.print("ON"); - else - Serial.print("OFF"); - Serial.print(", "); - if (fi50hz_bit.read()) - Serial.print("50HZ"); - else - Serial.print("60HZ"); - Serial.println(); -} - -// Check and print faults. Then clear them. -void checkFaults(void) { - if (fault_bit.read()) { - Serial.print("MAX: "); - Serial.println(maxRratio_bits.read()); - Serial.print("VAL: "); - Serial.println(rRatio_bits.read()); - Serial.print("MIN: "); - Serial.println(minRratio_bits.read()); - - if (range_high_fault_bit.read()) - Serial.println("Range high fault"); - if (range_low_fault_bit.read()) - Serial.println("Range low fault"); - if (refin_high_fault_bit.read()) - Serial.println("REFIN high fault"); - if (refin_low_fault_bit.read()) - Serial.println("REFIN low fault"); - if (rtdin_low_fault_bit.read()) - Serial.println("RTDIN low fault"); - if (voltage_fault_bit.read()) - Serial.println("Voltage fault"); - - faultR_bit.write(1); // clear fault - } -} - -void setup() { -#if (MAX31865_1_READY_PIN != -1) - pinMode(MAX31865_READY_PIN, INPUT_PULLUP); -#endif - - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("SPI Adafruit_BusIO_RegisterBits test on MAX31865"); - - if (!spi_dev.begin()) { - Serial.println("Could not initialize SPI device"); - while (1) - ; - } - - // Set up for automode 50Hz. We don't care about selfheating. We want the - // highest possible sampling rate. - auto_bit.write(0); // Don't switch filtermode while auto_mode is on. - fi50hz_bit.write(1); // Set filter to 50Hz mode. - faultR_bit.write(1); // Clear faults. - bias_bit.write(1); // In automode we want to have the bias current always on. - delay(5); // Wait until bias current settles down. - // 10.5 time constants of the input RC network is required. - // 10ms worst case for 10kω reference resistor and a 0.1µF capacitor - // across the RTD inputs. Adafruit Module has 0.1µF and only - // 430/4300ω So here 0.43/4.3ms - auto_bit.write( - 1); // Now we can set automode. Automatically starting first conversion. - -// Test the READY_PIN -#if (defined(MAX31865_READY_PIN) && (MAX31865_READY_PIN != -1)) - int i = 0; - while (digitalRead(MAX31865_READY_PIN) && i++ <= 100) { - delay(1); - } - if (i >= 100) { - Serial.print("ERROR: Max31865 Pin detection does not work. PIN:"); - Serial.println(MAX31865_READY_PIN); - } -#else - delay(100); -#endif - - // Set ratio range. - // Setting the temperatures would need some more calculation - not related to - // Adafruit_BusIO_RegisterBits. - uint16_t ratio = rRatio_bits.read(); - maxRratio_bits.write((ratio < 0x8fffu - 1000u) ? ratio + 1000u : 0x8fffu); - minRratio_bits.write((ratio > 1000u) ? ratio - 1000u : 0u); - - printConfig(); - checkFaults(); -} - -void loop() { -#if (defined(MAX31865_READY_PIN) && (MAX31865_1_READY_PIN != -1)) - // Is conversion ready? - if (!digitalRead(MAX31865_READY_PIN)) -#else - // Warant conversion is ready. - delay(21); // 21ms for 50Hz-mode. 19ms in 60Hz-mode. -#endif - { - // Read ratio, calculate temperature, scale, filter and print. - Serial.println(rRatio2C(rRatio_bits.read()) * 100.0f, - 0); // Temperature scaled by 100 - // Check, print, clear faults. - checkFaults(); - } - - // Do something else. - // delay(15000); -} - -// Module/Sensor related. Here Adafruit PT100 module with a 2_Wire PT100 Class C -// ***************************** -float rRatio2C(uint16_t ratio) { - // A simple linear conversion. - const float R0 = 100.0f; - const float Rref = 430.0f; - const float alphaPT = 0.003850f; - const float ADCmax = (1u << 15) - 1.0f; - const float rscale = Rref / ADCmax; - // Measured temperature in boiling water 101.08°C with factor a = 1 and b = 0. - // Rref and MAX at about 22±2°C. Measured temperature in ice/water bath 0.76°C - // with factor a = 1 and b = 0. Rref and MAX at about 22±2°C. - // const float a = 1.0f / (alphaPT * R0); - const float a = (100.0f / 101.08f) / (alphaPT * R0); - // const float b = 0.0f; // 101.08 - const float b = -0.76f; // 100.32 > 101.08 - - return filterRing(((ratio * rscale) - R0) * a + b); -} - -// General purpose -// ********************************************************************************************* -#define RINGLENGTH 250 -float filterRing(float newVal) { - static float ring[RINGLENGTH] = {0.0}; - static uint8_t ringIndex = 0; - static bool ringFull = false; - - if (ringIndex == RINGLENGTH) { - ringFull = true; - ringIndex = 0; - } - ring[ringIndex] = newVal; - uint8_t loopEnd = (ringFull) ? RINGLENGTH : ringIndex + 1; - float ringSum = 0.0f; - for (uint8_t i = 0; i < loopEnd; i++) - ringSum += ring[i]; - ringIndex++; - return ringSum / loopEnd; -} diff --git a/libraries/Adafruit_BusIO/examples/spi_registers/spi_registers.ino b/libraries/Adafruit_BusIO/examples/spi_registers/spi_registers.ino deleted file mode 100644 index af6069b..0000000 --- a/libraries/Adafruit_BusIO/examples/spi_registers/spi_registers.ino +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include - -#define SPIDEVICE_CS 10 -Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS); - -void setup() { - while (!Serial) { - delay(10); - } - Serial.begin(115200); - Serial.println("SPI device register test"); - - if (!spi_dev.begin()) { - Serial.println("Could not initialize SPI device"); - while (1) - ; - } - - Adafruit_BusIO_Register id_reg = - Adafruit_BusIO_Register(&spi_dev, 0x0F, ADDRBIT8_HIGH_TOREAD); - uint8_t id = 0; - id_reg.read(&id); - Serial.print("ID register = 0x"); - Serial.println(id, HEX); - - Adafruit_BusIO_Register thresh_reg = Adafruit_BusIO_Register( - &spi_dev, 0x0C, ADDRBIT8_HIGH_TOREAD, 2, LSBFIRST); - uint16_t thresh = 0; - thresh_reg.read(&thresh); - Serial.print("Initial threshold register = 0x"); - Serial.println(thresh, HEX); - - thresh_reg.write(~thresh); - - Serial.print("Post threshold register = 0x"); - Serial.println(thresh_reg.read(), HEX); -} - -void loop() {} diff --git a/libraries/Adafruit_BusIO/library.properties b/libraries/Adafruit_BusIO/library.properties deleted file mode 100644 index 1615468..0000000 --- a/libraries/Adafruit_BusIO/library.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Adafruit BusIO -version=1.17.4 -author=Adafruit -maintainer=Adafruit -sentence=This is a library for abstracting away UART, I2C and SPI interfacing -paragraph=This is a library for abstracting away UART, I2C and SPI interfacing -category=Signal Input/Output -url=https://github.com/adafruit/Adafruit_BusIO -architectures=* diff --git a/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.cpp b/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.cpp deleted file mode 100644 index d660bff..0000000 --- a/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/*! - * @file Adafruit_CircuitPlayground.cpp - * - * @mainpage Adafruit CircuitPlayground Library - * - * @section intro_sec Introduction - * - * This is the documentation for Adafruit's CircuitPlayground driver for the - * Arduino platform. It is designed specifically to work with the - * Adafruit CircuitPlayground boards: - * - https://www.adafruit.com/products/3000 - * - https://www.adafruit.com/products/3333 - * - * - * Adafruit invests time and resources providing this open source code, - * please support Adafruit and open-source hardware by purchasing - * products from Adafruit! - * - * - * @section author Author - * - * Written by Ladyada and others for Adafruit Industries. - * - * @section license License - * - * BSD license, all text here must be included in any redistribution. - * - */ - -#include - -/**************************************************************************/ -/*! - @brief Set up the CircuitPlayground hardware - @param brightness Optional brightness to set the neopixels to - @returns True if device is set up, false on any failure -*/ -/**************************************************************************/ -bool Adafruit_CircuitPlayground::begin(uint8_t brightness) { - pinMode(CPLAY_REDLED, OUTPUT); - pinMode(CPLAY_BUZZER, OUTPUT); -#if defined(__AVR__) - pinMode(CPLAY_CAPSENSE_SHARED, OUTPUT); - pinMode(CPLAY_LEFTBUTTON, INPUT); - pinMode(CPLAY_RIGHTBUTTON, INPUT); - pinMode(CPLAY_SLIDESWITCHPIN, INPUT); -#elif defined(ARDUINO_NRF52840_CIRCUITPLAY) // bluefruit - pinMode(CPLAY_LEFTBUTTON, INPUT_PULLDOWN); - pinMode(CPLAY_RIGHTBUTTON, INPUT_PULLDOWN); - pinMode(CPLAY_SLIDESWITCHPIN, INPUT_PULLUP); - pinMode(CPLAY_SPEAKER_SHUTDOWN, OUTPUT); - digitalWrite(CPLAY_SPEAKER_SHUTDOWN, HIGH); -#elif defined(__SAMD21G18A__) // Circuit Playground Express - pinMode(CPLAY_LEFTBUTTON, INPUT_PULLDOWN); - pinMode(CPLAY_RIGHTBUTTON, INPUT_PULLDOWN); - pinMode(CPLAY_SLIDESWITCHPIN, INPUT_PULLUP); - irReceiver = IRrecvPCI(CPLAY_IR_RECEIVER); - irDecoder = IRdecode(); - // since we aren't calling speaker.begin() anymore, do this here - pinMode(CPLAY_SPEAKER_SHUTDOWN, OUTPUT); - digitalWrite(CPLAY_SPEAKER_SHUTDOWN, HIGH); -#endif - - strip = Adafruit_CPlay_NeoPixel(); - strip.updateType(NEO_GRB + NEO_KHZ800); - strip.updateLength(10); - strip.setPin(CPLAY_NEOPIXELPIN); - -#ifdef __AVR__ // Circuit Playground 'classic' - lis = Adafruit_CPlay_LIS3DH(CPLAY_LIS3DH_CS, &SPI); // SPI -#elif defined(ARDUINO_NRF52840_CIRCUITPLAY) - lis = Adafruit_CPlay_LIS3DH(&Wire1); // i2c on wire1 -#else // samd21 - lis = Adafruit_CPlay_LIS3DH(&Wire1); // i2c on wire1 -#endif - - mic = Adafruit_CPlay_Mic(); - - strip.begin(); - strip.show(); // Initialize all pixels to 'off' - strip.setBrightness(brightness); - -#if defined(__AVR__) || defined(ARDUINO_NRF52840_CIRCUITPLAY) // bluefruit - cap[0] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 0); - cap[1] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 1); - cap[2] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 2); - cap[3] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 3); - cap[4] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 6); - cap[5] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 9); - cap[6] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 10); - cap[7] = CPlay_CapacitiveSensor(CPLAY_CAPSENSE_SHARED, 12); -#elif defined(__SAMD21G18A__) // Circuit Playground Express - for (int i = 0; i < 7; i++) { - cap[i] = Adafruit_CPlay_FreeTouch(A1 + i, OVERSAMPLE_4, RESISTOR_50K, - FREQ_MODE_NONE); - if (!cap[i].begin()) - return false; - } -#endif - - return lis.begin(CPLAY_LIS3DH_ADDRESS); -} - -/**************************************************************************/ -/*! - @brief read capacitive touch sensor - @param p the pin to read. Must be a captouch enabled pin. - @param samples Optional number of samples to take. Defaults to 10. - @returns measured captouch value -*/ -/**************************************************************************/ -uint16_t Adafruit_CircuitPlayground::readCap(uint8_t p, uint8_t samples) { -#if defined(__AVR__) || \ - defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground Classic or - // bluefruit - switch (p) { - case 0: - return cap[0].capacitiveSensor(samples); - case 1: - return cap[1].capacitiveSensor(samples); - case 2: - return cap[2].capacitiveSensor(samples); - case 3: - return cap[3].capacitiveSensor(samples); - case 6: - return cap[4].capacitiveSensor(samples); - case 9: - return cap[5].capacitiveSensor(samples); - case 10: - return cap[6].capacitiveSensor(samples); - case 12: - return cap[7].capacitiveSensor(samples); - default: - return 0; - } -#elif defined(__SAMD21G18A__) // Circuit Playground Express - // analog pins r ez! - if ((p >= A1) && (p <= A7)) { - return cap[p - A1].measure(); - } - // oof digital pins - switch (p) { - case 0: - return cap[A6 - A1].measure(); - case 1: - return cap[A7 - A1].measure(); - case 2: - return cap[A5 - A1].measure(); - case 3: - return cap[A4 - A1].measure(); - case 6: - return cap[A1 - A1].measure(); - case 9: - return cap[A2 - A1].measure(); - case 10: - return cap[A3 - A1].measure(); - default: - return 0; - } -#endif -} - -/**************************************************************************/ -/*! - @brief turn on or off the red LED on pin #13 - @param v pass true to turn LED on, false to turn LED off -*/ -/**************************************************************************/ -void Adafruit_CircuitPlayground::redLED(bool v) { - digitalWrite(CPLAY_REDLED, v); -} - -/**************************************************************************/ -/*! - @brief read the slide switch - @returns true if slide switch in set, false if not -*/ -/**************************************************************************/ -bool Adafruit_CircuitPlayground::slideSwitch(void) { - return digitalRead(CPLAY_SLIDESWITCHPIN); -} - -/**************************************************************************/ -/*! - @brief read the left button - @returns true if button is pressed, false if not -*/ -/**************************************************************************/ -bool Adafruit_CircuitPlayground::leftButton(void) { - return digitalRead(CPLAY_LEFTBUTTON); -} - -/**************************************************************************/ -/*! - @brief read the right button - @returns true if button is pressed, false if not -*/ -/**************************************************************************/ -bool Adafruit_CircuitPlayground::rightButton(void) { - return digitalRead(CPLAY_RIGHTBUTTON); -} - -/**************************************************************************/ -/*! - @brief play a tone on the onboard buzzer - @param freq the frequency to play - @param time the duration of the tone in milliseconds - @param wait Optional flag to wait for time milliseconds after playing the - tone. Defaults to true. - @note The driver circuitry is an on/off transistor driver, so you will only - be able to play square waves. It is also not the same loudness over all - frequencies but is designed to be the loudest at around 4 KHz -*/ -/**************************************************************************/ -void Adafruit_CircuitPlayground::playTone(uint16_t freq, uint16_t time, - bool wait) { -#ifdef __AVR__ -#define F_PLL 48000000 - if (!freq) - return; - uint32_t ocr; - uint16_t prescale = 1; - uint8_t scalebits = 0; - uint8_t hi1, lo1, hi2, lo2; - - // Determine best prescaler setting for 10-bit timer - do { - scalebits++; - ocr = F_PLL / freq / prescale - 1; - prescale *= 2; - if (prescale >= 16384) { - ocr = 1023; - scalebits = 0b1111; - } - } while (ocr > 1023); - - // Set up Timer4 for fast PWM on !OC4A - PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk - TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on - TCCR4B = _BV(PWM4X) | scalebits; // PWM invert - TCCR4D = 0; // Fast PWM mode - TCCR4E = 0; // Not enhanced mode - DT4 = 0; // No dead time - hi1 = ocr >> 8; - lo1 = ocr & 0xFF; - hi2 = ocr >> 9; - lo2 = (ocr >> 1) & 0xFF; - noInterrupts(); // TC4H accesses MUST be atomic - TC4H = hi1; - OCR4C = lo1; // TOP - TC4H = hi2; - OCR4A = lo2; // 50% duty - interrupts(); - pinMode(5, OUTPUT); // Enable output - delay(time); - pinMode(5, INPUT); // Disable output - TCCR4A = 0; // PWMA off -#else - tone(CPLAY_BUZZER, freq, time); - delay(time); // time argument to tone() isn't working, so... -#endif - if (wait) - delay(time); -} - -/**************************************************************************/ -/*! - @brief read the onboard lightsensor - @returns value between 0 and 1023 read from the light sensor - @note 1000 Lux will roughly read as 2 Volts (or about 680 as a raw analog - reading). A reading of about 300 is common for most indoor light levels. Note - that outdoor daylight is 10,000 Lux or even higher, so this sensor is best - suited for indoor light levels! -*/ -/**************************************************************************/ -uint16_t Adafruit_CircuitPlayground::lightSensor(void) { - return analogRead(CPLAY_LIGHTSENSOR); -} - -/**************************************************************************/ -/*! - @brief read the onboard sound sensor. A reading of ~0 is silent, and - loud audio will result in a reading between -500 and 500 or so. - @returns value of the sound sensor -*/ -/**************************************************************************/ -int16_t Adafruit_CircuitPlayground::soundSensor(void) { - int16_t x; - mic.capture(&x, 1); - return x; -} - -/**************************************************************************/ -/*! - @brief read the X parameter of the onboard accelerometer. Value returned is - defined by setAccelRange(). - @returns X value of the accelerometer -*/ -/**************************************************************************/ -float Adafruit_CircuitPlayground::motionX(void) { - sensors_event_t event; - CircuitPlayground.lis.getEvent(&event); - return event.acceleration.x; -} - -/**************************************************************************/ -/*! - @brief read the Y parameter of the onboard accelerometer. Value returned is - defined by setAccelRange(). - @returns Y value of the accelerometer -*/ -/**************************************************************************/ -float Adafruit_CircuitPlayground::motionY(void) { - sensors_event_t event; - CircuitPlayground.lis.getEvent(&event); - return event.acceleration.y; -} - -/**************************************************************************/ -/*! - @brief read the Z parameter of the onboard accelerometer. Value returned is - defined by setAccelRange(). - @returns the Z value of the onboard accelerometer -*/ -/**************************************************************************/ -float Adafruit_CircuitPlayground::motionZ(void) { - sensors_event_t event; - CircuitPlayground.lis.getEvent(&event); - return event.acceleration.z; -} - -/**************************************************************************/ -/*! - @brief read the onboard thermistor. - @returns temperature reading in Centigrade. -*/ -/**************************************************************************/ -float Adafruit_CircuitPlayground::temperature(void) { - // Thermistor test - double reading; - reading = analogRead(CPLAY_THERMISTORPIN); - - // Serial.print("Thermistor reading: "); Serial.println(reading); - - // convert the value to resistance - reading = ((1023.0 * SERIESRESISTOR) / reading); - reading -= SERIESRESISTOR; - - // Serial.print("Thermistor resistance: "); Serial.println(reading); - - double steinhart; - steinhart = reading / THERMISTORNOMINAL; // (R/Ro) - steinhart = log(steinhart); // ln(R/Ro) - steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro) - steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To) - steinhart = 1.0 / steinhart; // Invert - steinhart -= 273.15; // convert to C - - return steinhart; -} - -/**************************************************************************/ -/*! - @brief read the onboard thermistor. - @returns temperature reading in Farenheight. -*/ -/**************************************************************************/ -float Adafruit_CircuitPlayground::temperatureF(void) { - float tempF = CircuitPlayground.temperature() * 1.8 + 32; - return tempF; -} - -/**************************************************************************/ -/*! - @brief get a color value from the color wheel. - @param WheelPos a value 0 to 255 - @returns a color value. The colours are a transition r - g - b - back to r. -*/ -/**************************************************************************/ -uint32_t Adafruit_CircuitPlayground::colorWheel(uint8_t WheelPos) { - WheelPos = 255 - WheelPos; - if (WheelPos < 85) { - return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); - } - if (WheelPos < 170) { - WheelPos -= 85; - return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); - } - WheelPos -= 170; - return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); -} - -/**************************************************************************/ -/*! - @brief detect a color value from the light sensor - @param red the pointer to where the red component should be stored. - @param green the pointer to where the green component should be stored. - @param blue the pointer to where the blue component should be stored. -*/ -/**************************************************************************/ -void Adafruit_CircuitPlayground::senseColor(uint8_t &red, uint8_t &green, - uint8_t &blue) { - // Save the current pixel brightness so it can later be restored. Then bump - // the brightness to max to make sure the LED is as bright as possible for - // the color readings. - uint8_t old_brightness = strip.getBrightness(); - strip.setBrightness(255); - // Set pixel 1 (next to the light sensor) to full red, green, blue - // color and grab a light sensor reading. Make sure to wait a bit - // after changing pixel colors to let the light sensor change - // resistance! - setPixelColor(1, 255, 0, 0); // Red - delay(LIGHT_SETTLE_MS); - uint16_t raw_red = lightSensor(); - setPixelColor(1, 0, 255, 0); // Green - delay(LIGHT_SETTLE_MS); - uint16_t raw_green = lightSensor(); - setPixelColor(1, 0, 0, 255); // Blue - delay(LIGHT_SETTLE_MS); - uint16_t raw_blue = lightSensor(); - // Turn off the pixel and restore brightness, we're done with readings. - setPixelColor(1, 0); - strip.setBrightness(old_brightness); - // Now scale down each of the raw readings to be within - // 0 to 255. Remember each sensor reading is from the ADC - // which has 10 bits of resolution (0 to 1023), so dividing - // by 4 will change the range from 0-1023 to 0-255. Also - // use the min function to clamp the value to 255 at most (just - // to prevent overflow from 255.xx to 0). - red = min(255, raw_red / 4); - green = min(255, raw_green / 4); - blue = min(255, raw_blue / 4); -} - -/**************************************************************************/ -/*! - @brief check whether or not this device is a CircuitPlayground Express. - @returns True if the device is a CircuitPlayground Express, false if it is a - 'classic'. -*/ -/**************************************************************************/ -bool Adafruit_CircuitPlayground::isExpress(void) { -#ifdef __AVR__ - return false; -#else - return true; -#endif -} - -// instantiate static -Adafruit_CircuitPlayground CircuitPlayground; diff --git a/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.h b/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.h deleted file mode 100644 index c72cd31..0000000 --- a/libraries/Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.h +++ /dev/null @@ -1,3 +0,0 @@ -// this is a placeholder file. dont undo or delete this 'clever hack' :) - -#include diff --git a/libraries/Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h b/libraries/Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h deleted file mode 100644 index 9bfa245..0000000 --- a/libraries/Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h +++ /dev/null @@ -1,266 +0,0 @@ -/*! - * @file Adafruit_Circuit_Playground.h - * - * This is part of Adafruit's CircuitPlayground driver for the Arduino platform. - * It is designed specifically to work with the Adafruit CircuitPlayground - * boards. - * - * Adafruit invests time and resources providing this open source code, - * please support Adafruit and open-source hardware by purchasing - * products from Adafruit! - * - * Written by Ladyada and others for Adafruit Industries. - * - * BSD license, all text here must be included in any redistribution. - * - */ - -#ifndef _ADAFRUIT_CIRCUITPLAYGROUND_H_ -#define _ADAFRUIT_CIRCUITPLAYGROUND_H_ - -#include "utility/Adafruit_CPlay_LIS3DH.h" -#include "utility/Adafruit_CPlay_Mic.h" -#include "utility/Adafruit_CPlay_NeoPixel.h" -#include "utility/Adafruit_CPlay_Speaker.h" -#include "utility/CP_Firmata.h" -#include - -#if defined(__AVR__) || \ - defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic' -#include "utility/CPlay_CapacitiveSensor.h" -#else -#include "utility/Adafruit_CPlay_FreeTouch.h" -#include "utility/IRLibCPE.h" -#endif - -#ifndef NOT_AN_INTERRUPT // Not defined in Arduino 1.0.5 -#define NOT_AN_INTERRUPT -1 ///< Pin is not on an interrupt -#endif - -#ifdef __AVR__ // Circuit Playground 'classic' -#define CPLAY_CAPSENSE_SHARED 30 ///< capacitive sense pin -#define CPLAY_REDLED 13 ///< red LED pin -#define CPLAY_NEOPIXELPIN 17 ///< neopixel pin -#define CPLAY_SLIDESWITCHPIN 21 ///< slide switch pin -#define CPLAY_LEFTBUTTON 4 ///< left button pin -#define CPLAY_RIGHTBUTTON 19 ///< right button pin -#define CPLAY_LIGHTSENSOR A5 ///< light sensor pin -#define CPLAY_THERMISTORPIN A0 ///< thermistor pin -#define CPLAY_SOUNDSENSOR A4 ///< sound sensor pin -#define CPLAY_BUZZER 5 ///< buzzer pin -#define CPLAY_LIS3DH_CS 8 ///< LIS3DH chip select pin -#define CPLAY_LIS3DH_INTERRUPT 7 ///< LIS3DH interrupt pin -#define CPLAY_LIS3DH_ADDRESS 0x18 ///< LIS3DH I2C address -#elif defined(ARDUINO_NRF52840_CIRCUITPLAY) -#include -#define CPLAY_CAPSENSE_SHARED \ - 255 ///< we use ground instead of capacitive sense pin -#define CPLAY_LEFTBUTTON 4 ///< left button pin -#define CPLAY_RIGHTBUTTON 5 ///< right button pin -#define CPLAY_SLIDESWITCHPIN 7 ///< slide switch pin -#define CPLAY_NEOPIXELPIN 8 ///< neopixel pin -#define CPLAY_REDLED 13 ///< red led pin -#define CPLAY_BUZZER A0 ///< buzzer pin -#define CPLAY_LIGHTSENSOR A8 ///< light sensor pin -#define CPLAY_THERMISTORPIN A9 ///< thermistor pin -#define CPLAY_LIS3DH_CS -1 ///< LIS3DH chip select pin -#define CPLAY_LIS3DH_INTERRUPT 27 ///< LIS3DH interrupt pin -#define CPLAY_LIS3DH_ADDRESS 0x19 ///< LIS3DH I2C address -#else // Circuit Playground Express -#define CPLAY_LEFTBUTTON 4 ///< left button pin -#define CPLAY_RIGHTBUTTON 5 ///< right button pin -#define CPLAY_SLIDESWITCHPIN 7 ///< slide switch pin -#define CPLAY_NEOPIXELPIN 8 ///< neopixel pin -#define CPLAY_REDLED 13 ///< red led pin -#define CPLAY_IR_EMITTER 25 ///< IR emmitter pin -#define CPLAY_IR_RECEIVER 26 ///< IR receiver pin -#define CPLAY_BUZZER A0 ///< buzzer pin -#define CPLAY_LIGHTSENSOR A8 ///< light sensor pin -#define CPLAY_THERMISTORPIN A9 ///< thermistor pin -#define CPLAY_SOUNDSENSOR A4 ///< TBD I2S -#define CPLAY_LIS3DH_CS -1 ///< LIS3DH chip select pin -#define CPLAY_LIS3DH_INTERRUPT 27 ///< LIS3DH interrupt pin -#define CPLAY_LIS3DH_ADDRESS 0x19 ///< LIS3DH I2C address -#endif - -#define SERIESRESISTOR 10000 ///< series resistor for thermistor -#define THERMISTORNOMINAL 10000 ///< resistance of thermistor at 25 degrees C -#define TEMPERATURENOMINAL \ - 25 ///< temp. for nominal resistance (almost always 25 C) - -#define BCOEFFICIENT \ - 3380 ///< The beta coefficient of the thermistor (usually 3000-4000) - -/*! - @brief Configuration to tune the color sensing logic: - Amount of time (in milliseconds) to wait between - changing the pixel color and reading the light - sensor. -*/ -#define LIGHT_SETTLE_MS 100 - -/**************************************************************************/ -/*! - @brief Class that stores state and functions for interacting with - CircuitPlayground hardware -*/ -/**************************************************************************/ -class Adafruit_CircuitPlayground { -public: - bool begin(uint8_t brightness = 20); - - Adafruit_CPlay_NeoPixel strip; ///< the neopixel strip object - Adafruit_CPlay_LIS3DH lis; ///< the accelerometer object - Adafruit_CPlay_Mic mic; ///< the microphone object - Adafruit_CPlay_Speaker speaker; ///< the speaker object - -#if defined(__AVR__) || \ - defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic' or - // bluefruit - CPlay_CapacitiveSensor cap[8]; ///< the array of capacitive touch sensors -#else - Adafruit_CPlay_FreeTouch cap[7]; ///< the array of capacitive touch sensors - IRrecvPCI irReceiver; ///< the IR receiver object - IRdecode irDecoder; ///< the IR decoder object - IRsend irSend; ///< the IR send object -#endif - - bool slideSwitch(void); - void redLED(bool v); - void playTone(uint16_t freq, uint16_t time, bool wait = true); - bool leftButton(void); - bool rightButton(void); - uint16_t lightSensor(void); - int16_t soundSensor(void); - float temperature(void); - float temperatureF(void); - - uint16_t readCap(uint8_t p, uint8_t samples = 10); - - // Accelerometer - float motionX(void); - float motionY(void); - float motionZ(void); - - /**************************************************************************/ - /*! - @brief set the range of the MEMS accelerometer. - @param range the range to set the accelerometer to. LIS3DH_RANGE_2_G - is the smallest (+-2G) but will give the greatest precision, while - LIS3DH_RANGE_8_G is the largest (+-8G) but with the lease precision. - LIS3DH_RANGE_4_G is in the middle. - */ - /**************************************************************************/ - void setAccelRange(lis3dh_range_t range) { lis.setRange(range); } - /**************************************************************************/ - /*! - @brief turn on tap detection. Tap detection can detect single taps or - 'double taps' (like a double-click). - @param c If c is 1 you will only detect single taps, one at a time. - If c is 2, you will be able to detect both single taps and double - taps. - @param clickthresh the threshold over which to register a tap - */ - /**************************************************************************/ - void setAccelTap(uint8_t c, uint8_t clickthresh) { - lis.setClick(c, clickthresh, 10, 20, 255); - } - - /**************************************************************************/ - /*! - @brief test whether or not a tap has been detected - @return 0 if no tap is detected, 1 if a single tap is detected, and 2 or 3 - if double tap is detected. - */ - /**************************************************************************/ - uint8_t getAccelTap(void) { return (lis.getClick() >> 8) & 0x3; } - - /**************************************************************************/ - /*! - @brief turn off all neopixels on the board - */ - /**************************************************************************/ - void clearPixels(void) { - strip.clear(); - strip.show(); - } - - /**************************************************************************/ - /*! - @brief set the color of a neopixel on the board - @param p the pixel to set. Pixel 0 is above the pad labeled 'GND' right next - to the USB connector, while pixel 9 is above the pad labeled '3.3V' on the - other side of the USB connector. - @param c a 24bit color value to set the pixel to - */ - /**************************************************************************/ - void setPixelColor(uint8_t p, uint32_t c) { - strip.setPixelColor(p, c); - strip.show(); - } - - /**************************************************************************/ - /*! - @brief set the color of a neopixel on the board - @param p the pixel to set. Pixel 0 is above the pad labeled 'GND' right next - to the USB connector, while pixel 9 is above the pad labeled '3.3V' on the - other side of the USB connector. - @param r a 0 to 255 value corresponding to the red component of the desired - color. - @param g a 0 to 255 value corresponding to the green component of the - desired color. - @param b a 0 to 255 value corresponding to the blue component of the desired - color. - */ - /**************************************************************************/ - void setPixelColor(uint8_t p, uint8_t r, uint8_t g, uint8_t b) { - strip.setPixelColor(p, r, g, b); - strip.show(); - } - - /*! @brief set the global brightness of all neopixels. - @param b a 0 to 255 value corresponding to the desired brightness. The - default brightness of all neopixels is 30. */ - void setBrightness(uint16_t b) { strip.setBrightness(b); } - - /*! @brief Get a sinusoidal value from a sine table - @param x a 0 to 255 value corresponding to an index to the sine table - @returns An 8-bit sinusoidal value back */ - uint8_t sine8(uint8_t x) { return strip.sine8(x); } - - /*! @brief Get a gamma-corrected value from a gamma table - @param x a 0 to 255 value corresponding to an index to the gamma table - @returns An 8-bit gamma-corrected value back */ - uint8_t gamma8(uint8_t x) { return strip.gamma8(x); } - - uint32_t colorWheel(uint8_t x); - - // Basic RGB color sensing with the light sensor and nearby neopixel. - // Both functions do the same thing and just differ in how they return the - // result, either as explicit RGB bytes or a 24-bit RGB color value. - void senseColor(uint8_t &red, uint8_t &green, uint8_t &blue); - - /**************************************************************************/ - /*! - @brief detect a color using the onboard light sensor - @return a 24 bit color. The most significant byte is red, followed by green, - and the least significant byte is blue. - */ - /**************************************************************************/ - uint32_t senseColor() { - // Use the individual color component color sense function and then - // recombine tbe components into a 24-bit color value. - uint8_t red, green, blue; - senseColor(red, green, blue); - return ((uint32_t)red << 16) | ((uint32_t)green << 8) | blue; - } - - bool isExpress(void); - -private: -}; - -extern Adafruit_CircuitPlayground - CircuitPlayground; ///< instantiated by default - -#endif diff --git a/libraries/Adafruit_Circuit_Playground/CONTRIBUTING.md b/libraries/Adafruit_Circuit_Playground/CONTRIBUTING.md deleted file mode 100644 index 212ec63..0000000 --- a/libraries/Adafruit_Circuit_Playground/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contribution Guidelines - -This library is the culmination of the expertise of many members of the open source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/adafruit/Adafruit_CircuitPlayground/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community. - -The following are some guidelines to observe when creating issues or PRs: - -- Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas - -- [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets - -- Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile: - -- Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library diff --git a/libraries/Adafruit_Circuit_Playground/Doxyfile b/libraries/Adafruit_Circuit_Playground/Doxyfile deleted file mode 100644 index a0da164..0000000 --- a/libraries/Adafruit_Circuit_Playground/Doxyfile +++ /dev/null @@ -1,2492 +0,0 @@ -# Doxyfile 1.8.13 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "Adafruit Library" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = YES - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = . \ - utility - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.pyw \ - *.f90 \ - *.f95 \ - *.f03 \ - *.f08 \ - *.f \ - *.for \ - *.tcl \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = */utility/IRLib* \ - */utility/CP_Firmata.* - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /