Skip to content

Commit

Permalink
More RPI frontend fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-jonsson committed Nov 1, 2024
1 parent 1d6c1b3 commit faeda2a
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 104 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
__pycache__

*.o
*.d
/front/rpi/*.img
/front/rpi/*.lst
/front/rpi/*.map
/front/rpi/*.elf

/obj
/bin
/.vscode
Expand Down
2 changes: 1 addition & 1 deletion front/rpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OBJS_VXT = $(VXTHOME)/cpu.o \
$(VXTHOME)/system.o \
$(VXTHOME)/uart.o

OBJS = main.o kernel.o $(OBJS_VXT)
OBJS = main.o kernel.o cga.o $(OBJS_VXT)

LIBS = $(CIRCLEHOME)/lib/usb/libusb.a \
$(CIRCLEHOME)/lib/input/libinput.a \
Expand Down
22 changes: 22 additions & 0 deletions front/rpi/cga.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) 2019-2024 Andreas T Jonsson <mail@andreasjonsson.se>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source
// distribution.

#include "../../modules/cga/cga.c"
30 changes: 30 additions & 0 deletions front/rpi/joystick.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) 2019-2024 Andreas T Jonsson <mail@andreasjonsson.se>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source
// distribution.

#include "../../modules/joystick/joystick.c"

bool joystick_push_event(struct vxt_peripheral *p, const struct frontend_joystick_event *ev) {
return push_event(p, ev);
}

struct vxt_peripheral *joystick_create(vxt_allocator *alloc, void *frontend, const char *args) {
return create(alloc, frontend, args);
}
Loading

0 comments on commit faeda2a

Please sign in to comment.