From 292ff40e4b5f0bb2058766d4dcf34fa629d22047 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 26 Aug 2012 01:10:52 +0200 Subject: Use descriptor builders. --- laks | 2 +- main.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/laks b/laks index f1713a2..0661001 160000 --- a/laks +++ b/laks @@ -1 +1 @@ -Subproject commit f1713a25598e82e9d00a8e4c40044f590cc2c958 +Subproject commit 066100177770944a376e3a01cf4685ff9d2f562f diff --git a/main.cpp b/main.cpp index b57662b..c35ad7e 100644 --- a/main.cpp +++ b/main.cpp @@ -33,11 +33,11 @@ static Pin& i2c_sda = PB11; static Pin& cs_pressure = PB4; static Pin& cs_gyro = PB5; -auto dev_desc = Device_desc {18, 1, 0x200, 0, 0, 0, 64, 0x1234, 0x5678, 0, 0, 0, 0, 1}; -auto conf_desc = pack( - Configuration_desc {9, 2, 25, 1, 1, 0, 0xc0, 0}, - Interface_desc {9, 4, 0, 0, 1, 0xff, 0x00, 0x00, 0}, - Endpoint_desc {7, 5, 0x81, 0x02, 64, 0} +auto dev_desc = device_desc(0x200, 0, 0, 0, 64, 0x1234, 0x5678, 0, 0, 0, 0, 1); +auto conf_desc = configuration_desc(3, 1, 0, 0xc0, 0, + interface_desc(0, 0, 1, 0xff, 0x00, 0x00, 0, + endpoint_desc(0x81, 0x02, 64, 0) + ) ); desc_t dev_desc_p = {sizeof(dev_desc), (void*)&dev_desc}; -- cgit v1.2.3