File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 11require "fileutils"
22
33MRUBY_CONFIG = "prk_firmware-cortex-m0plus"
4+ PICO_SDK_TAG = "1.5.0"
45
56task :default => :all
67
@@ -48,8 +49,28 @@ task :cmake_production do
4849 sh "#{ mruby_config } cmake -B build"
4950end
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+
5172desc "build without cmake preparation"
52- task :build do
73+ task :build => :check_pico_sdk do
5374 sh "cmake --build build"
5475end
5576
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ send_hid_report()
339339}
340340
341341void
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 ;
You can’t perform that action at this time.
0 commit comments