Skip to content

Commit c8908cc

Browse files
committed
stick pico-sdk to 1.5.0
1 parent 4272160 commit c8908cc

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

Rakefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "fileutils"
22

33
MRUBY_CONFIG = "prk_firmware-cortex-m0plus"
4+
PICO_SDK_TAG = "1.5.0"
45

56
task :default => :all
67

@@ -48,8 +49,28 @@ task :cmake_production do
4849
sh "#{mruby_config} cmake -B build"
4950
end
5051

52+
task :check_pico_sdk => :check_pico_sdk_path do
53+
FileUtils.cd ENV["PICO_SDK_PATH"] do
54+
unless `git status --branch`.split("\n")[0].end_with?(PICO_SDK_TAG)
55+
raise <<~MSG
56+
pico-sdk #{PICO_SDK_TAG} is not checked out!\n
57+
Tips for dealing with:\n
58+
cd $PICO_SDK_PATH && git pull && git checkout #{PICO_SDK_TAG} && git submodule update --recursive\n
59+
MSG
60+
end
61+
end
62+
end
63+
64+
task :check_pico_sdk_path do
65+
unless ENV["PICO_SDK_PATH"]
66+
raise <<~MSG
67+
Environment variable `PICO_SDK_PATH` does not exist!
68+
MSG
69+
end
70+
end
71+
5172
desc "build without cmake preparation"
52-
task :build do
73+
task :build => :check_pico_sdk do
5374
sh "cmake --build build"
5475
end
5576

src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ send_hid_report()
339339
}
340340

341341
void
342-
tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint8_t len)
342+
tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint16_t len)
343343
{
344344
(void) instance;
345345
(void) len;

0 commit comments

Comments
 (0)