Blue Flower

 

LCDBPV2 API

LCDBPV2 support a wide variety of microcontrollers (almost all), and you can easily create libraries to fit with your hardware, but if you use libraries I provide, you can found some common functions. To port libraries to a new microcontroller only is needed to adapt these API functions.code.

LCD Screen Under this section you can found API functions related to LCD Screen.

void LCDBPV2_PixelDraw(uINT_16 lX, uINT_16 lY, uINT_32 ulValue );
Writes a pixel on the screen.

Parameter

FieldTypeDescription
lX uINT_16 X coordenate
lY uINT_16 Y coordenate
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_LineDrawH(uINT_16 lX1, uINT_16 lX2, uINT_16 lY, uINT_32 ulValue );
Writes a horizontal line on the screen.

Parameter

FieldTypeDescription
lX1 uINT_16 X min coordenate
lX2 uINT_16 X max coordenate
lY uINT_16 Y coordenate
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_LineDrawV(uINT_16 lX, uINT_16 lY1, uINT_16 lY2, uINT_32 ulValue );
Writes a vertical line on the screen.

Parameter

FieldTypeDescription
lX uINT_16 X coordenate
lY1 uINT_16 Y min coordenate
lY2 uINT_16 Y max coordenate
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_RectFill(gRectangle srecta, uINT_32 ulValue );
Writes a filled rectangle on the screen. The rectangle type gRectangle is defined by his attributes: Xmin, Xmax, Ymin, Ymax

Parameter

FieldTypeDescription
srecta gRectangle Rectangle to be drawed on the screen.
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

uINT_32 LCDBPV2_ColorTranslate(uINT_32 ulValue );
Transform 24 bit color into a driver specific color width.

Parameter

FieldTypeDescription
ulValue uINT_32 Color depth

Return

TypeDescription
uINT_32

Translated color depth value

void LCDBPV2_LineDraw(uINT_16 lX1, uINT_16 lY1, uINT_16 lX2, uINT_16 lY2,uINT_32 ulValue );


Writes a line on the screen.

Parameter

FieldTypeDescription
lX1 uINT_16 X min coordenate
lY1 uINT_16 Y min coordenate
lX2 uINT_16 X max coordenate
lY2 uINT_16 Y max coordenate
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_RectDraw(const gRectangle *pRect,uINT_32 ulValue );
Writes a rectangle (non filled) on the screen. The rectangle type gRectangle is defined by his attributes: Xmin, Xmax, Ymin, Ymax and with ulValue color depth.

Parameter

FieldTypeDescription
srecta gRectangle Rectangle to be drawed on the screen.
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_CircleDraw(uINT_16 lX, uINT_16 lY, uINT_16 lRadius, uINT_32 ulValue );
Writes a circle (non filled) on the screen. The circle is defined by his attributes: lX, lY, lRadius and width ulValue color depth.

Parameter

FieldTypeDescription
lX uINT_16 Defines the X coordenate of the circle's center.
lY uINT_16 Defines the Y coordenate of the circle's center.
lRadius uINT_16 Defines the radius of the circle.
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_CircleFill(uINT_16 lX, uINT_16 lY, uINT_16 lRadius, uINT_32 ulValue );
Writes a circle (filled) on the screen. The circle is defined by his attributes: lX, lY, lRadius and width ulValue color depth.

Parameter

FieldTypeDescription
lX uINT_16 Defines the X coordenate of the circle's center.
lY uINT_16 Defines the Y coordenate of the circle's center.
lRadius uINT_16 Defines the radius of the circle.
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

void LCDBPV2_StringDraw(const tFont *pFont, const uINT_8 *pcString, uINT_16 lX, uINT_16 lY, uINT_16 bOpaque, uINT_32 ulValue );
Writes a string on the screen width ulValue color depth.

Parameter

FieldTypeDescription
lX uINT_16 Defines the X coordenate of the circle's center.
lY uINT_16 Defines the Y coordenate of the circle's center.
lRadius uINT_16 Defines the radius of the circle.
ulValue uINT_32 Color depth

Return

TypeDescription
void

Nothing to return

Touch panel Under this section you can found API functions related to Touch Panel.

void LCDBPV2_IRQFilterPeriod(char state);
Set the LCDBPV2 rev.C IRQFilterPeriod parameter. This parameter defines the number of clock pulses to be measured before trigger an IRQ. Clock frequency is 1KHz, so clock period is 1mS. [Clock period]*[IRQFilterPeriod(number of pulses)]=[IRQ filter threshold].

Parameter

