Skip to content

Instantly share code, notes, and snippets.

@981213
981213 / ch347.c
Last active February 18, 2023 07:02
CH347 SPI library implemented with libusb
// SPDX-License-Identifier: BSD-1-Clause
/*
* Copyright (C) 2022 Chuanhong Guo <[email protected]>
*
* CH347 SPI library using libusb. Protocol reverse-engineered from WCH linux library.
* FIXME: Every numbers used in the USB protocol should be little-endian.
*/
#include <ch347.h>
#include <stdio.h>