Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename usb.capdata to usb.data_fragment. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions usb_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ do
local usb_setup_bRequest = Field.new("usb.setup.bRequest")
local usb_setup_wValue = Field.new("usb.setup.wValue")
local usb_setup_wIndex = Field.new("usb.setup.wIndex")
local usb_capdata = Field.new("usb.capdata")
local usb_dataFragment = Field.new("usb.data_fragment")

local usb_setup_wLength = Field.new("usb.setup.wLength")

Expand All @@ -46,10 +46,10 @@ do
code_string = code_string .. tostring( usb_setup_bRequest() ) .. ", "
code_string = code_string .. tostring( usb_setup_wValue() ) .. ", "
code_string = code_string .. tostring( usb_setup_wIndex() ) .. ", "
code_string = code_string .. to_c_byte_array( usb_capdata() ) .. ", "
code_string = code_string .. #usb_capdata() .. ", "
code_string = code_string .. to_c_byte_array( usb_dataFragment() ) .. ", "
code_string = code_string .. #usb_dataFragment() .. ", "
code_string = code_string .. "1000);"
code_string = code_string .. "\n if (ret != " .. #usb_capdata() .. ") {\n printf(\"strl out: ret == %i\\n\", ret);\n }\n"
code_string = code_string .. "\n if (ret != " .. #usb_dataFragment() .. ") {\n printf(\"strl out: ret == %i\\n\", ret);\n }\n"

print(code_string)

Expand Down