Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Adafruit_Fingerprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,21 @@ void Adafruit_Fingerprint::begin(uint32_t baudrate) {
#endif
}

/**************************************************************************/
/*!
@brief Closes serial interface. Can be used to save performance and
power usage
*/
/**************************************************************************/
void Adafruit_Fingerprint::end(void) {
if (hwSerial)
hwSerial->end();
#if defined(__AVR__) || defined(ESP8266) || defined(FREEDOM_E300_HIFIVE1)
if (swSerial)
swSerial->end();
#endif
}

/**************************************************************************/
/*!
@brief Verifies the sensors' access password (default password is
Expand Down
1 change: 1 addition & 0 deletions Adafruit_Fingerprint.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class Adafruit_Fingerprint {
Adafruit_Fingerprint(Stream *serial, uint32_t password = 0x0);

void begin(uint32_t baud);
void end(void);

boolean verifyPassword(void);
uint8_t getParameters(void);
Expand Down