Add DeleteAllUsers command
This commit is contained in:
@@ -312,6 +312,26 @@ namespace WaveshareUARTFingerprintSensor
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool DeleteAllUsers()
|
||||||
|
{
|
||||||
|
if (TrySendAndReceive(CommandType.DeleteAllUsers, 0, 0, 0, out var response, 1000))
|
||||||
|
{
|
||||||
|
return response.responseType == ResponseType.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeleteAllUsersWithPermission(UserPermission userPermission)
|
||||||
|
{
|
||||||
|
if (TrySendAndReceive(CommandType.DeleteAllUsers, 0, 0, (byte)userPermission, out var response, 1000))
|
||||||
|
{
|
||||||
|
return response.responseType == ResponseType.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnWake()
|
private void OnWake()
|
||||||
{
|
{
|
||||||
if (_wakePin.Read())
|
if (_wakePin.Read())
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace WaveshareUARTFingerprintSensor
|
namespace WaveshareUARTFingerprintSensor
|
||||||
{
|
{
|
||||||
public enum UserPermission
|
public enum UserPermission : byte
|
||||||
{
|
{
|
||||||
Level1 = 1,
|
Level1 = 1,
|
||||||
Level2 = 2,
|
Level2 = 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user