Composite device with several WinUSB devices (see descriptor below). WinUSB installed as driver using MSFT descriptors.
Steps:
- Open device
aaaa2 |
DefinitionBlock ("gpio-expander.aml", "SSDT", 1, "Vendor", "Accel", 0x00000004) | |
{ | |
External (\_SB.PC00.I2C0, DeviceObj) | |
Scope (\_SB.PC00.I2C0) | |
{ | |
Device (PCF0) | |
{ | |
Name (_CID, "PRP0001") | |
Name (_DDN, "GPIO-Expander") | |
Name (_ADR, 0x0020) |
def compatibility_id(): | |
return msft.CompatibilityIdTriple( | |
descriptorIndex=4, | |
sectionsCount=3, | |
interfaceNumber0=0, | |
compatibleId0='WINUSB', | |
subCompatibleId0='', | |
interfaceNumber1=1, |
#include <cstdio> | |
#include <exception> | |
#include <memory> | |
#include <Windows.h> | |
#include "libusb.h" | |
#include "utils.hpp" | |
namespace libusb | |
{ | |
namespace details |
set(OPENCM3_ROOT ${opencm3_SOURCE_DIR}) | |
find_package(Python3) | |
set(IRQ_IN_FILE include/libopencm3/stm32/f7/irq.json) | |
add_custom_command( | |
OUTPUT ${OPENCM3_ROOT}/include/libopencm3/stm32/f7/nvic.h | |
COMMAND ${Python3_EXECUTABLE} ${OPENCM3_ROOT}/scripts/irq2nvic_h ./${IRQ_IN_FILE} | |
WORKING_DIRECTORY ${OPENCM3_ROOT} | |
DEPENDS ${OPENCM3_ROOT}/${IRQ_IN_FILE} | |
) |
#include "em_gpio.h" | |
#include "trace/arm.hpp" | |
#include "trace/efm.hpp" | |
namespace trace::efm | |
{ | |
void SetupClock() | |
{ | |
CMU_OscillatorEnable(cmuOsc_HFXO, true, true); | |
CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFXO); |
Composite device with several WinUSB devices (see descriptor below). WinUSB installed as driver using MSFT descriptors.
Steps:
# Run as `install(SCRIPT)` | |
execute_process( | |
COMMAND | |
conan install | |
-l @CMAKE_BINARY_DIR@/conan.${CMAKE_INSTALL_CONFIG_NAME}.lock | |
-g deploy | |
-g CMakeDeps | |
-if ${CMAKE_INSTALL_PREFIX}/packages | |
@CMAKE_SOURCE_DIR@/conanfile.txt |
MEMORY | |
{ | |
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 | |
ram (rwx) : ORIGIN = 0x20002000, LENGTH = 0x00004000 | |
} |
#include <cstdint> | |
#include "em_cmu.h" | |
#include "em_gpio.h" | |
#include "core_cm3.h" | |
//#include "efm32gg_etm.h" | |
static void SetupClock() | |
{ | |
CMU_OscillatorEnable(cmuOsc_HFXO, true, true); | |
CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFXO); |