-
Notifications
You must be signed in to change notification settings - Fork 1
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
Integration #1
base: master
Are you sure you want to change the base?
Integration #1
Conversation
…e code of the LCD with the previious one
I'm not convinced on how you are structuring the
|
@@ -1,22 +1,25 @@ | |||
/*INCLUDES*/ | |||
|
|||
#include "bsp.h" | |||
#include "ili9488.h" |
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.
In future improvements of the code you should end up in a state where the file that contains the control code doesn't depend on level drivers, i.e. you will lose the #include "ili9488.h
dependency in dashboard.c
because all the code you will need is in either LVGL stuff or bsp.h
.
You can close this comment, just keep in mind it.
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.
Enable the watchdog, otherwise you will forget it!
#define ON 1 | ||
#define OFF 0 |
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.
where do you use this defines?
enum LCD_TFT_Device{CS, RST, DC, LCD_TFT_Device_NUM}; | ||
static const struct GPIO_Tuple LCD_TFT_Device_to_GPIO_Tuple_map[LCD_TFT_Device_NUM] = { | ||
[CS] = {.GPIO_Port = LCD_TFT_CS_GPIO_OUT_GPIO_Port, .GPIO_Pin = LCD_TFT_CS_GPIO_OUT_Pin}, | ||
[DC] = {.GPIO_Port = LCD_TFT_DC_GPIO_OUT_GPIO_Port, .GPIO_Pin = LCD_TFT_DC_GPIO_OUT_Pin}, | ||
[RST] = {.GPIO_Port = LCD_TFT_RST_GPIO_OUT_GPIO_Port, .GPIO_Pin = LCD_TFT_RST_GPIO_OUT_Pin}, | ||
}; |
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.
This construct here is used improperly: the array-map construct is used to make dictionaries/maps of similar things (for example LED_MONO
). These GPIOs are related to one another because they are necessary to drive the LCD_TFT display but they have different functions hence they are not a LCD_TFT device. In this case I suggest you to use a struct (a handle) to group everything since it betters conveys the fact that you are making a sort of "class" for the LCD_TFT. If you will end up using the code I pushed on ili9488 this is already available with the struct ILI9488_Handle
.
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.
prefix/namespace
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.
prefix/namespace missing
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.
Prefix/namespace missing on exported functions (eg: GUI
, UI
, EEZ_UI
...)
IMHO create
is a bit cringe as a name in a fuction
mem_mon.used_pct, | ||
(unsigned long)mem_mon.free_biggest_size); | ||
|
||
HAL_UART_Transmit(&LCD_TFT_USART_Handle, (uint8_t *)buffer, strlen(buffer), HAL_MAX_DELAY); |
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.
This should move to an interrupt based approach with DMA in the future otherwise when you do loggin the application will run veeeeery slowly.
#define BYTES_PER_PIXEL (LV_COLOR_FORMAT_GET_SIZE(LV_COLOR_FORMAT_RGB888)) | ||
#define BUFFER_SIZE (VERTICAL_RES * HORIZONTAL_RES * BYTES_PER_PIXEL / 7) |
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.
Namespace/prefix
[submodule "Lib/PCA9555"] | ||
path = Lib/PCA9555 | ||
url = https://github.com/squadracorsepolito/PCA9555.git |
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.
remove this lines
No description provided.