Version using RawSerial instead of Serial (thread safe)

Fork of FONA_Cellphone_Library by Dream Team

Embed: (wiki syntax)

« Back to documentation index

Adafruit_FONA::EventListener Class Reference

Adafruit_FONA::EventListener Class Reference

Listener for FONA events. More...

#include <Adafruit_FONA.h>

Public Member Functions

virtual void onRing ()=0
 Method called when somebody call the FONA.
virtual void onNoCarrier ()=0
 Method called when the calling person stop his call.

Detailed Description

Listener for FONA events.

Inherit this class to customize.

#define FONA_RST p12
#define FONA_TX p13
#define FONA_RX p14
#define FONA_RI p11

Adafruit_FONA my_fona(FONA_TX, FONA_RX, FONA_RST, FONA_RI);
DigitalOut led1(LED1); 
class FonaEventListener : public Adafruit_FONA::EventListener {
    virtual void onRing() {
        led1 = 1;
}

    virtual void onNoCarrier() {
        led1 = 0; 
    }
};
FonaEventListener fonaEventListener;
my_fona.setEventListener(&fonaEventListener);

Definition at line 85 of file Adafruit_FONA.h.


Member Function Documentation

virtual void onNoCarrier (  ) [pure virtual]

Method called when the calling person stop his call.

virtual void onRing (  ) [pure virtual]

Method called when somebody call the FONA.