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

fix build with Arduino Core for Silicon Labs EFR32 Series 2 #1343

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

lyusupov
Copy link
Contributor

@lyusupov lyusupov commented Dec 11, 2024

The Core location

https://github.com/SiliconLabs/arduino

Log of the issue this PR is intended to fix

/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp: In member function 'virtual void ArduinoHal::pinMode(uint32_t, uint32_t)':
/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp:25:52: error: invalid conversion from 'uint32_t' {aka 'long unsigned int'} to 'PinMode' [-fpermissive]
   25 |   ::pinMode(pin, RADIOLIB_ARDUINOHAL_PIN_MODE_CAST mode);
      |                                                    ^~~~
      |                                                    |
      |                                                    uint32_t {aka long unsigned int}
In file included from /home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/api/Interrupts.h:8,
                 from /home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/api/ArduinoAPI.h:29,
                 from /home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/Arduino.h:30,
                 from /home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/../../BuildOpt.h:119,
                 from /home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/../../TypeDef.h:6,
                 from /home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.h:2,
                 from /home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp:1:
/home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/api/Common.h:96:44: note:   initializing argument 2 of 'void pinMode(pin_size_t, PinMode)'
   96 | void pinMode(pin_size_t pinNumber, PinMode pinMode);
      |                                    ~~~~~~~~^~~~~~~
/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp: In member function 'virtual void ArduinoHal::digitalWrite(uint32_t, uint32_t)':
/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp:32:59: error: invalid conversion from 'uint32_t' {aka 'long unsigned int'} to 'PinStatus' [-fpermissive]
   32 |   ::digitalWrite(pin, RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST value);
      |                                                           ^~~~~
      |                                                           |
      |                                                           uint32_t {aka long unsigned int}
/home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/api/Common.h:97:51: note:   initializing argument 2 of 'void digitalWrite(pin_size_t, PinStatus)'
   97 | void digitalWrite(pin_size_t pinNumber, PinStatus status);
      |                                         ~~~~~~~~~~^~~~~~
/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp: In member function 'virtual void ArduinoHal::attachInterrupt(uint32_t, void (*)(), uint32_t)':
/home/codespace/Arduino/libraries/RadioLib/src/hal/Arduino/ArduinoHal.cpp:52:89: error: invalid conversion from 'uint32_t' {aka 'long unsigned int'} to 'PinStatus' [-fpermissive]
   52 |   ::attachInterrupt(interruptNum, interruptCb,  RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST mode);
      |                                                                                         ^~~~
      |                                                                                         |
      |                                                                                         uint32_t {aka long unsigned int}
/home/codespace/.arduino15/packages/SiliconLabs/hardware/silabs/2.2.0/cores/silabs/api/Common.h:113:82: note:   initializing argument 3 of 'void attachInterrupt(pin_size_t, voidFuncPtr, PinStatus)'
  113 | void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode);
      |                                                                        ~~~~~~~~~~^~~~

@jgromes jgromes merged commit 933981e into jgromes:master Dec 14, 2024
28 checks passed
@jgromes
Copy link
Owner

jgromes commented Dec 14, 2024

Looks good - merged, thank you! Running the build locally on my machine it's pretty fast, so I will add this to the CI and readme as officially supported platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants