-
Notifications
You must be signed in to change notification settings - Fork 69
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
vcs: add finish_device for simv_finish #324
Conversation
Please format PR title and message |
src/test/csrc/common/vga.cpp
Outdated
@@ -60,6 +60,12 @@ void init_sdl() { | |||
SDL_SetWindowTitle(window, "NOOP"); | |||
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, SCREEN_W, SCREEN_H); | |||
} | |||
|
|||
void finish_sdl() { | |||
for (size_t i = 0; i < SCREEN_H; i++) { |
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.
Why for loop here? Seems SCREEN_W * SCREEN_H is OK
type_t array[xx]; |
e1bdf78
to
5ccb8d1
Compare
src/test/csrc/common/uart.cpp
Outdated
@@ -106,3 +106,9 @@ static void preset_input() { | |||
void init_uart(void) { | |||
preset_input(); | |||
} | |||
|
|||
void finish_uart(void) { | |||
memset((void *)&queue, 0, QUEUE_SIZE * sizeof(char)); |
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.
Modify memset here.
src/test/csrc/common/vga.cpp
Outdated
@@ -60,6 +60,10 @@ void init_sdl() { | |||
SDL_SetWindowTitle(window, "NOOP"); | |||
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, SCREEN_W, SCREEN_H); | |||
} | |||
|
|||
void finish_sdl() { | |||
memset(vmem, 0, SCREEN_H * SCREEN_W * sizeof(vmem)); |
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.
sizeof(vmem) equals H*W*size(uint32_t)
Simply sizeof(vmem) is OK
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.
okok
Used to release peripherals upon reset