Skip to content

Instantly share code, notes, and snippets.

@SelvinPL
SelvinPL / example.c
Last active March 16, 2025 06:23
modified LUFA hid parser for simple use with tinyusb - gamepad example
/*
* The MIT License (MIT)
*
* Copyright (c) 2023 Selvin
*
*/
#include "ch32v20x.h" //include your board
#include "tusb.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct {
uint16_t *bitplane[6];
uint16_t *palette;
uint16_t modulo;
} amiga_t;
static const int width = 320;
static const int height = 200;
@MarsTechHAN
MarsTechHAN / bin2c.py
Last active April 1, 2025 12:04
Program Gowin from ESP32
import struct
import sys
if __name__ == '__main__':
fs = open(sys.argv[1], 'rb')
with open('fs.c', 'w+') as f:
print('const unsigned char fs_bitstream[] __attribute__((aligned(128))) ={', file=f)
counter = 0
while 1:
counter = counter + 1