Merge pull request #145 from brentru/add-genericdevice-end
Add end() for GenericDevice
This commit is contained in:
commit
e75ac29ca6
3 changed files with 10 additions and 1 deletions
|
|
@ -34,6 +34,14 @@ bool Adafruit_GenericDevice::begin(void) {
|
|||
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
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public:
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
name=Adafruit BusIO
|
||||
version=1.17.1
|
||||
version=1.17.2
|
||||
author=Adafruit
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=This is a library for abstracting away UART, I2C and SPI interfacing
|
||||
|
|
|
|||
Loading…
Reference in a new issue