-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F4 lcd #336
Open
luka177
wants to merge
4
commits into
littlekernel:master
Choose a base branch
from
luka177:f4-lcd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
F4 lcd #336
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#pragma once | ||
/* LCD Size (Width and Height) */ | ||
#define LCD_SIZE_PIXEL_WIDTH ((uint16_t)240) | ||
#define LCD_SIZE_PIXEL_HEIGHT ((uint16_t)320) | ||
|
||
#define LCD_FRAME_BUFFER ((uint32_t)0xD0000000) | ||
#define BUFFER_OFFSET ((uint32_t)0x50000) | ||
|
||
#define LCD_BACKGROUND_LAYER 0x0000 | ||
|
||
/** | ||
* @brief LCD Control pin | ||
*/ | ||
#define LCD_NCS_PIN GPIO_Pin_2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be some #includes up at the top of this file to make sure these are already defined? |
||
#define LCD_NCS_GPIO_PORT GPIOC | ||
#define LCD_NCS_GPIO_CLK RCC_AHB1Periph_GPIOC | ||
|
||
/** | ||
* @brief LCD Command/data pin | ||
*/ | ||
#define LCD_WRX_PIN GPIO_Pin_13 | ||
#define LCD_WRX_GPIO_PORT GPIOD | ||
#define LCD_WRX_GPIO_CLK RCC_AHB1Periph_GPIOD | ||
|
||
/** | ||
* @brief LCD SPI Interface pins | ||
*/ | ||
#define LCD_SPI_SCK_PIN GPIO_Pin_7 /* PF.07 */ | ||
#define LCD_SPI_SCK_GPIO_PORT GPIOF /* GPIOF */ | ||
#define LCD_SPI_SCK_GPIO_CLK RCC_AHB1Periph_GPIOF | ||
#define LCD_SPI_SCK_SOURCE GPIO_PinSource7 | ||
#define LCD_SPI_SCK_AF GPIO_AF_SPI5 | ||
#define LCD_SPI_MISO_PIN GPIO_Pin_8 /* PF.08 */ | ||
#define LCD_SPI_MISO_GPIO_PORT GPIOF /* GPIOF */ | ||
#define LCD_SPI_MISO_GPIO_CLK RCC_AHB1Periph_GPIOF | ||
#define LCD_SPI_MISO_SOURCE GPIO_PinSource8 | ||
#define LCD_SPI_MISO_AF GPIO_AF_SPI5 | ||
#define LCD_SPI_MOSI_PIN GPIO_Pin_9 /* PF.09 */ | ||
#define LCD_SPI_MOSI_GPIO_PORT GPIOF /* GPIOF */ | ||
#define LCD_SPI_MOSI_GPIO_CLK RCC_AHB1Periph_GPIOF | ||
#define LCD_SPI_MOSI_SOURCE GPIO_PinSource9 | ||
#define LCD_SPI_MOSI_AF GPIO_AF_SPI5 | ||
#define LCD_SPI SPI5 | ||
#define LCD_SPI_CLK RCC_APB2Periph_SPI5 | ||
|
||
/** | ||
* @brief LCD Registers | ||
*/ | ||
#define LCD_SLEEP_OUT 0x11 /* Sleep out register */ | ||
#define LCD_GAMMA 0x26 /* Gamma register */ | ||
#define LCD_DISPLAY_OFF 0x28 /* Display off register */ | ||
#define LCD_DISPLAY_ON 0x29 /* Display on register */ | ||
#define LCD_COLUMN_ADDR 0x2A /* Colomn address register */ | ||
#define LCD_PAGE_ADDR 0x2B /* Page address register */ | ||
#define LCD_GRAM 0x2C /* GRAM register */ | ||
#define LCD_MAC 0x36 /* Memory Access Control register*/ | ||
#define LCD_PIXEL_FORMAT 0x3A /* Pixel Format register */ | ||
#define LCD_WDB 0x51 /* Write Brightness Display register */ | ||
#define LCD_WCD 0x53 /* Write Control Display register*/ | ||
#define LCD_RGB_INTERFACE 0xB0 /* RGB Interface Signal Control */ | ||
#define LCD_FRC 0xB1 /* Frame Rate Control register */ | ||
#define LCD_BPC 0xB5 /* Blanking Porch Control register*/ | ||
#define LCD_DFC 0xB6 /* Display Function Control register*/ | ||
#define LCD_POWER1 0xC0 /* Power Control 1 register */ | ||
#define LCD_POWER2 0xC1 /* Power Control 2 register */ | ||
#define LCD_VCOM1 0xC5 /* VCOM Control 1 register */ | ||
#define LCD_VCOM2 0xC7 /* VCOM Control 2 register */ | ||
#define LCD_POWERA 0xCB /* Power control A register */ | ||
#define LCD_POWERB 0xCF /* Power control B register */ | ||
#define LCD_PGAMMA 0xE0 /* Positive Gamma Correction register*/ | ||
#define LCD_NGAMMA 0xE1 /* Negative Gamma Correction register*/ | ||
#define LCD_DTCA 0xE8 /* Driver timing control A */ | ||
#define LCD_DTCB 0xEA /* Driver timing control B */ | ||
#define LCD_POWER_SEQ 0xED /* Power on sequence register */ | ||
#define LCD_3GAMMA_EN 0xF2 /* 3 Gamma enable register */ | ||
#define LCD_INTERFACE 0xF6 /* Interface control register */ | ||
#define LCD_PRC 0xF7 /* Pump ratio control register */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a short license header here?