source: buchla-emu/emu/led.c@ 90d6373

Last change on this file since 90d6373 was 90d6373, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Properly display access width.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 * Copyright (C) 2017 The Contributors
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or (at
7 * your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * A copy of the GNU General Public License can be found in the file
15 * "gpl-v3.txt" in the top directory of this repository.
16 */
17
18#include <all.h>
19
20#define ver(...) { \
21 if (led_verbose) { \
22 SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
23 } \
24}
25
26bool led_verbose = false;
27
28void led_init(void)
29{
30 ver("led init");
31}
32
33void led_quit(void)
34{
35 ver("led quit");
36}
37
38void led_exec(void)
39{
40 ver("led exec");
41}
42
43uint32_t led_read(uint32_t off, int32_t sz)
44{
45 ver("led rd %u:%d", off, sz * 8);
46 return 0;
47}
48
49void led_write(uint32_t off, int32_t sz, uint32_t val)
50{
51 ver("led wr %u:%d 0x%0*x", off, sz * 8, sz * 2, val);
52}
Note: See TracBrowser for help on using the repository browser.