• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Question about "LV_UNUSED ()"

Q&A Forum › Category: Other › Question about "LV_UNUSED ()"
0 Vote Up Vote Down
Fernando Taddei asked 3 weeks ago

I read about this macro in the docs. It is used to avoid compiler warnings on unused objects in this case. In the example on page 115 of this tutorial about LVGL, it is used with “toggle_switch” as an argument, but this object is used in the very next line of code, which leads me to think that I have not understood well the purpose of this LV_UNUSED() macro. Would you please clarify it? Thanks

Question Tags: LVGL
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

Hi.
You’re right about your assumption.
I think that is not needed in that case because those variables are being used.
I think we may have copied it throughout all our examples, when we started our code based on some library examples.
 
Regards,
Sara
 
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.