Skip to content

Commit

Permalink
rgbled_pwm: Change linker so we can make board specific override for …
Browse files Browse the repository at this point in the history
…led functionality
  • Loading branch information
PetervdPerk-NXP committed Jun 30, 2024
1 parent db0b98c commit 51027d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platforms/nuttx/src/px4/nxp/imxrt/led_pwm/led_pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@
#include <chip.h>
#include "hardware/imxrt_tmr.h"

#ifndef BOARD_HAS_CUSTOM_LED_PWM
int led_pwm_servo_set(unsigned channel, uint8_t cvalue)
{
return 0;
}
int led_pwm_servo_init(void)
{
return 0;

}
#endif

#if 0 && defined(BOARD_HAS_LED_PWM) || defined(BOARD_HAS_UI_LED_PWM)

Expand Down
5 changes: 5 additions & 0 deletions src/drivers/lights/rgbled_pwm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ px4_add_module(
arch_io_pins
arch_led_pwm
)

target_link_libraries(drivers__rgbled_pwm
PRIVATE
drivers_board # Allows board to override PWM functions
)

0 comments on commit 51027d1

Please sign in to comment.