A board support package for the LPC4088 Display Module.

Dependencies:   DM_HttpServer DM_USBHost

Dependents:   lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more

Fork of DMSupport by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

DMBoard Class Reference

Example of using the Board class: More...

#include <DMBoard.h>

Public Member Functions

BoardError init ()
 Initializes the wanted features.
void setLED (Leds led, bool on)
 Controls the four LEDs on the Display Module.
void buzzer (int frequency=0, int duration_ms=0)
 Controls the buzzer.
bool buttonPressed ()
 Test if the USER button is pressed or not.
TouchPaneltouchPanel ()
 Returns the TouchPanel interface.
Displaydisplay ()
 Returns the Display interface.
RtosLoglogger ()
 Returns the logger interface.
Registryregistry ()
 Returns the Registry interface.
MCIFileSystemgetMciFS ()
 Returns the MCI File System instance.
QSPIFileSystemgetQspiFS ()
 Returns the QSPI File System instance.

Static Public Member Functions

static DMBoardinstance ()
 Get the only instance of the DMBoard.

Detailed Description

Example of using the Board class:

 #include "mbed.h"
 #include "DMBoard.h"

 int main(void) {
    DMBoard* board = &DMBoard::instance();
    board->init();
    ...
    board->setLed(1, true);
 }

Definition at line 67 of file DMBoard.h.


Member Function Documentation

bool buttonPressed (  )

Test if the USER button is pressed or not.

Returns:
True if the button is pressed, false if not

Definition at line 221 of file DMBoard.cpp.

void buzzer ( int  frequency = 0,
int  duration_ms = 0 
)

Controls the buzzer.

Examples: buzzer() turns it off buzzer(440) plays an A4 (440Hz) note forever buzzer(200, 25) plays a 200Hz tone for 25ms and then turns it off

Note that if duration_ms is >0 this is a blocking call

Parameters:
frequencythe frequency of the tone (in Hz) or 0 to turn it off
duration_msthe number of milliseconds to play or 0 for forever

Definition at line 207 of file DMBoard.cpp.

Display * display (  )

Returns the Display interface.

Returns:
The display

Definition at line 236 of file DMBoard.cpp.

MCIFileSystem* getMciFS (  )

Returns the MCI File System instance.

Can be used to call e.g. cardInserted().

Returns:
The file system instance

Definition at line 172 of file DMBoard.h.

QSPIFileSystem* getQspiFS (  )

Returns the QSPI File System instance.

Can be used to call e.g. isformatted() and format().

Returns:
The file system instance

Definition at line 184 of file DMBoard.h.

DMBoard::BoardError init (  )

Initializes the wanted features.

Returns:
Ok on success An error code on failure

Definition at line 102 of file DMBoard.cpp.

static DMBoard& instance (  ) [static]

Get the only instance of the DMBoard.

Returns:
The DMBoard

Definition at line 92 of file DMBoard.h.

RtosLog* logger (  )

Returns the logger interface.

Returns:
The logger

Definition at line 153 of file DMBoard.h.

Registry* registry (  )

Returns the Registry interface.

Returns:
The registry

Definition at line 161 of file DMBoard.h.

void setLED ( Leds  led,
bool  on 
)

Controls the four LEDs on the Display Module.

Parameters:
ledOne of Led1, Led2, Led3 or Led4
ontrue to turn the LED on regardless of its polarity

Definition at line 189 of file DMBoard.cpp.

TouchPanel * touchPanel (  )

Returns the TouchPanel interface.

Returns:
The touch panel

Definition at line 226 of file DMBoard.cpp.