diplom/научка/code/pwm_motor_control/Interface/i2c_lcd.h
2025-05-09 21:26:59 +03:00

31 lines
845 B
C

#ifndef __LCD_H_
#define __LCD_H_
#include "periph_general.h"
#include "cmsis_os.h"
#include <stdio.h>
typedef struct{
uint8_t Address;
I2C_HandleTypeDef *hi2c;
unsigned LCD_REINIT : 1;
uint16_t DisplayDelay;
uint8_t ClearDelay;
}LCDI2C_HandleTypeDef;
/**
* @brief Initialization of LCD.
* @note This called from main
*/
void LCD_Init(LCDI2C_HandleTypeDef *hlcd);
void LCD_Reinit(LCDI2C_HandleTypeDef *hlcd);
void LCD_Check(LCDI2C_HandleTypeDef *hlcd);
void LCD_Send_STRING(LCDI2C_HandleTypeDef *hlcd, char *str);
void LCD_Send_INT(LCDI2C_HandleTypeDef *hlcd, int int_to_string, uint8_t size);
void LCD_Send_NUMB(LCDI2C_HandleTypeDef *hlcd, float numb_to_string, uint8_t size);
void LCD_Send_DATA (LCDI2C_HandleTypeDef *hlcd, char data);
void LCD_Send_CMD (LCDI2C_HandleTypeDef *hlcd, char cmd);
#endif