Salem TANG / SLCD

Dependents:   FRDM-KL46Z_Debug

Fork of SLCD by Erik -

Embed: (wiki syntax)

« Back to documentation index

SLCD Class Reference

SLCD Class Reference

SLCD peripheral of the FRDM-KL46Z
Inherits mbed::Stream and supports the majority of Stream functions. More...

#include <SLCD.h>

Public Member Functions

 SLCD ()
 Construct an SLCD object.
void Home ()
 Move the SLCD cursor to the first character.
void Contrast (uint8_t lbContrast)
 Set contrast.
void All_Segments (int)
 Set Segments.
void clear ()
 Turn off all segments.
void DP (int pos, bool on)
 Turn a decimal point on or off.
void DP1 (int)
 Set DP1.
void DP2 (int)
 Set DP2.
void DP3 (int)
 Set DP3.
void Colon (bool on)
 Turn the colon symbol on or off.
void blink (int blink=3)
 Set Blink.
void deepsleepEnable (bool enable)
 Deep Sleep Enable.

Data Fields

uint8_t CharPosition
 Current cursor position.

Detailed Description

SLCD peripheral of the FRDM-KL46Z
Inherits mbed::Stream and supports the majority of Stream functions.

#include "mbed.h"
#include "SLCD.h"

SLCD slcd;

main()
{
    slcd.Home();            // Moves cursor to position 0 (start)
    slcd.printf("1.2.3.4"); // Standard printf function, only characters in ASCII_TO_WF_CODIFICATION_TABLE will display
    // Dots printed using decimal points
    slcd.putc('A');         // Prints a single character
    
    while(1);   // Wait forever
}

Definition at line 51 of file SLCD.h.


Constructor & Destructor Documentation

SLCD (  )

Construct an SLCD object.

SLCD Main Function.

Parameters:
[in]nil
Return values:
nil

Definition at line 128 of file SLCD.cpp.


Member Function Documentation

void All_Segments ( int  mode )

Set Segments.

Parameters:
[in]modemode
Return values:
nil

Definition at line 291 of file SLCD.cpp.

void blink ( int  blink = 3 )

Set Blink.

Parameters:
[in]blinkblink
Return values:
nil

Definition at line 389 of file SLCD.cpp.

void clear (  )

Turn off all segments.

Clear Segments.

Parameters:
[in]nil
Return values:
nil

Definition at line 281 of file SLCD.cpp.

void Colon ( bool  on )

Turn the colon symbol on or off.

Set Colon.

Parameters:
[in]onon
Return values:
nil

Definition at line 373 of file SLCD.cpp.

void Contrast ( uint8_t  lbContrast )

Set contrast.

Set Contrast.

Parameters:
lbContrast0 - 15, 0 lightest, 15 darkest
[in]lbContrastcontrast
Return values:
nil

Definition at line 270 of file SLCD.cpp.

void deepsleepEnable ( bool  enable )

Deep Sleep Enable.

Parameters:
[in]enableenable
Return values:
nil

Definition at line 402 of file SLCD.cpp.

void DP ( int  pos,
bool  on 
)

Turn a decimal point on or off.

Set DP.

Parameters:
posdecimal point position: 0-2
onTrue or False
[in]posposition
[in]onon
Return values:
nil

Definition at line 313 of file SLCD.cpp.

void DP1 ( int  mode )

Set DP1.

Parameters:
[in]modemode
Return values:
nil

Definition at line 343 of file SLCD.cpp.

void DP2 ( int  mode )

Set DP2.

Parameters:
[in]modemode
Return values:
nil

Definition at line 353 of file SLCD.cpp.

void DP3 ( int  mode )

Set DP3.

Parameters:
[in]modemode
Return values:
nil

Definition at line 363 of file SLCD.cpp.

void Home (  )

Move the SLCD cursor to the first character.

Set Home Position.

Parameters:
[in]nil
Return values:
nil

Definition at line 260 of file SLCD.cpp.


Field Documentation

uint8_t CharPosition

Current cursor position.

Definition at line 79 of file SLCD.h.