Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
Public Types | Public Member Functions | Public Attributes | List of all members
DFPResponse Struct Reference

#include <DFPlayerMini.h>

Public Types

enum  Status {
  Incomplete =0, Ok =1, Timeout =2, SerialError =3,
  Invalid =4
}
 

Public Member Functions

 DFPResponse ()
 

Public Attributes

Status status
 
uint8_t messageType
 
uint16_t arg
 

Detailed Description

A response to a query set to a DFPlayerMini object.

This object is returned when a query is sent to a DFPlayerMini object It indicates the success of the query using the .status member, and also contains the message type (which presumably should the same as the command used in the query), and the argument (result) value, which is always a uint16_t.

Definition at line 154 of file DFPlayerMini.h.

Member Enumeration Documentation

◆ Status

Enumerator
Incomplete 

Set when we start receiving, should not remain at end.

Ok 

Messaged received and is valid.

Timeout 

Message timed out (DFPlayerMini::ResponseTimeoutMs ms passed)

SerialError 

Indicates broken serial comms.

Invalid 

Response was not validated (bad cksum, header etc)

Definition at line 155 of file DFPlayerMini.h.

Constructor & Destructor Documentation

◆ DFPResponse()

DFPResponse::DFPResponse ( )
inline

Default constructor - packet starts in Incomplete state.

Definition at line 165 of file DFPlayerMini.h.


The documentation for this struct was generated from the following file: