STM32L152C-Discovery BSP User Manual: Exported Functions

STM32L152C-Discovery BSP Driver

STM32L152C-Discovery BSP User Manual
Exported Functions

Functions

void BSP_LCD_GLASS_Init (void)
 Configures the LCD GLASS relative GPIO port IOs and LCD peripheral.
void BSP_LCD_GLASS_DeInit (void)
 Unconfigures the LCD GLASS relative GPIO port IOs and LCD peripheral.
void BSP_LCD_GLASS_BlinkConfig (uint32_t BlinkMode, uint32_t BlinkFrequency)
 Configures the LCD Blink mode and Blink frequency.
void BSP_LCD_GLASS_Contrast (uint32_t Contrast)
 LCD contrast setting.
void BSP_LCD_GLASS_DisplayBar (uint32_t BarId)
 Display one or several bar on LCD frame buffer.
void BSP_LCD_GLASS_ClearBar (uint32_t BarId)
 Clear one or several bar on LCD frame buffer.
void BSP_LCD_GLASS_BarLevelConfig (uint8_t BarLevel)
 Setting bar on LCD, writes bar value in LCD frame buffer.
void BSP_LCD_GLASS_WriteChar (uint8_t *ch, uint8_t Point, uint8_t Column, uint8_t Position)
 This function writes a char in the LCD frame buffer and update BAR LEVEL.
void BSP_LCD_GLASS_DisplayChar (uint8_t *ch, Point_Typedef Point, DoublePoint_Typedef Column, DigitPosition_Typedef Position)
 This function writes a char in the LCD RAM and do not update BAR level.
void BSP_LCD_GLASS_DisplayString (uint8_t *ptr)
 This function writes a char in the LCD RAM.
void BSP_LCD_GLASS_DisplayStrDeci (uint16_t *ptr)
 This function writes a char in the LCD RAM.
void BSP_LCD_GLASS_Clear (void)
 This function Clear the whole LCD RAM.
void BSP_LCD_GLASS_ScrollSentence (uint8_t *ptr, uint16_t nScroll, uint16_t ScrollSpeed)
 Display a string in scrolling mode.

Function Documentation

void BSP_LCD_GLASS_BarLevelConfig ( uint8_t  BarLevel)

Setting bar on LCD, writes bar value in LCD frame buffer.

Parameters:
BarLevel,:specifies the LCD GLASS Batery Level. This parameter can be one of the following values:
  • BATTERYLEVEL_OFF: LCD GLASS Batery Empty
  • BATTERYLEVEL_1_4: LCD GLASS Batery 1/4 Full
  • BATTERYLEVEL_1_2: LCD GLASS Batery 1/2 Full
  • BATTERYLEVEL_3_4: LCD GLASS Batery 3/4 Full
  • BATTERYLEVEL_FULL: LCD GLASS Batery Full
Return values:
None

Definition at line 364 of file stm32l152c_discovery_glass_lcd.c.

References BATTERYLEVEL_1_2, BATTERYLEVEL_1_4, BATTERYLEVEL_3_4, BATTERYLEVEL_FULL, BATTERYLEVEL_OFF, LCD_BAR0_2_COM, LCD_BAR0_SEG, LCD_BAR1_3_COM, LCD_BAR1_SEG, LCD_BAR2_SEG, LCD_BAR3_SEG, LCDBar, and LCDHandle.

Referenced by BSP_LCD_GLASS_WriteChar().

void BSP_LCD_GLASS_BlinkConfig ( uint32_t  BlinkMode,
uint32_t  BlinkFrequency 
)

Configures the LCD Blink mode and Blink frequency.

Parameters:
BlinkMode,:specifies the LCD blink mode. This parameter can be one of the following values:
  • LCD_BLINKMODE_OFF: Blink disabled
  • LCD_BLINKMODE_SEG0_COM0: Blink enabled on SEG[0], COM[0] (1 pixel)
  • LCD_BLINKMODE_SEG0_ALLCOM: Blink enabled on SEG[0], all COM (up to 8 pixels according to the programmed duty)
  • LCD_BLINKMODE_ALLSEG_ALLCOM: Blink enabled on all SEG and all COM (all pixels)
BlinkFrequency,:specifies the LCD blink frequency.
  • LCD_BLINKFREQUENCY_DIV8: The Blink frequency = fLcd/8
  • LCD_BLINKFREQUENCY_DIV16: The Blink frequency = fLcd/16
  • LCD_BLINKFREQUENCY_DIV32: The Blink frequency = fLcd/32
  • LCD_BLINKFREQUENCY_DIV64: The Blink frequency = fLcd/64
  • LCD_BLINKFREQUENCY_DIV128: The Blink frequency = fLcd/128
  • LCD_BLINKFREQUENCY_DIV256: The Blink frequency = fLcd/256
  • LCD_BLINKFREQUENCY_DIV512: The Blink frequency = fLcd/512
  • LCD_BLINKFREQUENCY_DIV1024: The Blink frequency = fLcd/1024
Return values:
None

Definition at line 221 of file stm32l152c_discovery_glass_lcd.c.

References LCDHandle.

void BSP_LCD_GLASS_Clear ( void  )

This function Clear the whole LCD RAM.

Return values:
None

Definition at line 668 of file stm32l152c_discovery_glass_lcd.c.

References LCDHandle.

Referenced by BSP_LCD_GLASS_Init(), and BSP_LCD_GLASS_ScrollSentence().

void BSP_LCD_GLASS_ClearBar ( uint32_t  BarId)

Clear one or several bar on LCD frame buffer.

Parameters:
BarId,:specifies the LCD GLASS Bar to display This parameter can be combination of one of the following values:
  • LCD_BAR_0: LCD GLASS Bar 0
  • LCD_BAR_1: LCD GLASS Bar 1
  • LCD_BAR_2: LCD GLASS Bar 2
  • LCD_BAR_3: LCD GLASS Bar 3
Return values:
None

Definition at line 309 of file stm32l152c_discovery_glass_lcd.c.

References LCD_BAR0_2_COM, LCD_BAR0_SEG, LCD_BAR1_3_COM, LCD_BAR1_SEG, LCD_BAR2_SEG, LCD_BAR3_SEG, LCD_BAR_0, LCD_BAR_1, LCD_BAR_2, LCD_BAR_3, and LCDHandle.

void BSP_LCD_GLASS_Contrast ( uint32_t  Contrast)

LCD contrast setting.

Parameters:
Contrast,:specifies the LCD Contrast. This parameter can be one of the following values:
  • LCD_CONTRASTLEVEL_0: Maximum Voltage = 2.60V
  • LCD_CONTRASTLEVEL_1: Maximum Voltage = 2.73V
  • LCD_CONTRASTLEVEL_2: Maximum Voltage = 2.86V
  • LCD_CONTRASTLEVEL_3: Maximum Voltage = 2.99V
  • LCD_CONTRASTLEVEL_4: Maximum Voltage = 3.12V
  • LCD_CONTRASTLEVEL_5: Maximum Voltage = 3.25V
  • LCD_CONTRASTLEVEL_6: Maximum Voltage = 3.38V
  • LCD_CONTRASTLEVEL_7: Maximum Voltage = 3.51V
Return values:
None

Definition at line 240 of file stm32l152c_discovery_glass_lcd.c.

References LCDHandle.

void BSP_LCD_GLASS_DeInit ( void  )

Unconfigures the LCD GLASS relative GPIO port IOs and LCD peripheral.

Return values:
None

Definition at line 193 of file stm32l152c_discovery_glass_lcd.c.

References LCD_MspDeInit(), and LCDHandle.

void BSP_LCD_GLASS_DisplayBar ( uint32_t  BarId)

Display one or several bar on LCD frame buffer.

Parameters:
BarId,:specifies the LCD GLASS Bar to display This parameter can be one of the following values:
  • BAR0: LCD GLASS Bar 0
  • BAR0: LCD GLASS Bar 1
  • BAR0: LCD GLASS Bar 2
  • BAR0: LCD GLASS Bar 3
Return values:
None

Definition at line 255 of file stm32l152c_discovery_glass_lcd.c.

References LCD_BAR0_2_COM, LCD_BAR0_SEG, LCD_BAR1_3_COM, LCD_BAR1_SEG, LCD_BAR2_SEG, LCD_BAR3_SEG, LCD_BAR_0, LCD_BAR_1, LCD_BAR_2, LCD_BAR_3, and LCDHandle.

void BSP_LCD_GLASS_DisplayChar ( uint8_t *  ch,
Point_Typedef  Point,
DoublePoint_Typedef  Column,
DigitPosition_Typedef  Position 
)

This function writes a char in the LCD RAM and do not update BAR level.

Parameters:
ch,:The character to display.
Point,:A point to add in front of char. This parameter can be one of the following values:
  • POINT_OFF: No point to add in front of char.
  • POINT_ON: Add a point in front of char.
Column,:Flag indicating if a apostrophe has to be add in front of displayed character. This parameter can be one of the following values:
  • DOUBLEPOINT_OFF: No colon to add in back of char.
  • DOUBLEPOINT_ON: Add an colon in back of char.
Position,:Position in the LCD of the caracter to write. This parameter can be any value in DigitPosition_Typedef.
Return values:
None

Definition at line 458 of file stm32l152c_discovery_glass_lcd.c.

References Convert(), Digit, LCD_DIGIT1_COM0, LCD_DIGIT1_COM0_SEG_MASK, LCD_DIGIT1_COM1, LCD_DIGIT1_COM1_SEG_MASK, LCD_DIGIT1_COM2, LCD_DIGIT1_COM2_SEG_MASK, LCD_DIGIT1_COM3, LCD_DIGIT1_COM3_SEG_MASK, LCD_DIGIT2_COM0, LCD_DIGIT2_COM0_SEG_MASK, LCD_DIGIT2_COM1, LCD_DIGIT2_COM1_SEG_MASK, LCD_DIGIT2_COM2, LCD_DIGIT2_COM2_SEG_MASK, LCD_DIGIT2_COM3, LCD_DIGIT2_COM3_SEG_MASK, LCD_DIGIT3_COM0, LCD_DIGIT3_COM0_SEG_MASK, LCD_DIGIT3_COM1, LCD_DIGIT3_COM1_SEG_MASK, LCD_DIGIT3_COM2, LCD_DIGIT3_COM2_SEG_MASK, LCD_DIGIT3_COM3, LCD_DIGIT3_COM3_SEG_MASK, LCD_DIGIT4_COM0, LCD_DIGIT4_COM0_1, LCD_DIGIT4_COM0_1_SEG_MASK, LCD_DIGIT4_COM0_SEG_MASK, LCD_DIGIT4_COM1, LCD_DIGIT4_COM1_1, LCD_DIGIT4_COM1_1_SEG_MASK, LCD_DIGIT4_COM1_SEG_MASK, LCD_DIGIT4_COM2, LCD_DIGIT4_COM2_1, LCD_DIGIT4_COM2_1_SEG_MASK, LCD_DIGIT4_COM2_SEG_MASK, LCD_DIGIT4_COM3, LCD_DIGIT4_COM3_1, LCD_DIGIT4_COM3_1_SEG_MASK, LCD_DIGIT4_COM3_SEG_MASK, LCD_DIGIT5_COM0, LCD_DIGIT5_COM0_1, LCD_DIGIT5_COM0_1_SEG_MASK, LCD_DIGIT5_COM0_SEG_MASK, LCD_DIGIT5_COM1, LCD_DIGIT5_COM1_1, LCD_DIGIT5_COM1_1_SEG_MASK, LCD_DIGIT5_COM1_SEG_MASK, LCD_DIGIT5_COM2, LCD_DIGIT5_COM2_1, LCD_DIGIT5_COM2_1_SEG_MASK, LCD_DIGIT5_COM2_SEG_MASK, LCD_DIGIT5_COM3, LCD_DIGIT5_COM3_1, LCD_DIGIT5_COM3_1_SEG_MASK, LCD_DIGIT5_COM3_SEG_MASK, LCD_DIGIT6_COM0, LCD_DIGIT6_COM0_SEG_MASK, LCD_DIGIT6_COM1, LCD_DIGIT6_COM1_SEG_MASK, LCD_DIGIT6_COM2, LCD_DIGIT6_COM2_SEG_MASK, LCD_DIGIT6_COM3, LCD_DIGIT6_COM3_SEG_MASK, LCD_DIGIT_POSITION_1, LCD_DIGIT_POSITION_2, LCD_DIGIT_POSITION_3, LCD_DIGIT_POSITION_4, LCD_DIGIT_POSITION_5, LCD_DIGIT_POSITION_6, LCD_SEG0_SHIFT, LCD_SEG10_SHIFT, LCD_SEG11_SHIFT, LCD_SEG12_SHIFT, LCD_SEG13_SHIFT, LCD_SEG14_SHIFT, LCD_SEG15_SHIFT, LCD_SEG16_SHIFT, LCD_SEG17_SHIFT, LCD_SEG18_SHIFT, LCD_SEG19_SHIFT, LCD_SEG1_SHIFT, LCD_SEG20_SHIFT, LCD_SEG21_SHIFT, LCD_SEG22_SHIFT, LCD_SEG23_SHIFT, LCD_SEG2_SHIFT, LCD_SEG3_SHIFT, LCD_SEG4_SHIFT, LCD_SEG5_SHIFT, LCD_SEG6_SHIFT, LCD_SEG7_SHIFT, LCD_SEG8_SHIFT, LCD_SEG9_SHIFT, and LCDHandle.

Referenced by BSP_LCD_GLASS_WriteChar().

void BSP_LCD_GLASS_DisplayStrDeci ( uint16_t *  ptr)

This function writes a char in the LCD RAM.

Parameters:
ptr,:Pointer to string to display on the LCD Glass.
Return values:
None
Note:
Required preconditions: Char is ASCCI value "Ored" with decimal point or Column flag

Definition at line 633 of file stm32l152c_discovery_glass_lcd.c.

References BSP_LCD_GLASS_WriteChar(), DOT, DOUBLE_DOT, DOUBLEPOINT_OFF, DOUBLEPOINT_ON, LCD_DIGIT_POSITION_1, LCD_DIGIT_POSITION_6, POINT_OFF, and POINT_ON.

void BSP_LCD_GLASS_DisplayString ( uint8_t *  ptr)

This function writes a char in the LCD RAM.

Parameters:
ptr,:Pointer to string to display on the LCD Glass.
Return values:
None

Definition at line 609 of file stm32l152c_discovery_glass_lcd.c.

References BSP_LCD_GLASS_WriteChar(), DOUBLEPOINT_OFF, LCD_DIGIT_POSITION_1, LCD_DIGIT_POSITION_6, and POINT_OFF.

Referenced by BSP_LCD_GLASS_ScrollSentence().

void BSP_LCD_GLASS_Init ( void  )

Configures the LCD GLASS relative GPIO port IOs and LCD peripheral.

Return values:
None

Definition at line 168 of file stm32l152c_discovery_glass_lcd.c.

References BSP_LCD_GLASS_Clear(), LCD_MspInit(), and LCDHandle.

void BSP_LCD_GLASS_ScrollSentence ( uint8_t *  ptr,
uint16_t  nScroll,
uint16_t  ScrollSpeed 
)

Display a string in scrolling mode.

Parameters:
ptr,:Pointer to string to display on the LCD Glass.
nScroll,:Specifies how many time the message will be scrolled
ScrollSpeed: Specifies the speed of the scroll, low value gives higher speed
Return values:
None
Note:
Required preconditions: The LCD should be cleared before to start the write operation.

Definition at line 683 of file stm32l152c_discovery_glass_lcd.c.

References bLCDGlass_KeyPressed, BSP_LCD_GLASS_Clear(), and BSP_LCD_GLASS_DisplayString().

void BSP_LCD_GLASS_WriteChar ( uint8_t *  ch,
uint8_t  Point,
uint8_t  Column,
uint8_t  Position 
)

This function writes a char in the LCD frame buffer and update BAR LEVEL.

Parameters:
ch,:the character to display.
Point,:a point to add in front of char This parameter can be: POINT_OFF or POINT_ON
Column,:flag indicating if a column has to be add in front of displayed character. This parameter can be: DOUBLEPOINT_OFF or DOUBLEPOINT_ON.
Position,:position in the LCD of the character to write (DigitPosition_Typedef)
Return values:
None
Note:
Required preconditions: The LCD should be cleared before to start the write operation.

Definition at line 434 of file stm32l152c_discovery_glass_lcd.c.

References BSP_LCD_GLASS_BarLevelConfig(), BSP_LCD_GLASS_DisplayChar(), and LCDBar.

Referenced by BSP_LCD_GLASS_DisplayStrDeci(), and BSP_LCD_GLASS_DisplayString().

Generated on Thu Aug 24 2017 17:55:24 for STM32L152C-Discovery BSP User Manual by   doxygen 1.7.6.1