Init prototypes

This commit is contained in:
2025-05-02 12:26:13 +03:00
parent 62052a4058
commit 7eccaf1051
4 changed files with 106 additions and 27 deletions

View File

@@ -1,25 +0,0 @@
#ifndef DS_ILI3941_H
#define DS_ILI3941_H
#include <stdbool.h>
#ifdef STM32G030xx
#include "stm32g0xx_hal.h"
#endif
#ifdef STM32F030xx
#include "stm32f0xx_hal.h"
#endif
#endif //DS_ILI3941_H

60
Inc/DS_ILI9341.h Normal file
View File

@@ -0,0 +1,60 @@
#ifndef DS_ILI9341_H
#define DS_ILI9341_H
#include <stdbool.h>
#ifdef STM32G030xx
#include "stm32g0xx_hal.h"
#endif
#ifdef STM32F030xx
#include "stm32f0xx_hal.h"
#endif
#ifdef STM32F103xB
#include "stm32f1xx_hal.h"
#endif
typedef struct DS_ILI9341
{
GPIO_TypeDef* Port_CS, *Port_D0, *Port_D1, *Port_D2, *Port_D3, *Port_D4, *Port_D5, *Port_D6, *Port_D7, *Port_RQ, *Port_RS, *Port_RST, *Port_WR;
uint16_t Pin_CS, Pin_D0, Pin_D1, Pin_D2, Pin_D3, Pin_D4, Pin_D5, Pin_D6, Pin_D7, Pin_RQ, Pin_RS, Pin_RST, Pin_WR;
// SPI_HandleTypeDef* SPI;
// char DisplayData[8];
// uint8_t Dots;
// uint8_t DecodeMode, Intensivity, ScanLimit;
// bool EnableDecodeMode;
// GPIO_TypeDef* Port_CS;
// uint16_t Pin_CS;
}DS_ILI9341;
void DS_ILI9341_Init(DS_ILI9341* Display,
GPIO_TypeDef* Port_CS, uint16_t Pin_CS,
GPIO_TypeDef* Port_D0, uint16_t Pin_D0,
GPIO_TypeDef* Port_D1, uint16_t Pin_D1,
GPIO_TypeDef* Port_D2, uint16_t Pin_D2,
GPIO_TypeDef* Port_D3, uint16_t Pin_D3,
GPIO_TypeDef* Port_D4, uint16_t Pin_D4,
GPIO_TypeDef* Port_D5, uint16_t Pin_D5,
GPIO_TypeDef* Port_D6, uint16_t Pin_D6,
GPIO_TypeDef* Port_D7, uint16_t Pin_D7,
GPIO_TypeDef* Port_RQ, uint16_t Pin_RQ,
GPIO_TypeDef* Port_RS, uint16_t Pin_RS,
GPIO_TypeDef* Port_RST, uint16_t Pin_RST,
GPIO_TypeDef* Port_WR, uint16_t Pin_WR
);
#endif //DS_ILI9341_H