Linting & bringing the config closer to the ST7365

This commit is contained in:
Clément Grennerat
2025-08-18 23:08:08 +02:00
parent 6e6abff60c
commit 3bd65d37a5
11 changed files with 671 additions and 765 deletions
+66 -18
View File
@@ -31,7 +31,6 @@
#define LCD_SCREEN_HEIGHT 320
#define LCD_SCREEN_WIDTH 480
//CHIP SELECT PIN AND PORT, STANDARD GPIO
#define LCD_CS_PIN (1<<8)
#define LCD_DC_PIN (1<<11)
@@ -45,7 +44,6 @@
//#define LCD_RST_PORT GPIOC
//#define LCD_RST_PIN RST_Pin
#define BURST_MAX_SIZE 100 //buffer burst stocké sur pile. Par défaut stackSiZE=256 dans FreeRTOS.
#define BLACK 0x0000
@@ -94,17 +92,29 @@ void LCD_Fill_Screen(uint16_t Colour);
void LCD_Draw_Colour(uint16_t Colour);
// @param Colour : voir #define de quelques couleurs 16 bits standard ci-dessus
void LCD_Draw_Pixel(uint16_t X,uint16_t Y,uint16_t Colour);
void LCD_Draw_Pixel(uint16_t X, uint16_t Y, uint16_t Colour);
//@param X : coordonnee x
//@param Y : coordonnee y
//@param Colour : voir #define de quelques couleurs 16 bits standard ci-dessus
void LCD_Draw_Horizontal_Line(uint16_t X, uint16_t Y, uint16_t Width, uint16_t Colour);
void LCD_Draw_Vertical_Line(uint16_t X, uint16_t Y, uint16_t Height, uint16_t Colour);
void LCD_Draw_Rectangle(uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height, uint16_t Colour);
void LCD_Draw_Horizontal_Line(
uint16_t X,
uint16_t Y,
uint16_t Width,
uint16_t Colour);
void LCD_Draw_Vertical_Line(
uint16_t X,
uint16_t Y,
uint16_t Height,
uint16_t Colour);
void LCD_Draw_Rectangle(
uint16_t X,
uint16_t Y,
uint16_t Width,
uint16_t Height,
uint16_t Colour);
void LCD_Draw_Colour_Burst(uint16_t Colour, uint32_t Size);
#endif
/*******************PARTIE ISSUE DE LA LIB ILI9193_GFX.h***************************/
@@ -115,22 +125,60 @@ void LCD_Draw_Colour_Burst(uint16_t Colour, uint32_t Size);
#define HORIZONTAL_IMAGE 0
#define VERTICAL_IMAGE 1
void LCD_Draw_Hollow_Circle(uint16_t X, uint16_t Y, uint16_t Radius, uint16_t Colour);
void LCD_Draw_Filled_Circle(uint16_t X, uint16_t Y, uint16_t Radius, uint16_t Colour);
void LCD_Draw_Hollow_Rectangle_Coord(uint16_t X0, uint16_t Y0, uint16_t X1, uint16_t Y1, uint16_t Colour);
void LCD_Draw_Filled_Rectangle_Coord(uint16_t X0, uint16_t Y0, uint16_t X1, uint16_t Y1, uint16_t Colour);
void LCD_Draw_Char(char Character, uint16_t X, uint16_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);
void LCD_Draw_Hollow_Circle(
uint16_t X,
uint16_t Y,
uint16_t Radius,
uint16_t Colour);
void LCD_Draw_Filled_Circle(
uint16_t X,
uint16_t Y,
uint16_t Radius,
uint16_t Colour);
void LCD_Draw_Hollow_Rectangle_Coord(
uint16_t X0,
uint16_t Y0,
uint16_t X1,
uint16_t Y1,
uint16_t Colour);
void LCD_Draw_Filled_Rectangle_Coord(
uint16_t X0,
uint16_t Y0,
uint16_t X1,
uint16_t Y1,
uint16_t Colour);
void LCD_Draw_Char(
char Character,
uint16_t X,
uint16_t Y,
uint16_t Colour,
uint16_t Size,
uint16_t Background_Colour);
void LCD_Draw_Text(const char* Text, uint16_t X, uint16_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);
void LCD_Draw_Text(
const char *Text,
uint16_t X,
uint16_t Y,
uint16_t Colour,
uint16_t Size,
uint16_t Background_Colour);
/*Draws a character (fonts imported from fonts.h) at X,Y location with specified font colour, size and Background colour*/
void LCD_Draw_Filled_Rectangle_Size_Text(uint16_t X0, uint16_t Y0, uint16_t Size_X, uint16_t Size_Y, uint16_t Colour);
void LCD_Draw_Filled_Rectangle_Size_Text(
uint16_t X0,
uint16_t Y0,
uint16_t Size_X,
uint16_t Size_Y,
uint16_t Colour);
void LCD_Draw_Image_XY(const char* Image_Array, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height);
void LCD_Draw_Image_XY(
const char *Image_Array,
uint16_t X,
uint16_t Y,
uint16_t Width,
uint16_t Height);
/*Dessine une image 65K couleurs (2Bytes / Pixel) dans une zone de l'ecran, aux coordonnées X et Y*/
//CONVERTISSEUR: http://www.digole.com/tools/PicturetoC_Hex_converter.php
void LCD_Draw_Image_Full(const char* Image_Array, uint8_t Orientation);
void LCD_Draw_Image_Full(const char *Image_Array, uint8_t Orientation);
#endif
+29 -22
View File
@@ -1,21 +1,22 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
//@formatter:off
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
@@ -31,29 +32,34 @@ extern "C" {
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
//@formatter:on
//@formatter:off
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
//@formatter:on
//@formatter:off
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
//@formatter:on
//@formatter:off
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
//@formatter:on
//@formatter:off
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
//@formatter:on
//@formatter:off
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
@@ -105,7 +111,8 @@ void Error_Handler(void);
#define DB12_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
//@formatter:on
//@formatter:off
/* USER CODE END Private defines */
#ifdef __cplusplus