FieldTypeDescription
state char IRQFilterPeriod parameter.
  • 0- 10 pulses - 10mS
  • 1- 30 pulses - 30mS
  • 2- 50 pulses - 50mS [Default]
  • 3- 100 pulses - 100mS
  • 4- 200 pulses - 200mS
  • 5- 300 pulses - 300mS
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_IRQPersistenceState(char state);
    Set the LCDBPV2 rev.C IRQPersistenceState parameter. This parameter enables the automatic trigger of interrupt periodicaly when touch is pressed.

    Parameter

    FieldTypeDescription
    state char IRQPersistenceState parameter.
  • 0- Filter persistence disabled [Default]
  • 1- Filter persistence enabled
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_IRQPersistencePeriod(char state);
    Set the LCDBPV2 rev.C IRQPersistencePeriod parameter. This parameter defines the number of clock pulses to be measured before trigger an IRQ. Clock frequency is 1KHz, so clock period is 1mS. [Clock period]*[IRQPersistencePeriod(number of pulses)]=[IRQ automatic period].

    Parameter

    FieldTypeDescription
    state char IRQPersistencePeriod parameter.
  • 0- 10 pulses - 10mS
  • 1- 30 pulses - 30mS
  • 2- 50 pulses - 50mS [Default]
  • 3- 100 pulses - 100mS
  • 4- 200 pulses - 200mS
  • 5- 300 pulses - 300mS
  • Return

    TypeDescription
    void

    Nothing to return

    Backlight Under this section you can found API functions related to the LCDBPV2 backlight.

    void LCDBPV2_BacklightPulse();
    Send one pulse to backlight of BacklightPulsePeriod period.

    Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_BacklightPulsePeriod(char state);
    Set the LCDBPV2 rev.C BacklightPulsePeriod parameter.This parameter defines the number of clock pulses to do one backlight pulse. Clock frequency is 1KHz, so clock period is 1mS. [Clock period]*[BacklightPulsePeriod(number of pulses)]=[Backlight pulse period].

    Parameter

    FieldTypeDescription
    state char BacklightPulsePeriod parameter.
  • 0- 10 pulses - 10mS
  • 1- 30 pulses - 30mS
  • 2- 50 pulses - 50mS [Default]
  • 3- 100 pulses - 100mS
  • 4- 200 pulses - 200mS
  • 5- 300 pulses - 300mS
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_BacklightPWMFreq(char state);
    Set the LCDBPV2 rev.C BacklightPWMFreq parameter.

    Parameter

    FieldTypeDescription
    state char BacklightPWMFreq parameter.
  • 0- 100KHz
  • 1- 200KHz
  • 2- 285KHz [Default]
  • 3- 325KHz
  • 4- 363KHz
  • 5- 428KHz
  • 6- 510KHz
  • 7- 649KHz
  • 8- 860KHz
  • 9- 1263KHz
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_BacklightPWMDuty(char state);
    Set the LCDBPV2 rev.C BacklightPWMDuty parameter.

    Parameter

    FieldTypeDescription
    state char BacklightPWMDuty parameter.
  • 0- 0% duty
  • 1- 9% duty
  • 2- 18% duty
  • 3- 27% duty
  • 4- 36% duty
  • 5- 50% duty
  • 6- 54% duty
  • 7- 63% duty
  • 8- 72% duty
  • 9- 81% duty
  • 10- 100% duty [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_BacklightState(char state);
    Set the LCDBPV2 rev.C BacklightState parameter.

    Parameter

    FieldTypeDescription
    state char BacklightState parameter.
  • 0- Disable Backlight
  • 1- Enable Backlight
  • Return

    TypeDescription
    void

    Nothing to return

    Vibrator Under this section you can found API functions related to LCDBPV2 vibrator.

    void LCDBPV2_VibratorState(char state);
    Set the LCDBPV2 rev.C VibratorState parameter.

    Parameter

    FieldTypeDescription
    state char VibratorState parameter.
  • 0- Disable Vibrator
  • 1- Enable Vibrator
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_VibratorPulse();
    Send one pulse to vibrator of VibratorPulsePeriod period.

    Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_VibratorPulsePeriod(char state);
    Set the LCDBPV2 rev.C VibratorPulsePeriod parameter.

    Parameter

    FieldTypeDescription
    state char VibratorPulsePeriod parameter.
  • 0- 35mS
  • 1- 45mS
  • 2- 55mS
  • 3- 60mS
  • 4- 70mS
  • 5- 80mS
  • 6- 90mS
  • 7- 100mS
  • 8- 120mS
  • 9- 150mS
  • 10- 200mS
  • 11- 250mS
  • 12- 350mS
  • 13- 400mS
  • 14- 500mS
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_VibratorPWMFreq(char state);
    Set the LCDBPV2 rev.C VibratorPWMFreq parameter.

    Parameter

    FieldTypeDescription
    state char VibratorPWMFreq parameter.
  • 0- 162.7Hz
  • 1- 167.7Hz
  • 2- 172.9Hz
  • 3- 178.5Hz
  • 4- 184.4Hz
  • 5- 2700Hz [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_VibratorPWMDuty(char state);
    Set the LCDBPV2 rev.C VibratorPWMDuty parameter.

    Parameter

    FieldTypeDescription
    state char VibratorPWMDuty parameter.
  • 0- 0% duty
  • 1- 9% duty
  • 2- 18% duty
  • 3- 27% duty
  • 4- 36% duty
  • 5- 50% duty
  • 6- 54% duty
  • 7- 63% duty
  • 8- 72% duty
  • 9- 81% duty
  • 10- 100% duty [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    General LCDBPV2 commands Under this section you can found API functions related to general LCDBPV2 commands.

    void LCDBPV2_DefaultValues();
    Set the LCDBPV2 rev.C default values.

    Default values:

    ParameterValueDescription
    VibratorPWMDuty 10 100% duty
    VibratorPWMFreq 5 2700Hz
    LCDBPV2_VibratorPulsePeriod 4 70mS
    LCDBPV2_VibratorState 0 Disable vibrator
    BacklightState 1 Vibrator Backlight
    BacklightPWMDuty 10 100% duty
    BacklightPWMFreq 2 285KHz
    BacklightPulsePeriod 2 50 pulses - 50mS
    IRQPersistencePeriod 2 50 pulses - 50mS
    IRQPersistenceState 0 Filter persistence disabled
    IRQFilterPeriod 2 50 pulses - 50mS
    LCDEnable 1 LCD enabled
    LCDReset 0 LCD reset off
    FIFOI2CState 1 FIFOI2C enabled
    FIFOLCDState 1 FIFOLCD enabled
    LCDEnable 1 LCD Enabled
    LCDReset 0 LCD reset off
    I2CWatchdogCounter 7 7mS
    EnableI2CWatchdogCounter 1 Enable I2CWatchdogCounter
    I2CWatchdogCounter 7 7mS

    Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_LCDEnable(char state);
    Set the LCDBPV2 rev.C LCDEnable parameter.
    This parameter enable (1) or disable (0) the LCD. When disabled, LCD isn't updated with any new information ignoring all new LCD data.

    Parameter

    FieldTypeDescription
    state char LCDEnable parameter.
  • 0- LCD disabled
  • 1- LCD Enabled [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_LCDReset(char state);
    Set the LCDBPV2 rev.C LCDReset parameter.

    Parameter

    FieldTypeDescription
    state char LCDReset parameter.
  • 0- LCD reset off [Default]
  • 1- LCD reset on
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_FIFOI2CState(char state);
    Set the LCDBPV2 rev.C FIFOI2CState parameter.

    Parameter

    FieldTypeDescription
    state char FIFOI2CState parameter.
  • 0- FIFOI2C disabled
  • 1- FIFOI2C enabled [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_FIFOLCDState(char state);
    Set the LCDBPV2 rev.C FIFOLCDState parameter.

    Parameter

    FieldTypeDescription
    state char FIFOLCDState parameter.
  • 0- FIFOLCD disabled
  • 1- FIFOLCD enabled [Default]
  • Return

    TypeDescription
    void

    Nothing to return

    char LCDBPV2_GetFIFOLCDFullFlag();
    Return the current status of the FIFOLCDFullFlag flag. This flag is setted when FIFOLCD has been filled at some time.

    Return

    TypeDescription
    boolean

    FIFOLCDFullFlag flag

    void LCDBPV2_ResetFIFOLCDFullFlag(char state);
    Reset the LCDBPV2 rev.C FIFOLCDFullFlag parameter.

    Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_SetI2CWatchdogCounter(char counter);
    Set the LCDBPV2 rev.C I2CWatchdogCounter parameter.

    Parameter

    FieldTypeDescription
    counter char I2CWatchdogCounter value.
  • 0- 0mS
  • 1- 1mS
  • 2- 2mS
  • 3- 3mS
  • 4- 4mS
  • 5- 5mS
  • 6- 6mS
  • 7- 7mS [Default]
  • 8- 8mS
  • 9- 9mS
  • 10- 10mS
  • 11- 11mS
  • 12- 12mS
  • 13- 13mS
  • 14- 14mS
  • 15- 15mS
  • Return

    TypeDescription
    void

    Nothing to return

    void LCDBPV2_EnableI2CWatchdogCounter(char state);
    Enable the LCDBPV2 rev.C I2CWatchdogCounter.

    Parameter

    FieldTypeDescription
    state char EnableI2CWatchdogCounter
  • 0- Disable I2CWatchdogCounter
  • 1- Enable I2CWatchdogCounter [Default]
  • Return

    TypeDescription
    void

    Nothing to return