gokul/macro-six-usbc

A six-key macro keyboard PCB paired with a separate physical enclosure.

Version
0.1.16
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone gokul/macro-six-usbc  # download the package files into ./macro-six-usbc
tsci add gokul/macro-six-usbc    # add it to your project as @tsci/gokul.macro-six-usbc

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

firmware/Descriptors.h

#pragma once
#include <LUFA/Drivers/USB/USB.h>
#define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
#define CONSUMER_EPADDR (ENDPOINT_DIR_IN | 2)
#define KEYBOARD_EPSIZE 8
#define CONSUMER_EPSIZE 8
typedef struct {
 USB_Descriptor_Configuration_Header_t Config;
 USB_Descriptor_Interface_t KeyboardInterface;
 USB_HID_Descriptor_HID_t KeyboardHID;
 USB_Descriptor_Endpoint_t KeyboardEndpoint;
 USB_Descriptor_Interface_t ConsumerInterface;
 USB_HID_Descriptor_HID_t ConsumerHID;
 USB_Descriptor_Endpoint_t ConsumerEndpoint;
} MacroConfiguration;
uint16_t CALLBACK_USB_GetDescriptor(uint16_t wValue, uint16_t wIndex, const void **DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);