From patchwork Sun Jan 12 19:06:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 239513 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 12 Jan 2020 12:06:13 -0700 Subject: [PATCH 22/33] sandbox: Add comments to the sdl struct In-Reply-To: <20200112190624.79077-1-sjg@chromium.org> References: <20200112190624.79077-1-sjg@chromium.org> Message-ID: <20200112120216.22.Ib275349d701bdd14d118eddbced5f5d44fe8fbfe@changeid> Add comments for each struct member. Drop frequency since it is not used. Signed-off-by: Simon Glass --- arch/sandbox/cpu/sdl.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index 080c7c8d74..dad059f257 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -24,13 +24,28 @@ struct buf_info { uint8_t *data; }; +/** + * struct sdl_info - Information about our use of the SDL library + * + * @screen: Surface used to draw on the screen + * @width: Width of simulated LCD display + * @height: Height of simulated LCD display + * @depth: Depth of the display in bits per pixel (16 or 32) + * @pitch: Number of bytes per line of the display + * @sample_rate: Current sample rate for audio + * @audio_active: true if audio can be used + * @inited: true if this module is initialised + * @cur_buf: Current audio buffer being used by sandbox_sdl_fill_audio (0 or 1) + * @buf: The two available audio buffers. SDL can be reading from one while we + * are setting up the next + * @running: true if audio is running + */ static struct sdl_info { SDL_Surface *screen; int width; int height; int depth; int pitch; - uint frequency; uint sample_rate; bool audio_active; bool inited;