all repos — mgba @ 327f1dfe47c1a756e455839e296410e0e9f1550d

mGBA Game Boy Advance Emulator

src/platform/python/sio.h (view raw)

 1/* Copyright (c) 2013-2017 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifdef M_CORE_GBA
 7
 8#include <mgba/gba/interface.h>
 9
10struct GBASIOPythonDriver {
11    struct GBASIODriver d;
12    void* pyobj;
13};
14
15struct GBASIODriver* GBASIOPythonDriverCreate(void* pyobj);
16struct GBASIODriver* GBASIOJOYPythonDriverCreate(void* pyobj);
17
18PYEXPORT bool _pyGBASIOPythonDriverInit(void* driver);
19PYEXPORT void _pyGBASIOPythonDriverDeinit(void* driver);
20PYEXPORT bool _pyGBASIOPythonDriverLoad(void* driver);
21PYEXPORT bool _pyGBASIOPythonDriverUnload(void* driver);
22PYEXPORT uint16_t _pyGBASIOPythonDriverWriteRegister(void* driver, uint32_t address, uint16_t value);
23
24#endif
25
26#ifdef M_CORE_GB
27
28#include <mgba/gb/interface.h>
29
30struct GBSIOPythonDriver {
31    struct GBSIODriver d;
32    void* pyobj;
33};
34
35struct GBSIODriver* GBSIOPythonDriverCreate(void* pyobj);
36
37PYEXPORT bool _pyGBSIOPythonDriverInit(void* driver);
38PYEXPORT void _pyGBSIOPythonDriverDeinit(void* driver);
39PYEXPORT void _pyGBSIOPythonDriverWriteSB(void* driver, uint8_t value);
40PYEXPORT uint8_t _pyGBSIOPythonDriverWriteSC(void* driver, uint8_t value);
41
42#endif